Changeset 156521 in webkit for trunk/Source/JavaScriptCore/runtime/JSObject.cpp
- Timestamp:
- Sep 26, 2013, 5:39:00 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r155143 r156521 1633 1633 void JSObject::putIndexedDescriptor(ExecState* exec, SparseArrayEntry* entryInMap, const PropertyDescriptor& descriptor, PropertyDescriptor& oldDescriptor) 1634 1634 { 1635 VM& vm = exec->vm(); 1636 1635 1637 if (descriptor.isDataDescriptor()) { 1636 1638 if (descriptor.value()) 1637 entryInMap->set( exec->vm(), this, descriptor.value());1639 entryInMap->set(vm, this, descriptor.value()); 1638 1640 else if (oldDescriptor.isAccessorDescriptor()) 1639 entryInMap->set( exec->vm(), this, jsUndefined());1641 entryInMap->set(vm, this, jsUndefined()); 1640 1642 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~Accessor; 1641 1643 return; … … 1654 1656 setter = oldDescriptor.setterObject(); 1655 1657 1656 GetterSetter* accessor = GetterSetter::create( exec);1658 GetterSetter* accessor = GetterSetter::create(vm); 1657 1659 if (getter) 1658 accessor->setGetter( exec->vm(), getter);1660 accessor->setGetter(vm, getter); 1659 1661 if (setter) 1660 accessor->setSetter( exec->vm(), setter);1661 1662 entryInMap->set( exec->vm(), this, accessor);1662 accessor->setSetter(vm, setter); 1663 1664 entryInMap->set(vm, this, accessor); 1663 1665 entryInMap->attributes = descriptor.attributesOverridingCurrent(oldDescriptor) & ~ReadOnly; 1664 1666 return; … … 2397 2399 static bool putDescriptor(ExecState* exec, JSObject* target, PropertyName propertyName, const PropertyDescriptor& descriptor, unsigned attributes, const PropertyDescriptor& oldDescriptor) 2398 2400 { 2401 VM& vm = exec->vm(); 2399 2402 if (descriptor.isGenericDescriptor() || descriptor.isDataDescriptor()) { 2400 2403 if (descriptor.isGenericDescriptor() && oldDescriptor.isAccessorDescriptor()) { 2401 GetterSetter* accessor = GetterSetter::create( exec);2404 GetterSetter* accessor = GetterSetter::create(vm); 2402 2405 if (oldDescriptor.getterPresent()) 2403 accessor->setGetter( exec->vm(), oldDescriptor.getterObject());2406 accessor->setGetter(vm, oldDescriptor.getterObject()); 2404 2407 if (oldDescriptor.setterPresent()) 2405 accessor->setSetter( exec->vm(), oldDescriptor.setterObject());2408 accessor->setSetter(vm, oldDescriptor.setterObject()); 2406 2409 target->putDirectAccessor(exec, propertyName, accessor, attributes | Accessor); 2407 2410 return true; … … 2412 2415 else if (oldDescriptor.value()) 2413 2416 newValue = oldDescriptor.value(); 2414 target->putDirect( exec->vm(), propertyName, newValue, attributes & ~Accessor);2417 target->putDirect(vm, propertyName, newValue, attributes & ~Accessor); 2415 2418 if (attributes & ReadOnly) 2416 2419 target->structure()->setContainsReadOnlyProperties(); … … 2418 2421 } 2419 2422 attributes &= ~ReadOnly; 2420 GetterSetter* accessor = GetterSetter::create( exec);2423 GetterSetter* accessor = GetterSetter::create(vm); 2421 2424 2422 2425 if (descriptor.getterPresent()) 2423 accessor->setGetter( exec->vm(), descriptor.getterObject());2426 accessor->setGetter(vm, descriptor.getterObject()); 2424 2427 else if (oldDescriptor.getterPresent()) 2425 accessor->setGetter( exec->vm(), oldDescriptor.getterObject());2428 accessor->setGetter(vm, oldDescriptor.getterObject()); 2426 2429 if (descriptor.setterPresent()) 2427 accessor->setSetter( exec->vm(), descriptor.setterObject());2430 accessor->setSetter(vm, descriptor.setterObject()); 2428 2431 else if (oldDescriptor.setterPresent()) 2429 accessor->setSetter( exec->vm(), oldDescriptor.setterObject());2432 accessor->setSetter(vm, oldDescriptor.setterObject()); 2430 2433 2431 2434 target->putDirectAccessor(exec, propertyName, accessor, attributes | Accessor);
Note:
See TracChangeset
for help on using the changeset viewer.