Skip to content

Fix JSEvents deferredCalls sort comparator. NFC#26516

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
cuiweixie:fix/html5-deferred-calls-sort-comparator
Mar 21, 2026
Merged

Fix JSEvents deferredCalls sort comparator. NFC#26516
sbc100 merged 1 commit intoemscripten-core:mainfrom
cuiweixie:fix/html5-deferred-calls-sort-comparator

Conversation

@cuiweixie
Copy link
Contributor

Use numeric subtraction so sort orders by precedence; a boolean comparator does not satisfy Array.prototype.sort's contract.

Use numeric subtraction so sort orders by precedence; a boolean
comparator does not satisfy Array.prototype.sort's contract.
Copy link
Collaborator

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

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

Thanks for fix!

BTW, is bug effecting the programs you are building? I.e. are you relying on this HTML5_SUPPORT_DEFERRING_USER_SENSITIVE_REQUESTS mechanism yourself?

@sbc100 sbc100 enabled auto-merge (squash) March 21, 2026 18:12
@sbc100 sbc100 merged commit 312eed6 into emscripten-core:main Mar 21, 2026
38 checks passed
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