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
This has probably been fixed in r184846, the #ifdefed test cases passes now in current trunk
Created attachment 257258 [details] Patch
Committed r187218: <http://trac.webkit.org/changeset/187218>