Changeset 11923 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jan 7, 2006, 2:32:25 AM (19 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r11922 r11923 1 2006-01-07 Anders Carlsson <[email protected]> 2 3 Reviewed by Maciej. 4 5 - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=6373 6 REGRESSION: JavaScript hang when comparing large array to null 7 8 * kjs/object.h: 9 (KJS::JSObject::isEqualToNull): 10 Add new function which returns true if an object should be treated as null when 11 doing comparisons. 12 13 * kjs/operations.cpp: 14 (KJS::equal): 15 Use isEqualToNull. 16 1 17 2006-01-07 Alexey Proskuryakov <[email protected]> 2 18 3 19 Reviewed by Maciej. 4 20 5 - Fix WebCore development build6 http://bugzilla.opendarwin.org/show_bug.cgi?id=640821 - Fix WebCore development build 22 http://bugzilla.opendarwin.org/show_bug.cgi?id=6408 7 23 8 24 * kxmlcore/Assertions.h: Use __VA_ARGS__ in variadic macros. … … 17 33 Changes mostly thanks to Maks Orlovich, tweaked a little by me. 18 34 19 * kjs/create_hash_table: Use the same hash as the one used b uy Identifier.35 * kjs/create_hash_table: Use the same hash as the one used by Identifier. 20 36 * kjs/function.cpp: 21 37 (KJS::FunctionImp::processParameters): Use the new List::copyFrom -
trunk/JavaScriptCore/kjs/object.h
r11773 r11923 492 492 UString toString(ExecState *exec) const; 493 493 JSObject *toObject(ExecState *exec) const; 494 494 495 495 bool getPropertyAttributes(const Identifier& propertyName, int& attributes) const; 496 497 // Returns whether the object should be treated as null when doing equality comparisons 498 virtual bool isEqualToNull(ExecState *) const { return false; } 496 499 497 500 // This get function only looks at the property map. -
trunk/JavaScriptCore/kjs/operations.cpp
r11795 r11923 130 130 if ((t1 == StringType || t1 == NumberType) && t2 >= ObjectType) 131 131 return equal(exec, v1, v2->toPrimitive(exec)); 132 if (t1 == NullType && t2 >= ObjectType)133 return equal(exec, v1, v2->toPrimitive(exec, NullType));132 if (t1 == NullType && t2 == ObjectType) 133 return static_cast<JSObject *>(v2)->isEqualToNull(exec); 134 134 if (t1 >= ObjectType && (t2 == StringType || t2 == NumberType)) 135 135 return equal(exec, v1->toPrimitive(exec), v2); 136 if (t1 >= ObjectType && t2 == NullType)137 return equal(exec, v1->toPrimitive(exec, NullType), v2);136 if (t1 == ObjectType && t2 == NullType) 137 return static_cast<JSObject *>(v1)->isEqualToNull(exec); 138 138 if (t1 != t2) 139 139 return false;
Note:
See TracChangeset
for help on using the changeset viewer.