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); |
} |
} |