| Differences between
and this patch
- Source/JavaScriptCore/ChangeLog +15 lines
Lines 1-3 Source/JavaScriptCore/ChangeLog_sec1
1
2011-08-25  Juan C. Montemayor  <jmont@apple.com>
2
3
        Update topCallFrame when calling host functions in the JIT
4
        https://bugs.webkit.org/show_bug.cgi?id=67010
5
6
        Reviewed by NOBODY (OOPS!).
7
        
8
        The topCallFrame is not being updated when a host function is
9
        called by the JIT. This causes problems when trying to create a
10
        stack trace (https://bugs.webkit.org/show_bug.cgi?id=66994).
11
12
        * jit/JITOpcodes.cpp:
13
        (JSC::JIT::privateCompileCTIMachineTrampolines):
14
        (JSC::JIT::privateCompileCTINativeCall):
15
1
2011-08-24  Juan C. Montemayor  <jmont@apple.com>
16
2011-08-24  Juan C. Montemayor  <jmont@apple.com>
2
17
3
        Keep track of topCallFrame for Stack traces
18
        Keep track of topCallFrame for Stack traces
- Source/JavaScriptCore/jit/JITOpcodes.cpp +2 lines
Lines 140-145 void JIT::privateCompileCTIMachineTrampo Source/JavaScriptCore/jit/JITOpcodes.cpp_sec1
140
    move(TrustedImmPtr(&globalData->exceptionLocation), regT2);
140
    move(TrustedImmPtr(&globalData->exceptionLocation), regT2);
141
    storePtr(regT1, regT2);
141
    storePtr(regT1, regT2);
142
    poke(callFrameRegister, 1 + OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
142
    poke(callFrameRegister, 1 + OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
143
    // Fixme: Should TopCallFrame also be uploaded at this location?
143
    poke(TrustedImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()));
144
    poke(TrustedImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()));
144
    ret();
145
    ret();
145
146
Lines 280-285 JIT::Label JIT::privateCompileCTINativeC Source/JavaScriptCore/jit/JITOpcodes.cpp_sec2
280
    storePtr(regT1, regT2);
281
    storePtr(regT1, regT2);
281
    poke(callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
282
    poke(callFrameRegister, OBJECT_OFFSETOF(struct JITStackFrame, callFrame) / sizeof(void*));
282
283
284
    storePtr(callFrameRegister, &m_globalData->topCallFrame);
283
    // Set the return address.
285
    // Set the return address.
284
    move(TrustedImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()), regT1);
286
    move(TrustedImmPtr(FunctionPtr(ctiVMThrowTrampoline).value()), regT1);
285
    restoreReturnAddressBeforeReturn(regT1);
287
    restoreReturnAddressBeforeReturn(regT1);

Return to Bug 67010