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

Unified Diff: src/execution.cc

Issue 953463002: Reland "Correctly propagate terminate exception in TryCall." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comments Created 5 years, 10 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/factory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/execution.cc
diff --git a/src/execution.cc b/src/execution.cc
index 9dfef372bc3db56213264f5d1f64be3fa4e76903..d480daa47d55af5997adcda438b43f2f818a7337 100644
--- a/src/execution.cc
+++ b/src/execution.cc
@@ -210,11 +210,11 @@ MaybeHandle<Object> Execution::TryCall(Handle<JSFunction> func,
DCHECK(catcher.HasCaught());
DCHECK(isolate->has_pending_exception());
DCHECK(isolate->external_caught_exception());
- if (exception_out != NULL) {
- if (isolate->pending_exception() ==
- isolate->heap()->termination_exception()) {
- is_termination = true;
- } else {
+ if (isolate->pending_exception() ==
+ isolate->heap()->termination_exception()) {
+ is_termination = true;
+ } else {
+ if (exception_out != NULL) {
*exception_out = v8::Utils::OpenHandle(*catcher.Exception());
}
}
@@ -222,9 +222,11 @@ MaybeHandle<Object> Execution::TryCall(Handle<JSFunction> func,
}
DCHECK(!isolate->has_pending_exception());
- DCHECK(!isolate->external_caught_exception());
}
- if (is_termination) isolate->TerminateExecution();
+
+ // Re-request terminate execution interrupt to trigger later.
+ if (is_termination) isolate->stack_guard()->RequestTerminateExecution();
+
return maybe_result;
}
« no previous file with comments | « no previous file | src/factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698