Skip to content

Normative: Shield dynamic import defer against Promise.prototype monkey patch#77

Open
caiolima wants to merge 2 commits intotc39:mainfrom
caiolima:safe-perform-promise-all
Open

Normative: Shield dynamic import defer against Promise.prototype monkey patch#77
caiolima wants to merge 2 commits intotc39:mainfrom
caiolima:safe-perform-promise-all

Conversation

@caiolima
Copy link

@caiolima caiolima commented Feb 9, 2026

This change introduces a new Promise.all abstract operation that is close to PerformPromiseAll, but it expects a list of native promises and it calls PerformThen instead of Invoke(...,"then",...). This shields dynamic import from Promise.prototype.then monkey-patching.

The motivation behind this change comes from a discussion (ref) while implementing this feature on V8. It makes the implementation simpler, and it also avoid a new place where monkey-patching Promises would create some impact.

@nicolo-ribaudo nicolo-ribaudo changed the title Normative: Shield dynamic import defer agains Promise.prototype monkey patch Normative: Shield dynamic import defer against Promise.prototype monkey patch Feb 9, 2026
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.

3 participants