Changeset 35228 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 17, 2008, 2:42:24 PM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r35227 r35228 2 2 3 3 Roll out r35199 as it is causing failures on the PPC build. 4 5 2008-07-17 Geoffrey Garen <[email protected]> 6 7 Reviewed by David Kilzer. 8 9 Fixed https://bugs.webkit.org/show_bug.cgi?id=20067 10 Support function.name (Firefox extension) 11 12 Pretty straight-forward. 4 13 5 14 2008-07-17 Geoffrey Garen <[email protected]> -
trunk/JavaScriptCore/JavaScriptCore.exp
r35162 r35228 128 128 __ZN3KJS14constructArrayEPNS_9ExecStateERKNS_7ArgListE 129 129 __ZN3KJS15JSWrapperObject4markEv 130 __ZN3KJS16InternalFunction14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 131 __ZN3KJS16InternalFunction18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 132 __ZN3KJS16InternalFunction3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueE 130 133 __ZN3KJS16InternalFunction4infoE 131 134 __ZN3KJS16InternalFunctionC2EPNS_17FunctionPrototypeERKNS_10IdentifierE -
trunk/JavaScriptCore/kjs/InternalFunction.cpp
r34893 r35228 22 22 23 23 #include "config.h" 24 #include " JSFunction.h"24 #include "InternalFunction.h" 25 25 26 26 #include "FunctionPrototype.h" … … 45 45 } 46 46 47 bool InternalFunction::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot& slot) 48 { 49 if (propertyName == exec->propertyNames().name) { 50 slot.setCustom(this, nameGetter); 51 return true; 52 } 53 54 return JSObject::getOwnPropertySlot(exec, propertyName, slot); 55 } 56 57 void InternalFunction::put(ExecState* exec, const Identifier& propertyName, JSValue* value) 58 { 59 if (propertyName == exec->propertyNames().name) 60 return; 61 JSObject::put(exec, propertyName, value); 62 } 63 64 bool InternalFunction::deleteProperty(ExecState* exec, const Identifier& propertyName) 65 { 66 if (propertyName == exec->propertyNames().name) 67 return false; 68 return JSObject::deleteProperty(exec, propertyName); 69 } 70 71 JSValue* InternalFunction::nameGetter(ExecState* exec, const Identifier&, const PropertySlot& slot) 72 { 73 InternalFunction* thisObj = static_cast<InternalFunction*>(slot.slotBase()); 74 return jsString(exec, thisObj->functionName().ustring()); 75 } 76 47 77 } // namespace KJS -
trunk/JavaScriptCore/kjs/InternalFunction.h
r35022 r35228 37 37 static const ClassInfo info; 38 38 39 virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&); 40 virtual void put(ExecState*, const Identifier& propertyName, JSValue*); 41 virtual bool deleteProperty(ExecState*, const Identifier& propertyName); 42 39 43 const Identifier& functionName() const { return m_name; } 40 44 … … 44 48 45 49 private: 50 static JSValue* nameGetter(ExecState*, const Identifier&, const PropertySlot&); 46 51 virtual CallType getCallData(CallData&) = 0; 47 52 virtual bool implementsHasInstance() const;
Note:
See TracChangeset
for help on using the changeset viewer.