[wpt-sync] Sync PR 64119 - Don't hold references to name or id across UpdateName()/UpdateId()
Categories
(Core :: DOM: Core & HTML, task, P4)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 64119 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/64119
Details from upstream follow.
Mason Freed <masonf@chromium.org> wrote:
Don't hold references to name or id across UpdateName()/UpdateId()
Element::InsertedInto() took a const AtomicString& reference into the
element's attribute storage via GetNameAttribute() and passed it to
UpdateName(). UpdateName() calls HTMLDocument::AddNamedItem(), which
initializes the frame's WindowProxy before calling NamedItemAdded().
Initializing a sandboxed frame's script context installs
chrome.loadTimes, which can invoke a page-defined setter on a child
frame named 'chrome'. If that setter mutates the element's attributes
and reallocates the attribute vector, the name_value reference dangles
when NamedItemAdded() reads it.This CL copies the name and id attributes into local AtomicStrings by
value before calling UpdateName() and UpdateId() in InsertedInto(),
RemovedFrom(), and CloneAttributesFrom().Fixed: 576203565
Change-Id: If2164a83f298dcfbea9b191776016eeadd8271a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/8633114
Reviewed-by: David Baron \<dbaron@chromium.org>
Commit-Queue: David Baron \<dbaron@chromium.org>
Auto-Submit: Mason Freed \<masonf@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1725772}
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•1 month ago
|
| Assignee | ||
Updated•27 days ago
|
| Assignee | ||
Comment 1•27 days ago
|
||
Pushed to try (stability) https://treeherder.mozilla.org/jobs?repo=try&landoInstance=lando-prod-2025&landoCommitID=114004
| Assignee | ||
Comment 2•26 days ago
|
||
CI Results
Ran 11 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 57 tests and 2 subtests
Status Summary
Firefox
OK : 1[GitHub] 56[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
PASS: 1[Gecko-linux2204-64-wayland-debug, Gecko-linux2204-64-wayland-opt, GitHub] 283[Gecko-android-em-14-x86_64-debug-geckoview, Gecko-android-em-14-x86_64-lite-opt-geckoview, Gecko-android-em-14-x86_64-opt-geckoview, Gecko-linux2404-64-debug, Gecko-linux2404-64-opt, Gecko-windows11-32-25h2-debug, Gecko-windows11-32-25h2-opt, Gecko-windows11-64-25h2-debug, Gecko-windows11-64-25h2-opt]
FAIL: 2
Chrome
OK : 1
PASS: 1
Safari
OK : 1
PASS: 1
Links
Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base
Details
New Tests That Don't Pass
- /html/dom/documents/dom-tree-accessors/nameditem-names.html [wpt.fyi]
- A document's property names appear in tree order.:
FAIL
- A document's property names appear in tree order.:
- /html/dom/documents/dom-tree-accessors/nameditem-supported-property-names-order.html [wpt.fyi]
- Values from id attributes precede values from name attributes when the same element contributes both:
FAIL
- Values from id attributes precede values from name attributes when the same element contributes both:
Comment 4•19 days ago
|
||
| bugherder | ||
Description
•