Skip to content

editorial: correct AbstractModuleSource host invariants#77

Merged
guybedford merged 3 commits into
mainfrom
invariant-fix
Mar 25, 2026
Merged

editorial: correct AbstractModuleSource host invariants#77
guybedford merged 3 commits into
mainfrom
invariant-fix

Conversation

@guybedford

@guybedford guybedford commented Mar 24, 2026

Copy link
Copy Markdown
Collaborator

This resolves a question recently brought up by @dminor in ensuring the following corrections to the stated host properties on module sources:

  1. Both prototype links are now described as "initial" state
  2. %AbstractModuleSource% replaced with %AbstractModuleSource%.prototype to correct the invariant since it was clearly a bug to point to the constructor function itself
  3. Instead of stating "when set", state "when not empty"

//cc @nicolo-ribaudo @legendecas

@nicolo-ribaudo nicolo-ribaudo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would also be interested in unifying the two definitions of source, updating this table to just say "a module source object", and defining a module source object as an object whose initial [[Prototype]] is an object whose initial [[Prototype]] is %AbstractModuleSource%.prototype.

@guybedford guybedford changed the title editorical: correct AbstractModuleSource host invariants editorial: correct AbstractModuleSource host invariants Mar 24, 2026
@guybedford

Copy link
Copy Markdown
Collaborator Author

@nicolo-ribaudo I've updated the module source object definition to match this now.

@guybedford
guybedford merged commit f898f14 into main Mar 25, 2026
1 check passed
@guybedford
guybedford deleted the invariant-fix branch March 25, 2026 15:54
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