Changeset 43138 in webkit for trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
- Timestamp:
- May 1, 2009, 9:52:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r43130 r43138 129 129 JSValueRef exception = 0; 130 130 JSValueRef value = getProperty(ctx, thisRef, propertyNameRef.get(), &exception); 131 exec->setException(toJS(ex ec, exception));131 exec->setException(toJS(exception)); 132 132 if (value) { 133 slot.setValue(toJS( exec,value));133 slot.setValue(toJS(value)); 134 134 return true; 135 135 } … … 170 170 JSObjectRef thisRef = toRef(this); 171 171 RefPtr<OpaqueJSString> propertyNameRef; 172 JSValueRef valueRef = toRef( exec,value);172 JSValueRef valueRef = toRef(value); 173 173 174 174 for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) { … … 179 179 JSValueRef exception = 0; 180 180 bool result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); 181 exec->setException(toJS(ex ec, exception));181 exec->setException(toJS(exception)); 182 182 if (result || exception) 183 183 return; … … 194 194 JSValueRef exception = 0; 195 195 bool result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); 196 exec->setException(toJS(ex ec, exception));196 exec->setException(toJS(exception)); 197 197 if (result || exception) 198 198 return; … … 229 229 JSValueRef exception = 0; 230 230 bool result = deleteProperty(ctx, thisRef, propertyNameRef.get(), &exception); 231 exec->setException(toJS(ex ec, exception));231 exec->setException(toJS(exception)); 232 232 if (result || exception) 233 233 return true; … … 283 283 Vector<JSValueRef, 16> arguments(argumentCount); 284 284 for (int i = 0; i < argumentCount; i++) 285 arguments[i] = toRef( exec,args.at(i));285 arguments[i] = toRef(args.at(i)); 286 286 JSLock::DropAllLocks dropAllLocks(exec); 287 287 JSValueRef exception = 0; 288 288 JSObject* result = toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), &exception)); 289 exec->setException(toJS(ex ec, exception));289 exec->setException(toJS(exception)); 290 290 return result; 291 291 } … … 306 306 JSLock::DropAllLocks dropAllLocks(exec); 307 307 JSValueRef exception = 0; 308 bool result = hasInstance(execRef, thisRef, toRef( exec,value), &exception);309 exec->setException(toJS(ex ec, exception));308 bool result = hasInstance(execRef, thisRef, toRef(value), &exception); 309 exec->setException(toJS(exception)); 310 310 return result; 311 311 } … … 338 338 Vector<JSValueRef, 16> arguments(argumentCount); 339 339 for (int i = 0; i < argumentCount; i++) 340 arguments[i] = toRef( exec,args.at(i));341 JSLock::DropAllLocks dropAllLocks(exec); 342 JSValueRef exception = 0; 343 JSValue result = toJS( exec,callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception));344 exec->setException(toJS(ex ec, exception));340 arguments[i] = toRef(args.at(i)); 341 JSLock::DropAllLocks dropAllLocks(exec); 342 JSValueRef exception = 0; 343 JSValue result = toJS(callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception)); 344 exec->setException(toJS(exception)); 345 345 return result; 346 346 } … … 406 406 JSValueRef exception = 0; 407 407 JSValueRef value = convertToType(ctx, thisRef, kJSTypeNumber, &exception); 408 exec->setException(toJS(ex ec, exception));408 exec->setException(toJS(exception)); 409 409 if (value) { 410 410 double dValue; 411 return toJS( exec,value).getNumber(dValue) ? dValue : NaN;411 return toJS(value).getNumber(dValue) ? dValue : NaN; 412 412 } 413 413 } … … 429 429 JSLock::DropAllLocks dropAllLocks(exec); 430 430 value = convertToType(ctx, thisRef, kJSTypeString, &exception); 431 exec->setException(toJS(ex ec, exception));431 exec->setException(toJS(exception)); 432 432 } 433 433 if (value) 434 return toJS( exec,value).getString();434 return toJS(value).getString(); 435 435 if (exception) 436 436 return ""; … … 476 476 if (!propertyNameRef) 477 477 propertyNameRef = OpaqueJSString::create(propertyName.ustring()); 478 JSLock::DropAllLocks dropAllLocks(exec); 478 479 JSValueRef exception = 0; 479 JSValueRef value; 480 { 481 JSLock::DropAllLocks dropAllLocks(exec); 482 value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); 483 } 484 exec->setException(toJS(exec, exception)); 480 JSValueRef value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); 481 exec->setException(toJS(exception)); 485 482 if (value) 486 return toJS( exec,value);483 return toJS(value); 487 484 if (exception) 488 485 return jsUndefined(); … … 533 530 JSValueRef exception = 0; 534 531 JSValueRef value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); 535 exec->setException(toJS(ex ec, exception));532 exec->setException(toJS(exception)); 536 533 if (value) 537 return toJS( exec,value);534 return toJS(value); 538 535 if (exception) 539 536 return jsUndefined();
Note:
See TracChangeset
for help on using the changeset viewer.