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 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
939 try_catch_handler() : NULL; | 939 try_catch_handler() : NULL; |
940 | 940 |
941 // Set the exception being re-thrown. | 941 // Set the exception being re-thrown. |
942 set_pending_exception(exception); | 942 set_pending_exception(exception); |
943 if (exception->IsFailure()) return exception->ToFailureUnchecked(); | 943 if (exception->IsFailure()) return exception->ToFailureUnchecked(); |
944 return Failure::Exception(); | 944 return Failure::Exception(); |
945 } | 945 } |
946 | 946 |
947 | 947 |
948 Failure* Isolate::ThrowIllegalOperation() { | 948 Failure* Isolate::ThrowIllegalOperation() { |
| 949 if (FLAG_stack_trace_on_illegal) PrintStack(stdout); |
949 return Throw(heap_.illegal_access_string()); | 950 return Throw(heap_.illegal_access_string()); |
950 } | 951 } |
951 | 952 |
952 | 953 |
953 void Isolate::ScheduleThrow(Object* exception) { | 954 void Isolate::ScheduleThrow(Object* exception) { |
954 // When scheduling a throw we first throw the exception to get the | 955 // When scheduling a throw we first throw the exception to get the |
955 // error reporting if it is uncaught before rescheduling it. | 956 // error reporting if it is uncaught before rescheduling it. |
956 Throw(exception); | 957 Throw(exception); |
957 PropagatePendingExceptionToExternalTryCatch(); | 958 PropagatePendingExceptionToExternalTryCatch(); |
958 if (has_pending_exception()) { | 959 if (has_pending_exception()) { |
(...skipping 1353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2312 | 2313 |
2313 #ifdef DEBUG | 2314 #ifdef DEBUG |
2314 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 2315 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
2315 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 2316 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
2316 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 2317 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
2317 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 2318 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
2318 #undef ISOLATE_FIELD_OFFSET | 2319 #undef ISOLATE_FIELD_OFFSET |
2319 #endif | 2320 #endif |
2320 | 2321 |
2321 } } // namespace v8::internal | 2322 } } // namespace v8::internal |
OLD | NEW |