From 8236de3765ce1143b366321b7823903e38a681c2 Mon Sep 17 00:00:00 2001 From: Kershaw Chang Date: Mon, 2 Jun 2014 19:25:00 -0400 Subject: [PATCH] Bug 1013097 - Remove IPC for switch event because only the chrome process can receive it. r=dhylands --- hal/Hal.cpp | 1 + hal/sandbox/PHal.ipdl | 1 - hal/sandbox/SandboxHal.cpp | 12 +++--------- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/hal/Hal.cpp b/hal/Hal.cpp index 4617c562aa9..392338c08ee 100644 --- a/hal/Hal.cpp +++ b/hal/Hal.cpp @@ -764,6 +764,7 @@ SwitchState GetCurrentSwitchState(SwitchDevice aDevice) void NotifySwitchStateFromInputDevice(SwitchDevice aDevice, SwitchState aState) { + AssertMainThread(); PROXY_IF_SANDBOXED(NotifySwitchStateFromInputDevice(aDevice, aState)); } diff --git a/hal/sandbox/PHal.ipdl b/hal/sandbox/PHal.ipdl index 91fa8e97f44..79826fc06af 100644 --- a/hal/sandbox/PHal.ipdl +++ b/hal/sandbox/PHal.ipdl @@ -175,7 +175,6 @@ parent: DisableSwitchNotifications(SwitchDevice aDevice); sync GetCurrentSwitchState(SwitchDevice aDevice) returns (SwitchState aState); - NotifySwitchStateFromInputDevice(SwitchDevice aDevice, SwitchState aState); FactoryReset(); diff --git a/hal/sandbox/SandboxHal.cpp b/hal/sandbox/SandboxHal.cpp index f5e0166b433..ea48113155e 100644 --- a/hal/sandbox/SandboxHal.cpp +++ b/hal/sandbox/SandboxHal.cpp @@ -344,7 +344,9 @@ GetCurrentSwitchState(SwitchDevice aDevice) void NotifySwitchStateFromInputDevice(SwitchDevice aDevice, SwitchState aState) { - Hal()->SendNotifySwitchStateFromInputDevice(aDevice, aState); + unused << aDevice; + unused << aState; + NS_RUNTIMEABORT("Only the main process may notify switch state change."); } bool @@ -862,14 +864,6 @@ public: return true; } - virtual bool - RecvNotifySwitchStateFromInputDevice(const SwitchDevice& aDevice, - const SwitchState& aState) MOZ_OVERRIDE - { - hal::NotifySwitchStateFromInputDevice(aDevice, aState); - return true; - } - void Notify(const int64_t& aClockDeltaMS) { unused << SendNotifySystemClockChange(aClockDeltaMS);