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

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

Issue 952483002: NewError no longer returns a MaybeObject. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@reland
Patch Set: Created 5 years, 10 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/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-scopes.cc
diff --git a/src/runtime/runtime-scopes.cc b/src/runtime/runtime-scopes.cc
index 7eb2e0cfc1703940ec9e5a0231a17248b7df3d15..cffd7e1e0185c9e1f4ee2f06c39ef57f1dd166d1 100644
--- a/src/runtime/runtime-scopes.cc
+++ b/src/runtime/runtime-scopes.cc
@@ -905,11 +905,9 @@ static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate* isolate,
case MUTABLE_CHECK_INITIALIZED:
case IMMUTABLE_CHECK_INITIALIZED_HARMONY:
if (value->IsTheHole()) {
- Handle<Object> error;
- MaybeHandle<Object> maybe_error =
- isolate->factory()->NewReferenceError("not_defined",
- HandleVector(&name, 1));
- if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
+ Handle<Object> error = isolate->factory()->NewReferenceError(
+ "not_defined", HandleVector(&name, 1));
+ isolate->Throw(*error);
return MakePair(isolate->heap()->exception(), NULL);
}
// FALLTHROUGH
@@ -962,10 +960,9 @@ static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate* isolate,
if (throw_error) {
// The property doesn't exist - throw exception.
- Handle<Object> error;
- MaybeHandle<Object> maybe_error = isolate->factory()->NewReferenceError(
+ Handle<Object> error = isolate->factory()->NewReferenceError(
"not_defined", HandleVector(&name, 1));
- if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
+ isolate->Throw(*error);
return MakePair(isolate->heap()->exception(), NULL);
} else {
// The property doesn't exist - return undefined.
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698