Changeset 36764 in webkit for trunk/JavaScriptCore/kjs/StringObjectThatMasqueradesAsUndefined.h
- Timestamp:
- Sep 22, 2008, 6:59:06 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/StringObjectThatMasqueradesAsUndefined.h
r36726 r36764 22 22 #define StringObjectThatMasqueradesAsUndefined_h 23 23 24 #include "JSGlobalObject.h" 24 25 #include "StringObject.h" 25 26 #include "ustring.h" … … 30 31 class StringObjectThatMasqueradesAsUndefined : public StringObject { 31 32 public: 33 static StringObjectThatMasqueradesAsUndefined* create(ExecState* exec, const UString& string) 34 { 35 return new (exec) StringObjectThatMasqueradesAsUndefined(exec, 36 createStructureID(exec->lexicalGlobalObject()->stringPrototype()), string); 37 } 38 39 private: 32 40 StringObjectThatMasqueradesAsUndefined(ExecState* exec, PassRefPtr<StructureID> structure, const UString& string) 33 41 : StringObject(exec, structure, string) … … 35 43 } 36 44 37 virtual bool masqueradeAsUndefined() const { return true; } 45 static PassRefPtr<StructureID> createStructureID(JSValue* proto) 46 { 47 return StructureID::create(proto, TypeInfo(ObjectType, MasqueradesAsUndefined)); 48 } 49 38 50 virtual bool toBoolean(ExecState*) const { return false; } 39 51 };
Note:
See TracChangeset
for help on using the changeset viewer.