WebKit Bugzilla
Attachment 357365 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 for landing
bug-192090-20181214180126.patch (text/plain), 3.32 KB, created by
Matt Baker
on 2018-12-14 18:01:26 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2018-12-14 18:01:26 PST
Size:
3.32 KB
patch
obsolete
>Subversion Revision: 239235 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 0a2ae0d79059fa9bc17cf3ad3fa7285d431cfc52..e344c3526880043784f36bc40ed15e98f3d81cd9 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 Devin Rousso. >+ >+ * 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..cc8bb2d05ff11bb2da0ea787bf13d44e457ec264 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >@@ -803,7 +803,8 @@ WI.TreeOutline = class TreeOutline extends WI.Object > let treeElement = this._treeElementAtIndex(index); > console.assert(treeElement, "Missing TreeElement for deselected index " + index); > if (treeElement) { >- treeElement.listItemElement.classList.remove("selected"); >+ if (treeElement.listItemElement) >+ treeElement.listItemElement.classList.remove("selected"); > if (!this._suppressNextSelectionDidChangeEvent) > treeElement.deselect(); > } >@@ -813,7 +814,8 @@ WI.TreeOutline = class TreeOutline extends WI.Object > let treeElement = this._treeElementAtIndex(index); > console.assert(treeElement, "Missing TreeElement for selected index " + index); > if (treeElement) { >- treeElement.listItemElement.classList.add("selected"); >+ if (treeElement.listItemElement) >+ treeElement.listItemElement.classList.add("selected"); > if (!this._suppressNextSelectionDidChangeEvent) > treeElement.select(); > } >@@ -821,12 +823,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