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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 return Failure::Exception(); | 914 return Failure::Exception(); |
915 } | 915 } |
916 | 916 |
917 | 917 |
918 Failure* Isolate::Throw(Object* exception, MessageLocation* location) { | 918 Failure* Isolate::Throw(Object* exception, MessageLocation* location) { |
919 DoThrow(exception, location); | 919 DoThrow(exception, location); |
920 return Failure::Exception(); | 920 return Failure::Exception(); |
921 } | 921 } |
922 | 922 |
923 | 923 |
924 Failure* Isolate::ReThrow(MaybeObject* exception, MessageLocation* location) { | 924 Failure* Isolate::ReThrow(MaybeObject* exception) { |
925 bool can_be_caught_externally = false; | 925 bool can_be_caught_externally = false; |
926 bool catchable_by_javascript = is_catchable_by_javascript(exception); | 926 bool catchable_by_javascript = is_catchable_by_javascript(exception); |
927 ShouldReportException(&can_be_caught_externally, catchable_by_javascript); | 927 ShouldReportException(&can_be_caught_externally, catchable_by_javascript); |
928 | 928 |
929 thread_local_top()->catcher_ = can_be_caught_externally ? | 929 thread_local_top()->catcher_ = can_be_caught_externally ? |
930 try_catch_handler() : NULL; | 930 try_catch_handler() : NULL; |
931 | 931 |
932 // Set the exception being re-thrown. | 932 // Set the exception being re-thrown. |
933 set_pending_exception(exception); | 933 set_pending_exception(exception); |
934 if (exception->IsFailure()) return exception->ToFailureUnchecked(); | 934 if (exception->IsFailure()) return exception->ToFailureUnchecked(); |
(...skipping 1026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 | 1961 |
1962 #ifdef DEBUG | 1962 #ifdef DEBUG |
1963 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ | 1963 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ |
1964 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); | 1964 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); |
1965 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) | 1965 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) |
1966 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) | 1966 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) |
1967 #undef ISOLATE_FIELD_OFFSET | 1967 #undef ISOLATE_FIELD_OFFSET |
1968 #endif | 1968 #endif |
1969 | 1969 |
1970 } } // namespace v8::internal | 1970 } } // namespace v8::internal |
OLD | NEW |