| Index: src/runtime/runtime-classes.cc
|
| diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
|
| index 46e2fa4ce24aa8245474368055bb58a5f39380a3..4b7962dc63049e1b833a195fdcbd85e6c4046d6e 100644
|
| --- a/src/runtime/runtime-classes.cc
|
| +++ b/src/runtime/runtime-classes.cc
|
| @@ -94,13 +94,8 @@ 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(!super_class->IsJSFunction() ||
|
| + !Handle<JSFunction>::cast(super_class)->shared()->is_resumable());
|
| ASSIGN_RETURN_ON_EXCEPTION(
|
| isolate, prototype_parent,
|
| Runtime::GetObjectProperty(isolate, super_class,
|
| @@ -114,10 +109,10 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate,
|
| }
|
| constructor_parent = super_class;
|
| } else {
|
| - THROW_NEW_ERROR(
|
| - isolate,
|
| - NewTypeError(MessageTemplate::kExtendsValueNotFunction, super_class),
|
| - Object);
|
| + THROW_NEW_ERROR(isolate,
|
| + NewTypeError(MessageTemplate::kExtendsValueNotConstructor,
|
| + super_class),
|
| + Object);
|
| }
|
| }
|
|
|
|
|