Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e5ea2a419109ebcc919759ca43bccfff4f9c555
      
https://github.com/WebKit/WebKit/commit/5e5ea2a419109ebcc919759ca43bccfff4f9c555
  Author: Per Arne Vollan <pvol...@apple.com>
  Date:   2025-08-19 (Tue, 19 Aug 2025)

  Changed paths:
    M Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm
    M Source/WebKit/Shared/SandboxExtension.h
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebProcessPool.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.h

  Log Message:
  -----------
  In some cases, we can't follow file:// links from a local file
rdar://156619146
https://bugs.webkit.org/show_bug.cgi?id=296808

Reviewed by Sihui Liu.

When dropping a local file in a WKWebView or in the chrome of the embedding 
application, WebKit is normally only provided with a
temporary sandbox extension to that location in the UI process by the system or 
embedding application. If we later visit the same
local file URL, either by going back/forward in history, or manually entering 
the file URL in the address field, we are no longer
able to create a sandbox extension to that location for the WebContent process, 
since the temporary sandbox extension has been
revoked in the UI process. To address this, we add a sandbox extension cache in 
the process proxy, which lets us send a sandbox
extension to the WebContent process in these cases. This requires the 
SandboxExtensionHandle class to be copyable.

* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::handleMemoryPressureWarning):
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sandboxExtensionForFile const):
(WebKit::WebProcessProxy::addSandboxExtensionForFile):
(WebKit::WebProcessProxy::clearSandboxExtensions):
* Source/WebKit/UIProcess/WebProcessProxy.h:

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



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

Reply via email to