Changeset 30534 in webkit for trunk/JavaScriptCore/kjs/function.cpp
- Timestamp:
- Feb 23, 2008, 9:01:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/function.cpp
r30040 r30534 149 149 } 150 150 151 void FunctionImp::put(ExecState* exec, const Identifier& propertyName, JSValue* value , int attr)151 void FunctionImp::put(ExecState* exec, const Identifier& propertyName, JSValue* value) 152 152 { 153 153 if (propertyName == exec->propertyNames().arguments || propertyName == exec->propertyNames().length) 154 154 return; 155 InternalFunctionImp::put(exec, propertyName, value , attr);155 InternalFunctionImp::put(exec, propertyName, value); 156 156 } 157 157 … … 321 321 } 322 322 323 void Arguments::put(ExecState* exec, const Identifier& propertyName, JSValue* value, int attr) 324 { 325 if (indexToNameMap.isMapped(propertyName)) { 326 _activationObject->put(exec, indexToNameMap[propertyName], value, attr); 327 } else { 328 JSObject::put(exec, propertyName, value, attr); 329 } 323 void Arguments::put(ExecState* exec, const Identifier& propertyName, JSValue* value) 324 { 325 if (indexToNameMap.isMapped(propertyName)) 326 _activationObject->put(exec, indexToNameMap[propertyName], value); 327 else 328 JSObject::put(exec, propertyName, value); 330 329 } 331 330 … … 418 417 } 419 418 420 void ActivationImp::put(ExecState*, const Identifier& propertyName, JSValue* value, int attr) 421 { 422 // If any bits other than DontDelete are set, then we bypass the read-only check. 423 bool checkReadOnly = !(attr & ~DontDelete); 424 if (symbolTablePut(propertyName, value, checkReadOnly)) 419 void ActivationImp::put(ExecState*, const Identifier& propertyName, JSValue* value) 420 { 421 if (symbolTablePut(propertyName, value)) 425 422 return; 426 423 … … 429 426 // expose in the activation object. 430 427 ASSERT(!_prop.hasGetterSetterProperties()); 431 _prop.put(propertyName, value, attr, checkReadOnly); 428 _prop.put(propertyName, value, 0, true); 429 } 430 431 void ActivationImp::initializeVariable(ExecState*, const Identifier& propertyName, JSValue* value, unsigned attributes) 432 { 433 if (symbolTableInitializeVariable(propertyName, value, attributes)) 434 return; 435 436 // We don't call through to JSObject because __proto__ and getter/setter 437 // properties are non-standard extensions that other implementations do not 438 // expose in the activation object. 439 ASSERT(!_prop.hasGetterSetterProperties()); 440 _prop.put(propertyName, value, attributes, true); 432 441 } 433 442
Note:
See TracChangeset
for help on using the changeset viewer.