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

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

Issue 2610683003: [ignition] Only initialize [[HomeObject]] for class constructors if needed (Closed)
Patch Set: Fix bytecode expectations Created 3 years, 11 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
Index: src/runtime/runtime-classes.cc
diff --git a/src/runtime/runtime-classes.cc b/src/runtime/runtime-classes.cc
index ca2df80355b741f9ef30a81ec284070705376e2e..16edc99e57098f766a8776746f0f8df19dcbef10 100644
--- a/src/runtime/runtime-classes.cc
+++ b/src/runtime/runtime-classes.cc
@@ -167,13 +167,6 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate,
prototype, attribs),
Object);
- // TODO(arv): Only do this conditionally.
arv (Not doing code reviews) 2017/01/05 05:18:43 Thanks
- Handle<Symbol> home_object_symbol(isolate->heap()->home_object_symbol());
- RETURN_ON_EXCEPTION(
- isolate, JSObject::SetOwnPropertyIgnoreAttributes(
- constructor, home_object_symbol, prototype, DONT_ENUM),
- Object);
-
if (!constructor_parent.is_null()) {
MAYBE_RETURN_NULL(JSObject::SetPrototype(constructor, constructor_parent,
false, Object::THROW_ON_ERROR));
@@ -195,7 +188,8 @@ static MaybeHandle<Object> DefineClass(Isolate* isolate,
handle(Smi::FromInt(end_position), isolate), STRICT),
Object);
- return constructor;
+ // Caller already has access to constructor, so return the prototype.
+ return prototype;
}
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | test/cctest/interpreter/bytecode_expectations/ClassDeclarations.golden » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698