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

Unified Diff: src/runtime/runtime-internal.cc

Issue 858213003: Clear pending exception on stack overflow in the parser (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 70 needed for arm Created 5 years, 11 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-crbug-450960.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index 370b190107fa6be6e99a8635e88d15b331d88a1b..bd61c46e36af40afb323d0ea0e24eb66cdd1b654 100644
--- a/src/runtime/runtime-internal.cc
+++ b/src/runtime/runtime-internal.cc
@@ -166,14 +166,20 @@ RUNTIME_FUNCTION(Runtime_RenderCallSite) {
Zone zone;
if (location.function()->shared()->is_function()) {
CompilationInfo info(location.function(), &zone);
- if (!Parser::Parse(&info)) return isolate->heap()->empty_string();
+ if (!Parser::Parse(&info)) {
+ isolate->clear_pending_exception();
+ return isolate->heap()->empty_string();
+ }
CallPrinter printer(isolate, &zone);
const char* string = printer.Print(info.function(), location.start_pos());
return *isolate->factory()->NewStringFromAsciiChecked(string);
}
CompilationInfo info(location.script(), &zone);
- if (!Parser::Parse(&info)) return isolate->heap()->empty_string();
+ if (!Parser::Parse(&info)) {
+ isolate->clear_pending_exception();
+ return isolate->heap()->empty_string();
+ }
CallPrinter printer(isolate, &zone);
const char* string = printer.Print(info.function(), location.start_pos());
return *isolate->factory()->NewStringFromAsciiChecked(string);
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-450960.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698