Ignore:
Timestamp:
Dec 30, 2008, 10:49:34 PM (16 years ago)
Author:
[email protected]
Message:

<https://bugs.webkit.org/show_bug.cgi?id=23049> [jsfunfuzz] With blocks do not correctly protect their scope object
<rdar://problem/6469742> Crash in JSC::TypeInfo::hasStandardGetOwnPropertySlot() running jsfunfuzz

Reviewed by Darin Adler

The problem that caused this was that with nodes were not correctly protecting
the final object that was placed in the scope chain. We correct this by forcing
the use of a temporary register (which stops us relying on a local register
protecting the scope) and changing the behaviour of op_push_scope so that it
will store the final scope object.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/interpreter/Interpreter.cpp

    r39440 r39524  
    36403640
    36413641           Converts register scope to object, and pushes it onto the top
    3642            of the current scope chain.
     3642           of the current scope chain.  The contents of the register scope
     3643           are replaced by the result of toObject conversion of the scope.
    36433644        */
    36443645        int scope = (++vPC)->u.operand;
     
    36473648        CHECK_FOR_EXCEPTION();
    36483649
     3650        callFrame[scope] = o;
    36493651        callFrame->setScopeChain(callFrame->scopeChain()->push(o));
    36503652
     
    57395741}
    57405742
    5741 void Interpreter::cti_op_push_scope(STUB_ARGS)
     5743JSObject* Interpreter::cti_op_push_scope(STUB_ARGS)
    57425744{
    57435745    BEGIN_STUB_FUNCTION();
    57445746
    57455747    JSObject* o = ARG_src1->toObject(ARG_callFrame);
    5746     CHECK_FOR_EXCEPTION_VOID();
     5748    CHECK_FOR_EXCEPTION();
    57475749    ARG_callFrame->setScopeChain(ARG_callFrame->scopeChain()->push(o));
     5750    return o;
    57485751}
    57495752
Note: See TracChangeset for help on using the changeset viewer.