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

Unified Diff: src/messages.cc

Issue 2208663002: Clear exceptions in Invoke instead of JSEntryStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@port-no-sideeffect-to-string
Patch Set: Rebase Created 4 years, 4 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 | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('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 556012a39ad071e59c394d3dcf2704e5df320215..cc52748be5e2feccc26175b49c7424da490a3310 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -884,10 +884,13 @@ MaybeHandle<Object> ErrorUtils::MakeGenericError(
Isolate* isolate, Handle<JSFunction> constructor, int template_index,
Handle<Object> arg0, Handle<Object> arg1, Handle<Object> arg2,
FrameSkipMode mode) {
- // This function used to be implemented in JavaScript, and JSEntryStub clears
- // any pending exceptions - so whenever we'd call this from C++, pending
- // exceptions would be cleared. Preserve this behavior.
- isolate->clear_pending_exception();
+ if (FLAG_clear_exceptions_on_js_entry) {
+ // This function used to be implemented in JavaScript, and JSEntryStub
+ // clears
+ // any pending exceptions - so whenever we'd call this from C++, pending
+ // exceptions would be cleared. Preserve this behavior.
+ isolate->clear_pending_exception();
+ }
DCHECK(mode != SKIP_UNTIL_SEEN);
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698