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

Unified Diff: src/api.cc

Issue 102063004: Introduce API to temporarily interrupt long running JavaScript code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/v8.h ('k') | src/execution.h » ('j') | test/cctest/test-api.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 562985cc8ba1e700c6f4153c951fec2be8f73b57..cefc138f276855702c8ab19df7ee63370b2a4bb9 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6722,6 +6722,17 @@ void V8::CancelTerminateExecution(Isolate* isolate) {
}
+void Isolate::RequestInterrupt(InterruptCallback callback, void* data) {
+ reinterpret_cast<i::Isolate*>(this)->stack_guard()->RequestInterrupt(
+ callback, data);
+}
+
+
+void Isolate::ClearInterrupt() {
+ reinterpret_cast<i::Isolate*>(this)->stack_guard()->ClearInterrupt();
+}
+
+
Isolate* Isolate::GetCurrent() {
i::Isolate* isolate = i::Isolate::UncheckedCurrent();
return reinterpret_cast<Isolate*>(isolate);
« no previous file with comments | « include/v8.h ('k') | src/execution.h » ('j') | test/cctest/test-api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698