Commit b8f51544 authored by cfleizach@apple.com's avatar cfleizach@apple.com

AX: Seed: safari extension installation crashes safari under voice over and freezes voice over

https://bugs.webkit.org/show_bug.cgi?id=125308

Reviewed by Anders Carlsson.

Much like Javascript alerts, we need to allow accessibility clients to continue to interact with the WebProcess thread
when using dispatchDecidePolicyResponses.

* Platform/CoreIPC/MessageSender.h:
(CoreIPC::MessageSender::sendSync):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160197 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 95b9bf94
2013-12-05 Chris Fleizach <cfleizach@apple.com>
AX: Seed: safari extension installation crashes safari under voice over and freezes voice over
https://bugs.webkit.org/show_bug.cgi?id=125308
Reviewed by Anders Carlsson.
Much like Javascript alerts, we need to allow accessibility clients to continue to interact with the WebProcess thread
when using dispatchDecidePolicyResponses.
* Platform/CoreIPC/MessageSender.h:
(CoreIPC::MessageSender::sendSync):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2013-12-05 Anders Carlsson <andersca@apple.com>
"Use Selection for Find" doesn't work in PDF viewed in Safari
......
......@@ -51,19 +51,19 @@ public:
}
template<typename T>
bool sendSync(T&& message, typename T::Reply&& reply, double timeout = Connection::NoTimeout)
bool sendSync(T&& message, typename T::Reply&& reply, double timeout = Connection::NoTimeout, unsigned syncSendFlags = 0)
{
static_assert(T::isSync, "Message is not sync!");
return sendSync(std::forward<T>(message), std::move(reply), messageSenderDestinationID(), timeout);
return sendSync(std::forward<T>(message), std::move(reply), messageSenderDestinationID(), timeout, syncSendFlags);
}
template<typename T>
bool sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, double timeout = Connection::NoTimeout)
bool sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, double timeout = Connection::NoTimeout, unsigned syncSendFlags = 0)
{
ASSERT(messageSenderConnection());
return messageSenderConnection()->sendSync(std::move(message), std::move(reply), destinationID, timeout);
return messageSenderConnection()->sendSync(std::move(message), std::move(reply), destinationID, timeout, syncSendFlags);
}
bool sendMessage(std::unique_ptr<MessageEncoder>);
......
......@@ -51,6 +51,7 @@
#include "WebProcessProxyMessages.h"
#include <JavaScriptCore/APICast.h>
#include <JavaScriptCore/JSObject.h>
#include <WebCore/AXObjectCache.h>
#include <WebCore/Chrome.h>
#include <WebCore/DOMWrapperWorld.h>
#include <WebCore/DocumentLoader.h>
......@@ -646,7 +647,8 @@ void WebFrameLoaderClient::dispatchDecidePolicyForResponse(const ResourceRespons
uint64_t downloadID;
// Notify the UIProcess.
if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForResponseSync(m_frame->frameID(), response, request, canShowMIMEType, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForResponseSync::Reply(receivedPolicyAction, policyAction, downloadID)))
unsigned syncSendFlags = (WebCore::AXObjectCache::accessibilityEnabled()) ? CoreIPC::SpinRunLoopWhileWaitingForReply : 0;
if (!webPage->sendSync(Messages::WebPageProxy::DecidePolicyForResponseSync(m_frame->frameID(), response, request, canShowMIMEType, listenerID, InjectedBundleUserMessageEncoder(userData.get())), Messages::WebPageProxy::DecidePolicyForResponseSync::Reply(receivedPolicyAction, policyAction, downloadID), CoreIPC::Connection::NoTimeout, syncSendFlags))
return;
// We call this synchronously because CFNetwork can only convert a loading connection to a download from its didReceiveResponse callback.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment