Bug 1357711 - Remove unnecessary function delazification in JSObject::makeLazyGroup. r=bhackett
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 19 Apr 2017 16:42:58 +0200
changeset 565185 336b737be49aed46ef67c6b2e54bc066b1abf934
parent 565184 7c5628d40478bf50c4054acb5eb67871fa7168d5
child 565186 26825d7a225d98a9b29def0e0871ed7d8d3cb62f
push id54802
push userdgottwald@mozilla.com
push dateWed, 19 Apr 2017 15:26:27 +0000
reviewersbhackett
bugs1357711
milestone55.0a1
Bug 1357711 - Remove unnecessary function delazification in JSObject::makeLazyGroup. r=bhackett
js/src/vm/ObjectGroup.cpp
--- a/js/src/vm/ObjectGroup.cpp
+++ b/js/src/vm/ObjectGroup.cpp
@@ -307,23 +307,16 @@ JSObject::splicePrototype(JSContext* cx,
 }
 
 /* static */ ObjectGroup*
 JSObject::makeLazyGroup(JSContext* cx, HandleObject obj)
 {
     MOZ_ASSERT(obj->hasLazyGroup());
     MOZ_ASSERT(cx->compartment() == obj->compartment());
 
-    /* De-lazification of functions can GC, so we need to do it up here. */
-    if (obj->is<JSFunction>() && obj->as<JSFunction>().isInterpretedLazy()) {
-        RootedFunction fun(cx, &obj->as<JSFunction>());
-        if (!JSFunction::getOrCreateScript(cx, fun))
-            return nullptr;
-    }
-
     // Find flags which need to be specified immediately on the object.
     // Don't track whether singletons are packed.
     ObjectGroupFlags initialFlags = OBJECT_FLAG_SINGLETON | OBJECT_FLAG_NON_PACKED;
 
     if (obj->isIteratedSingleton())
         initialFlags |= OBJECT_FLAG_ITERATED;
 
     if (obj->isIndexed())