Changeset 28545 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Dec 7, 2007, 4:23:31 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Sam Weinig.


Fixed crash seen running layout tests.


Reverted a change I made earlier today. Added a comment to try to
discourage myself from making this mistake a third time.

  • kjs/function.cpp: (KJS::ActivationImp::mark):
  • kjs/function.h: (KJS::ActivationImp::ActivationImpData::ActivationImpData):
Location:
trunk/JavaScriptCore/kjs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function.cpp

    r28540 r28545  
    421421{
    422422    JSVariableObject::mark();
     423   
     424    if (!d()->function->marked())
     425        d()->function->mark();
    423426
    424427    if (d()->argumentsObject && !d()->argumentsObject->marked())
  • trunk/JavaScriptCore/kjs/function.h

    r28529 r28545  
    147147            : JSVariableObjectData(&e->function()->body->symbolTable())
    148148            , exec(e)
     149            , function(e->function()) // Store this pointer for marking, to keep our symbol table / scope alive after exec has gone out of scope.
    149150            , argumentsObject(0)
    150151        {
     
    152153
    153154        ExecState* exec;
     155        FunctionImp* function;
    154156        Arguments* argumentsObject;
    155157    };
Note: See TracChangeset for help on using the changeset viewer.