Changeset 43976 in webkit for trunk/JavaScriptCore/bytecompiler


Ignore:
Timestamp:
May 21, 2009, 12:57:26 PM (16 years ago)
Author:
[email protected]
Message:

Fix <https://bugs.webkit.org/show_bug.cgi?id=25917> / <rdar://problem/6910066>.
Bug 25917: REGRESSION (r43559?): Javascript debugger crashes when pausing page

Reviewed by Oliver Hunt.

The debugger currently retrieves the arguments object from an activation rather than pulling
it from a call frame. This is unreliable to due to the recent optimization to lazily create
the arguments object. In the long-term it should stop doing that (<rdar://problem/6911886>),
but for now we force eager creation of the arguments object when debugging.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

File:
1 edited

Legend:

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

    r43661 r43976  
    333333        emitOpcode(op_enter);
    334334
    335      if (usesArguments)
     335     if (usesArguments) {
    336336        emitOpcode(op_init_arguments);
     337
     338        // The debugger currently retrieves the arguments object from an activation rather than pulling
     339        // it from a call frame.  In the long-term it should stop doing that (<rdar://problem/6911886>),
     340        // but for now we force eager creation of the arguments object when debugging.
     341        if (m_shouldEmitDebugHooks)
     342            emitOpcode(op_create_arguments);
     343    }
    337344
    338345    const DeclarationStacks::FunctionStack& functionStack = functionBody->functionStack();
Note: See TracChangeset for help on using the changeset viewer.