OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1362 stack_trace_for_uncaught_exceptions_options_); | 1362 stack_trace_for_uncaught_exceptions_options_); |
1363 } | 1363 } |
1364 } | 1364 } |
1365 | 1365 |
1366 Handle<Object> exception_arg = exception_handle; | 1366 Handle<Object> exception_arg = exception_handle; |
1367 // If the exception argument is a custom object, turn it into a string | 1367 // If the exception argument is a custom object, turn it into a string |
1368 // before throwing as uncaught exception. Note that the pending | 1368 // before throwing as uncaught exception. Note that the pending |
1369 // exception object to be set later must not be turned into a string. | 1369 // exception object to be set later must not be turned into a string. |
1370 if (exception_arg->IsJSObject() && !IsErrorObject(exception_arg)) { | 1370 if (exception_arg->IsJSObject() && !IsErrorObject(exception_arg)) { |
1371 bool failed = false; | 1371 bool failed = false; |
1372 exception_arg = Execution::ToDetailString(exception_arg, &failed); | 1372 exception_arg = |
| 1373 Execution::ToDetailString(this, exception_arg, &failed); |
1373 if (failed) { | 1374 if (failed) { |
1374 exception_arg = factory()->InternalizeOneByteString( | 1375 exception_arg = factory()->InternalizeOneByteString( |
1375 STATIC_ASCII_VECTOR("exception")); | 1376 STATIC_ASCII_VECTOR("exception")); |
1376 } | 1377 } |
1377 } | 1378 } |
1378 Handle<Object> message_obj = MessageHandler::MakeMessageObject( | 1379 Handle<Object> message_obj = MessageHandler::MakeMessageObject( |
1379 this, | 1380 this, |
1380 "uncaught_exception", | 1381 "uncaught_exception", |
1381 location, | 1382 location, |
1382 HandleVector<Object>(&exception_arg, 1), | 1383 HandleVector<Object>(&exception_arg, 1), |
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2527 | 2528 |
2528 #ifdef DEBUG | 2529 #ifdef DEBUG |
2529 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2530 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2530 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2531 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2531 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2532 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2532 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2533 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2533 #undef ISOLATE_FIELD_OFFSET | 2534 #undef ISOLATE_FIELD_OFFSET |
2534 #endif | 2535 #endif |
2535 | 2536 |
2536 } } // namespace v8::internal | 2537 } } // namespace v8::internal |
OLD | NEW |