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

Unified Diff: src/accessors.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 | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index e08f86fc22af30714250054f3a2aa7b167df5b4c..052108a9b065feba47aa9ae907d55a9f33d092ab 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -242,14 +242,8 @@ void Accessors::ArrayLengthSetter(
return;
}
- Handle<Object> exception;
- maybe = isolate->factory()->NewRangeError("invalid_array_length",
- HandleVector<Object>(NULL, 0));
- if (!maybe.ToHandle(&exception)) {
- isolate->OptionalRescheduleException(false);
- return;
- }
-
+ Handle<Object> exception = isolate->factory()->NewRangeError(
+ "invalid_array_length", HandleVector<Object>(NULL, 0));
isolate->ScheduleThrow(*exception);
}
@@ -1459,14 +1453,8 @@ static void ModuleGetExport(
if (value->IsTheHole()) {
Handle<String> name = v8::Utils::OpenHandle(*property);
- Handle<Object> exception;
- MaybeHandle<Object> maybe = isolate->factory()->NewReferenceError(
+ Handle<Object> exception = isolate->factory()->NewReferenceError(
"not_defined", HandleVector(&name, 1));
- if (!maybe.ToHandle(&exception)) {
- isolate->OptionalRescheduleException(false);
- return;
- }
-
isolate->ScheduleThrow(*exception);
return;
}
@@ -1486,14 +1474,8 @@ static void ModuleSetExport(
Isolate* isolate = context->GetIsolate();
if (old_value->IsTheHole()) {
Handle<String> name = v8::Utils::OpenHandle(*property);
- Handle<Object> exception;
- MaybeHandle<Object> maybe = isolate->factory()->NewReferenceError(
+ Handle<Object> exception = isolate->factory()->NewReferenceError(
"not_defined", HandleVector(&name, 1));
- if (!maybe.ToHandle(&exception)) {
- isolate->OptionalRescheduleException(false);
- return;
- }
-
isolate->ScheduleThrow(*exception);
return;
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698