From d797c751df60aa5731a0cfaed1cc00811a5e273b Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 16 Sep 2022 09:33:08 -0700 Subject: wasm2js: Don't assume that `env.abort` can always be impored. (#5049) This import was being injected and then used to implement trapping. Rather than injecting an import that doesn't exist in the original module we instead use the existing mechanism to implement this as an internal helper. --- test/wasm2js/get-set-local.2asm.js.opt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'test/wasm2js/get-set-local.2asm.js.opt') diff --git a/test/wasm2js/get-set-local.2asm.js.opt b/test/wasm2js/get-set-local.2asm.js.opt index c457a4b90..fb0520b91 100644 --- a/test/wasm2js/get-set-local.2asm.js.opt +++ b/test/wasm2js/get-set-local.2asm.js.opt @@ -11,7 +11,6 @@ function asmFunc(importObject) { var Math_ceil = Math.ceil; var Math_trunc = Math.trunc; var Math_sqrt = Math.sqrt; - var abort = env.abort; var nan = NaN; var infinity = Infinity; function legalstub$1($0, $1, $2) { @@ -23,6 +22,6 @@ function asmFunc(importObject) { }; } -var retasmFunc = asmFunc( { abort: function() { throw new Error('abort'); } - }); +var retasmFunc = asmFunc({ +}); export var check_extend_ui32 = retasmFunc.check_extend_ui32; -- cgit v1.2.3