Bug 1081990 - Fix up test suite. r=gabor
authorBobby Holley <bobbyholley@gmail.com>
Sat, 18 Oct 2014 11:02:09 +0200
changeset 211110 aa887bd167cd16b83c04450c99dbb5bb18b0275a
parent 211109 7383d7a819fd4d72706e7e34e825fe976b30c385
child 211111 c66cc3b4f587e877edc838ca6f0ef567ac9981b5
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersgabor
bugs1081990
milestone36.0a1
Bug 1081990 - Fix up test suite. r=gabor
js/xpconnect/tests/unit/test_bug930091.js
--- a/js/xpconnect/tests/unit/test_bug930091.js
+++ b/js/xpconnect/tests/unit/test_bug930091.js
@@ -12,14 +12,14 @@ function checkThrows(fn) {
 function run_test() {
   var xosb = new Cu.Sandbox('http://www.example.org');
   var sb = new Cu.Sandbox('http://www.example.com');
   sb.do_check_true = do_check_true;
   sb.fun = function() { ok(false, "Shouldn't ever reach me"); };
   sb.cow = { foopy: 2, __exposedProps__: { foopy: 'rw' } };
   sb.payload = Cu.evalInSandbox('new Object()', xosb);
   Cu.evalInSandbox(checkThrows.toSource(), sb);
-  Cu.evalInSandbox('checkThrows(fun.bind(null, payload));', sb);
-  Cu.evalInSandbox('checkThrows(fun.bind(payload));', sb);
+  Cu.evalInSandbox('checkThrows(Function.bind.call(fun, null, payload));', sb);
+  Cu.evalInSandbox('checkThrows(Function.bind.call(fun, payload));', sb);
   Cu.evalInSandbox('checkThrows(function() { new fun(payload); });', sb);
   Cu.evalInSandbox('checkThrows(function() { cow.foopy = payload; });', sb);
   Cu.evalInSandbox('checkThrows(function() { Object.defineProperty(cow, "foopy", { value: payload }); });', sb);
 }