Bug 240644

Summary: Web Inspector: Computed Panel: Assertion Failed: Cannot remove view which isn't a subview. ComputedStyleSection
Product: WebKit Reporter: Razvan Caliman <rcaliman>
Component: Web InspectorAssignee: Razvan Caliman <rcaliman>
Status: RESOLVED FIXED    
Severity: Normal CC: inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   

Razvan Caliman
Reported 2022-05-19 05:55:27 PDT
``` [Error] Assertion Failed: Cannot remove view which isn't a subview. ComputedStyleSection {_listeners: Multimap, _element: <div class="computed-style-section">, _parentView: null, _subviews: [], _dirty: false, …} removeSubview (View.js:127) layout (ComputedStyleDetailsPanel.js:216) _layoutSubtree (View.js:308) _layoutSubtree (View.js:319) _layoutSubtree (View.js:319) _visitViewTreeForLayout (View.js:378) ``` The root cause of this failed assertion is an accumulation of orphaned `WI.ComputedStyleSection` instances in `this._detailsSectionByStyleSectionMap` from `WI.ComputedStyleDetailsPanel`. When `WI.ComputedStyleDetailsPanel.layout()` is called to reflect the latest selected node's variables, the previous `WI.ComputedStyleSection` view instance for ungrouped variables is accidentally kept around even though its host DOM node was removed. When attempting to remove this view on the next `layout()` run, this orphaned instance has no host node that belongs to the parent view so the assertion is hit. The issue gets progressively worse on each `layout()` run by accumulating more orphans.
Attachments
Radar WebKit Bug Importer
Comment 1 2022-05-19 05:55:53 PDT
Razvan Caliman
Comment 2 2022-05-19 08:12:24 PDT
EWS
Comment 3 2022-05-19 14:50:45 PDT
Committed r294506 (250763@main): <https://commits.webkit.org/250763@main> Reviewed commits have been landed. Closing PR #782 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.