Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1ba1a365ee238ffec2a6c8239a3315d8d747cc09
      
https://github.com/WebKit/WebKit/commit/1ba1a365ee238ffec2a6c8239a3315d8d747cc09
  Author: Sihui Liu <[email protected]>
  Date:   2025-10-21 (Tue, 21 Oct 2025)

  Changed paths:
    M Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAndDecodeImage.mm

  Log Message:
  -----------
  ASSERTION FAILED: iterator != m_sessionToPageIDsMap.end() in 
WebProcessPool::pageEndUsingWebsiteDataStore
rdar://162715518
https://bugs.webkit.org/show_bug.cgi?id=301142

Reviewed by Chris Dumez.

WebPageProxy::getInformationFromImageData() should avoid invoking 
ensureRunningProcess() if page has been closed;
otherwise, WebProcessPool::pageEndUsingWebsiteDataStore() might be invoked 
twice on the same page (one from
WebPageProxy::close() and one from WebPageProxy::launchProcess()), and the 
second call might cause assertion failure.

This patch also fixes other call sites of ensureRunningProcess() and adds an 
assertion in ensureRunningProcess().

API test: WebKit.GetInformationFromImageDataAfterClosingWebView

Test: Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAndDecodeImage.mm
* Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::getInformationFromImageData):
(WebKit::WebPageProxy::createIconDataFromImageData):
(WebKit::WebPageProxy::decodeImageData):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::ensureRunningProcess):
* Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp:
(WebKit::PlatformXRSystem::setImmersiveSessionState):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/LoadAndDecodeImage.mm:
(TestWebKitAPI::TEST(WebKit, GetInformationFromImageDataAfterClosingWebView)):

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



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

Reply via email to