Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Side by Side Diff: src/isolate.cc

Issue 11299329: Fix external exceptions in external try-catch handlers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 1055
1056 Failure* Isolate::ThrowIllegalOperation() { 1056 Failure* Isolate::ThrowIllegalOperation() {
1057 return Throw(heap_.illegal_access_symbol()); 1057 return Throw(heap_.illegal_access_symbol());
1058 } 1058 }
1059 1059
1060 1060
1061 void Isolate::ScheduleThrow(Object* exception) { 1061 void Isolate::ScheduleThrow(Object* exception) {
1062 // When scheduling a throw we first throw the exception to get the 1062 // When scheduling a throw we first throw the exception to get the
1063 // error reporting if it is uncaught before rescheduling it. 1063 // error reporting if it is uncaught before rescheduling it.
1064 Throw(exception); 1064 Throw(exception);
1065 thread_local_top()->scheduled_exception_ = pending_exception(); 1065 PropagatePendingExceptionToExternalTryCatch();
1066 thread_local_top()->external_caught_exception_ = false; 1066 if (has_pending_exception()) {
1067 clear_pending_exception(); 1067 thread_local_top()->scheduled_exception_ = pending_exception();
1068 thread_local_top()->external_caught_exception_ = false;
1069 clear_pending_exception();
1070 }
1068 } 1071 }
1069 1072
1070 1073
1071 Failure* Isolate::PromoteScheduledException() { 1074 Failure* Isolate::PromoteScheduledException() {
1072 MaybeObject* thrown = scheduled_exception(); 1075 MaybeObject* thrown = scheduled_exception();
1073 clear_scheduled_exception(); 1076 clear_scheduled_exception();
1074 // Re-throw the exception to avoid getting repeated error reporting. 1077 // Re-throw the exception to avoid getting repeated error reporting.
1075 return ReThrow(thrown); 1078 return ReThrow(thrown);
1076 } 1079 }
1077 1080
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 2181
2179 #ifdef DEBUG 2182 #ifdef DEBUG
2180 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \ 2183 #define ISOLATE_FIELD_OFFSET(type, name, ignored) \
2181 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_); 2184 const intptr_t Isolate::name##_debug_offset_ = OFFSET_OF(Isolate, name##_);
2182 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET) 2185 ISOLATE_INIT_LIST(ISOLATE_FIELD_OFFSET)
2183 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET) 2186 ISOLATE_INIT_ARRAY_LIST(ISOLATE_FIELD_OFFSET)
2184 #undef ISOLATE_FIELD_OFFSET 2187 #undef ISOLATE_FIELD_OFFSET
2185 #endif 2188 #endif
2186 2189
2187 } } // namespace v8::internal 2190 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698