Skip to content

Safari / Chrome discrepancies lead to problems in instantiateWasm implementation example; Uncatchable exceptions in receiveInstance #14777

Description

@vadimkantorov

These are two errors of two different modules (compiled under Emscripten 2.0.26):

[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'Module["asm"]["oa"]')
	receiveInstance (busybox_unstripped.js:9:10785)
	promiseReactionJob

[Error] Unhandled Promise Rejection: TypeError: undefined is not an object (evaluating 'Module['asm']['memory']')
	receiveInstance (busytex.js:1734)
	promiseReactionJob

I'm initialising module as:

instantiateWasm(imports, successCallback)
            {
                WebAssembly.instantiate(wasm_module, imports).then(successCallback);
            },

where wasm_module is ArrayBuffer (under Safari).

  1. How do I make it work under Safari? :)

  2. Also for some reason these Unhandled Promise Rejections do not lead to exceptions. I'm using modularised Emscripten module, so I'm doing try-catch, and await inside try. Would you know why it's not failing with an exception and how to at least handle this gracefully?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions