Bug 625191 - Root Bindings used in JS_CompileUCFunctionForPrincipals. rs=gwagner
authorJeff Walden <jwalden@mit.edu>
Wed, 12 Jan 2011 17:09:06 -0600
changeset 60570 6ef4c13f0941e7536238c099cba64dff202d3748
parent 60569 2d3cbd00376d0d6962988825fc882eb5c701db8e
child 60571 7e5853562debba1c7b905cc1ce73a41695dbc748
push id18037
push usercleary@mozilla.com
push dateFri, 14 Jan 2011 17:42:55 +0000
treeherdermozilla-central@4e0501a0c5e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgwagner
bugs625191
milestone2.0b10pre
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 625191 - Root Bindings used in JS_CompileUCFunctionForPrincipals. rs=gwagner
js/src/jsapi.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -4731,16 +4731,17 @@ JS_CompileUCFunctionForPrincipals(JSCont
     if (!fun)
         goto out2;
 
     {
         AutoObjectRooter tvr(cx, FUN_OBJECT(fun));
         MUST_FLOW_THROUGH("out");
 
         Bindings bindings(cx);
+        AutoBindingsRooter root(cx, bindings);
         for (i = 0; i < nargs; i++) {
             argAtom = js_Atomize(cx, argnames[i], strlen(argnames[i]), 0);
             if (!argAtom) {
                 fun = NULL;
                 goto out2;
             }
 
             uint16 dummy;