Changeset 96992 in webkit for trunk/Source/JavaScriptCore/API
- Timestamp:
- Oct 7, 2011, 5:06:07 PM (14 years ago)
- Location:
- trunk/Source/JavaScriptCore/API
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSCallbackObject.h
r96346 r96992 183 183 184 184 virtual void put(ExecState*, const Identifier&, JSValue, PutPropertySlot&); 185 static void put(JSCell*, ExecState*, const Identifier&, JSValue, PutPropertySlot&); 185 186 186 187 virtual bool deleteProperty(ExecState*, const Identifier&); -
trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
r96836 r96992 204 204 void JSCallbackObject<Parent>::put(ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 205 205 { 206 put(this, exec, propertyName, value, slot); 207 } 208 209 template <class Parent> 210 void JSCallbackObject<Parent>::put(JSCell* cell, ExecState* exec, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 211 { 212 JSCallbackObject* thisObject = static_cast<JSCallbackObject*>(cell); 206 213 JSContextRef ctx = toRef(exec); 207 JSObjectRef thisRef = toRef(this );214 JSObjectRef thisRef = toRef(thisObject); 208 215 RefPtr<OpaqueJSString> propertyNameRef; 209 216 JSValueRef valueRef = toRef(exec, value); 210 217 211 for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) {218 for (JSClassRef jsClass = thisObject->classRef(); jsClass; jsClass = jsClass->parentClass) { 212 219 if (JSObjectSetPropertyCallback setProperty = jsClass->setProperty) { 213 220 if (!propertyNameRef) … … 250 257 if (entry->attributes & kJSPropertyAttributeReadOnly) 251 258 return; 252 JSCallbackObject<Parent>::putDirect(exec->globalData(), propertyName, value); // put as override property259 thisObject->JSCallbackObject<Parent>::putDirect(exec->globalData(), propertyName, value); // put as override property 253 260 return; 254 261 } … … 256 263 } 257 264 258 return Parent::put( exec, propertyName, value, slot);265 return Parent::put(thisObject, exec, propertyName, value, slot); 259 266 } 260 267
Note:
See TracChangeset
for help on using the changeset viewer.