Closed Bug 1636322 Opened 5 years ago Closed 5 years ago

[wpt-sync] Sync PR 23470 - Fix a crash in custom built-in <input> element

Categories

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

task

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

Mason Freed <masonfreed@chromium.org> wrote:

Fix a crash in custom built-in <input> element

Prior to this CL, this code would cause an access violation crash:

\<script>
customElements.define("my-input",
class extends HTMLInputElement { },
{ extends: "input" });
\</script>
\<input is="my-input">

because the HTMLInputElement constructor purposely does not construct its
input_type_ and input_type_view_ members until the parser calls the
InitializeTypeInParsing() function. In the customized built-in element
case, this was not getting called prior to attempting to set attributes.
This bug was created with the [1] patch, which fixed several issues
with custom element construction.

[1] https://chromium.googlesource.com/chromium/src/+/7101418f85a0f17e4f9a35dfe3a9acff76340a93

Bug: 1078925, 1071059, 1024866
Change-Id: Id932d97d0d518bb28bdd2a7d846973a2a09e536d
Reviewed-on: https://chromium-review.googlesource.com/2188935
WPT-Export-Revision: 3d1908a9448282ae6bdbf1b2d15756ce3b9b12b5

Component: web-platform-tests → DOM: Core & HTML
Product: Testing → Core

CI Results

Ran 12 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 72 tests

Status Summary

Firefox

OK : 1
PASS : 5[GitHub] 76[Gecko-android-em-7.0-x86_64-debug-geckoview, Gecko-android-em-7.0-x86_64-opt-geckoview, Gecko-linux1804-64-debug, Gecko-linux1804-64-opt, Gecko-linux1804-64-qr-debug, Gecko-linux1804-64-qr-opt, Gecko-windows10-64-debug, Gecko-windows10-64-opt, Gecko-windows10-64-qr-debug, Gecko-windows10-64-qr-opt, Gecko-windows7-32-debug, Gecko-windows7-32-opt]

Chrome

CRASH: 1

Safari

OK : 1
FAIL : 5

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a3d80f6ec681 [wpt PR 23470] - Fix a crash in custom built-in <input> element, a=testonly
Pushed by wptsync@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c75ce77b221d [wpt PR 23470] - Fix a crash in custom built-in <input> element, a=testonly
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.