Backed out changeset fc2132ad05a1 (bug 836654)
authorEd Morley <emorley@mozilla.com>
Thu, 14 Feb 2013 10:02:52 +0000
changeset 121874 36c8abb302e5e61588237c31bedee8e0187c3ff3
parent 121873 ff4dc1018a27867cff11bbfc42c5cc79b5fe9306
child 121875 c2752716d6c8c5fb346e63114a9fbaad30dd41b0
push id22964
push useremorley@mozilla.com
push dateThu, 14 Feb 2013 10:03:56 +0000
treeherdermozilla-inbound@f48618e815d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs836654
milestone21.0a1
backs outfc2132ad05a1bcbf9e73089a20e4aa22f2ab4c0b
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset fc2132ad05a1 (bug 836654)
dom/audiochannel/AudioChannelService.cpp
dom/ipc/ContentParent.cpp
dom/ipc/ContentParent.h
hal/HalTypes.h
--- a/dom/audiochannel/AudioChannelService.cpp
+++ b/dom/audiochannel/AudioChannelService.cpp
@@ -20,17 +20,16 @@
 
 #include "nsThreadUtils.h"
 
 #ifdef MOZ_WIDGET_GONK
 #include "nsIAudioManager.h"
 #endif
 using namespace mozilla;
 using namespace mozilla::dom;
-using namespace mozilla::hal;
 
 StaticRefPtr<AudioChannelService> gAudioChannelService;
 
 // static
 AudioChannelService*
 AudioChannelService::GetAudioChannelService()
 {
   MOZ_ASSERT(NS_IsMainThread());
@@ -89,17 +88,17 @@ AudioChannelService::~AudioChannelServic
 void
 AudioChannelService::RegisterAudioChannelAgent(AudioChannelAgent* aAgent,
                                                AudioChannelType aType)
 {
   AudioChannelAgentData* data = new AudioChannelAgentData(aType,
                                                           true /* mElementHidden */,
                                                           true /* mMuted */);
   mAgents.Put(aAgent, data);
-  RegisterType(aType, CONTENT_PROCESS_ID_MAIN);
+  RegisterType(aType, CONTENT_PARENT_NO_CHILD_ID);
 }
 
 void
 AudioChannelService::RegisterType(AudioChannelType aType, uint64_t aChildID)
 {
   AudioChannelInternalType type = GetInternalType(aType, true);
   mChannelCounters[type].AppendElement(aChildID);
 
@@ -113,17 +112,17 @@ AudioChannelService::RegisterType(AudioC
 
 void
 AudioChannelService::UnregisterAudioChannelAgent(AudioChannelAgent* aAgent)
 {
   nsAutoPtr<AudioChannelAgentData> data;
   mAgents.RemoveAndForget(aAgent, data);
 
   if (data) {
-    UnregisterType(data->mType, data->mElementHidden, CONTENT_PROCESS_ID_MAIN);
+    UnregisterType(data->mType, data->mElementHidden, CONTENT_PARENT_NO_CHILD_ID);
   }
 }
 
 void
 AudioChannelService::UnregisterType(AudioChannelType aType,
                                     bool aElementHidden,
                                     uint64_t aChildID)
 {
@@ -147,17 +146,17 @@ AudioChannelService::GetMuted(AudioChann
   if (!mAgents.Get(aAgent, &data)) {
     return true;
   }
 
   bool oldElementHidden = data->mElementHidden;
   // Update visibility.
   data->mElementHidden = aElementHidden;
 
-  bool muted = GetMutedInternal(data->mType, CONTENT_PROCESS_ID_MAIN,
+  bool muted = GetMutedInternal(data->mType, CONTENT_PARENT_NO_CHILD_ID,
                                 aElementHidden, oldElementHidden);
   data->mMuted = muted;
 
   SendAudioChannelChangedNotification();
   return muted;
 }
 
 bool
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -885,17 +885,17 @@ ContentParent::GetTestShellSingleton()
     return static_cast<TestShellParent*>(ManagedPTestShellParent()[0]);
 }
 
 ContentParent::ContentParent(const nsAString& aAppManifestURL,
                              bool aIsForBrowser,
                              ChildPrivileges aOSPrivileges)
     : mSubprocess(nullptr)
     , mOSPrivileges(aOSPrivileges)
-    , mChildID(CONTENT_PROCESS_ID_UNKNOWN)
+    , mChildID(CONTENT_PARENT_UNKNOWN_CHILD_ID)
     , mGeolocationWatchID(-1)
     , mRunToCompletionDepth(0)
     , mShouldCallUnblockChild(false)
     , mAppManifestURL(aAppManifestURL)
     , mForceKillTask(nullptr)
     , mNumDestroyingTabs(0)
     , mIsAlive(true)
     , mIsDestroyed(false)
--- a/dom/ipc/ContentParent.h
+++ b/dom/ipc/ContentParent.h
@@ -10,32 +10,34 @@
 #include "base/waitable_event_watcher.h"
 
 #include "mozilla/dom/PContentParent.h"
 #include "mozilla/dom/PMemoryReportRequestParent.h"
 #include "mozilla/dom/TabContext.h"
 #include "mozilla/ipc/GeckoChildProcessHost.h"
 #include "mozilla/dom/ipc/Blob.h"
 #include "mozilla/Attributes.h"
-#include "mozilla/HalTypes.h"
 
 #include "nsFrameMessageManager.h"
 #include "nsIObserver.h"
 #include "nsIThreadInternal.h"
 #include "nsNetUtil.h"
 #include "nsIPermissionManager.h"
 #include "nsIDOMGeoPositionCallback.h"
 #include "nsIMemoryReporter.h"
 #include "nsCOMArray.h"
 #include "nsDataHashtable.h"
 #include "nsHashKeys.h"
 #include "PermissionMessageUtils.h"
 
 #define CHILD_PROCESS_SHUTDOWN_MESSAGE NS_LITERAL_STRING("child-process-shutdown")
 
+#define CONTENT_PARENT_NO_CHILD_ID 0
+#define CONTENT_PARENT_UNKNOWN_CHILD_ID -1
+
 class mozIApplication;
 class nsConsoleService;
 class nsIDOMBlob;
 
 namespace mozilla {
 
 namespace ipc {
 class OptionalURIParams;
--- a/hal/HalTypes.h
+++ b/hal/HalTypes.h
@@ -7,22 +7,16 @@
 #define mozilla_hal_Types_h
 
 #include "IPCMessageUtils.h"
 
 namespace mozilla {
 namespace hal {
 
 /**
- * XXX
- */
-const uint64_t CONTENT_PROCESS_ID_UNKNOWN = uint64_t(-1);
-const uint64_t CONTENT_PROCESS_ID_MAIN = 0;
-
-/**
  * These are defined by libhardware, specifically, hardware/libhardware/include/hardware/lights.h
  * in the gonk subsystem.
  * If these change and are exposed to JS, make sure nsIHal.idl is updated as well.
  */
 enum LightType {
   eHalLightID_Backlight     = 0,
   eHalLightID_Keyboard      = 1,
   eHalLightID_Buttons       = 2,