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

Avoid adding hooks for globalThis in MODULARIZE mode #22638

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Sep 26, 2024

Fixes: #22588

@sbc100 sbc100 requested a review from kripken September 26, 2024 19:34
// case.
//
// In this mode we simply ignore requests for `hookGlobalSymbolAccess`.
#else
Copy link
Member

Choose a reason for hiding this comment

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

To make it clearer why it is valid to ignore here, how about renaming this function to addWarningOnGlobalSymbol? By saying that it is a warning, it is clear that it is optional.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, will do, however all functions in this file are debug only so I think it should fairly clear.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, good point. In that case lgtm with just a comment here, like "As everything else in this file, these are just debug checks, so we simply avoid them in this case."

@sbc100 sbc100 merged commit a17e9d1 into emscripten-core:main Sep 30, 2024
2 of 8 checks passed
@sbc100 sbc100 deleted the modularize_globalThis branch September 30, 2024 21:25
@juj
Copy link
Collaborator

juj commented Sep 30, 2024

Yeh, this is probably simplest, rather than trying to codegen the checks. Thanks for thinking about this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants