⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 287346 in webkit


Ignore:
Timestamp:
Dec 21, 2021, 9:17:13 PM (5 years ago)
Author:
Patrick Angle
Message:

Web Inspector: Assertion Failed removing subview in ContentViewContainer.prototype._disassociateFromContentView
​https://bugs.webkit.org/show_bug.cgi?id=234572

Reviewed by Devin Rousso.

r283859 accidentally removed the checks that a content view is attached before attempting to remove it, leading
to an assertion.

  • UserInterface/Views/ContentViewContainer.js:

(WI.ContentViewContainer.prototype._disassociateFromContentView):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r287338 r287346  
     12021-12-21  Patrick Angle  <pangle@apple.com>
     2
     3        Web Inspector: Assertion Failed removing subview in ContentViewContainer.prototype._disassociateFromContentView
     4        https://bugs.webkit.org/show_bug.cgi?id=234572
     5
     6        Reviewed by Devin Rousso.
     7
     8        r283859 accidentally removed the checks that a content view is attached before attempting to remove it, leading
     9        to an assertion.
     10
     11        * UserInterface/Views/ContentViewContainer.js:
     12        (WI.ContentViewContainer.prototype._disassociateFromContentView):
     13
    1142021-12-21  Patrick Angle  <pangle@apple.com>
    215
  • trunk/Source/WebInspectorUI/UserInterface/Views/ContentViewContainer.js

    r283859 r287346  
    422422        }
    423423
    424         // Hidden/non-visible extension tabs must remain attached to the DOM to avoid reloading.
    425         if (contentView.constructor.shouldNotRemoveFromDOMWhenHidden() && !contentView.visible)
    426             return;
    427 
    428         this.removeSubview(contentView);
     424        if (contentView.constructor.shouldNotRemoveFromDOMWhenHidden()) {
     425            // Hidden/non-visible extension tabs must remain attached to the DOM to avoid reloading.
     426            if (!contentView.visible)
     427                return;
     428
     429            if (contentView.isAttached)
     430                this.removeSubview(contentView);
     431        }
    429432
    430433        console.assert(!contentView.isAttached);
Note: See TracChangeset for help on using the changeset viewer.