RESOLVED FIXED 173425
Uncaught Exception: TypeError: null is not an object (evaluating 'this.contentBrowser.contentViewForRepresentedObject')
https://bugs.webkit.org/show_bug.cgi?id=173425
Summary Uncaught Exception: TypeError: null is not an object (evaluating 'this.conten...
Joseph Pecoraro
Reported 2017-06-15 11:46:40 PDT
Summary: Uncaught Exception switching between tabs for the first time. Steps to Reproduce: 1. Inspect <https://msaboff.github.io/RallyTracker/index.html> 2. Show Storage Tab 3. Select the Application Cache (index.html) 4. Select the Debugger Tab 5. Close Inspector 6. Open Inspector (Develop > Show Web Inspector) => Should open to the Debugger tab 7. Select the Storage Tab => Uncaught Exception Uncaught Exceptions: - TypeError: null is not an object (evaluating 'this.contentBrowser.contentViewForRepresentedObject') (at NavigationSidebarPanel.js:191:50) showDefaultContentViewForTreeElement @ NavigationSidebarPanel.js:191:50 _checkElementsForPendingViewStateCookie @ NavigationSidebarPanel.js:709:79 restoreStateFromCookie @ NavigationSidebarPanel.js:237:53 restoreStateFromCookie @ TabContentView.js:156:63 shown @ TabContentView.js:135:40 shown @ ContentBrowserTabContentView.js:95:20 prepareToShow @ BackForwardEntry.js:86:35 _showEntry @ ContentViewContainer.js:445:28 showBackForwardEntryForIndex @ ContentViewContainer.js:162:28 showContentView @ ContentViewContainer.js:138:42 _tabBarItemSelected @ TabBrowser.js:239:55 dispatch @ Object.js:170:30 dispatchEventToListeners @ Object.js:177:17 selectedTabBarItem @ TabBar.js:376:38 _handleMouseDown @ TabBar.js:569:13 _handleMouseDown @ [native code]
Attachments
[PATCH] Proposed Fix (4.79 KB, patch)
2017-06-15 13:39 PDT, Joseph Pecoraro
hi: review+
[PATCH] For Landing (4.79 KB, patch)
2017-06-15 13:47 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2017-06-15 11:46:57 PDT
Joseph Pecoraro
Comment 2 2017-06-15 11:49:32 PDT
I can provide a simple solution to avoid the uncaught exception (and therefore the broken tab appearance that results) however it appears tab state restoration is not working as expected (selecting something in the sidebar + loading its content view). I think this is a regression from lazy sidebar initialization.
Joseph Pecoraro
Comment 3 2017-06-15 13:39:42 PDT
Created attachment 313001 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 4 2017-06-15 13:40:41 PDT
> I think this is a regression from lazy sidebar initialization. I don't think this is a regression from lazy sidebar initialization. But it is certainly a mixture of issues. I made restoration work slightly better in both the Debugger and Storage tabs.
Devin Rousso
Comment 5 2017-06-15 13:45:49 PDT
Comment on attachment 313001 [details] [PATCH] Proposed Fix r=me View in context: https://bugs.webkit.org/attachment.cgi?id=313001&action=review > Source/WebInspectorUI/ChangeLog:16 > + By default select a script/resource content view instead of nothing. This sentence is awkward to me. Always select a script/resource content view instead of nothing. > Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js:98 > if (this.navigationSidebarPanel) { > if (!this.navigationSidebarPanel.contentBrowser) > this.navigationSidebarPanel.contentBrowser = this._contentBrowser; > + } You can squash the two if statements: if (this.navigationSidebarPanel && !this.navigationSidebarPanel.contentBrowser) this.navigationSidebarPanel.contentBrowser = this._contentBrowser; > Source/WebInspectorUI/UserInterface/Views/ContentBrowserTabContentView.js:107 > + if (this.navigationSidebarPanel) { > if (!this._contentBrowser.currentContentView) > this.navigationSidebarPanel.showDefaultContentView(); > } Ditto: if (this.navigationSidebarPanel && !this._contentBrowser.currentContentView) this.navigationSidebarPanel.showDefaultContentView();
Joseph Pecoraro
Comment 6 2017-06-15 13:47:34 PDT
Created attachment 313002 [details] [PATCH] For Landing
WebKit Commit Bot
Comment 7 2017-06-15 14:26:37 PDT
Comment on attachment 313002 [details] [PATCH] For Landing Clearing flags on attachment: 313002 Committed r218356: <http://trac.webkit.org/changeset/218356>
Note You need to log in before you can comment on or make changes to this bug.