WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
228271
WKUserContentController.removeAllScriptMessageHandlers() doesn't release the message handlers
https://bugs.webkit.org/show_bug.cgi?id=228271
Summary
WKUserContentController.removeAllScriptMessageHandlers() doesn't release the ...
zero.griffin
Reported
2021-07-25 03:04:13 PDT
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. Cheers.
Attachments
Patch
(4.16 KB, patch)
2021-07-26 15:55 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2021-07-26 15:55:51 PDT
Created
attachment 434252
[details]
Patch
EWS
Comment 2
2021-07-26 16:58:33 PDT
Committed
r280325
(
239972@main
): <
https://commits.webkit.org/239972@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 434252
[details]
.
Radar WebKit Bug Importer
Comment 3
2021-07-26 16:59:16 PDT
<
rdar://problem/81137245
>
Alex Christensen
Comment 4
2021-10-20 08:06:08 PDT
***
Bug 231659
has been marked as a duplicate of this bug. ***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug