Bug 169336 - Web Inspector: DOM Tree broken if an element has a "debounce" attribute
Summary: Web Inspector: DOM Tree broken if an element has a "debounce" attribute
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-07 20:17 PST by Joseph Pecoraro
Modified: 2017-03-07 21:18 PST (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (3.58 KB, patch)
2017-03-07 20:20 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.