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

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

Issue 1731063007: Remove the global Strength enum class completely. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_strong-remove-literals
Patch Set: Remove more cruft. Created 4 years, 10 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/runtime/runtime.h ('k') | src/runtime/runtime-literals.cc » ('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 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;
}
« no previous file with comments | « src/runtime/runtime.h ('k') | src/runtime/runtime-literals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698