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

Side by Side Diff: src/top.h

Issue 56105: Reland exception propagation fix.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 8 months 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 | src/top.cc » ('j') | tools/test.py » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 thread_local_.pending_exception_ = Heap::the_hole_value(); 120 thread_local_.pending_exception_ = Heap::the_hole_value();
121 } 121 }
122 122
123 static Object** pending_exception_address() { 123 static Object** pending_exception_address() {
124 return &thread_local_.pending_exception_; 124 return &thread_local_.pending_exception_;
125 } 125 }
126 static bool has_pending_exception() { 126 static bool has_pending_exception() {
127 return !thread_local_.pending_exception_->IsTheHole(); 127 return !thread_local_.pending_exception_->IsTheHole();
128 } 128 }
129 static void clear_pending_message() { 129 static void clear_pending_message() {
130 thread_local_.catcher_ = NULL;
131 thread_local_.has_pending_message_ = false; 130 thread_local_.has_pending_message_ = false;
132 thread_local_.pending_message_ = NULL; 131 thread_local_.pending_message_ = NULL;
133 thread_local_.pending_message_obj_ = Heap::the_hole_value(); 132 thread_local_.pending_message_obj_ = Heap::the_hole_value();
134 thread_local_.pending_message_script_ = NULL; 133 thread_local_.pending_message_script_ = NULL;
135 } 134 }
136 static v8::TryCatch* try_catch_handler() { 135 static v8::TryCatch* try_catch_handler() {
137 return thread_local_.try_catch_handler_; 136 return thread_local_.try_catch_handler_;
138 } 137 }
139 // This method is called by the api after operations that may throw 138 // This method is called by the api after operations that may throw
140 // exceptions. If an exception was thrown and not handled by an external 139 // exceptions. If an exception was thrown and not handled by an external
(...skipping 11 matching lines...) Expand all
152 } 151 }
153 static bool has_scheduled_exception() { 152 static bool has_scheduled_exception() {
154 return !thread_local_.scheduled_exception_->IsTheHole(); 153 return !thread_local_.scheduled_exception_->IsTheHole();
155 } 154 }
156 static void clear_scheduled_exception() { 155 static void clear_scheduled_exception() {
157 thread_local_.scheduled_exception_ = Heap::the_hole_value(); 156 thread_local_.scheduled_exception_ = Heap::the_hole_value();
158 } 157 }
159 158
160 static void setup_external_caught() { 159 static void setup_external_caught() {
161 thread_local_.external_caught_exception_ = 160 thread_local_.external_caught_exception_ =
162 (!thread_local_.pending_exception_->IsTheHole()) && 161 has_pending_exception() &&
163 (thread_local_.catcher_ != NULL) && 162 (thread_local_.catcher_ != NULL) &&
164 (Top::thread_local_.try_catch_handler_ == Top::thread_local_.catcher_); 163 (thread_local_.try_catch_handler_ == thread_local_.catcher_);
165 } 164 }
166 165
167 // Tells whether the current context has experienced an out of memory 166 // Tells whether the current context has experienced an out of memory
168 // exception. 167 // exception.
169 static bool is_out_of_memory(); 168 static bool is_out_of_memory();
170 169
171 // JS execution stack (see frames.h). 170 // JS execution stack (see frames.h).
172 static Address c_entry_fp(ThreadLocalTop* thread) { 171 static Address c_entry_fp(ThreadLocalTop* thread) {
173 return thread->c_entry_fp_; 172 return thread->c_entry_fp_;
174 } 173 }
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 368
370 class ExecutionAccess BASE_EMBEDDED { 369 class ExecutionAccess BASE_EMBEDDED {
371 public: 370 public:
372 ExecutionAccess(); 371 ExecutionAccess();
373 ~ExecutionAccess(); 372 ~ExecutionAccess();
374 }; 373 };
375 374
376 } } // namespace v8::internal 375 } } // namespace v8::internal
377 376
378 #endif // V8_TOP_H_ 377 #endif // V8_TOP_H_
OLDNEW
« no previous file with comments | « no previous file | src/top.cc » ('j') | tools/test.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698