Bug 1284455 - Kill uses of nsISystemMessagesInternal.h outside of b2g r=gsvelto
authorAlexandre Lissy <lissyx@lissyx.dyndns.org>
Tue, 05 Jul 2016 14:59:40 +0200
changeset 303818 e172b816e8478566a70d53f1216f44601b547f3f
parent 303817 f00d45823516184f05e5707472037e5e3afff4e7
child 303819 f07c38c551f4358fb59ca70784c9405fccb7cc07
push id30403
push usergszorc@mozilla.com
push dateThu, 07 Jul 2016 01:15:37 +0000
treeherdermozilla-central@39ec98bf2580 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgsvelto
bugs1284455
milestone50.0a1
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
Bug 1284455 - Kill uses of nsISystemMessagesInternal.h outside of b2g r=gsvelto MozReview-Commit-ID: 8tVEvoF9kku
dom/browser-element/BrowserElementAudioChannel.cpp
--- a/dom/browser-element/BrowserElementAudioChannel.cpp
+++ b/dom/browser-element/BrowserElementAudioChannel.cpp
@@ -16,17 +16,19 @@
 #include "AudioChannelService.h"
 #include "nsIAppsService.h"
 #include "nsIBrowserElementAPI.h"
 #include "nsIDocShell.h"
 #include "nsIDOMDocument.h"
 #include "nsIDOMDOMRequest.h"
 #include "nsIObserverService.h"
 #include "nsISupportsPrimitives.h"
+#ifdef MOZ_B2G
 #include "nsISystemMessagesInternal.h"
+#endif
 #include "nsITabParent.h"
 #include "nsNetUtil.h"
 #include "nsPIDOMWindow.h"
 #include "nsServiceManagerUtils.h"
 #include "nsContentUtils.h"
 
 namespace mozilla {
 namespace dom {
@@ -518,16 +520,18 @@ BrowserElementAudioChannel::NotifyChanne
                                             getter_AddRefs(request));
     if (NS_WARN_IF(aRv.Failed())) {
       return nullptr;
     }
 
     return request.forget().downcast<DOMRequest>();
   }
 
+// TODO: We need this until bug 1254282 reaches m-c
+#ifdef MOZ_B2G
   nsCOMPtr<nsISystemMessagesInternal> systemMessenger =
     do_GetService("@mozilla.org/system-message-internal;1");
   MOZ_ASSERT(systemMessenger);
 
   JS::Rooted<JS::Value> value(nsContentUtils::RootingCxForThread());
   value.setInt32((uint32_t)mAudioChannel);
 
   nsCOMPtr<nsIURI> manifestURI;
@@ -546,16 +550,19 @@ BrowserElementAudioChannel::NotifyChanne
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return nullptr;
   }
 
   RefPtr<Promise> promiseIns = static_cast<Promise*>(promise.get());
   RefPtr<DOMRequest> request = new DOMRequest(GetOwner());
   RefPtr<RespondSuccessHandler> handler = new RespondSuccessHandler(request);
   promiseIns->AppendNativeHandler(handler);
+#else
+  RefPtr<DOMRequest> request = new DOMRequest(GetOwner());
+#endif
 
   return request.forget();
 }
 
 NS_IMETHODIMP
 BrowserElementAudioChannel::Observe(nsISupports* aSubject, const char* aTopic,
                                     const char16_t* aData)
 {