Changeset 155657 in webkit for trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
- Timestamp:
- Sep 12, 2013, 4:07:36 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
r154459 r155657 111 111 JSActivation* thisObject = jsCast<JSActivation*>(object); 112 112 113 if (mode == IncludeDontEnumProperties && !thisObject->isTornOff()) 113 CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(thisObject->m_registers)); 114 if (mode == IncludeDontEnumProperties && !thisObject->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval())) 114 115 propertyNames.add(exec->propertyNames().arguments); 115 116 … … 157 158 if (propertyName == exec->propertyNames().arguments) { 158 159 // Defend against the inspector asking for the arguments object after it has been optimized out. 159 if (!thisObject->isTornOff()) { 160 slot.setCustom(thisObject, DontEnum, thisObject->getArgumentsGetter()); 160 CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(thisObject->m_registers)); 161 if (!thisObject->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval())) { 162 slot.setCustom(thisObject, DontEnum, argumentsGetter); 161 163 return true; 162 164 } … … 212 214 { 213 215 JSActivation* activation = jsCast<JSActivation*>(slotBase); 214 if (activation->isTornOff()) 216 CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->m_registers)); 217 ASSERT(!activation->isTornOff() && (callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval())); 218 if (activation->isTornOff() || !(callFrame->codeBlock()->usesArguments() || callFrame->codeBlock()->usesEval())) 215 219 return jsUndefined(); 216 220 217 CallFrame* callFrame = CallFrame::create(reinterpret_cast<Register*>(activation->m_registers));218 221 int argumentsRegister = callFrame->codeBlock()->argumentsRegister(); 219 222 if (JSValue arguments = callFrame->uncheckedR(argumentsRegister).jsValue()) … … 229 232 } 230 233 231 // These two functions serve the purpose of isolating the common case from a232 // PIC branch.233 234 PropertySlot::GetValueFunc JSActivation::getArgumentsGetter()235 {236 return argumentsGetter;237 }238 239 234 } // namespace JSC
Note:
See TracChangeset
for help on using the changeset viewer.