test_bug1150771.js (470B)
1 function run_test() { 2 let sandbox1 = new Cu.Sandbox(null); 3 let sandbox2 = new Cu.Sandbox(null); 4 let arg = Cu.evalInSandbox('({ buf: new ArrayBuffer(2) })', sandbox1); 5 6 let clonedArg = Cu.cloneInto(Cu.waiveXrays(arg), sandbox2); 7 Assert.equal(typeof Cu.waiveXrays(clonedArg).buf, "object"); 8 9 clonedArg = Cu.cloneInto(arg, sandbox2); 10 Assert.equal(typeof Cu.waiveXrays(clonedArg).buf, "object"); 11 Assert.equal(Cu.waiveXrays(clonedArg).buf.constructor.name, "ArrayBuffer"); 12 }