Changeset 51068 in webkit for trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
- Timestamp:
- Nov 17, 2009, 12:41:10 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h
r48836 r51068 132 132 value = getProperty(ctx, thisRef, propertyNameRef.get(), &exception); 133 133 } 134 exec->setException(toJS(exec, exception)); 134 if (exception) { 135 exec->setException(toJS(exec, exception)); 136 slot.setValue(jsUndefined()); 137 return true; 138 } 135 139 if (value) { 136 140 slot.setValue(toJS(exec, value)); 137 return true;138 }139 if (exception) {140 slot.setValue(jsUndefined());141 141 return true; 142 142 } … … 185 185 result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); 186 186 } 187 exec->setException(toJS(exec, exception)); 187 if (exception) 188 exec->setException(toJS(exec, exception)); 188 189 if (result || exception) 189 190 return; … … 203 204 result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception); 204 205 } 205 exec->setException(toJS(exec, exception)); 206 if (exception) 207 exec->setException(toJS(exec, exception)); 206 208 if (result || exception) 207 209 return; … … 241 243 result = deleteProperty(ctx, thisRef, propertyNameRef.get(), &exception); 242 244 } 243 exec->setException(toJS(exec, exception)); 245 if (exception) 246 exec->setException(toJS(exec, exception)); 244 247 if (result || exception) 245 248 return true; … … 302 305 result = toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), &exception)); 303 306 } 304 exec->setException(toJS(exec, exception)); 307 if (exception) 308 exec->setException(toJS(exec, exception)); 305 309 return result; 306 310 } … … 326 330 result = hasInstance(execRef, thisRef, valueRef, &exception); 327 331 } 328 exec->setException(toJS(exec, exception)); 332 if (exception) 333 exec->setException(toJS(exec, exception)); 329 334 return result; 330 335 } … … 364 369 result = toJS(exec, callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception)); 365 370 } 366 exec->setException(toJS(exec, exception)); 371 if (exception) 372 exec->setException(toJS(exec, exception)); 367 373 return result; 368 374 } … … 436 442 437 443 double dValue; 438 return toJS(exec, value).getNumber(dValue) ? dValue : NaN; 444 if (value) 445 return toJS(exec, value).getNumber(dValue) ? dValue : NaN; 439 446 } 440 447 … … 460 467 return ""; 461 468 } 462 return toJS(exec, value).getString(); 469 if (value) 470 return toJS(exec, value).getString(); 463 471 } 464 472 … … 508 516 value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); 509 517 } 510 exec->setException(toJS(exec, exception)); 518 if (exception) { 519 exec->setException(toJS(exec, exception)); 520 return jsUndefined(); 521 } 511 522 if (value) 512 523 return toJS(exec, value); 513 if (exception)514 return jsUndefined();515 524 } 516 525 517 526 return throwError(exec, ReferenceError, "Static value property defined with NULL getProperty callback."); 518 527 } … … 561 570 value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception); 562 571 } 563 exec->setException(toJS(exec, exception)); 572 if (exception) { 573 exec->setException(toJS(exec, exception)); 574 return jsUndefined(); 575 } 564 576 if (value) 565 577 return toJS(exec, value); 566 if (exception)567 return jsUndefined();568 578 } 569 579
Note:
See TracChangeset
for help on using the changeset viewer.