Bug 1292289, part 1 - Stop unnecessarily using xpcprivate in XPCWrapper.h. r=mrbkap draft
authorAndrew McCreight <continuation@gmail.com>
Thu, 04 Aug 2016 11:14:35 -0700
changeset 396844 922deb044645fc403f64c2c1850a749c1a805102
parent 394995 ffac2798999c5b84f1b4605a1280994bb665a406
child 396845 cad5db495591db8b72e81ac29c90b17f26044b02
push id25130
push userbmo:continuation@gmail.com
push dateThu, 04 Aug 2016 18:53:26 +0000
reviewersmrbkap
bugs1292289
milestone51.0a1
Bug 1292289, part 1 - Stop unnecessarily using xpcprivate in XPCWrapper.h. r=mrbkap This file is included in caps/, but it only uses generic JS things, aside from a macro. AccessCheck.cpp was bootlegging xpcprivate.h. MozReview-Commit-ID: C6fGOFxsTvg
js/xpconnect/src/XPCWrapper.h
js/xpconnect/wrappers/AccessCheck.cpp
--- a/js/xpconnect/src/XPCWrapper.h
+++ b/js/xpconnect/src/XPCWrapper.h
@@ -2,18 +2,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef XPC_WRAPPER_H
 #define XPC_WRAPPER_H 1
 
-#include "xpcprivate.h"
-#include "jswrapper.h"
+#include "js/TypeDecls.h"
 
 namespace XPCNativeWrapper {
 
 // Given an XPCWrappedNative pointer and the name of the function on
 // XPCNativeScriptableFlags corresponding with a flag, returns 'true'
 // if the flag is set.
 // XXX Convert to using GetFlags() and not a macro.
 #define NATIVE_HAS_FLAG(_wn, _flag)                                           \
--- a/js/xpconnect/wrappers/AccessCheck.cpp
+++ b/js/xpconnect/wrappers/AccessCheck.cpp
@@ -14,16 +14,17 @@
 
 #include "jsfriendapi.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/LocationBinding.h"
 #include "mozilla/dom/WindowBinding.h"
 #include "mozilla/jsipc/CrossProcessObjectWrappers.h"
 #include "nsIDOMWindowCollection.h"
 #include "nsJSUtils.h"
+#include "xpcprivate.h"
 
 using namespace mozilla;
 using namespace JS;
 using namespace js;
 
 namespace xpc {
 
 nsIPrincipal*