Changeset 171213 in webkit for trunk/Source/JavaScriptCore/interpreter
- Timestamp:
- Jul 17, 2014, 9:34:16 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore/interpreter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r170147 r171213 458 458 #endif 459 459 activation = callFrame->uncheckedActivation(); 460 if (activation) 461 jsCast<JSActivation*>(activation)->tearOff(*scope->vm()); 460 // Protect against the activation not being created, or the variable still being 461 // initialized to Undefined inside op_enter. 462 if (activation && activation.isCell()) { 463 JSActivation* activationObject = jsCast<JSActivation*>(activation); 464 // Protect against throwing exceptions after tear-off. 465 if (!activationObject->isTornOff()) 466 activationObject->tearOff(*scope->vm()); 467 } 462 468 } 463 469 464 470 if (codeBlock->codeType() == FunctionCode && codeBlock->usesArguments()) { 465 471 if (Arguments* arguments = visitor->existingArguments()) { 466 if (activation )472 if (activation && activation.isCell()) 467 473 arguments->didTearOffActivation(callFrame, jsCast<JSActivation*>(activation)); 468 474 #if ENABLE(DFG_JIT) -
trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp
r164032 r171213 279 279 280 280 JSValue result = callFrame()->r(unmodifiedArgumentsRegister(reg).offset()).jsValue(); 281 if (!result )281 if (!result || !result.isCell()) // Protect against Undefined in case we throw in op_enter. 282 282 return 0; 283 283 return jsCast<Arguments*>(result);
Note:
See TracChangeset
for help on using the changeset viewer.