Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e78ffc906984991f10444d7cd8f564789fd4eadf
      
https://github.com/WebKit/WebKit/commit/e78ffc906984991f10444d7cd8f564789fd4eadf
  Author: Ahmad Saleem <[email protected]>
  Date:   2026-09-02 (Wed, 02 Sep 2026)

  Changed paths:
    M Source/WebCore/loader/SubframeLoader.cpp

  Log Message:
  -----------
  Remove dead code in FrameLoader::SubframeLoader::loadSubframe()
https://bugs.webkit.org/show_bug.cgi?id=323258
rdar://186506734

Reviewed by Chris Dumez.

Two pieces of dead code in loadSubframe():

- The page/subframeCount check is an exact duplicate of the check that
  canCreateSubFrame() already performs immediately afterward. Since
  canCreateSubFrame() tests the same predicate (and additionally checks
  frame tree depth), the inline check is fully redundant.

- The "!subFrame" operand in the post-load detachment check can never be
  true: subFrame is a local RefPtr proven non-null earlier and never
  reassigned. Detaching the frame from the document does not null the
  local strong reference; only the "!subFrame->tree().parent()" operand
  reflects removal.

No change in behavior.

* Source/WebCore/loader/SubframeLoader.cpp:
(WebCore::FrameLoader::SubframeLoader::loadSubframe):

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



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

Reply via email to