Changeset 35228 in webkit for trunk/JavaScriptCore/kjs/InternalFunction.cpp
- Timestamp:
- Jul 17, 2008, 2:42:24 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.