Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2919e42badc1e2ca41c68f25552a0233395b91b
      
https://github.com/WebKit/WebKit/commit/d2919e42badc1e2ca41c68f25552a0233395b91b
  Author: Richard Robinson <[email protected]>
  Date:   2026-10-02 (Fri, 02 Oct 2026)

  Changed paths:
    M Source/WebKit/UIProcess/Extensions/WebExtensionController.cpp

  Log Message:
  -----------
  New Test(322215@main): [ iOS ] 
TestWebKitAPI.WKWebExtensionDataRecordTests/getDataRecords() crashes in Debug 
(CRASH)
https://bugs.webkit.org/show_bug.cgi?id=326124
rdar://189034585

Reviewed by Abrar Rahman Protyasha and Megan Gardner.

~WebExtensionController removed its message receiver from every process pool 
before calling
unloadAll(), but did not clear m_processPools. Unloading a context closes its 
background page,
and WebPageProxy::close() calls removePage() through the page's weak controller 
pointer, which
still resolves during destruction. When no other page shares the process pool, 
removeProcessPool()
then removes the same message receiver a second time, hitting 
ASSERT_NOT_REACHED() in
MessageReceiverMap::removeMessageReceiver().

This wasn't hit before 322215@main because the old Objective-C test was 
compiled without ARC and
leaked the WKWebExtensionController, so its destructor never ran.

Fix this by unloading all contexts first, then removing the message receiver 
from any process
pools that are still tracked.

* Source/WebKit/UIProcess/Extensions/WebExtensionController.cpp:
(WebKit::WebExtensionController::~WebExtensionController):

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



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

Reply via email to