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

Side by Side Diff: src/isolate.cc

Issue 264233005: Clean up stack guard interrupts. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: addressed comments Created 6 years, 7 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include "v8.h" 7 #include "v8.h"
8 8
9 #include "ast.h" 9 #include "ast.h"
10 #include "bootstrapper.h" 10 #include "bootstrapper.h"
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
828 clear_pending_exception(); 828 clear_pending_exception();
829 } 829 }
830 if (has_scheduled_exception() && 830 if (has_scheduled_exception() &&
831 scheduled_exception() == heap_.termination_exception()) { 831 scheduled_exception() == heap_.termination_exception()) {
832 thread_local_top()->external_caught_exception_ = false; 832 thread_local_top()->external_caught_exception_ = false;
833 clear_scheduled_exception(); 833 clear_scheduled_exception();
834 } 834 }
835 } 835 }
836 836
837 837
838 void Isolate::InvokeApiInterruptCallback() {
839 InterruptCallback callback = api_interrupt_callback_;
840 void* data = api_interrupt_callback_data_;
841 api_interrupt_callback_ = NULL;
842 api_interrupt_callback_data_ = NULL;
843
844 if (callback != NULL) {
845 VMState<EXTERNAL> state(this);
846 HandleScope handle_scope(this);
847 callback(reinterpret_cast<v8::Isolate*>(this), data);
848 }
849 }
850
851
838 Object* Isolate::Throw(Object* exception, MessageLocation* location) { 852 Object* Isolate::Throw(Object* exception, MessageLocation* location) {
839 DoThrow(exception, location); 853 DoThrow(exception, location);
840 return heap()->exception(); 854 return heap()->exception();
841 } 855 }
842 856
843 857
844 Object* Isolate::ReThrow(Object* exception) { 858 Object* Isolate::ReThrow(Object* exception) {
845 bool can_be_caught_externally = false; 859 bool can_be_caught_externally = false;
846 bool catchable_by_javascript = is_catchable_by_javascript(exception); 860 bool catchable_by_javascript = is_catchable_by_javascript(exception);
847 ShouldReportException(&can_be_caught_externally, catchable_by_javascript); 861 ShouldReportException(&can_be_caught_externally, catchable_by_javascript);
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after
2239 ASSERT(handle_scope_implementer()->CallDepthIsZero()); 2253 ASSERT(handle_scope_implementer()->CallDepthIsZero());
2240 2254
2241 // Increase call depth to prevent recursive callbacks. 2255 // Increase call depth to prevent recursive callbacks.
2242 handle_scope_implementer()->IncrementCallDepth(); 2256 handle_scope_implementer()->IncrementCallDepth();
2243 Execution::RunMicrotasks(this); 2257 Execution::RunMicrotasks(this);
2244 handle_scope_implementer()->DecrementCallDepth(); 2258 handle_scope_implementer()->DecrementCallDepth();
2245 } 2259 }
2246 2260
2247 2261
2248 } } // namespace v8::internal 2262 } } // namespace v8::internal
OLDNEW
« src/execution.cc ('K') | « src/isolate.h ('k') | src/mips/regexp-macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698