Changeset 164486 in webkit for trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
- Timestamp:
- Feb 21, 2014, 11:14:17 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/API/JSObjectRef.cpp
r163844 r164486 56 56 #include "RegExpConstructor.h" 57 57 58 #if ENABLE(REMOTE_INSPECTOR) 59 #include "JSGlobalObjectInspectorController.h" 60 #endif 61 58 62 using namespace JSC; 59 63 … … 146 150 JSObject* result = constructFunction(exec, exec->lexicalGlobalObject(), args, nameID, sourceURL->string(), TextPosition(OrdinalNumber::fromOneBasedInt(startingLineNumber), OrdinalNumber::first())); 147 151 if (exec->hadException()) { 148 if (exception) 149 *exception = toRef(exec, exec->exception()); 150 exec->clearException(); 152 JSValue exceptionValue = exec->exception(); 153 if (exception) 154 *exception = toRef(exec, exceptionValue); 155 exec->clearException(); 156 #if ENABLE(REMOTE_INSPECTOR) 157 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 158 #endif 151 159 result = 0; 152 160 } … … 174 182 175 183 if (exec->hadException()) { 176 if (exception) 177 *exception = toRef(exec, exec->exception()); 178 exec->clearException(); 184 JSValue exceptionValue = exec->exception(); 185 if (exception) 186 *exception = toRef(exec, exceptionValue); 187 exec->clearException(); 188 #if ENABLE(REMOTE_INSPECTOR) 189 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 190 #endif 179 191 result = 0; 180 192 } … … 198 210 JSObject* result = constructDate(exec, exec->lexicalGlobalObject(), argList); 199 211 if (exec->hadException()) { 200 if (exception) 201 *exception = toRef(exec, exec->exception()); 202 exec->clearException(); 212 JSValue exceptionValue = exec->exception(); 213 if (exception) 214 *exception = toRef(exec, exceptionValue); 215 exec->clearException(); 216 #if ENABLE(REMOTE_INSPECTOR) 217 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 218 #endif 203 219 result = 0; 204 220 } … … 221 237 222 238 if (exec->hadException()) { 223 if (exception) 224 *exception = toRef(exec, exec->exception()); 225 exec->clearException(); 239 JSValue exceptionValue = exec->exception(); 240 if (exception) 241 *exception = toRef(exec, exceptionValue); 242 exec->clearException(); 243 #if ENABLE(REMOTE_INSPECTOR) 244 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 245 #endif 226 246 result = 0; 227 247 } … … 245 265 JSObject* result = constructRegExp(exec, exec->lexicalGlobalObject(), argList); 246 266 if (exec->hadException()) { 247 if (exception) 248 *exception = toRef(exec, exec->exception()); 249 exec->clearException(); 267 JSValue exceptionValue = exec->exception(); 268 if (exception) 269 *exception = toRef(exec, exceptionValue); 270 exec->clearException(); 271 #if ENABLE(REMOTE_INSPECTOR) 272 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 273 #endif 250 274 result = 0; 251 275 } … … 309 333 JSValue jsValue = jsObject->get(exec, propertyName->identifier(&exec->vm())); 310 334 if (exec->hadException()) { 311 if (exception) 312 *exception = toRef(exec, exec->exception()); 313 exec->clearException(); 335 JSValue exceptionValue = exec->exception(); 336 if (exception) 337 *exception = toRef(exec, exceptionValue); 338 exec->clearException(); 339 #if ENABLE(REMOTE_INSPECTOR) 340 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 341 #endif 314 342 } 315 343 return toRef(exec, jsValue); … … 338 366 339 367 if (exec->hadException()) { 340 if (exception) 341 *exception = toRef(exec, exec->exception()); 342 exec->clearException(); 368 JSValue exceptionValue = exec->exception(); 369 if (exception) 370 *exception = toRef(exec, exceptionValue); 371 exec->clearException(); 372 #if ENABLE(REMOTE_INSPECTOR) 373 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 374 #endif 343 375 } 344 376 } … … 357 389 JSValue jsValue = jsObject->get(exec, propertyIndex); 358 390 if (exec->hadException()) { 359 if (exception) 360 *exception = toRef(exec, exec->exception()); 361 exec->clearException(); 391 JSValue exceptionValue = exec->exception(); 392 if (exception) 393 *exception = toRef(exec, exceptionValue); 394 exec->clearException(); 395 #if ENABLE(REMOTE_INSPECTOR) 396 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 397 #endif 362 398 } 363 399 return toRef(exec, jsValue); … … 379 415 jsObject->methodTable()->putByIndex(jsObject, exec, propertyIndex, jsValue, false); 380 416 if (exec->hadException()) { 381 if (exception) 382 *exception = toRef(exec, exec->exception()); 383 exec->clearException(); 417 JSValue exceptionValue = exec->exception(); 418 if (exception) 419 *exception = toRef(exec, exceptionValue); 420 exec->clearException(); 421 #if ENABLE(REMOTE_INSPECTOR) 422 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 423 #endif 384 424 } 385 425 } … … 398 438 bool result = jsObject->methodTable()->deleteProperty(jsObject, exec, propertyName->identifier(&exec->vm())); 399 439 if (exec->hadException()) { 400 if (exception) 401 *exception = toRef(exec, exec->exception()); 402 exec->clearException(); 440 JSValue exceptionValue = exec->exception(); 441 if (exception) 442 *exception = toRef(exec, exceptionValue); 443 exec->clearException(); 444 #if ENABLE(REMOTE_INSPECTOR) 445 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 446 #endif 403 447 } 404 448 return result; … … 542 586 JSValueRef result = toRef(exec, call(exec, jsObject, callType, callData, jsThisObject, argList)); 543 587 if (exec->hadException()) { 544 if (exception) 545 *exception = toRef(exec, exec->exception()); 546 exec->clearException(); 588 JSValue exceptionValue = exec->exception(); 589 if (exception) 590 *exception = toRef(exec, exceptionValue); 591 exec->clearException(); 592 #if ENABLE(REMOTE_INSPECTOR) 593 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 594 #endif 547 595 result = 0; 548 596 } … … 579 627 JSObjectRef result = toRef(construct(exec, jsObject, constructType, constructData, argList)); 580 628 if (exec->hadException()) { 581 if (exception) 582 *exception = toRef(exec, exec->exception()); 583 exec->clearException(); 629 JSValue exceptionValue = exec->exception(); 630 if (exception) 631 *exception = toRef(exec, exceptionValue); 632 exec->clearException(); 633 #if ENABLE(REMOTE_INSPECTOR) 634 exec->vmEntryGlobalObject()->inspectorController().reportAPIException(exec, exceptionValue); 635 #endif 584 636 result = 0; 585 637 }
Note:
See TracChangeset
for help on using the changeset viewer.