Bug 169336

Summary: Web Inspector: DOM Tree broken if an element has a "debounce" attribute
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, jcraig, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2017-03-07 20:17:50 PST
DOM Tree broken if an element has a "debounce" attribute

<body><div debounce="debounceUpdate"></div></body>

Steps to Reproduce:
1. Inspect reduction
2. Show Elements tree
  => <body> doesn't have expected <div> child.

* Error in Inspector:

    [Error] TypeError: Attempted to assign to readonly property.
        _addAttribute — Main.js:9238
        _setAttributesPayload — Main.js:9180
        DOMNode — Main.js:8681
        _setChildrenPayload — Main.js:9212


    this._attributesMap[name] = attr;

Where name is "debounce". This is hitting Object.prototype.debounce which is not writable.

We should avoid these issues by making attributesMap an actually `Map` and not an Object.
Comment 1 Joseph Pecoraro 2017-03-07 20:18:47 PST
Comment 2 Joseph Pecoraro 2017-03-07 20:20:12 PST
Created attachment 303766 [details]
[PATCH] Proposed Fix
Comment 3 BJ Burg 2017-03-07 20:26:25 PST
Comment on attachment 303766 [details]
[PATCH] Proposed Fix

Comment 4 WebKit Commit Bot 2017-03-07 21:18:10 PST
The commit-queue encountered the following flaky tests while processing attachment 303766 [details]:

media/track/track-in-band-style.html bug 153143 (authors: dgorbik@apple.com, eric.carlson@apple.com, and jer.noble@apple.com)
media/track/media-element-enqueue-event-crash.html bug 117756 (authors: eric.carlson@apple.com, ggaren@apple.com, and simon.pena@samsung.com)
The commit-queue is continuing to process your patch.
Comment 5 WebKit Commit Bot 2017-03-07 21:18:38 PST
Comment on attachment 303766 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 303766

Committed r213565: <http://trac.webkit.org/changeset/213565>
Comment 6 WebKit Commit Bot 2017-03-07 21:18:43 PST
All reviewed patches have been landed.  Closing bug.