Bug 1292289, part 3 - Remove dependency of Console on xpcprivate.h. r=mrbkap
authorAndrew McCreight <continuation@gmail.com>
Thu, 04 Aug 2016 11:35:13 -0700
changeset 308174 e02666d4e3e8c72e6d78f41007c9292468cb740c
parent 308173 998eab06f1217e7c0479d7f6bf37efbecd30ec4d
child 308175 a1b9e1631661f11244148997f00fcd73c532803d
push id31077
push useramccreight@mozilla.com
push dateThu, 04 Aug 2016 20:26:36 +0000
treeherderautoland@e02666d4e3e8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1292289
milestone51.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 1292289, part 3 - Remove dependency of Console on xpcprivate.h. r=mrbkap This file only uses functions on nsIXPConnect, so it can get it from nsContentUtils and stop including xpcprivate.h, which eliminates another file from being rebuilt when xpcprivate.h gets touched. MozReview-Commit-ID: AT5Khu0vkyf
dom/console/Console.cpp
--- a/dom/console/Console.cpp
+++ b/dom/console/Console.cpp
@@ -20,17 +20,17 @@
 #include "nsDOMNavigationTiming.h"
 #include "nsGlobalWindow.h"
 #include "nsJSUtils.h"
 #include "nsNetUtil.h"
 #include "ScriptSettings.h"
 #include "WorkerPrivate.h"
 #include "WorkerRunnable.h"
 #include "WorkerScope.h"
-#include "xpcprivate.h"
+#include "xpcpublic.h"
 #include "nsContentUtils.h"
 #include "nsDocShell.h"
 #include "nsProxyRelease.h"
 #include "mozilla/ConsoleTimelineMarker.h"
 #include "mozilla/TimestampTimelineMarker.h"
 
 #include "nsIConsoleAPIStorage.h"
 #include "nsIDOMWindowUtils.h"
@@ -1094,17 +1094,17 @@ Console::ProfileMethodInternal(JSContext
   JS::Rooted<JSObject*> eventObj(aCx, &eventValue.toObject());
   MOZ_ASSERT(eventObj);
 
   if (!JS_DefineProperty(aCx, eventObj, "wrappedJSObject", eventValue,
       JSPROP_ENUMERATE)) {
     return;
   }
 
-  nsXPConnect*  xpc = nsXPConnect::XPConnect();
+  nsIXPConnect* xpc = nsContentUtils::XPConnect();
   nsCOMPtr<nsISupports> wrapper;
   const nsIID& iid = NS_GET_IID(nsISupports);
 
   if (NS_FAILED(xpc->WrapJS(aCx, eventObj, iid, getter_AddRefs(wrapper)))) {
     return;
   }
 
   nsCOMPtr<nsIObserverService> obs = mozilla::services::GetObserverService();