[web/skwasm] Remove name-based export of function#188256
Open
mkustermann wants to merge 1 commit into
Open
Conversation
The `@pragma('wasm:export')` is intended to be used on functions that
are called by-name from JS or by imported by-name by other wasm modules.
Though the `callbackHandler` seems to be not called by name, instead a
wasm funcref is taken from the function and passed to an imported
`skwasmWrapper.addFunction` function.
Removing the annotation can improve scenarios where flutter is loaded
via deferred loading. It allows defering this function and anything it
depends on (including ffi things).
This can land after dart-lang/sdk@702c9e4eea444 rolled up to flutter.
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes the @pragma('wasm:export') annotation from the callbackHandler function in surface.dart. I have no feedback to provide.
Member
Author
|
/cc @schultek |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
@pragma('wasm:export')is intended to be used on functions that are called by-namefrom JS or imported by-name by other wasm modules.
Though the
callbackHandlerseems to be not called by name, instead a wasm funcrefis taken from the function and passed to an imported
skwasmWrapper.addFunctionfunction.Removing the annotation can improve scenarios where flutter is loaded via deferred loading.
It allows defering this function and anything it depends on (including ffi things).
This can land after dart-lang/sdk@702c9e4eea444 rolled up to flutter.