WebKit Bugzilla
Attachment 357351 Details for
Bug 192090
: Web Inspector: REGRESSION(r238599): Uncaught Exception: TypeError: null is not an object (evaluating 'treeElement.listItemElement.classList')
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-192090-20181214154800.patch (text/plain), 3.25 KB, created by
Matt Baker
on 2018-12-14 15:48:01 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2018-12-14 15:48:01 PST
Size:
3.25 KB
patch
obsolete
>Subversion Revision: 239235 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 0a2ae0d79059fa9bc17cf3ad3fa7285d431cfc52..06e0e7f6f965f48cb39698b8091a7827e21a2247 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-14 Matt Baker <mattbaker@apple.com> >+ >+ 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 >+ <rdar://problem/46318614> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * UserInterface/Views/TreeOutline.js: >+ (WI.TreeOutline.prototype.selectionControllerSelectionDidChange): >+ Check that `listItemElement` is valid before accessing it to update class >+ names. The selection can change before the TreeElement has been attached. >+ > 2018-12-14 Matt Baker <mattbaker@apple.com> > > Web Inspector: Cookies view should use model objects instead of raw payload data >diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >index 247b6577c4736029509e78eaa0efc28f55a36cc5..bfdec9f3e5979eda4eac274ba0cc82bb476085ea 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >@@ -802,7 +802,7 @@ WI.TreeOutline = class TreeOutline extends WI.Object > for (let index of deselectedItems) { > let treeElement = this._treeElementAtIndex(index); > console.assert(treeElement, "Missing TreeElement for deselected index " + index); >- if (treeElement) { >+ if (treeElement && treeElement.listItemElement) { > treeElement.listItemElement.classList.remove("selected"); > if (!this._suppressNextSelectionDidChangeEvent) > treeElement.deselect(); >@@ -812,7 +812,7 @@ WI.TreeOutline = class TreeOutline extends WI.Object > for (let index of selectedItems) { > let treeElement = this._treeElementAtIndex(index); > console.assert(treeElement, "Missing TreeElement for selected index " + index); >- if (treeElement) { >+ if (treeElement && treeElement.listItemElement) { > treeElement.listItemElement.classList.add("selected"); > if (!this._suppressNextSelectionDidChangeEvent) > treeElement.select(); >@@ -821,12 +821,12 @@ WI.TreeOutline = class TreeOutline extends WI.Object > > let selectedTreeElement = this.selectedTreeElement; > if (selectedTreeElement !== this._previousSelectedTreeElement) { >- if (this._previousSelectedTreeElement) >+ if (this._previousSelectedTreeElement && this._previousSelectedTreeElement.listItemElement) > this._previousSelectedTreeElement.listItemElement.classList.remove("last-selected"); > > this._previousSelectedTreeElement = selectedTreeElement; > >- if (this._previousSelectedTreeElement) >+ if (this._previousSelectedTreeElement && this._previousSelectedTreeElement.listItemElement) > this._previousSelectedTreeElement.listItemElement.classList.add("last-selected"); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192090
:
357351
|
357365