Bug 224650 - Web Inspector: audit for re-entrancy issues with `initialLayout` and `layout`
Summary: Web Inspector: audit for re-entrancy issues with `initialLayout` and `layout`
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-15 23:16 PDT by Devin Rousso
Modified: 2021-04-16 10:09 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2021-04-15 23:16:50 PDT
It appears that it's possible for re-entrancy issues in the `WI.View` system since the `_didInitialLayout` flag isn't set until _after_ `initialLayout` returns, meaning that if the logic inside `initialLayout` triggers a synchronous `layout` then that second `layout` won't know that it's already in the middle of an `initialLayout`.

As an example, showing the `WI.GraphicsOverviewContentView` in `WI.GraphicsTabContentView.prototype.initialLayout` causes the navigation sidebar to be shown, which forces a synchronous `layout` from handling `WI.Sidebar.Event.WidthDidChange`.
Comment 1 Radar WebKit Bug Importer 2021-04-15 23:18:44 PDT
<rdar://problem/76745432>