// Privileged compartment accessing privileged stack.
let stack = getSavedFrameInstanceFromSandbox(high);
let parent = stack.parent;
let asyncParent = stack.asyncParent;
let source = stack.source;
let functionDisplayName = stack.functionDisplayName;
ok(true, "Didn't crash");
}
// Get a SavedFrame instance from inside the given sandbox. // // We can't use Cu.getJSTestingFunctions().saveStack() because Cu isn't // available to sandboxes that don't have the system principal. The easiest way // to get the SavedFrame is to use the Debugger API to track allocation sites // and then do an allocation. function getSavedFrameInstanceFromSandbox(sandbox) { const dbg = new Debugger(sandbox);
ok(allocs[0], "We should observe the allocation"); const { frame } = allocs[0];
if (sandbox !== high) {
ok(Cu.isXrayWrapper(frame), "`frame` should be an xray...");
equal(Object.prototype.toString.call(Cu.waiveXrays(frame)), "[object SavedFrame]", "...and that xray should wrap a SavedFrame");
}
return frame;
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet)
¤
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.