diff --git a/JavaScriptCore/kjs/function.cpp b/JavaScriptCore/kjs/function.cpp index a9fef6e..b31ac88 100644 --- a/JavaScriptCore/kjs/function.cpp +++ b/JavaScriptCore/kjs/function.cpp @@ -86,7 +86,10 @@ JSValue* FunctionImp::callAsFunction(ExecState* exec, JSObject* thisObj, const L RegisterFileStack* stack = &exec->dynamicGlobalObject()->registerFileStack(); RegisterFile* current = stack->current(); if (!current->safeForReentry()) { - stack->pushFunctionRegisterFile(); + RegisterFile* file = stack->pushFunctionRegisterFile(); + ASSERT(file == stack->current()); + ASSERT(file->safeForReentry()); + ASSERT(stack->current()->safeForReentry()); JSValue* result = machine().execute(body.get(), exec, this, thisObj, args, stack, _scope.node(), &exception); stack->popFunctionRegisterFile(); exec->setException(exception);