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

Unified Diff: src/builtins.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/api.cc ('k') | src/debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 7c64f65a6db3426e74a50d0a3ce9b3796de7c76a..14b0c93207e49a0159f12b8ca35a84bfa575247c 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -1010,15 +1010,17 @@ BUILTIN(ArrayConcat) {
BUILTIN(StrictModePoisonPill) {
HandleScope scope(isolate);
- return isolate->Throw(*isolate->factory()->NewTypeError(
- "strict_poison_pill", HandleVector<Object>(NULL, 0)));
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate,
+ NewTypeError("strict_poison_pill", HandleVector<Object>(NULL, 0)));
}
BUILTIN(GeneratorPoisonPill) {
HandleScope scope(isolate);
- return isolate->Throw(*isolate->factory()->NewTypeError(
- "generator_poison_pill", HandleVector<Object>(NULL, 0)));
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate,
+ NewTypeError("generator_poison_pill", HandleVector<Object>(NULL, 0)));
}
@@ -1115,10 +1117,9 @@ MUST_USE_RESULT static Object* HandleApiCallHelper(
if (raw_holder->IsNull()) {
// This function cannot be called with the given receiver. Abort!
- Handle<Object> obj =
- isolate->factory()->NewTypeError(
- "illegal_invocation", HandleVector(&function, 1));
- return isolate->Throw(*obj);
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate,
+ NewTypeError("illegal_invocation", HandleVector(&function, 1)));
}
Object* raw_call_data = fun_data->call_code();
« no previous file with comments | « src/api.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698