Bug 952619 - Kill some SpiderMonkey build warnings; r=Waldo
authorTerrence Cole <terrence@mozilla.com>
Fri, 20 Dec 2013 12:48:41 -0800
changeset 161478 597dd96a08cd0de5d82fbfd05845f2e07ee9df66
parent 161477 f84ac36ce832c98ed5337ef2556b9e8854c195ba
child 161479 4c45705d14c44948b0b268f47a669053b8bbb8f2
push id37928
push usertcole@mozilla.com
push dateFri, 20 Dec 2013 20:50:59 +0000
treeherdermozilla-inbound@597dd96a08cd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersWaldo
bugs952619
milestone29.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 952619 - Kill some SpiderMonkey build warnings; r=Waldo
js/src/jsarray.cpp
js/src/jsinfer.cpp
js/src/jsinfer.h
--- a/js/src/jsarray.cpp
+++ b/js/src/jsarray.cpp
@@ -671,17 +671,16 @@ js::ArraySetLength(typename ExecutionMod
                             : arr->nativeLookup(cxArg->asJSContext(), id));
     if (!JSObject::changeProperty<mode>(cxArg, arr, lengthShape, attrs,
                                         JSPROP_PERMANENT | JSPROP_READONLY | JSPROP_SHARED,
                                         array_length_getter, array_length_setter))
     {
         return false;
     }
 
-    RootedValue v(cxArg, NumberValue(newLen));
     if (mode == ParallelExecution) {
         // Overflowing int32 requires changing TI state.
         if (newLen > INT32_MAX)
             return false;
         arr->setLengthInt32(newLen);
     } else {
         JSContext *cx = cxArg->asJSContext();
         ArrayObject::setLength(cx, arr, newLen);
--- a/js/src/jsinfer.cpp
+++ b/js/src/jsinfer.cpp
@@ -4505,16 +4505,23 @@ TypeScript::printTypes(JSContext *cx, Ha
     fprintf(stderr, "\n");
 }
 #endif /* DEBUG */
 
 /////////////////////////////////////////////////////////////////////
 // Binary data
 /////////////////////////////////////////////////////////////////////
 
+void
+TypeObject::setAddendum(TypeObjectAddendum *addendum)
+{
+    JS_ASSERT(CurrentThreadCanWriteCompilationData());
+    this->addendum = addendum;
+}
+
 bool
 TypeObject::addTypedObjectAddendum(JSContext *cx,
                                    TypeTypedObject::Kind kind,
                                    TypeRepresentation *repr)
 {
     if (!cx->typeInferenceEnabled())
         return true;
 
--- a/js/src/jsinfer.h
+++ b/js/src/jsinfer.h
@@ -997,20 +997,17 @@ struct TypeObject : gc::BarrieredCell<Ty
     }
 
     TypeTypedObject *typedObject() {
         JS_ASSERT(CurrentThreadCanReadCompilationData());
         AutoThreadSafeAccess ts(this);
         return addendum->asTypedObject();
     }
 
-    void setAddendum(TypeObjectAddendum *addendum) {
-        JS_ASSERT(CurrentThreadCanWriteCompilationData());
-        this->addendum = addendum;
-    }
+    void setAddendum(TypeObjectAddendum *addendum);
 
     /*
      * Tag the type object for a binary data type descriptor, instance,
      * or handle with the type representation of the data it points at.
      * If this type object is already tagged with a binary data addendum,
      * this addendum must already be associated with the same TypeRepresentation,
      * and the method has no effect.
      */