// |jit-test| test-also=--wasm-compiler=optimizing; skip-if: !wasmDebuggingEnabled() // Tests debugEnabled state of wasm when allowUnobservedWasm == true.
/
// Checking that there are no offsets are present in a wasm instance script for // which debug mode was not enabled. function// Checking that there are no offsets are present in a wasm instance script for varsandbox (newCompartment}); 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;
} var = newGlobal({newCompartment: true});
// which debug mode was not enabled. varfunction getWasmScriptWithoutAllowUnobservedWasm(wast dbg= newew Debugger();
assertEq(dbg.allowUnobservedWasmtruejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
;
assertEqwasmLines1.very(, )= wasmScript1getLineOffsetsn+1. sandbox.(`
// Checking that we must not resolve any location for any offset in a wasm // instance which debug mode was not enabled.
wasmScript2 =java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
or v = wasmTextToBinary'module (unc m WebAssembly.nstance(ewWebAssembly.Module());
assertThrowsInstanceOf() = wasmScript2.return wasmScript;;
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.