WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
194242
Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshing the page
https://bugs.webkit.org/show_bug.cgi?id=194242
Summary
Web Inspector: REGRESSION: Resources: WI.TreeOutline assertions when refreshi...
Devin Rousso
Reported
2019-02-04 15:15:17 PST
# Steps to reproduce: 1. inspect <
https://apple.com
> 2. select the <
https://apple.com
> frame tree element in the Resources tab 3. refresh the page => many assertions fire - Assertion Failed: Unable to get index for tree element. - Assertion Failed: Index must be a non-negative integer.
Attachments
Patch
(1.84 KB, patch)
2019-02-04 16:26 PST
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Patch for landing
(1.84 KB, patch)
2019-02-04 16:41 PST
,
Matt Baker
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2019-02-04 15:15:57 PST
<
rdar://problem/47802027
>
Devin Rousso
Comment 2
2019-02-04 15:17:31 PST
It looks like `WI.TreeOutline`'s `_cachedNumberOfDescendents` is a negative value.
Matt Baker
Comment 3
2019-02-04 16:26:26 PST
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.
Matt Baker
Comment 4
2019-02-04 16:26:47 PST
Created
attachment 361124
[details]
Patch
Joseph Pecoraro
Comment 5
2019-02-04 16:37:28 PST
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
Matt Baker
Comment 6
2019-02-04 16:41:20 PST
Created
attachment 361126
[details]
Patch for landing
WebKit Commit Bot
Comment 7
2019-02-04 17:08:46 PST
Comment on
attachment 361126
[details]
Patch for landing Clearing flags on attachment: 361126 Committed
r240950
: <
https://trac.webkit.org/changeset/240950
>
WebKit Commit Bot
Comment 8
2019-02-04 17:08:47 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug