Index: src/runtime/runtime-classes.cc |
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc |
index e27685dd3f7a5cc79c571795b30f5acdb0c59ad4..3f102256bf91b18083cd9f820d986b7ca973bfec 100644 |
--- a/src/runtime/runtime-classes.cc |
+++ b/src/runtime/runtime-classes.cc |
@@ -124,14 +124,6 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate, |
Handle<Map> map = |
isolate->factory()->NewMap(JS_OBJECT_TYPE, JSObject::kHeaderSize); |
map->set_is_prototype_map(true); |
- if (constructor->map()->is_strong()) { |
- map->set_is_strong(); |
- if (super_class->IsNull()) { |
- // Strong class is not permitted to extend null. |
- THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kStrongExtendNull), |
- Object); |
- } |
- } |
Map::SetPrototype(map, prototype_parent); |
map->SetConstructor(*constructor); |
Handle<JSObject> prototype = isolate->factory()->NewJSObjectFromMap(map); |
@@ -206,19 +198,7 @@ RUNTIME_FUNCTION(Runtime_FinalizeClassDefinition) { |
HandleScope scope(isolate); |
DCHECK(args.length() == 2); |
CONVERT_ARG_HANDLE_CHECKED(JSObject, constructor, 0); |
- CONVERT_ARG_HANDLE_CHECKED(JSObject, prototype, 1); |
- |
JSObject::MigrateSlowToFast(constructor, 0, "RuntimeToFastProperties"); |
- |
- if (constructor->map()->is_strong()) { |
- DCHECK(prototype->map()->is_strong()); |
- MAYBE_RETURN(JSReceiver::SetIntegrityLevel(prototype, FROZEN, |
- Object::THROW_ON_ERROR), |
- isolate->heap()->exception()); |
- MAYBE_RETURN(JSReceiver::SetIntegrityLevel(constructor, FROZEN, |
- Object::THROW_ON_ERROR), |
- isolate->heap()->exception()); |
- } |
return *constructor; |
} |