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

Unified Diff: src/messages.cc

Issue 2870423002: [error] Clear external_caught_exception in Error formatting (Closed)
Patch Set: Add test Created 3 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 | test/mjsunit/regress/regress-719380.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.cc
diff --git a/src/messages.cc b/src/messages.cc
index 1d8dd1597170d96fd82a0a791823da1c76028043..b71b9afce4402b143dd174195cf381e91dd51ed0 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -890,13 +890,14 @@ MaybeHandle<Object> AppendErrorString(Isolate* isolate, Handle<Object> error,
Handle<Object> pending_exception =
handle(isolate->pending_exception(), isolate);
isolate->clear_pending_exception();
+ isolate->set_external_caught_exception(false);
err_str = ErrorUtils::ToString(isolate, pending_exception);
if (err_str.is_null()) {
// Formatting the thrown exception threw again, give up.
DCHECK(isolate->has_pending_exception());
isolate->clear_pending_exception();
-
+ isolate->set_external_caught_exception(false);
builder->AppendCString("<error>");
} else {
// Formatted thrown exception successfully, append it.
@@ -991,6 +992,7 @@ MaybeHandle<Object> ErrorUtils::FormatStackTrace(Isolate* isolate,
Handle<Object> pending_exception =
handle(isolate->pending_exception(), isolate);
isolate->clear_pending_exception();
+ isolate->set_external_caught_exception(false);
maybe_frame_string = ErrorUtils::ToString(isolate, pending_exception);
if (maybe_frame_string.is_null()) {
@@ -1222,6 +1224,7 @@ Handle<String> FormatMessage(Isolate* isolate, int template_index,
.ToHandle(&msg)) {
DCHECK(isolate->has_pending_exception());
isolate->clear_pending_exception();
+ isolate->set_external_caught_exception(false);
return isolate->factory()->NewStringFromAsciiChecked("<error>");
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-719380.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698