Bug 143139 - Web Inspector: Uncaught Exception: TypeError: Attempted to assign to readonly - DOMNodeDetailsSidebarPanel.js
Summary: Web Inspector: Uncaught Exception: TypeError: Attempted to assign to readonly...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-03-27 11:58 PDT by Joseph Pecoraro
Modified: 2015-03-27 17:52 PDT (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (4.82 KB, patch)
2015-03-27 12:10 PDT, 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 2015-03-27 11:58:50 PDT
* SUMMARY
Uncaught Exception: TypeError: Attempted to assign to readonly.

[Error] Uncaught exception in inspector page while handling event DOM.attributeModified:  TypeError: Attempted to assign to readonly property.
    _createAttributesDataGrid @ /Views/DOMNodeDetailsSidebarPanel.js:587:17
    _refreshAttributes @ /Views/DOMNodeDetailsSidebarPanel.js:122:78
    _attributesChanged @ /Views/DOMNodeDetailsSidebarPanel.js:537:32
    dispatch @ /Base/Object.js:129:55
    dispatchEventToListeners @ /Base/Object.js:136:17
    _attributeModified @ /Controllers/DOMTreeManager.js:136:38
    attributeModified @ /Protocol/DOMObserver.js:42:55
    dispatchEvent @ /Protocol/InspectorBackend.js:353:42
    _dispatchEvent @ /Protocol/InspectorBackend.js:233:32
    dispatch @ /Protocol/InspectorBackend.js:88:32
    dispatchNextQueuedMessageFromBackend @ /Protocol/MessageDispatcher.js:42:34

Not exactly sure how to reproduce, but I was playing with DOM nodes in the console and may have modified an attribute myself.
Comment 1 Radar WebKit Bug Importer 2015-03-27 11:59:28 PDT
<rdar://problem/20329695>
Comment 2 Joseph Pecoraro 2015-03-27 12:00:02 PDT
Looks like there are plenty of places that set the selectable state of a DataGridNode:

    var node = new WebInspector.DataGridNode({name: attribute.name, value: attribute.value || ""}, false);
    node.selectable = true;

But DataGridNode only has a getter for "selectable" not a setter.
Comment 3 Joseph Pecoraro 2015-03-27 12:01:26 PDT
* STEPS TO REPRODUCE
1. Inspect any page with an image
2. Show the Node details sidebar for an image
3. Expand Attributes Section
  => exceptions in inspector
Comment 4 Joseph Pecoraro 2015-03-27 12:10:34 PDT
Created attachment 249593 [details]
[PATCH] Proposed Fix
Comment 5 WebKit Commit Bot 2015-03-27 17:52:03 PDT
Comment on attachment 249593 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 249593

Committed r182092: <http://trac.webkit.org/changeset/182092>
Comment 6 WebKit Commit Bot 2015-03-27 17:52:07 PDT
All reviewed patches have been landed.  Closing bug.