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

Unified Diff: src/api.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/arm/regexp-macro-assembler-arm.cc » ('j') | src/execution.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 1ea45ffa3992ac494edfbe0efa8ed5b8d0cfced1..7eeb325e9c31183db3149454a27200790c88d2da 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6464,7 +6464,8 @@ void V8::SetAutorunMicrotasks(Isolate* isolate, bool autorun) {
void V8::TerminateExecution(Isolate* isolate) {
- reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->TerminateExecution();
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
+ i_isolate->stack_guard()->RequestTerminateExecution();
}
@@ -6477,18 +6478,24 @@ bool V8::IsExecutionTerminating(Isolate* isolate) {
void V8::CancelTerminateExecution(Isolate* isolate) {
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
- i_isolate->stack_guard()->CancelTerminateExecution();
+ i_isolate->stack_guard()->ClearTerminateExecution();
+ i_isolate->CancelTerminateExecution();
}
void Isolate::RequestInterrupt(InterruptCallback callback, void* data) {
- reinterpret_cast<i::Isolate*>(this)->stack_guard()->RequestInterrupt(
- callback, data);
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this);
+ i_isolate->set_api_interrupt_callback(callback);
+ i_isolate->set_api_interrupt_callback_data(data);
+ i_isolate->stack_guard()->RequestApiInterrupt();
}
void Isolate::ClearInterrupt() {
- reinterpret_cast<i::Isolate*>(this)->stack_guard()->ClearInterrupt();
+ i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(this);
+ i_isolate->stack_guard()->ClearApiInterrupt();
+ i_isolate->set_api_interrupt_callback(NULL);
+ i_isolate->set_api_interrupt_callback_data(NULL);
}
@@ -6810,13 +6817,13 @@ bool Debug::SetDebugEventListener(v8::Handle<v8::Object> that,
void Debug::DebugBreak(Isolate* isolate) {
- reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->DebugBreak();
+ reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->RequestDebugBreak();
}
void Debug::CancelDebugBreak(Isolate* isolate) {
i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate);
- internal_isolate->stack_guard()->Continue(i::DEBUGBREAK);
+ internal_isolate->stack_guard()->ClearDebugBreak();
}
« no previous file with comments | « no previous file | src/arm/regexp-macro-assembler-arm.cc » ('j') | src/execution.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698