- JSValue activation;
- if (codeBlock->codeType() == FunctionCode && codeBlock->needsActivation()) {
-#if ENABLE(DFG_JIT)
- RELEASE_ASSERT(!visitor->isInlinedFrame());
-#endif
- activation = callFrame->uncheckedActivation();
- // Protect against the activation not being created, or the variable still being
- // initialized to Undefined inside op_enter.
- if (activation && activation.isCell()) {
- JSActivation* activationObject = jsCast<JSActivation*>(activation);
- // Protect against throwing exceptions after tear-off.
- if (!activationObject->isTornOff())
- activationObject->tearOff(*scope->vm());
- }
- }
-
- if (codeBlock->codeType() == FunctionCode && codeBlock->usesArguments()) {
- if (Arguments* arguments = visitor->existingArguments()) {
- if (activation && activation.isCell())
- arguments->didTearOffActivation(callFrame, jsCast<JSActivation*>(activation));
-#if ENABLE(DFG_JIT)
- else if (visitor->isInlinedFrame())
- arguments->tearOff(callFrame, visitor->inlineCallFrame());
-#endif
- else
- arguments->tearOff(callFrame);
- }
- }
-
- CallFrame* callerFrame = callFrame->callerFrame();
- return !callerFrame->isVMEntrySentinel();