Ignore:
Timestamp:
Dec 10, 2008, 10:27:36 PM (16 years ago)
Author:
[email protected]
Message:

2008-12-10 Cameron Zwarich <[email protected]>

Reviewed by Oliver Hunt.

Bug 22734: Debugger crashes when stepping into a function call in a return statement
<https://bugs.webkit.org/show_bug.cgi?id=22734>
<rdar://problem/6426796>

  • bytecompiler/BytecodeGenerator.cpp: (JSC::BytecodeGenerator::BytecodeGenerator): The DebuggerCallFrame uses the 'this' value stored in a callFrame, so op_convert_this should be emitted at the beginning of a function body when generating bytecode with debug hooks.
  • debugger/DebuggerCallFrame.cpp: (JSC::DebuggerCallFrame::thisObject): The assertion inherent in the call to asObject() here is valid, because any 'this' value should have been converted to a JSObject*.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r39157 r39198  
    332332    ++m_codeBlock->m_numParameters;
    333333
    334     if (functionBody->usesThis()) {
     334    if (functionBody->usesThis() || m_shouldEmitDebugHooks) {
    335335        emitOpcode(op_convert_this);
    336336        instructions().append(m_thisRegister.index());
Note: See TracChangeset for help on using the changeset viewer.