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

Unified Diff: src/api.cc

Issue 11142013: Add methods to allow resuming execution after calling TerminateExecution(). (Closed) Base URL: http://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 side-by-side diff with in-line comments
Download patch
Index: src/api.cc
===================================================================
--- src/api.cc (revision 12718)
+++ src/api.cc (working copy)
@@ -1674,7 +1674,8 @@
is_verbose_(false),
can_continue_(true),
capture_message_(true),
- rethrow_(false) {
+ rethrow_(false),
+ has_terminated_(false) {
isolate_->RegisterTryCatchHandler(this);
}
@@ -1702,6 +1703,11 @@
}
+bool v8::TryCatch::HasTerminated() const {
+ return has_terminated_;
+}
+
+
v8::Handle<v8::Value> v8::TryCatch::ReThrow() {
if (!HasCaught()) return v8::Local<v8::Value>();
rethrow_ = true;
@@ -5471,6 +5477,16 @@
}
+void V8::ResumeExecution(Isolate* isolate) {
+ // If no isolate is supplied, use the default isolate.
+ if (isolate != NULL) {
+ reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->ResumeExecution();
+ } else {
+ i::Isolate::GetDefaultIsolateStackGuard()->ResumeExecution();
+ }
+}
+
+
Isolate* Isolate::GetCurrent() {
i::Isolate* isolate = i::Isolate::UncheckedCurrent();
return reinterpret_cast<Isolate*>(isolate);

Powered by Google App Engine
This is Rietveld 408576698