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>
Status: RESOLVED FIXED    
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   
Attachments:
Description Flags
[PATCH] Proposed Fix none

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

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

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

Notes:
* 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

Evaluating:

    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
<rdar://problem/30899430>
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

r=me
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.