Backed out changeset 4a8eb498c244 (bug 972087) for potentially breaking the build on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 28 Feb 2014 14:32:09 -0800
changeset 189580 cc06ddfe4b3a312b013bc1e48c37165fd3ae16da
parent 189579 18f113ab1a354c218f5217c98f4969fb977d1bf4
child 189581 b8c1ff82160e557b0d08f75abd4161fa309df22d
push id474
push userasasaki@mozilla.com
push dateMon, 02 Jun 2014 21:01:02 +0000
treeherdermozilla-release@967f4cf1b31c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs972087
milestone30.0a1
backs out4a8eb498c24468466765d42defc459c123ca4222
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
Backed out changeset 4a8eb498c244 (bug 972087) for potentially breaking the build on a CLOSED TREE
js/src/vm/SelfHosting.cpp
--- a/js/src/vm/SelfHosting.cpp
+++ b/js/src/vm/SelfHosting.cpp
@@ -1008,29 +1008,26 @@ static JSObject *
 CloneObject(JSContext *cx, JSObject *selfHostedObject, CloneMemory &clonedObjects)
 {
     DependentAddPtr<CloneMemory> p(cx, clonedObjects, selfHostedObject);
     if (p)
         return p->value();
     RootedObject clone(cx);
     if (selfHostedObject->is<JSFunction>()) {
         JSFunction *selfHostedFunction = &selfHostedObject->as<JSFunction>();
-        bool needsName = selfHostedFunction->isInterpreted() &&
-                         selfHostedFunction->atom() != nullptr;
-        js::gc::AllocKind kind = needsName
+        bool hasName = selfHostedFunction->atom() != nullptr;
+        js::gc::AllocKind kind = hasName
                                  ? JSFunction::ExtendedFinalizeKind
                                  : selfHostedFunction->getAllocKind();
         clone = CloneFunctionObject(cx, HandleFunction::fromMarkedLocation(&selfHostedFunction),
                                     cx->global(), kind, TenuredObject);
-        // To be able to re-lazify cloned interpreted functions, their name in
-        // the self-hosting compartment has to be stored on the clone.
-        if (clone && needsName) {
-            JS_ASSERT(clone->as<JSFunction>().isSelfHostedBuiltin());
+        // To be able to re-lazify the cloned function, its name in the
+        // self-hosting compartment has to be stored on the clone.
+        if (clone && hasName)
             clone->as<JSFunction>().setExtendedSlot(0, StringValue(selfHostedFunction->atom()));
-        }
     } else if (selfHostedObject->is<RegExpObject>()) {
         RegExpObject &reobj = selfHostedObject->as<RegExpObject>();
         RootedAtom source(cx, reobj.getSource());
         JS_ASSERT(source->isPermanentAtom());
         clone = RegExpObject::createNoStatics(cx, source, reobj.getFlags(), nullptr);
     } else if (selfHostedObject->is<DateObject>()) {
         clone = JS_NewDateObjectMsec(cx, selfHostedObject->as<DateObject>().UTCTime().toNumber());
     } else if (selfHostedObject->is<BooleanObject>()) {