Skip to content

Handle exceptions from DetachArrayBuffer #4603

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

Merged
merged 2 commits into from
May 9, 2019
Merged

Handle exceptions from DetachArrayBuffer #4603

merged 2 commits into from
May 9, 2019

Conversation

Ms2ger
Copy link
Member

@Ms2ger Ms2ger commented May 9, 2019

In particular, DetachArrayBuffer() can throw for the ArrayBuffer used as the
backing memory in the WebAssembly JS API.

This matches the current behavior in Firefox and Safari.

Fixes #4601.

(See WHATWG Working Mode: Changes for more details.)


/references.html ( diff )
/structured-data.html ( diff )

@domenic
Copy link
Member

domenic commented May 9, 2019

Can you add a note, or even better an example, explaining when this might throw? I know you can click through to DetachArrayBuffer and find out it has something to do with [[ArrayBufferDetachKey]], but I think it's pretty opaque.

@littledan
Copy link
Contributor

Chrome implementation bug: https://bugs.chromium.org/p/chromium/issues/detail?id=961059

@annevk
Copy link
Member

annevk commented May 9, 2019

So, does anyone call https://heycam.github.io/webidl/#dfn-detach?

Copy link
Contributor

@littledan littledan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #4601 (comment) for specification cross-references to understand this fix.

In particular, DetachArrayBuffer() can throw for the ArrayBuffer used as the
backing memory in the WebAssembly JS API.

This matches the current behavior in Firefox and Safari.

Fixes #4601.
@Ms2ger Ms2ger force-pushed the detacharraybuffer branch from 79eec83 to 45c5284 Compare May 9, 2019 15:05
@Ms2ger
Copy link
Member Author

Ms2ger commented May 9, 2019

Added a note

@domenic domenic force-pushed the detacharraybuffer branch from 5403530 to f8e26d5 Compare May 9, 2019 16:03
@domenic domenic merged commit c04117f into master May 9, 2019
@domenic domenic deleted the detacharraybuffer branch May 9, 2019 16:20
Ms2ger added a commit to web-platform-tests/wpt that referenced this pull request May 10, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 5, 2019
…y ArrayBuffer, a=testonly

Automatic update from web-platform-tests
Add a test for transferring a WebAssembly ArrayBuffer

See <whatwg/html#4603>.

--

wpt-commits: e92b4f5a8819d195c5ee5807261cfaa46520dac6
wpt-pr: 16746
mykmelez pushed a commit to mykmelez/gecko that referenced this pull request Jun 6, 2019
…y ArrayBuffer, a=testonly

Automatic update from web-platform-tests
Add a test for transferring a WebAssembly ArrayBuffer

See <whatwg/html#4603>.

--

wpt-commits: e92b4f5a8819d195c5ee5807261cfaa46520dac6
wpt-pr: 16746
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 23, 2019
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 4, 2019
…y ArrayBuffer, a=testonly

Automatic update from web-platform-tests
Add a test for transferring a WebAssembly ArrayBuffer

See <whatwg/html#4603>.

--

wpt-commits: e92b4f5a8819d195c5ee5807261cfaa46520dac6
wpt-pr: 16746

UltraBlame original commit: e261df73282723d85a2e7dc366f73a11cd8ac6c5
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 4, 2019
…y ArrayBuffer, a=testonly

Automatic update from web-platform-tests
Add a test for transferring a WebAssembly ArrayBuffer

See <whatwg/html#4603>.

--

wpt-commits: e92b4f5a8819d195c5ee5807261cfaa46520dac6
wpt-pr: 16746

UltraBlame original commit: e261df73282723d85a2e7dc366f73a11cd8ac6c5
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 4, 2019
…y ArrayBuffer, a=testonly

Automatic update from web-platform-tests
Add a test for transferring a WebAssembly ArrayBuffer

See <whatwg/html#4603>.

--

wpt-commits: e92b4f5a8819d195c5ee5807261cfaa46520dac6
wpt-pr: 16746

UltraBlame original commit: e261df73282723d85a2e7dc366f73a11cd8ac6c5
bhearsum pushed a commit to mozilla-releng/staging-firefox that referenced this pull request May 1, 2025
…y ArrayBuffer, a=testonly

Automatic update from web-platform-tests
Add a test for transferring a WebAssembly ArrayBuffer

See <whatwg/html#4603>.

--

wpt-commits: e92b4f5a8819d195c5ee5807261cfaa46520dac6
wpt-pr: 16746
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

postMessage, WebAssembly.Memory, and undetachable ArrayBuffers
4 participants