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

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: don't pass unneeded zero 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
« no previous file with comments | « src/objects-printer.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « src/objects-printer.cc ('k') | test/cctest/interpreter/bytecode_expectations/ForOf.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698