[webkit-reviews] review granted: [Bug 192090] Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError: null is not an object (evaluating 'treeElement.listItemElement.classList') : [Attachment 357351] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 14 16:24:58 PST 2018


Devin Rousso <drousso at apple.com> has granted Matt Baker <mattbaker at apple.com>'s
request for review:
Bug 192090: Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError:
null is not an object (evaluating 'treeElement.listItemElement.classList')
https://bugs.webkit.org/show_bug.cgi?id=192090

Attachment 357351: Patch

https://bugs.webkit.org/attachment.cgi?id=357351&action=review




--- Comment #7 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 357351
  --> https://bugs.webkit.org/attachment.cgi?id=357351
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=357351&action=review

rs=me

Perhaps this is a good opportunity to move `addClassName` and `removeClassName`
from `WI.GeneralTreeElement` to `WI.TreeElement`.  It would effectively solve
this problem.

> Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:805
> +	       if (treeElement && treeElement.listItemElement) {

This would prevent `deselect` from being called if the element hasn't been
created yet.  I think we only want to avoid adding a class to the element, not
any other functionality.

> Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:815
> +	       if (treeElement && treeElement.listItemElement) {

Ditto (>805).


More information about the webkit-reviews mailing list