Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: afc4a2a8a2c030e6675f5cb5014882dd55f9326a
      
https://github.com/WebKit/WebKit/commit/afc4a2a8a2c030e6675f5cb5014882dd55f9326a
  Author: Anuj Panta <[email protected]>
  Date:   2026-04-15 (Wed, 15 Apr 2026)

  Changed paths:
    M Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js
    M Source/WebInspectorUI/UserInterface/Views/LayerDetailsSidebarPanel.js
    M Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js
    M Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js

  Log Message:
  -----------
  Web Inspector: Web Inspector: Layers tab async race conditions and null guards
https://bugs.webkit.org/show_bug.cgi?id=311841
rdar://174430948

Reviewed by Devin Rousso and BJ Burg.

LayerTreeDetailsSidebarPanel.layout() re-reads this.domNode in the
layersForNode callback if the user switches nodes mid-request, the
old result is displayed for the new node. Capture domNode before the
call and bail if it changed.

Layers3DContentView._updateLayerInfoElement shows compositing reasons
for a deselected layer if the async callback fires late-check that the
selection still matches before updating.

LayerDetailsSidebarPanel.selectNodeByLayerId crashes if called before
the data grid is initialized. Defer via _layerIdToSelect.

Layers3DContentView._resetCamera crashes on this._layers[0] when the
layers array is empty. Add a length guard.

LayerTreeManager.layersForNode silently swallows protocol errors.
Report via WI.reportInternalError to match other error paths.

LayerTreeDetailsSidebarPanel._updateLayerInfoSection passes
layer.memory to Number.bytesToString without a fallback, producing
"NaN". Add || 0.

* Source/WebInspectorUI/UserInterface/Controllers/LayerTreeManager.js:
(WI.LayerTreeManager.prototype.layersForNode):
* Source/WebInspectorUI/UserInterface/Views/LayerDetailsSidebarPanel.js:
(WI.LayerDetailsSidebarPanel.prototype.selectNodeByLayerId):
* Source/WebInspectorUI/UserInterface/Views/LayerTreeDetailsSidebarPanel.js:
(WI.LayerTreeDetailsSidebarPanel.prototype.layout):
(WI.LayerTreeDetailsSidebarPanel.prototype._updateLayerInfoSection):
* Source/WebInspectorUI/UserInterface/Views/Layers3DContentView.js:
(WI.Layers3DContentView.prototype._resetCamera):
(WI.Layers3DContentView.prototype._updateLayerInfoElement):

Canonical link: https://commits.webkit.org/311304@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to