Closed Bug 1599630 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 20465 - Quick attempt to outlaw recursive custom element constructions

Categories

(Core :: DOM: Core & HTML, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla73
Tracking Status
firefox73 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 20465 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/20465
Details from upstream follow.

Mason Freed <masonfreed@chromium.org> wrote:

Quick attempt to outlaw recursive custom element constructions

Essentially, because the constructors are called synchronously,
the custom element state never gets changed to kCustom at [1],
so there is no easy way to just check the state at the top as
the spec ([2]) states in step 4.13.5.1. This CL looks at the
custom element construction stack, and looks for a null top
element, which is the case when the existing element
recursively calls the same constructor.

[1] https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/custom/custom_element_definition.cc?rcl=07d3d555040a175bfdf35ccc008939258273e6bd&l=212
[2] https://html.spec.whatwg.org/multipage/custom-elements.html#upgrades

Bug: 966472
Change-Id: I76e88c0b70132eee2482c304ef9e727ae1fe8fc7
Reviewed-on: https://chromium-review.googlesource.com/1931644
WPT-Export-Revision: 01092bc60a19bf6bdf303ee34960b5dbcf7b222b

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/99e8822752ad [wpt PR 20465] - Disallow recursive custom element constructions, a=testonly https://hg.mozilla.org/integration/autoland/rev/80137062b7a2 [wpt PR 20465] - Update wpt metadata, a=testonly
Test result changes from PR not available.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla73
You need to log in before you can comment on or make changes to this bug.