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 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 // exception object to be set later must not be turned into a string. | 1325 // exception object to be set later must not be turned into a string. |
1326 if (exception_arg->IsJSObject() && !IsErrorObject(exception_arg)) { | 1326 if (exception_arg->IsJSObject() && !IsErrorObject(exception_arg)) { |
1327 bool failed = false; | 1327 bool failed = false; |
1328 exception_arg = Execution::ToDetailString(exception_arg, &failed); | 1328 exception_arg = Execution::ToDetailString(exception_arg, &failed); |
1329 if (failed) { | 1329 if (failed) { |
1330 exception_arg = factory()->InternalizeOneByteString( | 1330 exception_arg = factory()->InternalizeOneByteString( |
1331 STATIC_ASCII_VECTOR("exception")); | 1331 STATIC_ASCII_VECTOR("exception")); |
1332 } | 1332 } |
1333 } | 1333 } |
1334 Handle<Object> message_obj = MessageHandler::MakeMessageObject( | 1334 Handle<Object> message_obj = MessageHandler::MakeMessageObject( |
| 1335 this, |
1335 "uncaught_exception", | 1336 "uncaught_exception", |
1336 location, | 1337 location, |
1337 HandleVector<Object>(&exception_arg, 1), | 1338 HandleVector<Object>(&exception_arg, 1), |
1338 stack_trace, | 1339 stack_trace, |
1339 stack_trace_object); | 1340 stack_trace_object); |
1340 thread_local_top()->pending_message_obj_ = *message_obj; | 1341 thread_local_top()->pending_message_obj_ = *message_obj; |
1341 if (location != NULL) { | 1342 if (location != NULL) { |
1342 thread_local_top()->pending_message_script_ = *location->script(); | 1343 thread_local_top()->pending_message_script_ = *location->script(); |
1343 thread_local_top()->pending_message_start_pos_ = location->start_pos(); | 1344 thread_local_top()->pending_message_start_pos_ = location->start_pos(); |
1344 thread_local_top()->pending_message_end_pos_ = location->end_pos(); | 1345 thread_local_top()->pending_message_end_pos_ = location->end_pos(); |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 | 2492 |
2492 #ifdef DEBUG | 2493 #ifdef DEBUG |
2493 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2494 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2494 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2495 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2495 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2496 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2496 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2497 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2497 #undef ISOLATE_FIELD_OFFSET | 2498 #undef ISOLATE_FIELD_OFFSET |
2498 #endif | 2499 #endif |
2499 | 2500 |
2500 } } // namespace v8::internal | 2501 } } // namespace v8::internal |
OLD | NEW |