Changeset 104899 in webkit
- Timestamp:
- Jan 12, 2012 10:44:31 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r99497 r104899 275 275 276 276 if (attributes && !jsObject->hasProperty(exec, name)) 277 jsObject->methodTable()->put WithAttributes(jsObject, exec, name, jsValue, attributes);277 jsObject->methodTable()->putDirectVirtual(jsObject, exec, name, jsValue, attributes); 278 278 else { 279 279 PutPropertySlot slot; -
trunk/Source/JavaScriptCore/ChangeLog
r104897 r104899 28 28 (WTF::HwndDC::~HwndDC): 29 29 (WTF::HwndDC::operator HDC): 30 31 2012-01-12 Gavin Barraclough <barraclough@apple.com> 32 33 Clean up putDirect (part 2) 34 https://bugs.webkit.org/show_bug.cgi?id=76232 35 36 Reviewed by Sam Weinig. 37 38 Rename putWithAttributes to putDirectVirtual, to identify that this 39 has the same unchecked-DefineOwnProperty behaviour, change putDirectInternal 40 to be templated on an enum indicating which behaviour it is supposed to be 41 implementing, and change clients that are defining properties to call 42 putDirectInternal correctly. 43 44 * API/JSObjectRef.cpp: 45 (JSObjectSetProperty): 46 * JavaScriptCore.exp: 47 * debugger/DebuggerActivation.cpp: 48 (JSC::DebuggerActivation::putDirectVirtual): 49 * debugger/DebuggerActivation.h: 50 * interpreter/Interpreter.cpp: 51 (JSC::Interpreter::execute): 52 * runtime/ClassInfo.h: 53 * runtime/Error.cpp: 54 (JSC::addErrorInfo): 55 * runtime/JSActivation.cpp: 56 (JSC::JSActivation::putDirectVirtual): 57 * runtime/JSActivation.h: 58 * runtime/JSCell.cpp: 59 (JSC::JSCell::putDirectVirtual): 60 * runtime/JSCell.h: 61 * runtime/JSGlobalObject.cpp: 62 (JSC::JSGlobalObject::putDirectVirtual): 63 * runtime/JSGlobalObject.h: 64 * runtime/JSObject.cpp: 65 (JSC::JSObject::put): 66 (JSC::JSObject::putDirectVirtual): 67 (JSC::JSObject::defineGetter): 68 (JSC::JSObject::initializeGetterSetterProperty): 69 (JSC::JSObject::defineSetter): 70 (JSC::putDescriptor): 71 * runtime/JSObject.h: 72 (JSC::JSObject::putDirectInternal): 73 (JSC::JSObject::putOwnDataProperty): 74 (JSC::JSObject::putDirect): 75 * runtime/JSStaticScopeObject.cpp: 76 (JSC::JSStaticScopeObject::putDirectVirtual): 77 * runtime/JSStaticScopeObject.h: 78 * runtime/JSVariableObject.cpp: 79 (JSC::JSVariableObject::putDirectVirtual): 80 * runtime/JSVariableObject.h: 30 81 31 82 2012-01-12 Gavin Barraclough <barraclough@apple.com> -
trunk/Source/JavaScriptCore/JavaScriptCore.exp
r104604 r104899 169 169 __ZN3JSC14JSGlobalObject13visitChildrenEPNS_6JSCellERNS_11SlotVisitorE 170 170 __ZN3JSC14JSGlobalObject16addStaticGlobalsEPNS0_18GlobalPropertyInfoEi 171 __ZN3JSC14JSGlobalObject1 7putWithAttributesEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj171 __ZN3JSC14JSGlobalObject16putDirectVirtualEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj 172 172 __ZN3JSC14JSGlobalObject18getOwnPropertySlotEPNS_6JSCellEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 173 173 __ZN3JSC14JSGlobalObject24getOwnPropertyDescriptorEPNS_8JSObjectEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE … … 323 323 __ZN3JSC8JSObject17defineOwnPropertyEPS0_PNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorEb 324 324 __ZN3JSC8JSObject17preventExtensionsERNS_12JSGlobalDataE 325 __ZN3JSC8JSObject17putWithAttributesEPNS_12JSGlobalDataERKNS_10IdentifierENS_7JSValueEj 326 __ZN3JSC8JSObject17putWithAttributesEPS0_PNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj 325 __ZN3JSC8JSObject16putDirectVirtualEPS0_PNS_9ExecStateERKNS_10IdentifierENS_7JSValueEj 327 326 __ZN3JSC8JSObject19getOwnPropertyNamesEPS0_PNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE 328 327 __ZN3JSC8JSObject21deletePropertyByIndexEPNS_6JSCellEPNS_9ExecStateEj -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r104744 r104899 275 275 ?putByIndex@JSByteArray@JSC@@SAXPAVJSCell@2@PAVExecState@2@IVJSValue@2@@Z 276 276 ?putByIndex@JSObject@JSC@@SAXPAVJSCell@2@PAVExecState@2@IVJSValue@2@@Z 277 ?putDirectInternal@JSObject@JSC@@AAE_NAAVJSGlobalData@2@ABVIdentifier@2@VJSValue@2@I_NAAVPutPropertySlot@2@PAVJSCell@2@@Z 278 ?putWithAttributes@JSGlobalObject@JSC@@SAXPAVJSObject@2@PAVExecState@2@ABVIdentifier@2@VJSValue@2@I@Z 279 ?putWithAttributes@JSObject@JSC@@SAXPAV12@PAVExecState@2@ABVIdentifier@2@VJSValue@2@I@Z 277 ?putDirectVirtual@JSGlobalObject@JSC@@SAXPAVJSObject@2@PAVExecState@2@ABVIdentifier@2@VJSValue@2@I@Z 278 ?putDirectVirtual@JSObject@JSC@@SAXPAV12@PAVExecState@2@ABVIdentifier@2@VJSValue@2@I@Z 280 279 ?randomNumber@WTF@@YANXZ 281 280 ?recompileAllJSFunctions@Debugger@JSC@@QAEXPAVJSGlobalData@2@@Z -
trunk/Source/JavaScriptCore/debugger/DebuggerActivation.cpp
r103083 r104899 78 78 } 79 79 80 void DebuggerActivation::put WithAttributes(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes)80 void DebuggerActivation::putDirectVirtual(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) 81 81 { 82 82 DebuggerActivation* thisObject = jsCast<DebuggerActivation*>(object); 83 thisObject->m_activation->methodTable()->put WithAttributes(thisObject->m_activation.get(), exec, propertyName, value, attributes);83 thisObject->m_activation->methodTable()->putDirectVirtual(thisObject->m_activation.get(), exec, propertyName, value, attributes); 84 84 } 85 85 -
trunk/Source/JavaScriptCore/debugger/DebuggerActivation.h
r103243 r104899 46 46 static bool getOwnPropertySlot(JSCell*, ExecState*, const Identifier& propertyName, PropertySlot&); 47 47 static void put(JSCell*, ExecState*, const Identifier& propertyName, JSValue, PutPropertySlot&); 48 static void put WithAttributes(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes);48 static void putDirectVirtual(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); 49 49 static bool deleteProperty(JSCell*, ExecState*, const Identifier& propertyName); 50 50 static void getOwnPropertyNames(JSObject*, ExecState*, PropertyNameArray&, EnumerationMode); -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r104886 r104899 906 906 globalObject->methodTable()->put(globalObject, callFrame, JSONPPath[0].m_pathEntryName, JSONPValue, slot); 907 907 } else 908 globalObject->methodTable()->put WithAttributes(globalObject, callFrame, JSONPPath[0].m_pathEntryName, JSONPValue, DontEnum | DontDelete);908 globalObject->methodTable()->putDirectVirtual(globalObject, callFrame, JSONPPath[0].m_pathEntryName, JSONPValue, DontEnum | DontDelete); 909 909 // var declarations return undefined 910 910 result = jsUndefined(); -
trunk/Source/JavaScriptCore/runtime/ClassInfo.h
r103083 r104899 89 89 90 90 typedef void (*PutWithAttributesFunctionPtr)(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); 91 PutWithAttributesFunctionPtr put WithAttributes;91 PutWithAttributesFunctionPtr putDirectVirtual; 92 92 93 93 typedef bool (*DefineOwnPropertyFunctionPtr)(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&, bool); … … 136 136 &ClassName::className, \ 137 137 &ClassName::hasInstance, \ 138 &ClassName::put WithAttributes, \138 &ClassName::putDirectVirtual, \ 139 139 &ClassName::defineOwnProperty, \ 140 140 &ClassName::getOwnPropertyDescriptor, \ -
trunk/Source/JavaScriptCore/runtime/Error.cpp
r103958 r104899 124 124 125 125 if (line != -1) 126 error->put WithAttributes(globalData, Identifier(globalData, linePropertyName), jsNumber(line), ReadOnly | DontDelete);126 error->putDirect(*globalData, Identifier(globalData, linePropertyName), jsNumber(line), ReadOnly | DontDelete); 127 127 if (sourceID != -1) 128 error->put WithAttributes(globalData, Identifier(globalData, sourceIdPropertyName), jsNumber((double)sourceID), ReadOnly | DontDelete);128 error->putDirect(*globalData, Identifier(globalData, sourceIdPropertyName), jsNumber((double)sourceID), ReadOnly | DontDelete); 129 129 if (!sourceURL.isNull()) 130 error->put WithAttributes(globalData, Identifier(globalData, sourceURLPropertyName), jsString(globalData, sourceURL), ReadOnly | DontDelete);130 error->putDirect(*globalData, Identifier(globalData, sourceURLPropertyName), jsString(globalData, sourceURL), ReadOnly | DontDelete); 131 131 132 132 return error; -
trunk/Source/JavaScriptCore/runtime/JSActivation.cpp
r104886 r104899 189 189 190 190 // FIXME: Make this function honor ReadOnly (const) and DontEnum 191 void JSActivation::put WithAttributes(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes)191 void JSActivation::putDirectVirtual(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) 192 192 { 193 193 JSActivation* thisObject = jsCast<JSActivation*>(object); … … 201 201 // expose in the activation object. 202 202 ASSERT(!thisObject->hasGetterSetterProperties()); 203 JSObject::put WithAttributes(thisObject, exec, propertyName, value, attributes);203 JSObject::putDirectVirtual(thisObject, exec, propertyName, value, attributes); 204 204 } 205 205 -
trunk/Source/JavaScriptCore/runtime/JSActivation.h
r103697 r104899 65 65 static void put(JSCell*, ExecState*, const Identifier&, JSValue, PutPropertySlot&); 66 66 67 static void put WithAttributes(JSObject*, ExecState*, const Identifier&, JSValue, unsigned attributes);67 static void putDirectVirtual(JSObject*, ExecState*, const Identifier&, JSValue, unsigned attributes); 68 68 static bool deleteProperty(JSCell*, ExecState*, const Identifier& propertyName); 69 69 -
trunk/Source/JavaScriptCore/runtime/JSCell.cpp
r103083 r104899 204 204 } 205 205 206 void JSCell::put WithAttributes(JSObject*, ExecState*, const Identifier&, JSValue, unsigned)206 void JSCell::putDirectVirtual(JSObject*, ExecState*, const Identifier&, JSValue, unsigned) 207 207 { 208 208 ASSERT_NOT_REACHED(); -
trunk/Source/JavaScriptCore/runtime/JSCell.h
r103243 r104899 160 160 static UString className(const JSObject*); 161 161 static bool hasInstance(JSObject*, ExecState*, JSValue, JSValue prototypeProperty); 162 static NO_RETURN_DUE_TO_ASSERT void put WithAttributes(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes);162 static NO_RETURN_DUE_TO_ASSERT void putDirectVirtual(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); 163 163 static bool defineOwnProperty(JSObject*, ExecState*, const Identifier& propertyName, PropertyDescriptor&, bool shouldThrow); 164 164 static bool getOwnPropertyDescriptor(JSObject*, ExecState*, const Identifier&, PropertyDescriptor&); -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp
r103958 r104899 154 154 } 155 155 156 void JSGlobalObject::put WithAttributes(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes)156 void JSGlobalObject::putDirectVirtual(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) 157 157 { 158 158 JSGlobalObject* thisObject = jsCast<JSGlobalObject*>(object); … … 168 168 JSValue valueAfter = thisObject->getDirect(exec->globalData(), propertyName); 169 169 if (valueAfter) 170 JSObject::put WithAttributes(thisObject, exec, propertyName, valueAfter, attributes);170 JSObject::putDirectVirtual(thisObject, exec, propertyName, valueAfter, attributes); 171 171 } 172 172 } -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r103960 r104899 203 203 static void put(JSCell*, ExecState*, const Identifier&, JSValue, PutPropertySlot&); 204 204 205 static void put WithAttributes(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes);205 static void putDirectVirtual(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); 206 206 207 207 static void defineGetter(JSObject*, ExecState*, const Identifier& propertyName, JSObject* getterFunc, unsigned attributes); -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r104871 r104899 163 163 prototype = obj->prototype(); 164 164 if (prototype.isNull()) { 165 if (!thisObject->putDirectInternal (globalData, propertyName, value, 0, true, slot, getJSFunction(value)) && slot.isStrictMode())165 if (!thisObject->putDirectInternal<PutModePut>(globalData, propertyName, value, 0, slot, getJSFunction(value)) && slot.isStrictMode()) 166 166 throwTypeError(exec, StrictModeReadonlyPropertyWriteError); 167 167 return; … … 206 206 } 207 207 208 if (!thisObject->putDirectInternal (globalData, propertyName, value, 0, true, slot, getJSFunction(value)) && slot.isStrictMode())208 if (!thisObject->putDirectInternal<PutModePut>(globalData, propertyName, value, 0, slot, getJSFunction(value)) && slot.isStrictMode()) 209 209 throwTypeError(exec, StrictModeReadonlyPropertyWriteError); 210 210 return; … … 218 218 } 219 219 220 void JSObject::put WithAttributes(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes)220 void JSObject::putDirectVirtual(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) 221 221 { 222 222 PutPropertySlot slot; 223 object->putDirectInternal(exec->globalData(), propertyName, value, attributes, true, slot, getJSFunction(value)); 224 } 225 226 void JSObject::putWithAttributes(JSGlobalData* globalData, const Identifier& propertyName, JSValue value, unsigned attributes) 227 { 228 PutPropertySlot slot; 229 putDirectInternal(*globalData, propertyName, value, attributes, true, slot, getJSFunction(value)); 223 object->putDirectInternal<PutModeDefineOwnProperty>(exec->globalData(), propertyName, value, attributes, slot, getJSFunction(value)); 230 224 } 231 225 … … 362 356 PutPropertySlot slot; 363 357 GetterSetter* getterSetter = GetterSetter::create(exec); 364 thisObject->putDirectInternal (globalData, propertyName, getterSetter, attributes | Accessor, true, slot, 0);358 thisObject->putDirectInternal<PutModeDefineOwnProperty>(globalData, propertyName, getterSetter, attributes | Accessor, slot, 0); 365 359 366 360 // putDirect will change our Structure if we add a new property. For … … 382 376 JSGlobalData& globalData = exec->globalData(); 383 377 PutPropertySlot slot; 384 putDirectInternal (globalData, propertyName, getterSetter, attributes, true, slot, 0);378 putDirectInternal<PutModeDefineOwnProperty>(globalData, propertyName, getterSetter, attributes, slot, 0); 385 379 386 380 // putDirect will change our Structure if we add a new property. For … … 409 403 PutPropertySlot slot; 410 404 GetterSetter* getterSetter = GetterSetter::create(exec); 411 thisObject->putDirectInternal (exec->globalData(), propertyName, getterSetter, attributes | Accessor, true, slot, 0);405 thisObject->putDirectInternal<PutModeDefineOwnProperty>(exec->globalData(), propertyName, getterSetter, attributes | Accessor, slot, 0); 412 406 413 407 // putDirect will change our Structure if we add a new property. For … … 694 688 accessor->setSetter(exec->globalData(), oldDescriptor.setterObject()); 695 689 } 696 target->methodTable()->put WithAttributes(target, exec, propertyName, accessor, attributes);690 target->methodTable()->putDirectVirtual(target, exec, propertyName, accessor, attributes); 697 691 return true; 698 692 } … … 702 696 else if (oldDescriptor.value()) 703 697 newValue = oldDescriptor.value(); 704 target->methodTable()->put WithAttributes(target, exec, propertyName, newValue, attributes & ~Accessor);698 target->methodTable()->putDirectVirtual(target, exec, propertyName, newValue, attributes & ~Accessor); 705 699 return true; 706 700 } -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r104886 r104899 77 77 friend bool setUpStaticFunctionSlot(ExecState* exec, const HashEntry* entry, JSObject* thisObj, const Identifier& propertyName, PropertySlot& slot); 78 78 79 enum PutMode { 80 PutModePut, 81 PutModeDefineOwnProperty, 82 }; 83 79 84 public: 80 85 typedef JSCell Base; … … 108 113 static void putByIndex(JSCell*, ExecState*, unsigned propertyName, JSValue); 109 114 110 // put WithAttributesis effectively an unchecked vesion of 'defineOwnProperty':115 // putDirect is effectively an unchecked vesion of 'defineOwnProperty': 111 116 // - the prototype chain is not consulted 112 117 // - accessors are not called. 113 118 // - attributes will be respected (after the call the property will exist with the given attributes) 114 static void putWithAttributes(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); 115 void putWithAttributes(JSGlobalData*, const Identifier& propertyName, JSValue, unsigned attributes); 119 static void putDirectVirtual(JSObject*, ExecState*, const Identifier& propertyName, JSValue, unsigned attributes); 120 void putDirect(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attributes = 0); 121 void putDirect(JSGlobalData&, const Identifier& propertyName, JSValue, PutPropertySlot&); 122 void putDirectWithoutTransition(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attributes = 0); 116 123 117 124 bool propertyIsEnumerable(ExecState*, const Identifier& propertyName) const; … … 181 188 // This is used by JSActivation. 182 189 bool putOwnDataProperty(JSGlobalData&, const Identifier& propertyName, JSValue, PutPropertySlot&); 183 184 void putDirect(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr = 0);185 bool putDirect(JSGlobalData&, const Identifier& propertyName, JSValue, PutPropertySlot&);186 187 void putDirectWithoutTransition(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr = 0);188 190 189 191 // Fast access to known property offsets. … … 291 293 } 292 294 293 bool putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr, bool checkReadOnly, PutPropertySlot&, JSCell*); 295 template<PutMode> 296 bool putDirectInternal(JSGlobalData&, const Identifier& propertyName, JSValue, unsigned attr, PutPropertySlot&, JSCell*); 294 297 295 298 bool inlineGetOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&); … … 638 641 } 639 642 640 inline bool JSObject::putDirectInternal(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes, bool checkReadOnly, PutPropertySlot& slot, JSCell* specificFunction) 643 template<JSObject::PutMode mode> 644 inline bool JSObject::putDirectInternal(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, unsigned attributes, PutPropertySlot& slot, JSCell* specificFunction) 641 645 { 642 646 ASSERT(value); … … 652 656 if (currentSpecificFunction && (specificFunction != currentSpecificFunction)) 653 657 structure()->despecifyDictionaryFunction(globalData, propertyName); 654 if ( checkReadOnly&& currentAttributes & ReadOnly)658 if ((mode == PutModePut) && currentAttributes & ReadOnly) 655 659 return false; 656 660 … … 667 671 } 668 672 669 if ( checkReadOnly&& !isExtensible())673 if ((mode == PutModePut) && !isExtensible()) 670 674 return false; 671 675 … … 703 707 offset = structure()->get(globalData, propertyName, currentAttributes, currentSpecificFunction); 704 708 if (offset != WTF::notFound) { 705 if ( checkReadOnly&& currentAttributes & ReadOnly)709 if ((mode == PutModePut) && currentAttributes & ReadOnly) 706 710 return false; 707 711 … … 731 735 } 732 736 733 if ( checkReadOnly&& !isExtensible())737 if ((mode == PutModePut) && !isExtensible()) 734 738 return false; 735 739 … … 755 759 ASSERT(!structure()->hasGetterSetterProperties()); 756 760 757 return putDirectInternal (globalData, propertyName, value, 0, true, slot, getJSFunction(value));761 return putDirectInternal<PutModePut>(globalData, propertyName, value, 0, slot, getJSFunction(value)); 758 762 } 759 763 … … 761 765 { 762 766 PutPropertySlot slot; 763 putDirectInternal (globalData, propertyName, value, attributes, false, slot, getJSFunction(value));764 } 765 766 inline boolJSObject::putDirect(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, PutPropertySlot& slot)767 { 768 return putDirectInternal(globalData, propertyName, value, 0, false, slot, getJSFunction(value));767 putDirectInternal<PutModeDefineOwnProperty>(globalData, propertyName, value, attributes, slot, getJSFunction(value)); 768 } 769 770 inline void JSObject::putDirect(JSGlobalData& globalData, const Identifier& propertyName, JSValue value, PutPropertySlot& slot) 771 { 772 putDirectInternal<PutModeDefineOwnProperty>(globalData, propertyName, value, 0, slot, getJSFunction(value)); 769 773 } 770 774 -
trunk/Source/JavaScriptCore/runtime/JSStaticScopeObject.cpp
r103697 r104899 79 79 } 80 80 81 void JSStaticScopeObject::put WithAttributes(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes)81 void JSStaticScopeObject::putDirectVirtual(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) 82 82 { 83 83 JSStaticScopeObject* thisObject = jsCast<JSStaticScopeObject*>(object); -
trunk/Source/JavaScriptCore/runtime/JSStaticScopeObject.h
r103243 r104899 48 48 static void put(JSCell*, ExecState*, const Identifier&, JSValue, PutPropertySlot&); 49 49 50 static void put WithAttributes(JSObject*, ExecState*, const Identifier&, JSValue, unsigned attributes);50 static void putDirectVirtual(JSObject*, ExecState*, const Identifier&, JSValue, unsigned attributes); 51 51 52 52 static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) { return Structure::create(globalData, globalObject, proto, TypeInfo(StaticScopeObjectType, StructureFlags), &s_info); } -
trunk/Source/JavaScriptCore/runtime/JSVariableObject.cpp
r103083 r104899 74 74 } 75 75 76 void JSVariableObject::put WithAttributes(JSObject*, ExecState*, const Identifier&, JSValue, unsigned)76 void JSVariableObject::putDirectVirtual(JSObject*, ExecState*, const Identifier&, JSValue, unsigned) 77 77 { 78 78 ASSERT_NOT_REACHED(); -
trunk/Source/JavaScriptCore/runtime/JSVariableObject.h
r103697 r104899 51 51 static void destroy(JSCell*); 52 52 53 static NO_RETURN_DUE_TO_ASSERT void put WithAttributes(JSObject*, ExecState*, const Identifier&, JSValue, unsigned attributes);53 static NO_RETURN_DUE_TO_ASSERT void putDirectVirtual(JSObject*, ExecState*, const Identifier&, JSValue, unsigned attributes); 54 54 55 55 static bool deleteProperty(JSCell*, ExecState*, const Identifier&); -
trunk/Source/WebCore/ChangeLog
r104897 r104899 1 2012-01-12 Gavin Barraclough <barraclough@apple.com> 2 3 Clean up putDirect (part 2) 4 https://bugs.webkit.org/show_bug.cgi?id=76232 5 6 Reviewed by Sam Weinig. 7 8 Rename putWithAttributes to putDirectVirtual. 9 10 * bindings/js/JSDOMWindowShell.cpp: 11 (WebCore::JSDOMWindowShell::putDirectVirtual): 12 * bindings/js/JSDOMWindowShell.h: 13 1 14 2012-01-12 MORITA Hajime <morrita@google.com> 2 15 -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.cpp
r103083 r104899 110 110 } 111 111 112 void JSDOMWindowShell::put WithAttributes(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes)112 void JSDOMWindowShell::putDirectVirtual(JSObject* object, ExecState* exec, const Identifier& propertyName, JSValue value, unsigned attributes) 113 113 { 114 114 JSDOMWindowShell* thisObject = jsCast<JSDOMWindowShell*>(object); 115 thisObject->window()->put WithAttributes(thisObject->window(), exec, propertyName, value, attributes);115 thisObject->window()->putDirectVirtual(thisObject->window(), exec, propertyName, value, attributes); 116 116 } 117 117 -
trunk/Source/WebCore/bindings/js/JSDOMWindowShell.h
r103083 r104899 83 83 static bool getOwnPropertyDescriptor(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::PropertyDescriptor&); 84 84 static void put(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, JSC::PutPropertySlot&); 85 static void put WithAttributes(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, unsigned attributes);85 static void putDirectVirtual(JSC::JSObject*, JSC::ExecState*, const JSC::Identifier& propertyName, JSC::JSValue, unsigned attributes); 86 86 static bool deleteProperty(JSC::JSCell*, JSC::ExecState*, const JSC::Identifier& propertyName); 87 87 static void getOwnPropertyNames(JSC::JSObject*, JSC::ExecState*, JSC::PropertyNameArray&, JSC::EnumerationMode);
Note: See TracChangeset
for help on using the changeset viewer.