Bug 159787 - Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'this._selectorSection.update')
Summary: Web Inspector: Uncaught Exception: undefined is not an object (evaluating 'th...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Matt Baker
URL: http://n12v.com/
Keywords: InRadar
Depends on: 159745
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-14 14:52 PDT by Nikita Vasilyev
Modified: 2016-08-08 10:44 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2016-07-14 14:52:48 PDT
-------
Inspected URL:        http://n12v.com/
Loading completed:    true
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_5) AppleWebKit/602.1.41+ (KHTML, like Gecko)

Uncaught Exceptions:
 - undefined is not an object (evaluating 'this._selectorSection.update') (at VisualStyleDetailsPanel.js:64:34)
    refresh @ VisualStyleDetailsPanel.js:64:34
    _refreshPreservingScrollPosition @ StyleDetailsPanel.js:143:21
    nodeStylesRefreshed @ StyleDetailsPanel.js:114:50
    dispatch @ Object.js:162:30
    dispatchEventToListeners @ Object.js:169:17
    fetchedComputedStyle @ DOMNodeStyles.js:228:42
    fetchedComputedStyle @ [native code]
    _dispatchResponseToCallback @ InspectorBackend.js:311:27
    _dispatchResponse @ InspectorBackend.js:281:45
    dispatch @ InspectorBackend.js:157:35
    dispatchNextQueuedMessageFromBackend @ MessageDispatcher.js:42:34

Additional Details:
    cause --> An uncaught exception was thrown while dispatching response callback for command CSS.getComputedStyleForNode.
-------

* STEPS TO REPRODUCE
1. Open http://n12v.com
2. Select Elements tab
3. Select "Styles — Visual"
Comment 1 Radar WebKit Bug Importer 2016-07-14 14:53:28 PDT
<rdar://problem/27358715>
Comment 2 Nikita Vasilyev 2016-07-14 14:54:29 PDT
Must be a regression. I can't reproduce it in Safari TP 8.
Comment 3 Nikita Vasilyev 2016-07-14 14:56:57 PDT
Selecting "Styles — Computed" also causes an uncaught exception:

Uncaught Exceptions:
 - undefined is not an object (evaluating 'this._propertiesTextEditor.style = this.nodeStyles.computedStyle') (at ComputedStyleDetailsPanel.js:130:35)
    refresh @ ComputedStyleDetailsPanel.js:130:35
    _refreshPreservingScrollPosition @ StyleDetailsPanel.js:143:21
    nodeStylesRefreshed @ StyleDetailsPanel.js:114:50
    dispatch @ Object.js:162:30
    dispatchEventToListeners @ Object.js:169:17
    fetchedComputedStyle @ DOMNodeStyles.js:228:42
    fetchedComputedStyle @ [native code]
    _dispatchResponseToCallback @ InspectorBackend.js:311:27
    _dispatchResponse @ InspectorBackend.js:281:45
    dispatch @ InspectorBackend.js:157:35
    dispatchNextQueuedMessageFromBackend @ MessageDispatcher.js:42:34

Additional Details:
    cause --> An uncaught exception was thrown while dispatching response callback for command CSS.getComputedStyleForNode.
Comment 4 Nikita Vasilyev 2016-07-14 15:06:32 PDT
This manifests itself by not showing the selectors list (Style Rules section in the visual styles sidebar) on first open.
Comment 5 Nikita Vasilyev 2016-07-14 15:14:02 PDT
For the first exception:

WebInspector.VisualStyleDetailsPanel.prototype.refresh gets called before
WebInspector.VisualStyleDetailsPanel.prototype.initialLayout.


    refresh(significantChange)
    {
        if (significantChange)
            this._selectorSection.update(this._nodeStyles);
        else
            this._updateSections();

        super.refresh();
    }

    // Protected

    initialLayout()
    {
        // Selector Section
        this._selectorSection = new WebInspector.VisualStyleSelectorSection(this);
        ...
Comment 6 Nikita Vasilyev 2016-07-14 15:23:47 PDT
I was able to reproduce it 5 times in a row, but I can't reproduce it anymore :/
Comment 7 Matt Baker 2016-07-14 16:20:03 PDT
Steps to Reproduce:
1. Select Elements tab
2. If details sidebar is expanded, collapse and reload Inspector.
3. Select a different node in the DOM tree
  => TypeError: undefined is not an object (evaluating 'this._classListContainer.hidden')
Comment 8 Matt Baker 2016-07-14 16:22:40 PDT
This is fixed by https://bugs.webkit.org/show_bug.cgi?id=159745.
Comment 9 Nikita Vasilyev 2016-07-14 16:31:19 PDT
(In reply to comment #7)
> Steps to Reproduce:
> 1. Select Elements tab
> 2. If details sidebar is expanded, collapse and reload Inspector.
> 3. Select a different node in the DOM tree
>   => TypeError: undefined is not an object (evaluating
> 'this._classListContainer.hidden')

I'm getting this exception:

 - TypeError: undefined is not an object (evaluating 'this._classListContainer.hidden') (at CSSStyleDetailsSidebarPanel.js:72:38)
    refresh @ CSSStyleDetailsSidebarPanel.js:72:38
    needsRefresh @ DetailsSidebarPanel.js:68:21
    domNode @ DOMDetailsSidebarPanel.js:81:26
    inspect @ DOMDetailsSidebarPanel.js:58:13
    showDetailsSidebarPanels @ ContentBrowserTabContentView.js:145:37
    dispatch @ Object.js:162:30
    dispatchEventToListeners @ Object.js:169:17
    _dispatchCurrentRepresentedObjectsDidChangeEvent @ ContentBrowser.js:437:38
    performWork @ Utilities.js:1255:43
Comment 10 Timothy Hatcher 2016-08-08 10:44:37 PDT
Is this fixed or not?