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

Remove offset-converter run dependency. NFC #14757

Merged
merged 2 commits into from
Jul 27, 2021
Merged

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Jul 26, 2021

Remove offset-converter run dependency. NFC

Following up on the change made in #14611, this change forces the
WasmOffsetConverter before calling receiveInstantiationResult in both
code paths (instantiateArrayBuffer and instantiateAsync).

With that done (along with #14755) there are no more valid use cases for
to block execution based on the absence of WasmOffsetConverter. By
the time the instance is received it is always defined.

@sbc100 sbc100 force-pushed the fix_offset_converter_modularize branch from c8307db to 00096d9 Compare July 26, 2021 22:21
Base automatically changed from fix_offset_converter_modularize to main July 26, 2021 23:48
@sbc100 sbc100 requested a review from kripken July 26, 2021 23:58
@sbc100 sbc100 force-pushed the limit_run_dependencies branch 2 times, most recently from 1de42f6 to 63361f7 Compare July 27, 2021 00:39
@sbc100 sbc100 changed the title Only use offset-converter run dependency when actually needed. NFC Remove offset-converter run dependency. NFC Jul 27, 2021
@sbc100 sbc100 force-pushed the limit_run_dependencies branch 3 times, most recently from 9ba935d to f41191a Compare July 27, 2021 15:54
src/preamble.js Outdated
return WebAssembly.instantiate(binary, info);
}).then(function (instance) {
#if USE_OFFSET_CONVERTER
// See comment below in instantiateAsync
Copy link
Member

Choose a reason for hiding this comment

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

Which comment does this refer to? If it's for We need the wasm binary for the offset converter .. then I'm not sure how it's related?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The one on line 1139: When using the offset converter, we must interpose here..

Basically we can't call receiver before we have assigned wasmOffsetConverter .. for the same reason as on line 1139. I believe you fixed this in #14611 for the normal instantiateAsync but not for the fallback instantiateArrayBuffer.

src/preamble.js Outdated Show resolved Hide resolved
Following up on the change made in #14611, this change forces the
`WasmOffsetConverter` before calling receiveInstantiationResult in both
code paths (instantiateArrayBuffer and instantiateAsync).

With that done (along with #14755) there are no more valid use cases for
to block execution based on the absence of `WasmOffsetConverter`.  By
the time the instance is received it is always defined.
Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

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

I see, makes sense. Yes, I think that's right.

src/preamble.js Outdated Show resolved Hide resolved
Co-authored-by: Alon Zakai <[email protected]>
@sbc100 sbc100 merged commit 1abc342 into main Jul 27, 2021
@sbc100 sbc100 deleted the limit_run_dependencies branch July 27, 2021 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants