Changeset 15557 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jul 21, 2006, 11:50:24 AM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r15546 r15557 1 2006-07-21 Geoffrey Garen <[email protected]> 2 3 Reviewed by Darin. 4 5 - Added support for strings that masquerade as undefined. Currently used 6 by WebCore to implement undetectable style.filter. 7 8 The name is a little long, but it's only used in one line of code, so I 9 thought clarity should win over brevity. 10 11 * JavaScriptCore.exp: 12 * JavaScriptCore.xcodeproj/project.pbxproj: 13 * kjs/object.h: 14 * kjs/string_object.h: 15 (KJS::StringInstanceThatMasqueradesAsUndefined::StringInstanceThatMasqueradesAsUndefined): 16 (KJS::StringInstanceThatMasqueradesAsUndefined::masqueradeAsUndefined): 17 (KJS::StringInstanceThatMasqueradesAsUndefined::toBoolean): 18 1 19 2006-07-20 Steve Falkenburg <[email protected]> 2 20 -
trunk/JavaScriptCore/JavaScriptCore.exp
r15497 r15557 1 1 2 _JSCheckScriptSyntax 2 3 _JSClassCreate … … 144 145 __ZN3KJS13SavedBuiltinsC1Ev 145 146 __ZN3KJS13SavedBuiltinsD1Ev 147 __ZN3KJS14StringInstance14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE 148 __ZN3KJS14StringInstance16getPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayE 149 __ZN3KJS14StringInstance18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE 150 __ZN3KJS14StringInstance3putEPNS_9ExecStateERKNS_10IdentifierEPNS_7JSValueEi 151 __ZN3KJS14StringInstance4infoE 152 __ZN3KJS14StringInstanceC1EPNS_8JSObjectERKNS_7UStringE 153 __ZN3KJS14StringInstanceC2EPNS_8JSObjectERKNS_7UStringE 146 154 __ZN3KJS15SavedPropertiesC1Ev 147 155 __ZN3KJS15SavedPropertiesD1Ev … … 223 231 __ZNK3KJS11Interpreter15builtinFunctionEv 224 232 __ZNK3KJS11Interpreter22builtinObjectPrototypeEv 233 __ZNK3KJS11Interpreter22builtinStringPrototypeEv 225 234 __ZNK3KJS11Interpreter24builtinFunctionPrototypeEv 226 235 __ZNK3KJS11PropertyMap3getERKNS_10IdentifierE … … 260 269 __ZNK3KJS8JSObject9toBooleanEPNS_9ExecStateE 261 270 __ZNK3KJS9ExecState18lexicalInterpreterEv 271 __ZTVN3KJS14StringInstanceE 262 272 __ZTVN3KJS19InternalFunctionImpE 263 273 __ZTVN3KJS8JSObjectE -
trunk/JavaScriptCore/kjs/object.h
r15468 r15557 471 471 bool getPropertyAttributes(const Identifier& propertyName, unsigned& attributes) const; 472 472 473 // Returns whether the object should be treated as undefined when doing equality comparisons473 // WebCore uses this to make document.all and style.filter undetectable 474 474 virtual bool masqueradeAsUndefined() const { return false; } 475 475 -
trunk/JavaScriptCore/kjs/string_object.h
r15468 r15557 42 42 static JSValue *lengthGetter(ExecState *exec, JSObject *, const Identifier&, const PropertySlot &slot); 43 43 static JSValue *indexGetter(ExecState *exec, JSObject *, const Identifier&, const PropertySlot &slot); 44 }; 45 46 // WebCore uses this to make style.filter undetectable 47 class StringInstanceThatMasqueradesAsUndefined : public StringInstance { 48 public: 49 StringInstanceThatMasqueradesAsUndefined(JSObject* proto, const UString& string) 50 : StringInstance(proto, string) { } 51 virtual bool masqueradeAsUndefined() const { return true; } 52 virtual bool toBoolean(ExecState*) const { return false; } 44 53 }; 45 54
Note:
See TracChangeset
for help on using the changeset viewer.