[Webkit-unassigned] [Bug 228271] New: WKUserContentController.removeAllScriptMessageHandlers() doesn't remove the message handlers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jul 25 03:04:13 PDT 2021


            Bug ID: 228271
           Summary: WKUserContentController.removeAllScriptMessageHandlers
                    () doesn't remove the message handlers
           Product: WebKit
           Version: Safari 14
          Hardware: All
                OS: macOS 11
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit2
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: zero.griffin at gmail.com
                CC: kkinnunen at apple.com

Trying to remove all message handlers from a WKUserContentController using removeAllScriptMessageHandlers() doesn't seem to be working.

There is not an API to view all message handlers from a WKUserContentController, but I have noticed that trying to remove all of them using removeAllScriptMessageHandlers() doesn't release those handlers, as by adding them, the WKUserContentController seems to retain them.

This I can reproduce 100% of the time. And in comparison, using removeScriptMessageHandler(forName:) seems to be working fine, and the message handlers gets released.

Having a removeAllScriptMessageHandlers() is specially helpful when, like in my case, you have many different message handlers, with different names.

If necessary I can provide with a small working prototype to test it.


You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210725/e1bf93a4/attachment.htm>

More information about the webkit-unassigned mailing list