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

Unified Diff: src/parser.cc

Issue 516913003: Do not expose termination exceptions to the Exception API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: address comment Created 6 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/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parser.cc
diff --git a/src/parser.cc b/src/parser.cc
index a3061dc8303150415119fdbb7c954f7eb34548fa..24510e3da77c339a120564d12c04cbf1fdfb5a15 100644
--- a/src/parser.cc
+++ b/src/parser.cc
@@ -3955,10 +3955,12 @@ void Parser::ThrowPendingError() {
isolate()->debug()->OnCompileError(script_);
Handle<JSArray> array = factory->NewJSArrayWithElements(elements);
- Handle<Object> result = pending_error_is_reference_error_
- ? factory->NewReferenceError(pending_error_message_, array)
- : factory->NewSyntaxError(pending_error_message_, array);
- isolate()->Throw(*result, &location);
+ Handle<Object> error;
+ MaybeHandle<Object> maybe_error =
+ pending_error_is_reference_error_
+ ? factory->NewReferenceError(pending_error_message_, array)
+ : factory->NewSyntaxError(pending_error_message_, array);
+ if (maybe_error.ToHandle(&error)) isolate()->Throw(*error, &location);
}
}
« no previous file with comments | « src/objects.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698