[wpt-sync] Sync PR 27892 - [Element Reflection] explicitly set attr-element should not prevent GC.
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
Tracking | Status | |
---|---|---|
firefox88 | --- | fixed |
People
(Reporter: mozilla.org, Unassigned)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 27892 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/27892
Details from upstream follow.
b'Chris Hall <chrishall@chromium.org>' wrote:
[Element Reflection] explicitly set attr-element should not prevent GC.
An explicitly set attr-element is an internal reference from one element
to other element(s). This internal reference is then only exposed if
that reference relationship is considered valid, otherwise the accessors
will "lie" and pretend that the underlying reference is not set by
returning appropriate default values.A relationship can only be valid if the referenced element is inserted
into the DOM, in which case the reference from its DOM parent will keep
it alive.If a referenced element is not inserted into the DOM, the only way it
can later become a valid and exposed reference is if there is another
valid reference somewhere (e.g. inside Javascript) which will be used to
insert the referenced element into the DOM at a later point.If a referenced element is not currently within the DOM, then the only
way it can later become valid and exposed is by being inserted into the
DOM, which requires another reference somewhere (e.g. within Javascript)
to be used to insert into the DOM.This means that if no other references exist, then the referenced
element(s) can be safely garbage collected as this reference is in an
invalid state (referenced element not in DOM), and we can never reach a
valid state (no other references).Updating internal maps to store WeakMember(s) rather than Member(s).
This necessitated a move from HeapVector to HeapLinkedHashSet, as
HeapVector does not support WeakMember(s) as elements.
The array setters/getters perform conversion between HeapVector and
HeapLinkedHashSet to keep the V8 bindings happy.Change-Id: If9733a8affaf9b0b74b705115909627c1dd8e173
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2695010
Reviewed-by: Kent Tamura \<tkent@chromium.org>
Reviewed-by: Alice Boxhall \<aboxhall@chromium.org>
Reviewed-by: Meredith Lane \<meredithl@chromium.org>
Commit-Queue: Chris Hall \<chrishall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#860058}
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 1•3 years ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f4aba127a1aee7ba1cc42e36ee20d86555a78a1
Assignee | ||
Comment 2•3 years ago
|
||
CI Results
Ran 15 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 22 subtests
Status Summary
Firefox
OK : 1
PASS: 1
FAIL: 21
Chrome
OK : 1
PASS: 22
Safari
OK : 1
PASS: 1
FAIL: 21
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
/dom/nodes/aria-element-reflection.tentative.html
aria-activedescendant element reflection: FAIL (Chrome: PASS, Safari: FAIL)
If the content attribute is set directly, the IDL attribute getter always returns the first element whose ID matches the content attribute.: FAIL (Chrome: PASS, Safari: FAIL)
Setting the IDL attribute to an element which is not the first element in DOM order with its ID causes the content attribute to be an empty string: FAIL (Chrome: PASS, Safari: FAIL)
Setting an element reference that crosses into a shadow tree is disallowed, but setting one that is in a shadow inclusive ancestor is allowed.: FAIL (Chrome: PASS, Safari: FAIL)
aria-errormessage: FAIL (Chrome: PASS, Safari: FAIL)
aria-details: FAIL (Chrome: PASS, Safari: FAIL)
Deleting a reflected element should return null for the IDL attribute and cause the content attribute to become stale.: FAIL (Chrome: PASS, Safari: FAIL)
Changing the ID of an element causes the content attribute to become out of sync.: FAIL (Chrome: PASS, Safari: FAIL)
Reparenting an element into a descendant shadow scope hides the element reference.: FAIL (Chrome: PASS, Safari: FAIL)
Reparenting referenced element cannot cause retargeting of reference.: FAIL (Chrome: PASS, Safari: FAIL)
Element reference set in invalid scope remains intact throughout move to valid scope.: FAIL (Chrome: PASS, Safari: FAIL)
aria-labelledby.: FAIL (Chrome: PASS, Safari: FAIL)
aria-controls.: FAIL (Chrome: PASS, Safari: FAIL)
aria-describedby.: FAIL (Chrome: PASS, Safari: FAIL)
aria-flowto.: FAIL (Chrome: PASS, Safari: FAIL)
aria-owns.: FAIL (Chrome: PASS, Safari: FAIL)
shadow DOM behaviour for FrozenArray element reflection.: FAIL (Chrome: PASS, Safari: FAIL)
Moving explicitly set elements across shadow DOM boundaries.: FAIL (Chrome: PASS, Safari: FAIL)
Moving explicitly set elements around within the same scope, and removing from the DOM.: FAIL (Chrome: PASS, Safari: FAIL)
Attaching element reference before it's inserted into the DOM.: FAIL (Chrome: PASS, Safari: FAIL)
Cross-document references and moves.: FAIL (Chrome: PASS, Safari: FAIL)
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ce7eb30ad47c [wpt PR 27892] - [Element Reflection] explicitly set attr-element should not prevent GC., a=testonly
Comment 4•3 years ago
|
||
bugherder |
Description
•