Changeset 20835 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Apr 10, 2007, 3:27:26 PM (18 years ago)
Author:
ggaren
Message:

Reviewed by John Sullivan, Darin Adler.


Fixed <rdar://problem/5121899> JavaScript garbage collection leads to
later crash under Rosetta (should abort or leak instead?)


Log an error message and crash if the kernel reports failure during GC.
We decided to do this instead of just leaking because we don't want people
to get the mistaken impression that running in Rosetta is a supported
configurtion.


The CRASH macro will also hook into CrashReporter, which will tell us if
many (any?) users run into this issue.

  • kjs/collector.cpp: (KJS::getPlatformThreadRegisters):
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r20775 r20835  
     12007-04-10  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by John Sullivan, Darin Adler.
     4       
     5        Fixed <rdar://problem/5121899> JavaScript garbage collection leads to
     6        later crash under Rosetta (should abort or leak instead?)
     7       
     8        Log an error message and crash if the kernel reports failure during GC.
     9        We decided to do this instead of just leaking because we don't want people
     10        to get the mistaken impression that running in Rosetta is a supported
     11        configurtion.
     12       
     13        The CRASH macro will also hook into CrashReporter, which will tell us if
     14        many (any?) users run into this issue.
     15
     16        * kjs/collector.cpp:
     17        (KJS::getPlatformThreadRegisters):
     18
    1192007-04-06  Krzysztof Kowalczyk  <[email protected]>
    220
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r20476 r20835  
    13901390                        isa = PBXProject;
    13911391                        buildConfigurationList = 149C277108902AFE008A9EFC /* Build configuration list for PBXProject "JavaScriptCore" */;
     1392                        compatibilityVersion = "Xcode 2.4";
    13921393                        hasScannedForEncodings = 1;
    13931394                        mainGroup = 0867D691FE84028FC02AAC07 /* JavaScriptCore */;
     
    13951396                        projectDirPath = "";
    13961397                        projectRoot = "";
     1398                        shouldCheckCompatibility = 1;
    13971399                        targets = (
    13981400                                932F5BE30822A1C700736975 /* All */,
  • trunk/JavaScriptCore/kjs/collector.cpp

    r20733 r20835  
    499499#endif
    500500
    501   thread_get_state(platformThread, flavor, (thread_state_t)&regs, &user_count);
     501  kern_return_t result = thread_get_state(platformThread, flavor, (thread_state_t)&regs, &user_count);
     502  if (result != KERN_SUCCESS) {
     503    LOG_ERROR("JavaScript garbage collection failed because thread_get_state returned an error (%d). This is probably the result of running inside Rosetta, which is not supported.", result);
     504    CRASH();
     505  }
    502506  return user_count * sizeof(usword_t);
    503507// end PLATFORM(DARWIN)
Note: See TracChangeset for help on using the changeset viewer.