| 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 927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 | 938 |
| 939 Failure* Isolate::ThrowIllegalOperation() { | 939 Failure* Isolate::ThrowIllegalOperation() { |
| 940 return Throw(heap_.illegal_access_symbol()); | 940 return Throw(heap_.illegal_access_symbol()); |
| 941 } | 941 } |
| 942 | 942 |
| 943 | 943 |
| 944 void Isolate::ScheduleThrow(Object* exception) { | 944 void Isolate::ScheduleThrow(Object* exception) { |
| 945 // When scheduling a throw we first throw the exception to get the | 945 // When scheduling a throw we first throw the exception to get the |
| 946 // error reporting if it is uncaught before rescheduling it. | 946 // error reporting if it is uncaught before rescheduling it. |
| 947 Throw(exception); | 947 Throw(exception); |
| 948 PropagatePendingExceptionToExternalTryCatch(); | 948 thread_local_top()->scheduled_exception_ = pending_exception(); |
| 949 if (has_pending_exception()) { | 949 thread_local_top()->external_caught_exception_ = false; |
| 950 thread_local_top()->scheduled_exception_ = pending_exception(); | 950 clear_pending_exception(); |
| 951 thread_local_top()->external_caught_exception_ = false; | |
| 952 clear_pending_exception(); | |
| 953 } | |
| 954 } | 951 } |
| 955 | 952 |
| 956 | 953 |
| 957 Failure* Isolate::PromoteScheduledException() { | 954 Failure* Isolate::PromoteScheduledException() { |
| 958 MaybeObject* thrown = scheduled_exception(); | 955 MaybeObject* thrown = scheduled_exception(); |
| 959 clear_scheduled_exception(); | 956 clear_scheduled_exception(); |
| 960 // Re-throw the exception to avoid getting repeated error reporting. | 957 // Re-throw the exception to avoid getting repeated error reporting. |
| 961 return ReThrow(thrown); | 958 return ReThrow(thrown); |
| 962 } | 959 } |
| 963 | 960 |
| (...skipping 1030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1994 | 1991 |
| 1995 #ifdef DEBUG | 1992 #ifdef DEBUG |
| 1996 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1993 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1997 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1994 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 1998 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1995 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1999 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1996 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 2000 #undef ISOLATE_FIELD_OFFSET | 1997 #undef ISOLATE_FIELD_OFFSET |
| 2001 #endif | 1998 #endif |
| 2002 | 1999 |
| 2003 } } // namespace v8::internal | 2000 } } // namespace v8::internal |
| OLD | NEW |