Bug 837856 - Rename hal_sandbox::IsHalChildLive() to HalChildDestroyed(). r=mounir

The return value stays the same (that is, the function was mis-named).
This commit is contained in:
Justin Lebar 2013-02-11 23:09:25 -05:00
parent d03526652d
commit 663ad8052f
3 changed files with 11 additions and 7 deletions

View File

@ -33,7 +33,7 @@ using namespace mozilla::services;
#define PROXY_IF_SANDBOXED(_call) \
do { \
if (InSandbox()) { \
if (!hal_sandbox::IsHalChildLive()) { \
if (!hal_sandbox::HalChildDestroyed()) { \
hal_sandbox::_call; \
} \
} else { \
@ -44,7 +44,7 @@ using namespace mozilla::services;
#define RETURN_PROXY_IF_SANDBOXED(_call, defValue)\
do { \
if (InSandbox()) { \
if (hal_sandbox::IsHalChildLive()) { \
if (hal_sandbox::HalChildDestroyed()) { \
return defValue; \
} \
return hal_sandbox::_call; \

View File

@ -94,7 +94,11 @@ void EnableSystemTimezoneChangeNotifications();
*/
void DisableSystemTimezoneChangeNotifications();
bool IsHalChildLive();
/**
* Has the child-side HAL IPC object been destroyed? If so, you shouldn't send
* messages to hal_sandbox.
*/
bool HalChildDestroyed();
} // namespace MOZ_HAL_NAMESPACE
} // namespace mozilla

View File

@ -25,12 +25,12 @@ using namespace mozilla::hal;
namespace mozilla {
namespace hal_sandbox {
static bool sHalChildIsLive = false;
static bool sHalChildDestroyed = false;
bool
IsHalChildLive()
HalChildDestroyed()
{
return sHalChildIsLive;
return sHalChildDestroyed;
}
static PHalChild* sHal;
@ -810,7 +810,7 @@ public:
virtual void
ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE
{
sHalChildIsLive = true;
sHalChildDestroyed = true;
}
virtual bool