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

Unified Diff: src/scopes.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/runtime.cc ('k') | test/cctest/test-thread-termination.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 5a9169547e4fedfec3bf2cc3c07f21cc8a6da5a3..e1297b332ca52bd224bce0129ae3c72d3419ceac 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -1080,9 +1080,10 @@ bool Scope::ResolveVariable(CompilationInfo* info,
Isolate* isolate = info->isolate();
Factory* factory = isolate->factory();
Handle<JSArray> array = factory->NewJSArray(0);
- Handle<Object> result =
+ Handle<Object> error;
+ MaybeHandle<Object> maybe_error =
factory->NewSyntaxError("harmony_const_assign", array);
- isolate->Throw(*result, &location);
+ if (maybe_error.ToHandle(&error)) isolate->Throw(*error, &location);
return false;
}
@@ -1114,9 +1115,10 @@ bool Scope::ResolveVariable(CompilationInfo* info,
Factory* factory = isolate->factory();
Handle<JSArray> array = factory->NewJSArray(1);
JSObject::SetElement(array, 0, var->name(), NONE, STRICT).Assert();
- Handle<Object> result =
+ Handle<Object> error;
+ MaybeHandle<Object> maybe_error =
factory->NewSyntaxError("module_type_error", array);
- isolate->Throw(*result, &location);
+ if (maybe_error.ToHandle(&error)) isolate->Throw(*error, &location);
return false;
}
}
« no previous file with comments | « src/runtime.cc ('k') | test/cctest/test-thread-termination.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698