Changeset 15149 in webkit for trunk/JavaScriptCore/API/JSObjectRef.cpp
- Timestamp:
- Jul 3, 2006, 7:35:09 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSObjectRef.cpp
r15133 r15149 46 46 47 47 JSObjectRef objectRef = toRef(jsValue->toObject(exec)); 48 // FIXME: What should we do with this exception? 49 if (exec->hadException()) 48 if (exec->hadException()) { 50 49 exec->clearException(); 50 objectRef = NULL; 51 } 51 52 return objectRef; 52 53 } … … 177 178 } 178 179 179 bool JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argc, JSValueRef argv[], JSValueRef* returnValue)180 JSValueRef JSObjectCallAsFunction(JSContextRef context, JSObjectRef object, JSObjectRef thisObject, size_t argc, JSValueRef argv[], JSValueRef* exception) 180 181 { 181 182 JSLock lock; … … 188 189 argList.append(toJS(argv[i])); 189 190 190 *returnValue = jsObject->call(exec, jsThisObject, argList);191 JSValueRef result = toRef(jsObject->call(exec, jsThisObject, argList)); 191 192 if (exec->hadException()) { 193 if (exception) 194 *exception = exec->exception(); 195 result = NULL; 192 196 exec->clearException(); 193 return false; 194 } 195 return true; 197 } 198 return result; 196 199 } 197 200 … … 202 205 } 203 206 204 bool JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argc, JSValueRef argv[], JSValueRef* returnValue)207 JSObjectRef JSObjectCallAsConstructor(JSContextRef context, JSObjectRef object, size_t argc, JSValueRef argv[], JSValueRef* exception) 205 208 { 206 209 JSLock lock; … … 212 215 argList.append(toJS(argv[i])); 213 216 214 *returnValue = jsObject->construct(exec, argList);217 JSObjectRef result = toRef(jsObject->construct(exec, argList)); 215 218 if (exec->hadException()) { 219 if (exception) 220 *exception = exec->exception(); 221 result = NULL; 216 222 exec->clearException(); 217 return false; 218 } 219 return true; 223 } 224 return result; 220 225 } 221 226
Note:
See TracChangeset
for help on using the changeset viewer.