RESOLVED FIXED 138142
Unregistering and re-registering a user message handler does not work
https://bugs.webkit.org/show_bug.cgi?id=138142
Summary Unregistering and re-registering a user message handler does not work
Adrian Perez
Reported 2014-10-28 12:05:16 PDT
User script messages sent with “window.webkit.messageHandlers.<name>.postMessage()” will not work (i.e. “WebScriptMessageHandler::Client::didPostMessage()” is not called) after performing the following sequence of operations: 1. Register a handler with “WebUserContentControllerProxy::addUserScriptMessageHandler()” 2. Unregister the handler with “WebUserContentControllerProxy::removeUserMessageHandlerForName()” 3. Register again a handler with the same name as in step (1) using “WebUserContentControllerProxy::addUserScriptMessageHandler()” This probably means that either removing the handler does not do all the cleanup it should and the logic for installing a handler fails when trying to add one with a name used previously. I have found this issue while writing the unit tests for the API of the GTK+ port, being worked in bug #133730
Attachments
Patch (2.18 KB, patch)
2015-07-22 04:18 PDT, Carlos Garcia Campos
mrobinson: review+
Carlos Garcia Campos
Comment 1 2015-07-22 04:15:45 PDT
This has probably been fixed in r184846, the #ifdefed test cases passes now in current trunk
Carlos Garcia Campos
Comment 2 2015-07-22 04:18:23 PDT
Carlos Garcia Campos
Comment 3 2015-07-23 00:32:41 PDT
Note You need to log in before you can comment on or make changes to this bug.