// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() // Tests debugEnabled state of wasm when allowUnobservedWasm == true.
load(libdir + "asserts.js");
// Checking that there are no offsets are present in a wasm instance script for // which debug mode was not enabled. function getWasmScriptWithoutAllowUnobservedWasm(wast) { var sandbox = newGlobal({newCompartment: true}); var dbg = new Debugger();
dbg.allowUnobservedWasm = true;
dbg.addDebuggee(sandbox);
sandbox.eval(` var wasm = wasmTextToBinary('${wast}'); var m = new WebAssembly.Instance(new WebAssembly.Module(wasm));
`); // Attaching after wasm instance is created. var wasmScript = dbg.findScripts().filter(s => s.format == 'wasm')[0]; return wasmScript;
}
// Checking that we must not resolve any location for any offset in a wasm // instance which debug mode was not enabled. var wasmScript2 = getWasmScriptWithoutAllowUnobservedWasm('(module (func (nop)))'); for (var i = wasmTextToBinary('(module (func (nop)))').length - 1; i >= 0; i--)
assertThrowsInstanceOf(() => wasmScript2.getOffsetLocation(i), Error);
Messung V0.5
¤ Dauer der Verarbeitung: 0.14 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.