Changeset 34945 in webkit for trunk/JavaScriptCore/kjs/JSObject.cpp
- Timestamp:
- Jul 1, 2008, 10:39:23 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/JSObject.cpp
r34878 r34945 227 227 CallType callType = function->getCallData(callData); 228 228 if (callType == CallTypeNone) 229 return 0; 229 return exec->exception(); 230 231 // Prevent "toString" and "valueOf" from observing execution if an exception 232 // is pending. 233 if (exec->hadException()) 234 return exec->exception(); 235 230 236 JSValue* result = call(exec, function, callType, callData, const_cast<JSObject*>(object), exec->emptyList()); 231 237 ASSERT(result->type() != GetterSetterType); … … 247 253 JSValue* JSObject::defaultValue(ExecState* exec, JSType hint) const 248 254 { 249 // We need this check to guard against the case where this object is rhs of250 // a binary expression where lhs threw an exception in its conversion to251 // primitive.252 if (exec->hadException())253 return exec->exception();254 255 255 // Must call toString first for Date objects. 256 256 if ((hint == StringType) || (hint != NumberType && _proto == exec->lexicalGlobalObject()->datePrototype())) {
Note:
See TracChangeset
for help on using the changeset viewer.