Bug 177587

Summary: Uncaught Exception: Attempted to assign to readonly property (at ContentView.js:​206:​34)​
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, joepeck, mattbaker, 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-09-27 20:05:14 PDT
Uncaught Exception: Attempted to assign to readonly property (at ContentView.js:​206:​34)​

Backtrace:
Attempted to assign to readonly property. (at ContentView.js:​206:​34)​
    closedContentViewForRepresentedObject @ ContentView.js:​206:​34
    _disassociateFromContentView @ ContentViewContainer.js:​432:​65
    closeAllContentViews @ ContentViewContainer.js:​291:​46
    closed @ ClusterContentView.js:​82:​56
    closed @ ResourceClusterContentView.js:​146:​21
    _disassociateFromContentView @ ContentViewContainer.js:​429:​27
    closeAllContentViews @ ContentViewContainer.js:​291:​46
    dispose @ NetworkResourceDetailView.js:​71:​71
    reset @ NetworkTableContentView.js:​183:​31
    _mainResourceDidChange @ NetworkTableContentView.js:​698:​19
    ...

It when we close any ContentView with Post Data we can get this exception since the representedObject is a string, and you can't do:

   str[prop] = value;

in strict mode on a string... it throws this exception.
Comment 1 Joseph Pecoraro 2017-09-27 20:08:03 PDT
Created attachment 322059 [details]
[PATCH] Proposed Fix
Comment 2 Matt Baker 2017-09-27 20:34:40 PDT
Comment on attachment 322059 [details]
[PATCH] Proposed Fix

r=me
Comment 3 WebKit Commit Bot 2017-09-27 21:20:08 PDT
Comment on attachment 322059 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 322059

Committed r222599: <http://trac.webkit.org/changeset/222599>
Comment 4 WebKit Commit Bot 2017-09-27 21:20:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2017-09-27 21:21:17 PDT
<rdar://problem/34706004>