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

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

Issue 1996943002: [esnext] Fix various callsites to use is_resumable, not is_generator (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index a784d6d773040227a948dee8cda957fa968d52a8..d4965d49a13533dc92e7bb8d6d945ae41f0a68eb 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -94,13 +94,7 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate,
if (super_class->IsNull()) {
prototype_parent = isolate->factory()->null_value();
} else if (super_class->IsConstructor()) {
- if (super_class->IsJSFunction() &&
- Handle<JSFunction>::cast(super_class)->shared()->is_generator()) {
- THROW_NEW_ERROR(
- isolate,
- NewTypeError(MessageTemplate::kExtendsValueGenerator, super_class),
- Object);
- }
+ DCHECK(!Handle<JSFunction>::cast(super_class)->shared()->is_resumable());
caitp (gmail) 2016/05/20 13:35:56 Is this CHECK really needed? if we have this check
Dan Ehrenberg 2016/05/20 14:59:19 Just because I'm removing old code on the basis of
ASSIGN_RETURN_ON_EXCEPTION(
isolate, prototype_parent,
Runtime::GetObjectProperty(isolate, super_class,
@@ -116,7 +110,7 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate,
} else {
THROW_NEW_ERROR(
isolate,
- NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class),
+ NewTypeError(MessageTemplate::kExtendsValueNotConstructor, super_class),
caitp (gmail) 2016/05/20 13:35:56 awfully similar to my CL from yesterday :p but it'
Dan Ehrenberg 2016/05/20 14:59:19 Oops! I hadn't gotten around to reviewing it yet.
Object);
}
}

Powered by Google App Engine
This is Rietveld 408576698