mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 1362807 - Keep wasm scripts live so the GC cannot kill one before findScripts sees it, r=yury
--HG-- extra : rebase_source : 76eed5ac5d7f22ae3a3d0f87f2565ee448975249
This commit is contained in:
parent
31873f0e6b
commit
ef72c77b25
@ -6,7 +6,7 @@ if (!wasmIsSupported())
|
||||
var g = newGlobal();
|
||||
g.eval(`
|
||||
function initWasm(s) { return new WebAssembly.Instance(new WebAssembly.Module(wasmTextToBinary(s))); }
|
||||
o = initWasm('(module (func) (export "" 0))');
|
||||
o1 = initWasm('(module (func) (export "" 0))');
|
||||
o2 = initWasm('(module (func) (func) (export "" 1))');
|
||||
`);
|
||||
|
||||
@ -14,7 +14,7 @@ function isWasm(script) { return script.format === "wasm"; }
|
||||
|
||||
function isValidWasmURL(url) {
|
||||
// The URLs will have the following format:
|
||||
// wasm: [<uri-econded-filename-of-host> ":"] <64-bit-hash>
|
||||
// wasm: [<uri-encoded-filename-of-host> ":"] <64-bit-hash>
|
||||
return /^wasm:(?:[^:]*:)*?[0-9a-f]{16}$/.test(url);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user