Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 2d6787eaecd883e5aea220cb2ed096cb82a19802
      
https://github.com/WebKit/WebKit/commit/2d6787eaecd883e5aea220cb2ed096cb82a19802
  Author: Alex Christensen <[email protected]>
  Date:   2025-01-22 (Wed, 22 Jan 2025)

  Changed paths:
    M Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
    M Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm
    M Source/WebCore/loader/NavigationDisabler.h
    M Source/WebCore/page/DOMWindowExtension.cpp
    M Source/WebCore/page/DOMWindowExtension.h

  Log Message:
  -----------
  Reduce strong references to WebCore::Frame
https://bugs.webkit.org/show_bug.cgi?id=285484
rdar://142447647

Reviewed by Brady Eidson.

While browsing the web with debug builds of WebKit with site isolation on,
the most common assertions are various assertions about Frame objects being
kept alive longer than they should be.  When an iframe is removed, we need
the Frame to be destroyed pretty quickly to have the frame tree consistent.
Otherwise, we hit assertions like the one in the Page destructor.
A few objects keep strong references to the Frame because they were written
before we introduced WeakPtr into WebKit.  There is no reason why they
need to prevent the Frame from being destroyed.

* Source/WebCore/bindings/js/JSDOMWindowCustom.cpp:
(WebCore::DialogHandler::dialogCreated):
(WebCore::DialogHandler::returnValue const):
* Source/WebCore/editing/Editor.h:
* Source/WebCore/editing/EditorCommand.cpp:
(WebCore::Editor::Command::execute const):
(WebCore::Editor::Command::isSupported const):
(WebCore::Editor::Command::isEnabled const):
(WebCore::Editor::Command::state const):
(WebCore::Editor::Command::value const):
(WebCore::Editor::Command::allowExecutionWhenDisabled const):
* Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::DeferredLoadingScope::~DeferredLoadingScope):
* Source/WebCore/loader/NavigationDisabler.h:
(WebCore::NavigationDisabler::NavigationDisabler):
(WebCore::NavigationDisabler::~NavigationDisabler):
* Source/WebCore/loader/ProgressTracker.cpp:
(WebCore::ProgressTracker::progressStarted):
(WebCore::ProgressTracker::finalProgressComplete):
(WebCore::ProgressTracker::incrementProgress):
(WebCore::ProgressTracker::progressHeartbeatTimerFired):
* Source/WebCore/loader/ProgressTracker.h:
* Source/WebCore/loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::init):
(WebCore::ResourceLoader::frameLoader const):
(WebCore::ResourceLoader::loadDataURL):
(WebCore::ResourceLoader::willSendRequestInternal):
(WebCore::ResourceLoader::shouldAllowResourceToAskForCredentials const):
(WebCore::ResourceLoader::didBlockAuthenticationChallenge):
(WebCore::ResourceLoader::didReceiveResponse):
(WebCore::ResourceLoader::didReceiveBuffer):
(WebCore::ResourceLoader::shouldUseCredentialStorage):
(WebCore::ResourceLoader::isAllowedToAskUserForCredentials const):
(WebCore::ResourceLoader::isPDFJSResourceLoad const):
(WebCore::ResourceLoader::protectedFrame const):
(WebCore::ResourceLoader::frame const):
(WebCore::ResourceLoader::resourceMonitorIfExists):
* Source/WebCore/loader/ResourceLoader.h:
(WebCore::ResourceLoader::frame const): Deleted.
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal):
* Source/WebCore/page/DOMWindowExtension.cpp:
(WebCore::DOMWindowExtension::suspendForBackForwardCache):
(WebCore::DOMWindowExtension::willDestroyGlobalObjectInCachedFrame):
* Source/WebCore/page/DOMWindowExtension.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to