Changeset 169703 in webkit for trunk/Source/JavaScriptCore/runtime/JSObject.cpp
- Timestamp:
- Jun 9, 2014, 11:53:32 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r168631 r169703 29 29 #include "CopyVisitor.h" 30 30 #include "CopyVisitorInlines.h" 31 #include "CustomGetterSetter.h" 31 32 #include "DatePrototype.h" 32 33 #include "ErrorConstructor.h" … … 388 389 slot.setCacheableSetter(obj, offset); 389 390 return; 390 } else 391 ASSERT(!(attributes & Accessor)); 391 } 392 if (gs.isCustomGetterSetter()) { 393 callCustomSetter(exec, gs, obj, slot.thisValue(), value); 394 slot.setCustomProperty(obj, jsCast<CustomGetterSetter*>(gs.asCell())->setter()); 395 return; 396 } 397 ASSERT(!(attributes & Accessor)); 392 398 393 399 // If there's an existing property on the object or one of its … … 1223 1229 1224 1230 putDirectNonIndexAccessor(exec->vm(), propertyName, value, attributes); 1231 } 1232 1233 void JSObject::putDirectCustomAccessor(VM& vm, PropertyName propertyName, JSValue value, unsigned attributes) 1234 { 1235 ASSERT(propertyName.asIndex() == PropertyName::NotAnIndex); 1236 1237 PutPropertySlot slot(this); 1238 putDirectInternal<PutModeDefineOwnProperty>(vm, propertyName, value, attributes, slot, getCallableObject(value)); 1239 1240 ASSERT(slot.type() == PutPropertySlot::NewProperty); 1241 1242 Structure* structure = this->structure(vm); 1243 if (attributes & ReadOnly) 1244 structure->setContainsReadOnlyProperties(); 1245 structure->setHasCustomGetterSetterProperties(); 1225 1246 } 1226 1247 … … 1667 1688 return; 1668 1689 } 1669 1670 1690 slot.setCacheableGetterSlot(this, attributes, jsCast<GetterSetter*>(getterSetter), offset); 1691 } 1692 1693 NEVER_INLINE void JSObject::fillCustomGetterPropertySlot(PropertySlot& slot, JSValue customGetterSetter, unsigned attributes) 1694 { 1695 if (structure()->isDictionary()) { 1696 slot.setCustom(this, attributes, jsCast<CustomGetterSetter*>(customGetterSetter)->getter()); 1697 return; 1698 } 1699 slot.setCacheableCustom(this, attributes, jsCast<CustomGetterSetter*>(customGetterSetter)->getter()); 1671 1700 } 1672 1701 … … 2661 2690 } 2662 2691 2663 bool JSObject::getOwnPropertySlotSlow(ExecState* exec, PropertyName propertyName, PropertySlot& slot)2664 {2665 unsigned i = propertyName.asIndex();2666 if (i != PropertyName::NotAnIndex)2667 return getOwnPropertySlotByIndex(this, exec, i, slot);2668 return false;2669 }2670 2671 2692 JSObject* throwTypeError(ExecState* exec, const String& message) 2672 2693 {
Note:
See TracChangeset
for help on using the changeset viewer.