Bug 1357680 part 2 - Remove unnecessary setNewGroupUnknown call in SetClassAndProto. r=bhackett
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 25 Apr 2017 13:52:06 +0200
changeset 354805 c35f0ad34397990adec0612015eb1a2a566434da
parent 354804 a088990038615b40e43edcd4085a2b959cc14959
child 354806 4de83aa3b81782d11b36c3bb76eb5cdc3e0dab5f
push id31714
push userkwierso@gmail.com
push dateTue, 25 Apr 2017 20:53:09 +0000
treeherdermozilla-central@2c497462f25e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs1357680
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1357680 part 2 - Remove unnecessary setNewGroupUnknown call in SetClassAndProto. r=bhackett
js/src/jsobj.cpp
--- a/js/src/jsobj.cpp
+++ b/js/src/jsobj.cpp
@@ -1966,22 +1966,16 @@ js::SetClassAndProto(JSContext* cx, Hand
          * consistent behavior.
          */
         if (!JSObject::splicePrototype(cx, obj, clasp, proto))
             return false;
         MarkObjectGroupUnknownProperties(cx, obj->group());
         return true;
     }
 
-    if (proto.isObject()) {
-        RootedObject protoObj(cx, proto.toObject());
-        if (!JSObject::setNewGroupUnknown(cx, clasp, protoObj))
-            return false;
-    }
-
     ObjectGroup* group = ObjectGroup::defaultNewGroup(cx, clasp, proto);
     if (!group)
         return false;
 
     /*
      * Setting __proto__ on an object that has escaped and may be referenced by
      * other heap objects can only be done if the properties of both objects
      * are unknown. Type sets containing this object will contain the original