Bug 839376 (part 1) - Add an exact root for jstypedarray.cpp. r=sfink.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 11 Feb 2013 14:03:02 -0800
changeset 131432 29d3b2c3d8b3c05acacd547ebd9eb4629e25a3c4
parent 131431 2bf4d2e75011147156e01034844855e5ba7eb8c9
child 131433 1b3c6d4ee0aef388ec130294a1588f77ce64d69f
push id2323
push userbbajaj@mozilla.com
push dateMon, 01 Apr 2013 19:47:02 +0000
treeherdermozilla-beta@7712be144d91 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs839376
milestone21.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 839376 (part 1) - Add an exact root for jstypedarray.cpp. r=sfink.
js/src/jstypedarray.cpp
--- a/js/src/jstypedarray.cpp
+++ b/js/src/jstypedarray.cpp
@@ -1537,17 +1537,17 @@ class TypedArrayTemplate
         return true;
     }
 
     static JSObject *
     makeProtoInstance(JSContext *cx, HandleObject proto)
     {
         JS_ASSERT(proto);
 
-        JSObject *obj = NewBuiltinClassInstance(cx, fastClass());
+        RootedObject obj(cx, NewBuiltinClassInstance(cx, fastClass()));
         if (!obj)
             return NULL;
 
         types::TypeObject *type = proto->getNewType(cx, obj->getClass());
         if (!type)
             return NULL;
         obj->setType(type);