[webkit-changes] [WebKit/WebKit] e64b8c: Adopt more smart pointers in ProcessThrottler

Chris Dumez noreply at github.com
Sat Feb 17 20:53:43 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e64b8cfcb1eed322cf049ed57586395504f35aab
      https://github.com/WebKit/WebKit/commit/e64b8cfcb1eed322cf049ed57586395504f35aab
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-02-17 (Sat, 17 Feb 2024)

  Changed paths:
    M Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
    M Source/WebKit/UIProcess/ProcessThrottler.cpp
    M Source/WebKit/UIProcess/ProcessThrottler.h
    R Source/WebKit/UIProcess/ProcessThrottlerClient.h
    M Source/WebKit/UIProcess/WebProcessProxy.h
    M Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  -----------
  Adopt more smart pointers in ProcessThrottler
https://bugs.webkit.org/show_bug.cgi?id=269605

Reviewed by Per Arne Vollan.

Adopt more smart pointers in ProcessThrottler. Also drop the ProcessThrottlerClient
abstraction since ProcessThrottler already has a pointer back to the
AuxiliaryProcessProxy, which is the only ProcessThrottlerClient. This simplifies
the code a bit and gets rid of an unnecessary data member.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm:
(-[WKWebView _processDidResumeForTesting]):
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.h:
(WebKit::AuxiliaryProcessProxy::isRunning const):
(WebKit::AuxiliaryProcessProxy::didChangeThrottleState):
(WebKit::AuxiliaryProcessProxy::environmentIdentifier const):
(WebKit::AuxiliaryProcessProxy::prepareToDropLastAssertion):
(WebKit::AuxiliaryProcessProxy::didDropLastAssertion):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.h:
* Source/WebKit/UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
(WebKit::ProcessThrottler::assertionName const):
(WebKit::ProcessThrottler::setThrottleState):
(WebKit::ProcessThrottler::ref):
(WebKit::ProcessThrottler::deref):
(WebKit::ProcessThrottler::updateThrottleStateIfNeeded):
(WebKit::ProcessThrottler::didConnectToProcess):
(WebKit::ProcessThrottler::didDisconnectFromProcess):
(WebKit::ProcessThrottler::sendPrepareToSuspendIPC):
(WebKit::ProcessThrottler::setShouldTakeNearSuspendedAssertion):
(WebKit::ProcessThrottler::clearAssertion):
(WebKit::ProcessThrottler::protectedProcess const):
(WebKit::ProcessThrottler::isSuspended const):
(WebKit::ProcessThrottlerActivity::invalidate):
* Source/WebKit/UIProcess/ProcessThrottler.h:
* Source/WebKit/UIProcess/ProcessThrottlerClient.h: Removed.
* Source/WebKit/UIProcess/WebProcessProxy.h:
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::sendNetworkProcessDidResume):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

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



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


More information about the webkit-changes mailing list