Bug 1821963 part 5: Remove code to prevent handling of window messages while handling PDocAccessible sync IPDL calls. r=handyman
This actually hasn't ever been used in a shipping build of Firefox. Although sync IPDL was tried with Windos a11y for a while when e10s was still disabled, it was never feasible and was replaced with COM proxying. Differential Revision: https://phabricator.services.mozilla.com/D177965
This commit is contained in:
@@ -25,9 +25,6 @@
|
||||
#include "nsComponentManagerUtils.h"
|
||||
#include "nsIBrowserDOMWindow.h"
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
# include "mozilla/a11y/PDocAccessible.h"
|
||||
#endif
|
||||
#include "GMPServiceParent.h"
|
||||
#include "HandlerServiceParent.h"
|
||||
#include "IHistory.h"
|
||||
@@ -6245,22 +6242,6 @@ ContentParent::RecvUnstoreAndBroadcastBlobURLUnregistration(
|
||||
return IPC_OK();
|
||||
}
|
||||
|
||||
bool ContentParent::HandleWindowsMessages(const Message& aMsg) const {
|
||||
MOZ_ASSERT(aMsg.is_sync());
|
||||
|
||||
#ifdef ACCESSIBILITY
|
||||
// a11y messages can be triggered by windows messages, which means if we
|
||||
// allow handling windows messages while we wait for the response to a sync
|
||||
// a11y message we can reenter the ipc message sending code.
|
||||
if (a11y::PDocAccessible::PDocAccessibleStart < aMsg.type() &&
|
||||
a11y::PDocAccessible::PDocAccessibleEnd > aMsg.type()) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
mozilla::ipc::IPCResult ContentParent::RecvGetFilesRequest(
|
||||
const nsID& aUUID, const nsAString& aDirectoryPath,
|
||||
const bool& aRecursiveFlag) {
|
||||
|
||||
@@ -483,8 +483,6 @@ class ContentParent final : public PContentParent,
|
||||
bool DeallocPContentPermissionRequestParent(
|
||||
PContentPermissionRequestParent* actor);
|
||||
|
||||
virtual bool HandleWindowsMessages(const Message& aMsg) const override;
|
||||
|
||||
void ForkNewProcess(bool aBlocking);
|
||||
|
||||
mozilla::ipc::IPCResult RecvCreateWindow(
|
||||
|
||||
@@ -1312,7 +1312,6 @@ bool MessageChannel::Send(UniquePtr<Message> aMsg, UniquePtr<Message>* aReply) {
|
||||
int32_t transaction = nest ? stackTop->TransactionID() : seqno;
|
||||
aMsg->set_transaction_id(transaction);
|
||||
|
||||
bool handleWindowsMessages = mListener->HandleWindowsMessages(*aMsg.get());
|
||||
AutoEnterTransaction transact(this, seqno, transaction, nestedLevel);
|
||||
|
||||
IPC_LOG("Send seqno=%d, xid=%d", seqno, transaction);
|
||||
@@ -1340,7 +1339,7 @@ bool MessageChannel::Send(UniquePtr<Message> aMsg, UniquePtr<Message>* aReply) {
|
||||
MOZ_RELEASE_ASSERT(!transact.IsComplete());
|
||||
MOZ_RELEASE_ASSERT(mTransactionStack == &transact);
|
||||
|
||||
bool maybeTimedOut = !WaitForSyncNotify(handleWindowsMessages);
|
||||
bool maybeTimedOut = !WaitForSyncNotify();
|
||||
|
||||
if (mListener->NeedArtificialSleep()) {
|
||||
MonitorAutoUnlock unlock(*mMonitor);
|
||||
@@ -1828,7 +1827,7 @@ bool MessageChannel::WaitResponse(bool aWaitTimedOut) {
|
||||
}
|
||||
|
||||
#ifndef OS_WIN
|
||||
bool MessageChannel::WaitForSyncNotify(bool /* aHandleWindowsMessages */) {
|
||||
bool MessageChannel::WaitForSyncNotify() {
|
||||
AssertWorkerThread();
|
||||
# ifdef DEBUG
|
||||
// WARNING: We don't release the lock here. We can't because the link
|
||||
|
||||
@@ -405,7 +405,7 @@ class MessageChannel : HasResultCodes {
|
||||
//
|
||||
// So in sum: true is a meaningful return value; false isn't,
|
||||
// necessarily.
|
||||
bool WaitForSyncNotify(bool aHandleWindowsMessages) MOZ_REQUIRES(*mMonitor);
|
||||
bool WaitForSyncNotify() MOZ_REQUIRES(*mMonitor);
|
||||
|
||||
bool WaitResponse(bool aWaitTimedOut);
|
||||
|
||||
|
||||
@@ -470,12 +470,6 @@ class IToplevelProtocol : public IProtocol {
|
||||
|
||||
bool IsOnCxxStack() const;
|
||||
|
||||
/**
|
||||
* Return true if windows messages can be handled while waiting for a reply
|
||||
* to a sync IPDL message.
|
||||
*/
|
||||
virtual bool HandleWindowsMessages(const Message& aMsg) const { return true; }
|
||||
|
||||
virtual void ProcessRemoteNativeEventsInInterruptCall() {}
|
||||
|
||||
virtual void OnChannelReceivedMessage(const Message& aMsg) {}
|
||||
|
||||
@@ -850,7 +850,7 @@ SuppressedNeuteringRegion::~SuppressedNeuteringRegion() {
|
||||
|
||||
bool SuppressedNeuteringRegion::sSuppressNeutering = false;
|
||||
|
||||
bool MessageChannel::WaitForSyncNotify(bool aHandleWindowsMessages) {
|
||||
bool MessageChannel::WaitForSyncNotify() {
|
||||
mMonitor->AssertCurrentThreadOwns();
|
||||
|
||||
if (!gUIThreadId) {
|
||||
@@ -859,8 +859,7 @@ bool MessageChannel::WaitForSyncNotify(bool aHandleWindowsMessages) {
|
||||
|
||||
// Use a blocking wait if this channel does not require
|
||||
// Windows message deferral behavior.
|
||||
if (!(mFlags & REQUIRE_DEFERRED_MESSAGE_PROTECTION) ||
|
||||
!aHandleWindowsMessages) {
|
||||
if (!(mFlags & REQUIRE_DEFERRED_MESSAGE_PROTECTION)) {
|
||||
TimeDuration timeout = (kNoTimeout == mTimeoutMs)
|
||||
? TimeDuration::Forever()
|
||||
: TimeDuration::FromMilliseconds(mTimeoutMs);
|
||||
|
||||
Reference in New Issue
Block a user