Changeset 172932 in webkit for trunk/Source/JavaScriptCore


Ignore:
Timestamp:
Aug 25, 2014, 12:32:40 PM (11 years ago)
Author:
[email protected]
Message:

After r172867 another crash in in js/dom/line-column-numbers.html
https://bugs.webkit.org/show_bug.cgi?id=136192

Reviewed by Geoffrey Garen.

In lookupExceptionHandlerFromCallerFrame(), We need to use the caller's CallFrame
and VMEntryFrame when calling genericUnwind(). NativeCallFrameTracerWithRestore()
does that for us.

In general, NativeCallFrameTracerWithRestore(), restores the values because we may
do more processing that requires the current callFrame and vmEntryFrame before we
get to the catch handler where we change these to the catch values. In this
particular case, that restoration isn't currently needed, but we add complexity
and possible future confusion if we create another NativeCallFrameTracerXXX()
version that doesn't restore the values.

  • jit/JITOperations.cpp:

(JSC::lookupExceptionHandlerFromCallerFrame): Changed NativeCallFrameTracer() to
NativeCallFrameTracerWithRestore() so that VM::topVMEntryFrame will be updated
before calling genericUnwind().

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r172930 r172932  
     12014-08-22  Michael Saboff  <[email protected]>
     2
     3        After r172867 another crash in in js/dom/line-column-numbers.html
     4        https://bugs.webkit.org/show_bug.cgi?id=136192
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        In lookupExceptionHandlerFromCallerFrame(), We need to use the caller's CallFrame
     9        and VMEntryFrame when calling genericUnwind().  NativeCallFrameTracerWithRestore()
     10        does that for us.
     11
     12        In general, NativeCallFrameTracerWithRestore(), restores the values because we may
     13        do more processing that requires the current callFrame and vmEntryFrame before we
     14        get to the catch handler where we change these to the catch values.  In this
     15        particular case, that restoration isn't currently needed, but we add complexity
     16        and possible future confusion if we create another NativeCallFrameTracerXXX()
     17        version that doesn't restore the values.
     18
     19        * jit/JITOperations.cpp:
     20        (JSC::lookupExceptionHandlerFromCallerFrame): Changed NativeCallFrameTracer() to
     21        NativeCallFrameTracerWithRestore() so that VM::topVMEntryFrame will be updated
     22        before calling genericUnwind().
     23
    1242014-08-24  Brian J. Burg  <[email protected]>
    225
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r172867 r172932  
    18451845    ASSERT(callerFrame);
    18461846
    1847     NativeCallFrameTracer tracer(vm, callerFrame);
     1847    NativeCallFrameTracerWithRestore tracer(vm, vmEntryFrame, callerFrame);
    18481848
    18491849    JSValue exceptionValue = vm->exception();
Note: See TracChangeset for help on using the changeset viewer.