diff --git a/AUTHORS b/AUTHORS index 37bb2be302566..16028e87dd56a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -315,5 +315,6 @@ a license to everyone to use it as detailed in LICENSE.) * Jiajie Hu (copyright owned by Intel Corporation) * Kamil Klimek * José Carlos Pujol +* Dannii Willis diff --git a/tools/emterpretify.py b/tools/emterpretify.py index 083b1a1fb822d..e06fad392b54b 100755 --- a/tools/emterpretify.py +++ b/tools/emterpretify.py @@ -991,7 +991,9 @@ def post_process_code(code): js += [''' var bytecodeFile = Module['emterpreterFile']; - assert(bytecodeFile instanceof ArrayBuffer, 'bad or missing emterpreter file. if you compiled to JS (and not HTML) make sure you set Module["emterpreterFile"]'); + if (!(bytecodeFile instanceof ArrayBuffer)) { + throw "bad or missing emterpreter file. If you compiled to JS (and not HTML) make sure you set Module['emterpreterFile']"; + } var codeSize = %d; HEAPU8.set(new Uint8Array(bytecodeFile).subarray(0, codeSize), eb); assert(HEAPU8[eb] === %d);