Bug 589216 - TM: fix another crossCompartment call in jsapi-tests r=jorendorff
authorGregor Wagner <anygregor@gmail.com>
Fri, 20 Aug 2010 17:23:47 -0700
changeset 51442 3d1ce92d03db83ffea18645e2a04b945d51175c1
parent 51441 b5ef64f4655fa487390d90c556a1db9f330f43c8
child 51443 311ae2addf12fa79cd81c51b4747ecf76377229d
push idunknown
push userunknown
push dateunknown
reviewersjorendorff
bugs589216
milestone2.0b5pre
Bug 589216 - TM: fix another crossCompartment call in jsapi-tests r=jorendorff
js/src/jsapi-tests/testContexts.cpp
--- a/js/src/jsapi-tests/testContexts.cpp
+++ b/js/src/jsapi-tests/testContexts.cpp
@@ -63,16 +63,18 @@ BEGIN_TEST(testContexts_bug561444)
         ThreadData *d = (ThreadData *) arg;
 
         JSContext *cx = JS_NewContext(d->rt, 8192);
         if (!cx)
             return;
         JS_BeginRequest(cx);
         {
             jsvalRoot v(cx);
+            JSAutoCrossCompartmentCall crossCall;
+            crossCall.enter(cx, d->obj);            
             if (!JS_EvaluateScript(cx, d->obj, d->code, strlen(d->code), __FILE__, __LINE__, v.addr()))
                 return;
         }
         JS_DestroyContext(cx);
         d->ok = true;
     }
 END_TEST(testContexts_bug561444)
 #endif