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

Unified Diff: src/ic/ic.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/factory.cc ('k') | src/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ic/ic.cc
diff --git a/src/ic/ic.cc b/src/ic/ic.cc
index 784a5e5e7df47f5d25b40d394f45ab1fda4b041e..59db5bfc999735ddf6057de8269120db60529691 100644
--- a/src/ic/ic.cc
+++ b/src/ic/ic.cc
@@ -333,17 +333,14 @@ MaybeHandle<Object> IC::TypeError(const char* type, Handle<Object> object,
Handle<Object> key) {
HandleScope scope(isolate());
Handle<Object> args[2] = {key, object};
- Handle<Object> error =
- isolate()->factory()->NewTypeError(type, HandleVector(args, 2));
- return isolate()->Throw<Object>(error);
+ THROW_NEW_ERROR(isolate(), NewTypeError(type, HandleVector(args, 2)), Object);
}
MaybeHandle<Object> IC::ReferenceError(const char* type, Handle<Name> name) {
HandleScope scope(isolate());
- Handle<Object> error =
- isolate()->factory()->NewReferenceError(type, HandleVector(&name, 1));
- return isolate()->Throw<Object>(error);
+ THROW_NEW_ERROR(isolate(), NewReferenceError(type, HandleVector(&name, 1)),
+ Object);
}
@@ -3116,9 +3113,8 @@ static Object* ThrowReferenceError(Isolate* isolate, Name* name) {
// Throw a reference error.
Handle<Name> name_handle(name);
- Handle<Object> error = isolate->factory()->NewReferenceError(
- "not_defined", HandleVector(&name_handle, 1));
- return isolate->Throw(*error);
+ THROW_NEW_ERROR_RETURN_FAILURE(
+ isolate, NewReferenceError("not_defined", HandleVector(&name_handle, 1)));
}
« no previous file with comments | « src/factory.cc ('k') | src/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698