Skip to content

Add assertion for ancestorOrigins - #12630

Open
TimvdLippe wants to merge 2 commits into
whatwg:mainfrom
TimvdLippe:remove-unused-variable
Open

Add assertion for ancestorOrigins#12630
TimvdLippe wants to merge 2 commits into
whatwg:mainfrom
TimvdLippe:remove-unused-variable

Conversation

@TimvdLippe

@TimvdLippe TimvdLippe commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

It can be null, as initially "internal ancestor origin objects"
is null and is only initialized later. The assertion makes sure
that it happens first in the parent and then in the child.

The previous step referenced a variable that is no longer
present in the algorithm after e161310

(See WHATWG Working Mode: Changes for more details.)


/dom.html ( diff )

This is not referenced in the algorithm and instead
parentDoc is used.
@TimvdLippe

Copy link
Copy Markdown
Contributor Author

Hm, this line probably needs to be Assert: ancestorOrigins is not null CC @zcorpan

@TimvdLippe

Copy link
Copy Markdown
Contributor Author

Relevant Servo PR that uncovers these issues: servo/servo#46056

@zcorpan

zcorpan commented Aug 5, 2026

Copy link
Copy Markdown
Member

Hm, this line probably needs to be Assert: ancestorOrigins is not null CC @zcorpan

Yes that can be added.

@TimvdLippe

Copy link
Copy Markdown
Contributor Author

Do you want me to make that change in this PR (and thus make it a normative change) or in a separate PR?

@zcorpan

zcorpan commented Sep 4, 2026

Copy link
Copy Markdown
Member

@TimvdLippe either is OK.

It can be `null`, as initially "internal ancestor origin objects"
is `null` and is only initialized later. The assertion makes sure
that it happens first in the parent and then in the child.
@TimvdLippe TimvdLippe changed the title Editorial: remove unused variable Add assertion for ancestorOrigins Sep 4, 2026
@TimvdLippe

Copy link
Copy Markdown
Contributor Author

All right done 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants