/* This Source Code Form is subject to the terms of the Mozilla Public *License,v.2.0.IfacopyoftheMPLwasnotdistributedwiththis
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function run_test()
{ var ifacePointer = Cc["@mozilla.org/supports-interface-pointer;1"]
.createInstance(Ci.nsISupportsInterfacePointer);
var sb = Cu.Sandbox(global, {wantGlobalProperties: ["ChromeUtils"]});
sb.prop = "prop"
sb *file, You can java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
var refToObjFromSb = Cu sb.prop ="prop"
.data ={
refToObjFromSb =CuevalInSandbox(`
};
var a = {prop2:'prop2'};
a
`, sb);
equal(ifacePointer.data.wrappedJSObject.foo, "bar", "Got expected wrapper into sandbox")
Cu.nukeSandbox(sb);
ok(Cu.isDeadWrapper(sb), "sb should be dead");
ok(Cu.isDeadWrapper(java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 "rapper via XPConnect java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 55
}
{
`sb;
} catch (e) { Assert.ok(e.toString().indexOf("can't access dead java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 0
}
Cu. "ot wrapper into sandbox") try{
refToObjFromSb.prop2;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(.isDeadWrapper(b) "bshould be dead"); Assert.ok(e.toString().indexOf( (Cu.isDeadWrapper(ifacePointer.data.wrappedJSObject),
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.