Changeset 96992 in webkit for trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
- Timestamp:
- Oct 7, 2011, 5:06:07 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSFunction.cpp
r96346 r96992 302 302 void JSFunction::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 303 303 { 304 if (isHostFunction()) { 305 Base::put(exec, propertyName, value, slot); 304 put(this, exec, propertyName, value, slot); 305 } 306 307 void JSFunction::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 308 { 309 JSFunction* thisObject = static_cast<JSFunction*>(cell); 310 if (thisObject->isHostFunction()) { 311 Base::put(thisObject, exec, propertyName, value, slot); 306 312 return; 307 313 } … … 310 316 // following the rules set out in ECMA-262 8.12.9. 311 317 PropertySlot slot; 312 getOwnPropertySlot(exec, propertyName, slot);313 } 314 if ( jsExecutable()->isStrictMode()) {318 thisObject->getOwnPropertySlot(exec, propertyName, slot); 319 } 320 if (thisObject->jsExecutable()->isStrictMode()) { 315 321 if (propertyName == exec->propertyNames().arguments) { 316 322 throwTypeError(exec, StrictModeArgumentsAccessError); … … 324 330 if (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().length) 325 331 return; 326 Base::put( exec, propertyName, value, slot);332 Base::put(thisObject, exec, propertyName, value, slot); 327 333 } 328 334
Note:
See TracChangeset
for help on using the changeset viewer.