Changeset 33372 in webkit
- Timestamp:
- May 13, 2008 12:11:01 AM (16 years ago)
- Location:
- branches/squirrelfish/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/squirrelfish/JavaScriptCore/API/JSCallbackObjectFunctions.h
r33218 r33372 367 367 double JSCallbackObject<Base>::toNumber(ExecState* exec) const 368 368 { 369 // We need this check to guard against the case where this object is rhs of 370 // a binary expression where lhs threw an exception in its conversion to 371 // primitive 372 if (exec->hadException()) 373 return NaN; 369 374 JSContextRef ctx = toRef(exec); 370 375 JSObjectRef thisRef = toRef(this); -
branches/squirrelfish/JavaScriptCore/ChangeLog
r33371 r33372 1 2008-05-13 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Geoff. 4 5 Bug 18752: SQUIRRELFISH: exceptions are not always handled by the vm 6 <https://bugs.webkit.org/show_bug.cgi?id=18752> 7 8 First step: prevent incorrect evaluation of valueOf/toString conversion 9 in right hand side of expression after earlier conversion throws. 10 11 * API/JSCallbackObjectFunctions.h: 12 (KJS::::toNumber): 13 * kjs/object.cpp: 14 (KJS::JSObject::defaultValue): 15 1 16 2008-05-12 Oliver Hunt <oliver@apple.com> 2 17 -
branches/squirrelfish/JavaScriptCore/kjs/object.cpp
r33366 r33372 341 341 JSValue* JSObject::defaultValue(ExecState* exec, JSType hint) const 342 342 { 343 // We need this check to guard against the case where this object is rhs of 344 // a binary expression where lhs threw an exception in its conversion to 345 // primitive 346 if (exec->hadException()) 347 return exec->exception(); 343 348 /* Prefer String for Date objects */ 344 349 if ((hint == StringType) || (hint != NumberType && _proto == exec->lexicalGlobalObject()->datePrototype())) {
Note: See TracChangeset
for help on using the changeset viewer.