Bug 587898 - TM: fix CrossCompartmentCall in jsapi tests (r=jorendorff)
authorGregor Wagner <anygregor@gmail.com>
Tue, 17 Aug 2010 09:11:01 -0700
changeset 51071 33989e03c28783a2b6d20cbbd814d2e3442c1e75
parent 51070 af8d71b0de3b05e7944ca13aae5fc3181e17b1dd
child 51072 00a1d96d3da2cb952a47f6f5744148c4ca65b75f
push idunknown
push userunknown
push dateunknown
reviewersjorendorff
bugs587898
milestone2.0b4pre
Bug 587898 - TM: fix CrossCompartmentCall 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
@@ -80,16 +80,18 @@ END_TEST(testContexts_bug561444)
 BEGIN_TEST(testContexts_bug563735)
 {
     JSContext *cx2 = JS_NewContext(rt, 8192);
     CHECK(cx2);
 
     JSBool ok;
     {
         JSAutoRequest req(cx2);
+        JSAutoCrossCompartmentCall crossCall;
+        CHECK(crossCall.enter(cx2, global));
         jsval v = JSVAL_NULL;
         ok = JS_SetProperty(cx2, global, "x", &v);
     }
     CHECK(ok);
 
     EXEC("(function () { for (var i = 0; i < 9; i++) ; })();");
 
     JS_DestroyContext(cx2);