Summary: | Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||
Component: | Web Inspector | Assignee: | Matt Baker <mattbaker> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, hi, inspector-bugzilla-changes, joepeck, mattbaker, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Devin Rousso
2019-02-04 15:15:17 PST
It looks like `WI.TreeOutline`'s `_cachedNumberOfDescendents` is a negative value. Did some digging. When the frame navigates, FrameTreeElement calls TreeElement.prototype.removeChildren, which the immediate base class, FolderizedTreeElement overrides: removeChildren() { super.removeChildren(); this._clearNewChildQueue(); for (var folder of this._folderTypeMap.values()) folder.removeChildren(); this._folderExpandedSettingMap.clear(); this._folderTypeMap.clear(); this._groupedIntoFolders = false; } Calling `removeChildren` for each FolderTreeElement leads to the assertions when trying to calculate the indexes of TreeElements which are no longer attached the tree. I think the fix is to simply remove this step. I don't think it is necessary. We clear the map below, and I don't believe we hold on to any references to the FolderTreeElements after this function returns. Created attachment 361124 [details]
Patch
Comment on attachment 361124 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=361124&action=review > Source/WebInspectorUI/ChangeLog:12 > + Calling `removeChildren` for deteached TreeElements is unnecessary. Typo: deteached => detached Created attachment 361126 [details]
Patch for landing
Comment on attachment 361126 [details] Patch for landing Clearing flags on attachment: 361126 Committed r240950: <https://trac.webkit.org/changeset/240950> All reviewed patches have been landed. Closing bug. |