| 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 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1359 } else { | 1359 } else { |
| 1360 MessageHandler::ReportMessage(this, NULL, message_obj); | 1360 MessageHandler::ReportMessage(this, NULL, message_obj); |
| 1361 } | 1361 } |
| 1362 } | 1362 } |
| 1363 } | 1363 } |
| 1364 } | 1364 } |
| 1365 clear_pending_message(); | 1365 clear_pending_message(); |
| 1366 } | 1366 } |
| 1367 | 1367 |
| 1368 | 1368 |
| 1369 MessageLocation Isolate::GetMessageLocation() { |
| 1370 ASSERT(has_pending_exception()); |
| 1371 |
| 1372 if (thread_local_top_.pending_exception_ != Failure::OutOfMemoryException() && |
| 1373 thread_local_top_.pending_exception_ != heap()->termination_exception() && |
| 1374 thread_local_top_.has_pending_message_ && |
| 1375 !thread_local_top_.pending_message_obj_->IsTheHole() && |
| 1376 thread_local_top_.pending_message_script_ != NULL) { |
| 1377 Handle<Script> script(thread_local_top_.pending_message_script_); |
| 1378 int start_pos = thread_local_top_.pending_message_start_pos_; |
| 1379 int end_pos = thread_local_top_.pending_message_end_pos_; |
| 1380 return MessageLocation(script, start_pos, end_pos); |
| 1381 } |
| 1382 |
| 1383 return MessageLocation(); |
| 1384 } |
| 1385 |
| 1386 |
| 1369 void Isolate::TraceException(bool flag) { | 1387 void Isolate::TraceException(bool flag) { |
| 1370 FLAG_trace_exception = flag; // TODO(isolates): This is an unfortunate use. | 1388 FLAG_trace_exception = flag; // TODO(isolates): This is an unfortunate use. |
| 1371 } | 1389 } |
| 1372 | 1390 |
| 1373 | 1391 |
| 1374 bool Isolate::OptionalRescheduleException(bool is_bottom_call) { | 1392 bool Isolate::OptionalRescheduleException(bool is_bottom_call) { |
| 1375 ASSERT(has_pending_exception()); | 1393 ASSERT(has_pending_exception()); |
| 1376 PropagatePendingExceptionToExternalTryCatch(); | 1394 PropagatePendingExceptionToExternalTryCatch(); |
| 1377 | 1395 |
| 1378 // Always reschedule out of memory exceptions. | 1396 // Always reschedule out of memory exceptions. |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2160 | 2178 |
| 2161 #ifdef DEBUG | 2179 #ifdef DEBUG |
| 2162 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2180 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 2163 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2181 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 2164 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2182 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 2165 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2183 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2166 #undef ISOLATE_FIELD_OFFSET | 2184 #undef ISOLATE_FIELD_OFFSET |
| 2167 #endif | 2185 #endif |
| 2168 | 2186 |
| 2169 } } // namespace v8::internal | 2187 } } // namespace v8::internal |
| OLD | NEW |