Commit 1a180f56 authored by Steve Fink's avatar Steve Fink
Browse files

Bug 927204 - Cannot AddNamedRoot a nullptr, r=terrence

parent 3dee7b1a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@ BEGIN_TEST(testChromeBuffer)

    if (!JS_AddNamedObjectRoot(cx, &trusted_glob, "trusted-global"))
        return false;
    if (!JS_AddNamedObjectRoot(cx, &trusted_fun, "trusted-function"))
        return false;

    JSFunction *fun;

@@ -70,6 +68,8 @@ BEGIN_TEST(testChromeBuffer)
                                                        "trusted", 1, &paramName, bytes, strlen(bytes),
                                                        "", 0));
            trusted_fun = JS_GetFunctionObject(fun);
            if (!JS_AddNamedObjectRoot(cx, &trusted_fun, "trusted-function"))
                return false;
        }

        JS::RootedValue v(cx, JS::ObjectValue(*trusted_fun));