* SUMMARY Uncaught Exception opening inspector - TypeError: Attempted to assign to readonly property. * EXCEPTION TypeError: Attempted to assign to readonly property. replaceContentView — ContentViewContainer.js:229 _resourceTypeDidChange — ResourceClusterContentView.js:248 dispatch — Object.js:155 dispatchEventToListeners — Object.js:162 associateWithScript — Resource.js:653 Script — Script.js:42 scriptDidParse — DebuggerManager.js:531 scriptParsed — DebuggerObserver.js:37 dispatchEvent — InspectorBackend.js:382 _dispatchEvent — InspectorBackend.js:281 dispatch — InspectorBackend.js:89 dispatchNextQueuedMessageFromBackend — MessageDispatcher.js:42 * NOTES BackForwardEntry.js has a "get contentView()" but no "set contentView(x)" so this looks legit. // Replace all occurrences of oldContentView with newContentView in the back/forward list. for (var i = 0; i < this._backForwardList.length; ++i) { if (this._backForwardList[i].contentView === oldContentView) this._backForwardList[i].contentView = newContentView; // <-- attempting to set content view. }
<rdar://problem/23404728>
A BackForwardEntry associates a ContentView with a cookie, so having a contentView setter seems like the wrong thing to do. What we probably want is: // Replace all occurrences of oldContentView with newContentView in the back/forward list. for (var i = 0; i < this._backForwardList.length; ++i) { if (this._backForwardList[i].contentView === oldContentView) this._backForwardList[i] = new WebInspector.BackForwardEntry(newContentView, newCookie); }
Looks right to me. Good catch.
Created attachment 264836 [details] [Patch] Proposed Fix
Comment on attachment 264836 [details] [Patch] Proposed Fix Clearing flags on attachment: 264836 Committed r192049: <http://trac.webkit.org/changeset/192049>
All reviewed patches have been landed. Closing bug.