Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken JS glue for AUDIO_WORKLETS with EXPORT_ES6 #21192

Merged
merged 1 commit into from
Feb 8, 2024

Commits on Feb 3, 2024

  1. Fix broken JS glue for AUDIO_WORKLETS with EXPORT_ES6

    WASM Audio Worklets with EXPORT_ES6 may break at runtime:
    
      test.js:989 Uncaught (in promise) TypeError: Cannot set property wasmTable of #<Object> which has only a getter
          at receiveInstance (test.js:989:25)
          at receiveInstantiationResult (test.js:1011:5)
    
    The read-only getter at issue is created in ASSERTIONS-enabled
    builds, and conflicts with the current way of exporting wasmTable
    on the Module object.
    
    Exporting wasmTable via EXPORTED_RUNTIME_METHODS prevents the getter
    from being created in normal builds. In MINIMAL_RUNTIME builds, we
    make sure to delete the getter before manually exporting as before.
    
    We also prevent an ES6 Audio Worklet from loading the .wasm binary
    via `new URL()`, as `URL` is unavailable in AudioWorkletGlobalScope.
    kangtastic committed Feb 3, 2024
    Configuration menu
    Copy the full SHA
    1887cc4 View commit details
    Browse the repository at this point in the history