| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 | 889 |
| 890 | 890 |
| 891 Failure* Isolate::Throw(Object* exception, MessageLocation* location) { | 891 Failure* Isolate::Throw(Object* exception, MessageLocation* location) { |
| 892 DoThrow(exception, location); | 892 DoThrow(exception, location); |
| 893 return Failure::Exception(); | 893 return Failure::Exception(); |
| 894 } | 894 } |
| 895 | 895 |
| 896 | 896 |
| 897 Failure* Isolate::ReThrow(MaybeObject* exception, MessageLocation* location) { | 897 Failure* Isolate::ReThrow(MaybeObject* exception, MessageLocation* location) { |
| 898 bool can_be_caught_externally = false; | 898 bool can_be_caught_externally = false; |
| 899 ShouldReportException(&can_be_caught_externally, | 899 bool catchable_by_javascript = is_catchable_by_javascript(exception); |
| 900 is_catchable_by_javascript(exception)); | 900 ShouldReportException(&can_be_caught_externally, catchable_by_javascript); |
| 901 |
| 901 thread_local_top()->catcher_ = can_be_caught_externally ? | 902 thread_local_top()->catcher_ = can_be_caught_externally ? |
| 902 try_catch_handler() : NULL; | 903 try_catch_handler() : NULL; |
| 903 | 904 |
| 904 // Set the exception being re-thrown. | 905 // Set the exception being re-thrown. |
| 905 set_pending_exception(exception); | 906 set_pending_exception(exception); |
| 907 if (exception->IsFailure()) return exception->ToFailureUnchecked(); |
| 906 return Failure::Exception(); | 908 return Failure::Exception(); |
| 907 } | 909 } |
| 908 | 910 |
| 909 | 911 |
| 910 Failure* Isolate::ThrowIllegalOperation() { | 912 Failure* Isolate::ThrowIllegalOperation() { |
| 911 return Throw(heap_.illegal_access_symbol()); | 913 return Throw(heap_.illegal_access_symbol()); |
| 912 } | 914 } |
| 913 | 915 |
| 914 | 916 |
| 915 void Isolate::ScheduleThrow(Object* exception) { | 917 void Isolate::ScheduleThrow(Object* exception) { |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1857 | 1859 |
| 1858 #ifdef DEBUG | 1860 #ifdef DEBUG |
| 1859 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1861 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
| 1860 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1862 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
| 1861 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1863 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
| 1862 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1864 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
| 1863 #undef ISOLATE_FIELD_OFFSET | 1865 #undef ISOLATE_FIELD_OFFSET |
| 1864 #endif | 1866 #endif |
| 1865 | 1867 |
| 1866 } } // namespace v8::internal | 1868 } } // namespace v8::internal |
| OLD | NEW |