From e70ddb74761e17b86fab26a18151a4d26fc38095 Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Thu, 14 Aug 2014 18:47:15 -0700 Subject: [PATCH] Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor --- caps/nsPrincipal.cpp | 2 +- caps/nsScriptSecurityManager.cpp | 2 +- content/base/public/nsContentUtils.h | 2 +- content/base/src/nsContentUtils.cpp | 1 - content/base/src/nsDocument.cpp | 1 - content/base/src/nsFrameMessageManager.cpp | 2 +- content/base/src/nsNodeUtils.cpp | 1 - content/base/src/nsObjectLoadingContent.cpp | 1 - content/base/src/nsScriptLoader.cpp | 1 - content/base/src/nsXMLHttpRequest.cpp | 1 - dom/audiochannel/AudioChannelService.cpp | 1 - dom/base/DOMRequest.cpp | 1 - dom/base/ScriptSettings.cpp | 88 +++++++++++++++ dom/base/ScriptSettings.h | 70 ++++++++++++ dom/base/nsContentPermissionHelper.cpp | 1 - dom/base/nsDOMClassInfo.cpp | 1 - dom/base/nsGlobalWindow.cpp | 1 - dom/base/nsJSEnvironment.cpp | 1 - dom/bindings/CallbackObject.cpp | 1 - dom/bindings/Codegen.py | 1 - dom/bluetooth/BluetoothReplyRunnable.cpp | 1 + dom/bluetooth/BluetoothService.cpp | 1 - dom/bluetooth/bluedroid/BluetoothUtils.cpp | 1 - dom/bluetooth/bluez/BluetoothUtils.cpp | 1 - dom/bluetooth2/BluetoothReplyRunnable.cpp | 1 + dom/bluetooth2/BluetoothService.cpp | 1 - dom/bluetooth2/bluedroid/BluetoothUtils.cpp | 2 +- dom/bluetooth2/bluez/BluetoothUtils.cpp | 2 +- dom/browser-element/BrowserElementParent.cpp | 1 - dom/canvas/WebGLContextUtils.cpp | 3 +- dom/devicestorage/nsDeviceStorage.cpp | 1 - dom/events/EventListenerService.cpp | 1 - dom/fmradio/FMRadioService.cpp | 2 +- dom/indexedDB/IDBFactory.cpp | 1 - dom/indexedDB/IDBFileRequest.cpp | 1 - dom/indexedDB/IDBRequest.cpp | 1 - dom/indexedDB/ipc/IndexedDBParent.cpp | 1 - dom/ipc/PreallocatedProcessManager.cpp | 2 +- dom/ipc/TabChild.cpp | 1 - dom/media/GetUserMediaRequest.cpp | 1 - dom/media/MediaPermissionGonk.cpp | 1 - .../src/MobileConnectionInfo.cpp | 3 +- dom/mobilemessage/src/MmsMessage.cpp | 2 +- .../src/MobileMessageCallback.cpp | 1 - dom/mobilemessage/src/ipc/SmsIPCService.cpp | 1 - dom/mobilemessage/src/ipc/SmsParent.cpp | 1 - dom/network/src/TCPSocketParent.cpp | 2 +- dom/nfc/gonk/NfcService.cpp | 1 - dom/plugins/base/nsJSNPRuntime.cpp | 1 - dom/plugins/base/nsNPAPIPlugin.cpp | 1 - dom/plugins/base/nsNPAPIPlugin.h | 3 +- dom/plugins/ipc/PluginIdentifierParent.cpp | 1 - .../ipc/PluginScriptableObjectParent.cpp | 1 - dom/src/jsurl/nsJSProtocolHandler.cpp | 1 - dom/system/gonk/AudioManager.cpp | 2 +- dom/system/gonk/AutoMounterSetting.cpp | 2 +- dom/system/gonk/NetworkWorker.cpp | 2 +- dom/system/gonk/SystemWorkerManager.cpp | 2 +- dom/system/gonk/TimeZoneSettingObserver.cpp | 2 +- dom/telephony/Telephony.cpp | 1 - dom/time/DateCacheCleaner.cpp | 2 +- dom/wifi/WifiCertService.cpp | 1 - dom/wifi/WifiProxyService.cpp | 1 - dom/wifi/WifiUtils.h | 1 - dom/workers/ServiceWorkerManager.cpp | 1 - dom/workers/WorkerPrivate.cpp | 1 - dom/workers/XMLHttpRequest.cpp | 1 - dom/xbl/nsXBLDocumentInfo.cpp | 1 - dom/xbl/nsXBLProtoImpl.cpp | 1 - dom/xbl/nsXBLProtoImplMethod.cpp | 1 - dom/xbl/nsXBLProtoImplProperty.cpp | 1 - dom/xbl/nsXBLPrototypeHandler.cpp | 1 - dom/xbl/nsXBLSerialize.cpp | 1 - .../autoconfig/src/nsJSConfigTriggers.cpp | 1 - ipc/testshell/XPCShellEnvironment.cpp | 1 - js/ipc/JavaScriptChild.cpp | 1 - js/ipc/WrapperAnswer.cpp | 1 - js/xpconnect/loader/mozJSComponentLoader.h | 2 +- js/xpconnect/src/Sandbox.cpp | 1 - js/xpconnect/src/XPCJSRuntime.cpp | 1 - js/xpconnect/src/XPCVariant.cpp | 1 - js/xpconnect/src/XPCWrappedJS.cpp | 1 - js/xpconnect/src/XPCWrappedNative.cpp | 1 - js/xpconnect/src/XPCWrappedNativeInfo.cpp | 1 - js/xpconnect/src/XPCWrappedNativeProto.cpp | 1 - js/xpconnect/src/moz.build | 2 - js/xpconnect/src/nsCxPusher.cpp | 104 ------------------ js/xpconnect/src/nsCxPusher.h | 86 --------------- js/xpconnect/src/xpcprivate.h | 11 +- netwerk/base/src/Dashboard.cpp | 1 - netwerk/protocol/app/AppProtocolHandler.cpp | 3 +- .../mozapps/extensions/AddonPathService.cpp | 2 +- xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp | 2 +- 93 files changed, 196 insertions(+), 279 deletions(-) delete mode 100644 js/xpconnect/src/nsCxPusher.cpp delete mode 100644 js/xpconnect/src/nsCxPusher.h diff --git a/caps/nsPrincipal.cpp b/caps/nsPrincipal.cpp index 2fcad5ed504f..661f7b96bb07 100644 --- a/caps/nsPrincipal.cpp +++ b/caps/nsPrincipal.cpp @@ -19,9 +19,9 @@ #include "nsIClassInfoImpl.h" #include "nsError.h" #include "nsIContentSecurityPolicy.h" -#include "nsCxPusher.h" #include "jswrapper.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/Preferences.h" #include "mozilla/HashFunctions.h" diff --git a/caps/nsScriptSecurityManager.cpp b/caps/nsScriptSecurityManager.cpp index 2c15f4c2e3df..0c3d7bd3e4f2 100644 --- a/caps/nsScriptSecurityManager.cpp +++ b/caps/nsScriptSecurityManager.cpp @@ -61,10 +61,10 @@ #include "mozilla/Preferences.h" #include "mozilla/dom/BindingUtils.h" #include +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/StaticPtr.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsJSUtils.h" #include "nsILoadInfo.h" diff --git a/content/base/public/nsContentUtils.h b/content/base/public/nsContentUtils.h index 4726d89f1ba2..e67be4a10812 100644 --- a/content/base/public/nsContentUtils.h +++ b/content/base/public/nsContentUtils.h @@ -24,11 +24,11 @@ #include "mozilla/GuardObjects.h" #include "mozilla/TimeStamp.h" #include "nsContentListDeclarations.h" -#include "nsCxPusher.h" #include "nsMathUtils.h" #include "nsTArrayForwardDeclare.h" #include "Units.h" #include "mozilla/dom/AutocompleteInfoBinding.h" +#include "mozilla/dom/ScriptSettings.h" #if defined(XP_WIN) // Undefine LoadImage to prevent naming conflict with Windows. diff --git a/content/base/src/nsContentUtils.cpp b/content/base/src/nsContentUtils.cpp index 4837b9fa9345..3fe31b825d91 100644 --- a/content/base/src/nsContentUtils.cpp +++ b/content/base/src/nsContentUtils.cpp @@ -12,7 +12,6 @@ #include #include "prprf.h" -#include "nsCxPusher.h" #include "DecoderTraits.h" #include "harfbuzz/hb.h" #include "imgICache.h" diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index a06b0c2e404a..eca503a78174 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -39,7 +39,6 @@ #include "nsIDocShellTreeItem.h" #include "nsCOMArray.h" #include "nsDOMClassInfo.h" -#include "nsCxPusher.h" #include "mozilla/AsyncEventDispatcher.h" #include "mozilla/BasicEvents.h" diff --git a/content/base/src/nsFrameMessageManager.cpp b/content/base/src/nsFrameMessageManager.cpp index bcf47bbbbfc6..6fb3b596fa39 100644 --- a/content/base/src/nsFrameMessageManager.cpp +++ b/content/base/src/nsFrameMessageManager.cpp @@ -10,7 +10,6 @@ #include "AppProcessChecker.h" #include "ContentChild.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsError.h" #include "nsIXPConnect.h" #include "jsapi.h" @@ -33,6 +32,7 @@ #include "mozilla/Preferences.h" #include "mozilla/dom/nsIContentParent.h" #include "mozilla/dom/PermissionMessageUtils.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/StructuredCloneUtils.h" #include "mozilla/dom/PBlobChild.h" #include "mozilla/dom/PBlobParent.h" diff --git a/content/base/src/nsNodeUtils.cpp b/content/base/src/nsNodeUtils.cpp index 8ab312b511d7..fb5441f70555 100644 --- a/content/base/src/nsNodeUtils.cpp +++ b/content/base/src/nsNodeUtils.cpp @@ -6,7 +6,6 @@ #include "nsNodeUtils.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsINode.h" #include "nsIContent.h" #include "mozilla/dom/Element.h" diff --git a/content/base/src/nsObjectLoadingContent.cpp b/content/base/src/nsObjectLoadingContent.cpp index fdcbfb59d28d..c7a14d260c7f 100644 --- a/content/base/src/nsObjectLoadingContent.cpp +++ b/content/base/src/nsObjectLoadingContent.cpp @@ -48,7 +48,6 @@ #include "nsCURILoader.h" #include "nsContentPolicyUtils.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsDocShellCID.h" #include "nsGkAtoms.h" #include "nsThreadUtils.h" diff --git a/content/base/src/nsScriptLoader.cpp b/content/base/src/nsScriptLoader.cpp index 03c6ad87d086..f82cbf0cd2fc 100644 --- a/content/base/src/nsScriptLoader.cpp +++ b/content/base/src/nsScriptLoader.cpp @@ -33,7 +33,6 @@ #include "nsIDOMHTMLScriptElement.h" #include "nsIDocShell.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsUnicharUtils.h" #include "nsAutoPtr.h" #include "nsIXPConnect.h" diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 877342fd4d3e..554eb7279c15 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -41,7 +41,6 @@ #include "nsIStreamConverterService.h" #include "nsICachingChannel.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsCycleCollectionParticipant.h" #include "nsIContentPolicy.h" #include "nsContentPolicyUtils.h" diff --git a/dom/audiochannel/AudioChannelService.cpp b/dom/audiochannel/AudioChannelService.cpp index 99ab9d6c782e..286cc3e87424 100644 --- a/dom/audiochannel/AudioChannelService.cpp +++ b/dom/audiochannel/AudioChannelService.cpp @@ -23,7 +23,6 @@ #ifdef MOZ_WIDGET_GONK #include "nsJSUtils.h" -#include "nsCxPusher.h" #include "nsIAudioManager.h" #include "SpeakerManagerService.h" #define NS_AUDIOMANAGER_CONTRACTID "@mozilla.org/telephony/audiomanager;1" diff --git a/dom/base/DOMRequest.cpp b/dom/base/DOMRequest.cpp index ae1391ada65f..a6c21cb47703 100644 --- a/dom/base/DOMRequest.cpp +++ b/dom/base/DOMRequest.cpp @@ -7,7 +7,6 @@ #include "DOMRequest.h" #include "DOMError.h" -#include "nsCxPusher.h" #include "nsThreadUtils.h" #include "DOMCursor.h" #include "nsIDOMEvent.h" diff --git a/dom/base/ScriptSettings.cpp b/dom/base/ScriptSettings.cpp index edeb01f715d3..8cbea9aed5bc 100644 --- a/dom/base/ScriptSettings.cpp +++ b/dom/base/ScriptSettings.cpp @@ -20,6 +20,7 @@ #include "nsTArray.h" #include "nsJSUtils.h" #include "nsDOMJSUtils.h" +#include "WorkerPrivate.h" namespace mozilla { namespace dom { @@ -437,4 +438,91 @@ danger::AutoCxPusher::IsStackTop() const } } // namespace dom + +AutoJSContext::AutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) + : mCx(nullptr) +{ + Init(false MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT); +} + +AutoJSContext::AutoJSContext(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) + : mCx(nullptr) +{ + Init(aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT); +} + +void +AutoJSContext::Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) +{ + JS::AutoSuppressGCAnalysis nogc; + MOZ_ASSERT(!mCx, "mCx should not be initialized!"); + + MOZ_GUARD_OBJECT_NOTIFIER_INIT; + + nsXPConnect *xpc = nsXPConnect::XPConnect(); + if (!aSafe) { + mCx = xpc->GetCurrentJSContext(); + } + + if (!mCx) { + mCx = xpc->GetSafeJSContext(); + mPusher.emplace(mCx); + } +} + +AutoJSContext::operator JSContext*() const +{ + return mCx; +} + +ThreadsafeAutoJSContext::ThreadsafeAutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) +{ + MOZ_GUARD_OBJECT_NOTIFIER_INIT; + + if (NS_IsMainThread()) { + mCx = nullptr; + mAutoJSContext.emplace(); + } else { + mCx = mozilla::dom::workers::GetCurrentThreadJSContext(); + mRequest.emplace(mCx); + } +} + +ThreadsafeAutoJSContext::operator JSContext*() const +{ + if (mCx) { + return mCx; + } else { + return *mAutoJSContext; + } +} + +AutoSafeJSContext::AutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) + : AutoJSContext(true MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT) + , mAc(mCx, XPCJSRuntime::Get()->GetJSContextStack()->GetSafeJSContextGlobal()) +{ +} + +ThreadsafeAutoSafeJSContext::ThreadsafeAutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) +{ + MOZ_GUARD_OBJECT_NOTIFIER_INIT; + + if (NS_IsMainThread()) { + mCx = nullptr; + mAutoSafeJSContext.emplace(); + } else { + mCx = mozilla::dom::workers::GetCurrentThreadJSContext(); + mRequest.emplace(mCx); + } +} + +ThreadsafeAutoSafeJSContext::operator JSContext*() const +{ + if (mCx) { + return mCx; + } else { + return *mAutoSafeJSContext; + } +} + } // namespace mozilla diff --git a/dom/base/ScriptSettings.h b/dom/base/ScriptSettings.h index 51be031b4618..5e53cddea816 100644 --- a/dom/base/ScriptSettings.h +++ b/dom/base/ScriptSettings.h @@ -24,6 +24,7 @@ class nsIScriptContext; namespace mozilla { namespace dom { +// For internal use only - use AutoJSAPI instead. namespace danger { /** @@ -279,6 +280,75 @@ private: }; } // namespace dom + +/** + * Use AutoJSContext when you need a JS context on the stack but don't have one + * passed as a parameter. AutoJSContext will take care of finding the most + * appropriate JS context and release it when leaving the stack. + */ +class MOZ_STACK_CLASS AutoJSContext { +public: + explicit AutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); + operator JSContext*() const; + +protected: + explicit AutoJSContext(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM); + + // We need this Init() method because we can't use delegating constructor for + // the moment. It is a C++11 feature and we do not require C++11 to be + // supported to be able to compile Gecko. + void Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM); + + JSContext* mCx; + Maybe mPusher; + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER +}; + +/** + * Use ThreadsafeAutoJSContext when you want an AutoJSContext but might be + * running on a worker thread. + */ +class MOZ_STACK_CLASS ThreadsafeAutoJSContext { +public: + explicit ThreadsafeAutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); + operator JSContext*() const; + +private: + JSContext* mCx; // Used on workers. Null means mainthread. + Maybe mRequest; // Used on workers. + Maybe mAutoJSContext; // Used on main thread. + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER +}; + +/** + * AutoSafeJSContext is similar to AutoJSContext but will only return the safe + * JS context. That means it will never call nsContentUtils::GetCurrentJSContext(). + * + * Note - This is deprecated. Please use AutoJSAPI instead. + */ +class MOZ_STACK_CLASS AutoSafeJSContext : public AutoJSContext { +public: + explicit AutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); +private: + JSAutoCompartment mAc; +}; + +/** + * Like AutoSafeJSContext but can be used safely on worker threads. + */ +class MOZ_STACK_CLASS ThreadsafeAutoSafeJSContext { +public: + explicit ThreadsafeAutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); + operator JSContext*() const; + +private: + JSContext* mCx; // Used on workers. Null means mainthread. + Maybe mRequest; // Used on workers. + Maybe mAutoSafeJSContext; // Used on main thread. + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER +}; + + } // namespace mozilla #endif // mozilla_dom_ScriptSettings_h diff --git a/dom/base/nsContentPermissionHelper.cpp b/dom/base/nsContentPermissionHelper.cpp index 98e6ee2fba53..4d955b6dadf8 100644 --- a/dom/base/nsContentPermissionHelper.cpp +++ b/dom/base/nsContentPermissionHelper.cpp @@ -21,7 +21,6 @@ #include "nsArrayUtils.h" #include "nsIMutableArray.h" #include "nsContentPermissionHelper.h" -#include "nsCxPusher.h" #include "nsJSUtils.h" #include "nsISupportsPrimitives.h" #include "nsServiceManagerUtils.h" diff --git a/dom/base/nsDOMClassInfo.cpp b/dom/base/nsDOMClassInfo.cpp index d851b683acef..ac70ca637e65 100644 --- a/dom/base/nsDOMClassInfo.cpp +++ b/dom/base/nsDOMClassInfo.cpp @@ -48,7 +48,6 @@ #include "nsIDOMEvent.h" #include "nsIDOMEventListener.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIDOMGlobalPropertyInitializer.h" #include "mozilla/Attributes.h" #include "mozilla/Telemetry.h" diff --git a/dom/base/nsGlobalWindow.cpp b/dom/base/nsGlobalWindow.cpp index d3f6cd9ccea5..62cfef6397a7 100644 --- a/dom/base/nsGlobalWindow.cpp +++ b/dom/base/nsGlobalWindow.cpp @@ -119,7 +119,6 @@ #include "nsGlobalWindowCommands.h" #include "nsAutoPtr.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsCSSProps.h" #include "nsIDOMFile.h" #include "nsIDOMFileList.h" diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index bc710cd4aa71..7ae1c32bb6dc 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -31,7 +31,6 @@ #include "nsITimer.h" #include "nsIAtom.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "mozilla/EventDispatcher.h" #include "nsIContent.h" #include "nsCycleCollector.h" diff --git a/dom/bindings/CallbackObject.cpp b/dom/bindings/CallbackObject.cpp index b2681a3e81ad..a2c92d5305cc 100644 --- a/dom/bindings/CallbackObject.cpp +++ b/dom/bindings/CallbackObject.cpp @@ -14,7 +14,6 @@ #include "nsIScriptContext.h" #include "nsPIDOMWindow.h" #include "nsJSUtils.h" -#include "nsCxPusher.h" #include "nsIScriptSecurityManager.h" #include "xpcprivate.h" #include "WorkerPrivate.h" diff --git a/dom/bindings/Codegen.py b/dom/bindings/Codegen.py index 1374de7ca79c..6ae351b4aff2 100644 --- a/dom/bindings/Codegen.py +++ b/dom/bindings/Codegen.py @@ -11831,7 +11831,6 @@ class CGBindingRoot(CGThing): bindingHeaders["nsThreadUtils.h"] = hasWorkerStuff dictionaries = config.getDictionaries(webIDLFile=webIDLFile) - bindingHeaders["nsCxPusher.h"] = dictionaries hasNonEmptyDictionaries = any( len(dict.members) > 0 for dict in dictionaries) mainCallbacks = config.getCallbacks(webIDLFile=webIDLFile, diff --git a/dom/bluetooth/BluetoothReplyRunnable.cpp b/dom/bluetooth/BluetoothReplyRunnable.cpp index a8fe77632a98..d2e2f3771b93 100644 --- a/dom/bluetooth/BluetoothReplyRunnable.cpp +++ b/dom/bluetooth/BluetoothReplyRunnable.cpp @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "BluetoothReplyRunnable.h" #include "DOMRequest.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "nsServiceManagerUtils.h" diff --git a/dom/bluetooth/BluetoothService.cpp b/dom/bluetooth/BluetoothService.cpp index 4b95ffd965a1..4784ae3608b1 100644 --- a/dom/bluetooth/BluetoothService.cpp +++ b/dom/bluetooth/BluetoothService.cpp @@ -28,7 +28,6 @@ #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/ipc/UnixSocket.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIObserverService.h" #include "nsISettingsService.h" #include "nsISystemMessagesInternal.h" diff --git a/dom/bluetooth/bluedroid/BluetoothUtils.cpp b/dom/bluetooth/bluedroid/BluetoothUtils.cpp index c89efef54f8a..7853ebf098ee 100644 --- a/dom/bluetooth/bluedroid/BluetoothUtils.cpp +++ b/dom/bluetooth/bluedroid/BluetoothUtils.cpp @@ -14,7 +14,6 @@ #include "mozilla/Scoped.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIScriptContext.h" #include "nsISystemMessagesInternal.h" #include "nsString.h" diff --git a/dom/bluetooth/bluez/BluetoothUtils.cpp b/dom/bluetooth/bluez/BluetoothUtils.cpp index d9bd896fb2b9..d4120082d9ea 100644 --- a/dom/bluetooth/bluez/BluetoothUtils.cpp +++ b/dom/bluetooth/bluez/BluetoothUtils.cpp @@ -13,7 +13,6 @@ #include "mozilla/Scoped.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIScriptContext.h" #include "nsISystemMessagesInternal.h" #include "nsString.h" diff --git a/dom/bluetooth2/BluetoothReplyRunnable.cpp b/dom/bluetooth2/BluetoothReplyRunnable.cpp index d1ede83d4648..a381aaa89356 100644 --- a/dom/bluetooth2/BluetoothReplyRunnable.cpp +++ b/dom/bluetooth2/BluetoothReplyRunnable.cpp @@ -7,6 +7,7 @@ #include "base/basictypes.h" #include "BluetoothReplyRunnable.h" #include "DOMRequest.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "mozilla/dom/Promise.h" #include "nsServiceManagerUtils.h" diff --git a/dom/bluetooth2/BluetoothService.cpp b/dom/bluetooth2/BluetoothService.cpp index 5cafeb0a430e..428c7c1f25c2 100644 --- a/dom/bluetooth2/BluetoothService.cpp +++ b/dom/bluetooth2/BluetoothService.cpp @@ -27,7 +27,6 @@ #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIObserverService.h" #include "nsISettingsService.h" #include "nsISystemMessagesInternal.h" diff --git a/dom/bluetooth2/bluedroid/BluetoothUtils.cpp b/dom/bluetooth2/bluedroid/BluetoothUtils.cpp index d4432660ca78..063ca036550f 100644 --- a/dom/bluetooth2/bluedroid/BluetoothUtils.cpp +++ b/dom/bluetooth2/bluedroid/BluetoothUtils.cpp @@ -12,9 +12,9 @@ #include "BluetoothUtils.h" #include "jsapi.h" #include "mozilla/Scoped.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIScriptContext.h" #include "nsISystemMessagesInternal.h" #include "nsString.h" diff --git a/dom/bluetooth2/bluez/BluetoothUtils.cpp b/dom/bluetooth2/bluez/BluetoothUtils.cpp index d9bd896fb2b9..d4bc173db6ee 100644 --- a/dom/bluetooth2/bluez/BluetoothUtils.cpp +++ b/dom/bluetooth2/bluez/BluetoothUtils.cpp @@ -11,9 +11,9 @@ #include "BluetoothUtils.h" #include "jsapi.h" #include "mozilla/Scoped.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/bluetooth/BluetoothTypes.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIScriptContext.h" #include "nsISystemMessagesInternal.h" #include "nsString.h" diff --git a/dom/browser-element/BrowserElementParent.cpp b/dom/browser-element/BrowserElementParent.cpp index d2a123a4cea7..586d481ade94 100644 --- a/dom/browser-element/BrowserElementParent.cpp +++ b/dom/browser-element/BrowserElementParent.cpp @@ -19,7 +19,6 @@ #include "nsIInterfaceRequestorUtils.h" #include "nsVariant.h" #include "mozilla/dom/BrowserElementDictionariesBinding.h" -#include "nsCxPusher.h" #include "mozilla/dom/CustomEvent.h" using namespace mozilla; diff --git a/dom/canvas/WebGLContextUtils.cpp b/dom/canvas/WebGLContextUtils.cpp index 545a6220046f..657230d422d4 100644 --- a/dom/canvas/WebGLContextUtils.cpp +++ b/dom/canvas/WebGLContextUtils.cpp @@ -10,7 +10,6 @@ #include "GLContext.h" #include "jsapi.h" #include "mozilla/Preferences.h" -#include "nsCxPusher.h" #include "nsIDOMDataContainerEvent.h" #include "nsIDOMEvent.h" #include "nsIScriptSecurityManager.h" @@ -24,6 +23,8 @@ #include "WebGLTexture.h" #include "WebGLVertexArray.h" +#include "mozilla/dom/ScriptSettings.h" + namespace mozilla { using namespace gl; diff --git a/dom/devicestorage/nsDeviceStorage.cpp b/dom/devicestorage/nsDeviceStorage.cpp index f3e66cbeb77a..1147ebd3f8bb 100644 --- a/dom/devicestorage/nsDeviceStorage.cpp +++ b/dom/devicestorage/nsDeviceStorage.cpp @@ -43,7 +43,6 @@ #include "nsIPrincipal.h" #include "nsJSUtils.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsXULAppAPI.h" #include "DeviceStorageFileDescriptor.h" #include "DeviceStorageRequestChild.h" diff --git a/dom/events/EventListenerService.cpp b/dom/events/EventListenerService.cpp index 4a4ded4017b2..a0cc99ca5c5d 100644 --- a/dom/events/EventListenerService.cpp +++ b/dom/events/EventListenerService.cpp @@ -10,7 +10,6 @@ #include "mozilla/JSEventHandler.h" #include "mozilla/Maybe.h" #include "nsCOMArray.h" -#include "nsCxPusher.h" #include "nsDOMClassInfoID.h" #include "nsIXPConnect.h" #include "nsJSUtils.h" diff --git a/dom/fmradio/FMRadioService.cpp b/dom/fmradio/FMRadioService.cpp index f37bbd7bf700..d6885eebd6d3 100644 --- a/dom/fmradio/FMRadioService.cpp +++ b/dom/fmradio/FMRadioService.cpp @@ -12,10 +12,10 @@ #include "nsDOMClassInfo.h" #include "mozilla/Preferences.h" #include "mozilla/dom/FMRadioChild.h" +#include "mozilla/dom/ScriptSettings.h" #include "nsIObserverService.h" #include "nsISettingsService.h" #include "nsJSUtils.h" -#include "nsCxPusher.h" #define BAND_87500_108000_kHz 1 #define BAND_76000_108000_kHz 2 diff --git a/dom/indexedDB/IDBFactory.cpp b/dom/indexedDB/IDBFactory.cpp index 1f890665adb6..a17ce5d1f865 100644 --- a/dom/indexedDB/IDBFactory.cpp +++ b/dom/indexedDB/IDBFactory.cpp @@ -26,7 +26,6 @@ #include "nsComponentManagerUtils.h" #include "nsCharSeparatedTokenizer.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsDOMClassInfoID.h" #include "nsGlobalWindow.h" #include "nsHashKeys.h" diff --git a/dom/indexedDB/IDBFileRequest.cpp b/dom/indexedDB/IDBFileRequest.cpp index d470b2830b57..d774df24aaae 100644 --- a/dom/indexedDB/IDBFileRequest.cpp +++ b/dom/indexedDB/IDBFileRequest.cpp @@ -16,7 +16,6 @@ #include "mozilla/dom/ProgressEvent.h" #include "mozilla/EventDispatcher.h" #include "nsCOMPtr.h" -#include "nsCxPusher.h" #include "nsDebug.h" #include "nsError.h" #include "nsIDOMEvent.h" diff --git a/dom/indexedDB/IDBRequest.cpp b/dom/indexedDB/IDBRequest.cpp index 2a813a4fb76d..e778a4bfdeec 100644 --- a/dom/indexedDB/IDBRequest.cpp +++ b/dom/indexedDB/IDBRequest.cpp @@ -18,7 +18,6 @@ #include "nsDOMClassInfoID.h" #include "nsDOMJSUtils.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsJSUtils.h" #include "nsPIDOMWindow.h" #include "nsString.h" diff --git a/dom/indexedDB/ipc/IndexedDBParent.cpp b/dom/indexedDB/ipc/IndexedDBParent.cpp index 20ff78ec0d62..c5f4f2658867 100644 --- a/dom/indexedDB/ipc/IndexedDBParent.cpp +++ b/dom/indexedDB/ipc/IndexedDBParent.cpp @@ -17,7 +17,6 @@ #include "mozilla/dom/ipc/Blob.h" #include "mozilla/dom/TabParent.h" #include "mozilla/unused.h" -#include "nsCxPusher.h" #include "AsyncConnectionHelper.h" #include "DatabaseInfo.h" diff --git a/dom/ipc/PreallocatedProcessManager.cpp b/dom/ipc/PreallocatedProcessManager.cpp index c74d1c6fe35b..ea0ab9bbee67 100644 --- a/dom/ipc/PreallocatedProcessManager.cpp +++ b/dom/ipc/PreallocatedProcessManager.cpp @@ -8,10 +8,10 @@ #include "mozilla/ClearOnShutdown.h" #include "mozilla/Preferences.h" #include "mozilla/dom/ContentParent.h" +#include "mozilla/dom/ScriptSettings.h" #include "nsIPropertyBag2.h" #include "ProcessPriorityManager.h" #include "nsServiceManagerUtils.h" -#include "nsCxPusher.h" #ifdef MOZ_NUWA_PROCESS #include "ipc/Nuwa.h" diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index 9ebf11d0d68e..512209f3a681 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -34,7 +34,6 @@ #include "mozilla/unused.h" #include "mozIApplication.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsEmbedCID.h" #include #ifdef MOZ_CRASHREPORTER diff --git a/dom/media/GetUserMediaRequest.cpp b/dom/media/GetUserMediaRequest.cpp index f0e8b9ca58a7..d884ac828d65 100644 --- a/dom/media/GetUserMediaRequest.cpp +++ b/dom/media/GetUserMediaRequest.cpp @@ -8,7 +8,6 @@ #include "mozilla/dom/GetUserMediaRequestBinding.h" #include "nsIScriptGlobalObject.h" #include "nsPIDOMWindow.h" -#include "nsCxPusher.h" namespace mozilla { namespace dom { diff --git a/dom/media/MediaPermissionGonk.cpp b/dom/media/MediaPermissionGonk.cpp index 2f4a78ff1def..83d35e641fa5 100644 --- a/dom/media/MediaPermissionGonk.cpp +++ b/dom/media/MediaPermissionGonk.cpp @@ -6,7 +6,6 @@ #include "MediaPermissionGonk.h" #include "nsCOMPtr.h" -#include "nsCxPusher.h" #include "nsIContentPermissionPrompt.h" #include "nsIDocument.h" #include "nsIDOMNavigatorUserMedia.h" diff --git a/dom/mobileconnection/src/MobileConnectionInfo.cpp b/dom/mobileconnection/src/MobileConnectionInfo.cpp index b9ad84f25ccf..1b8803d26b17 100644 --- a/dom/mobileconnection/src/MobileConnectionInfo.cpp +++ b/dom/mobileconnection/src/MobileConnectionInfo.cpp @@ -6,8 +6,9 @@ #include "MobileConnectionInfo.h" +#include "mozilla/dom/ScriptSettings.h" + #include "jsapi.h" -#include "nsCxPusher.h" #define CONVERT_STRING_TO_NULLABLE_ENUM(_string, _enumType, _enum) \ { \ diff --git a/dom/mobilemessage/src/MmsMessage.cpp b/dom/mobilemessage/src/MmsMessage.cpp index ab8c588245b9..c62d017d3257 100644 --- a/dom/mobilemessage/src/MmsMessage.cpp +++ b/dom/mobilemessage/src/MmsMessage.cpp @@ -14,9 +14,9 @@ #include "mozilla/dom/ContentParent.h" #include "mozilla/dom/mobilemessage/Constants.h" // For MessageType #include "mozilla/dom/mobilemessage/SmsTypes.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/ToJSValue.h" #include "nsDOMFile.h" -#include "nsCxPusher.h" using namespace mozilla::dom::mobilemessage; diff --git a/dom/mobilemessage/src/MobileMessageCallback.cpp b/dom/mobilemessage/src/MobileMessageCallback.cpp index 9d9f91227799..981e80641ad4 100644 --- a/dom/mobilemessage/src/MobileMessageCallback.cpp +++ b/dom/mobilemessage/src/MobileMessageCallback.cpp @@ -6,7 +6,6 @@ #include "MobileMessageCallback.h" #include "mozilla/dom/ToJSValue.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIDOMMozSmsMessage.h" #include "nsIDOMMozMmsMessage.h" #include "nsIScriptGlobalObject.h" diff --git a/dom/mobilemessage/src/ipc/SmsIPCService.cpp b/dom/mobilemessage/src/ipc/SmsIPCService.cpp index cdca5b39245b..83f2931947c3 100644 --- a/dom/mobilemessage/src/ipc/SmsIPCService.cpp +++ b/dom/mobilemessage/src/ipc/SmsIPCService.cpp @@ -10,7 +10,6 @@ #include "SmsMessage.h" #include "SmsFilter.h" #include "nsJSUtils.h" -#include "nsCxPusher.h" #include "mozilla/dom/MozMobileMessageManagerBinding.h" #include "mozilla/dom/BindingUtils.h" #include "mozilla/Preferences.h" diff --git a/dom/mobilemessage/src/ipc/SmsParent.cpp b/dom/mobilemessage/src/ipc/SmsParent.cpp index 20d136797c71..987d74ea0fdf 100644 --- a/dom/mobilemessage/src/ipc/SmsParent.cpp +++ b/dom/mobilemessage/src/ipc/SmsParent.cpp @@ -22,7 +22,6 @@ #include "mozilla/dom/mobilemessage/Constants.h" // For MessageType #include "nsContentUtils.h" #include "nsTArrayHelpers.h" -#include "nsCxPusher.h" #include "xpcpublic.h" #include "nsServiceManagerUtils.h" #include "DeletedMessageInfo.h" diff --git a/dom/network/src/TCPSocketParent.cpp b/dom/network/src/TCPSocketParent.cpp index af306d776ab9..e9de185ce137 100644 --- a/dom/network/src/TCPSocketParent.cpp +++ b/dom/network/src/TCPSocketParent.cpp @@ -7,12 +7,12 @@ #include "jsfriendapi.h" #include "nsJSUtils.h" #include "nsIDOMTCPSocket.h" -#include "nsCxPusher.h" #include "mozilla/unused.h" #include "mozilla/AppProcessChecker.h" #include "mozilla/net/NeckoCommon.h" #include "mozilla/net/PNeckoParent.h" #include "mozilla/dom/ContentParent.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/TabParent.h" #include "nsIScriptSecurityManager.h" diff --git a/dom/nfc/gonk/NfcService.cpp b/dom/nfc/gonk/NfcService.cpp index 02ed8d611b55..17bef26571fa 100644 --- a/dom/nfc/gonk/NfcService.cpp +++ b/dom/nfc/gonk/NfcService.cpp @@ -9,7 +9,6 @@ #include "mozilla/dom/ToJSValue.h" #include "mozilla/dom/RootedDictionary.h" #include "nsAutoPtr.h" -#include "nsCxPusher.h" #include "nsString.h" #include "nsXULAppAPI.h" #include "NfcOptions.h" diff --git a/dom/plugins/base/nsJSNPRuntime.cpp b/dom/plugins/base/nsJSNPRuntime.cpp index 375f9364b2d8..0833c4cd69c6 100644 --- a/dom/plugins/base/nsJSNPRuntime.cpp +++ b/dom/plugins/base/nsJSNPRuntime.cpp @@ -17,7 +17,6 @@ #include "nsIScriptContext.h" #include "nsDOMJSUtils.h" #include "nsJSUtils.h" -#include "nsCxPusher.h" #include "nsIDocument.h" #include "nsIJSRuntimeService.h" #include "nsIXPConnect.h" diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index d955254d2809..0455b86d619f 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -40,7 +40,6 @@ #include "nsIPrincipal.h" #include "nsWildCard.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "mozilla/dom/ScriptSettings.h" #include "nsIXPConnect.h" diff --git a/dom/plugins/base/nsNPAPIPlugin.h b/dom/plugins/base/nsNPAPIPlugin.h index c5ba6d9c8140..29edc92b0db8 100644 --- a/dom/plugins/base/nsNPAPIPlugin.h +++ b/dom/plugins/base/nsNPAPIPlugin.h @@ -10,8 +10,7 @@ #include "npfunctions.h" #include "nsPluginHost.h" -#include "nsCxPusher.h" - +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/PluginLibrary.h" #if defined(XP_WIN) diff --git a/dom/plugins/ipc/PluginIdentifierParent.cpp b/dom/plugins/ipc/PluginIdentifierParent.cpp index afdeb81aaa90..137162c59a98 100644 --- a/dom/plugins/ipc/PluginIdentifierParent.cpp +++ b/dom/plugins/ipc/PluginIdentifierParent.cpp @@ -9,7 +9,6 @@ #include "nsNPAPIPlugin.h" #include "nsServiceManagerUtils.h" #include "PluginScriptableObjectUtils.h" -#include "nsCxPusher.h" #include "mozilla/unused.h" using namespace mozilla::plugins::parent; diff --git a/dom/plugins/ipc/PluginScriptableObjectParent.cpp b/dom/plugins/ipc/PluginScriptableObjectParent.cpp index 5d55b1df53f8..baea05c1715a 100644 --- a/dom/plugins/ipc/PluginScriptableObjectParent.cpp +++ b/dom/plugins/ipc/PluginScriptableObjectParent.cpp @@ -9,7 +9,6 @@ #include "mozilla/DebugOnly.h" #include "mozilla/plugins/PluginIdentifierParent.h" #include "mozilla/unused.h" -#include "nsCxPusher.h" #include "nsNPAPIPlugin.h" #include "PluginScriptableObjectUtils.h" diff --git a/dom/src/jsurl/nsJSProtocolHandler.cpp b/dom/src/jsurl/nsJSProtocolHandler.cpp index 0ce5193cb4d1..06ad830f7a63 100644 --- a/dom/src/jsurl/nsJSProtocolHandler.cpp +++ b/dom/src/jsurl/nsJSProtocolHandler.cpp @@ -36,7 +36,6 @@ #include "nsIContentViewer.h" #include "nsIXPConnect.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsJSUtils.h" #include "nsThreadUtils.h" #include "nsIScriptChannel.h" diff --git a/dom/system/gonk/AudioManager.cpp b/dom/system/gonk/AudioManager.cpp index a4a2ceead67b..82517df7a7e7 100644 --- a/dom/system/gonk/AudioManager.cpp +++ b/dom/system/gonk/AudioManager.cpp @@ -30,13 +30,13 @@ #include "mozilla/Services.h" #include "mozilla/StaticPtr.h" #include "mozilla/ClearOnShutdown.h" +#include "mozilla/dom/ScriptSettings.h" #include "base/message_loop.h" #include "BluetoothCommon.h" #include "BluetoothHfpManagerBase.h" #include "nsJSUtils.h" -#include "nsCxPusher.h" #include "nsThreadUtils.h" #include "nsServiceManagerUtils.h" #include "nsComponentManagerUtils.h" diff --git a/dom/system/gonk/AutoMounterSetting.cpp b/dom/system/gonk/AutoMounterSetting.cpp index d6e4637a1b70..876a756b02be 100644 --- a/dom/system/gonk/AutoMounterSetting.cpp +++ b/dom/system/gonk/AutoMounterSetting.cpp @@ -11,7 +11,6 @@ #include "nsCOMPtr.h" #include "nsDebug.h" #include "nsIObserverService.h" -#include "nsCxPusher.h" #include "nsISettingsService.h" #include "nsJSUtils.h" #include "nsPrintfCString.h" @@ -19,6 +18,7 @@ #include "nsString.h" #include "nsThreadUtils.h" #include "xpcpublic.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/Attributes.h" #undef LOG diff --git a/dom/system/gonk/NetworkWorker.cpp b/dom/system/gonk/NetworkWorker.cpp index fa4769ef4c60..b848c406736f 100644 --- a/dom/system/gonk/NetworkWorker.cpp +++ b/dom/system/gonk/NetworkWorker.cpp @@ -7,9 +7,9 @@ #include #include "mozilla/ModuleUtils.h" #include "mozilla/ClearOnShutdown.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/dom/ToJSValue.h" #include "nsXULAppAPI.h" -#include "nsCxPusher.h" #define NS_NETWORKWORKER_CID \ { 0x6df093e1, 0x8127, 0x4fa7, {0x90, 0x13, 0xa3, 0xaa, 0xa7, 0x79, 0xbb, 0xdd} } diff --git a/dom/system/gonk/SystemWorkerManager.cpp b/dom/system/gonk/SystemWorkerManager.cpp index 9d1573702928..7332817662d2 100644 --- a/dom/system/gonk/SystemWorkerManager.cpp +++ b/dom/system/gonk/SystemWorkerManager.cpp @@ -27,12 +27,12 @@ #include "AutoMounter.h" #include "TimeZoneSettingObserver.h" #include "AudioManager.h" +#include "mozilla/dom/ScriptSettings.h" #ifdef MOZ_B2G_RIL #include "mozilla/ipc/Ril.h" #endif #include "mozilla/ipc/KeyStore.h" #include "nsIObserverService.h" -#include "nsCxPusher.h" #include "nsServiceManagerUtils.h" #include "nsThreadUtils.h" #include "nsRadioInterfaceLayer.h" diff --git a/dom/system/gonk/TimeZoneSettingObserver.cpp b/dom/system/gonk/TimeZoneSettingObserver.cpp index 3db33a9e3439..18306e7e0d25 100644 --- a/dom/system/gonk/TimeZoneSettingObserver.cpp +++ b/dom/system/gonk/TimeZoneSettingObserver.cpp @@ -4,6 +4,7 @@ #include "base/message_loop.h" #include "jsapi.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/Attributes.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/Hal.h" @@ -20,7 +21,6 @@ #include "TimeZoneSettingObserver.h" #include "xpcpublic.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsPrintfCString.h" #undef LOG diff --git a/dom/telephony/Telephony.cpp b/dom/telephony/Telephony.cpp index d947b88dbbf7..2a63cb4e6978 100644 --- a/dom/telephony/Telephony.cpp +++ b/dom/telephony/Telephony.cpp @@ -17,7 +17,6 @@ #include "mozilla/Preferences.h" #include "nsCharSeparatedTokenizer.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsNetUtil.h" #include "nsServiceManagerUtils.h" #include "nsThreadUtils.h" diff --git a/dom/time/DateCacheCleaner.cpp b/dom/time/DateCacheCleaner.cpp index 5be69faf88ac..a976ef4ea3bc 100644 --- a/dom/time/DateCacheCleaner.cpp +++ b/dom/time/DateCacheCleaner.cpp @@ -6,10 +6,10 @@ #include "DateCacheCleaner.h" #include "jsapi.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/ClearOnShutdown.h" #include "mozilla/Hal.h" #include "mozilla/StaticPtr.h" -#include "nsCxPusher.h" using namespace mozilla::hal; diff --git a/dom/wifi/WifiCertService.cpp b/dom/wifi/WifiCertService.cpp index cfc0910dc2a0..23bca42f24e4 100644 --- a/dom/wifi/WifiCertService.cpp +++ b/dom/wifi/WifiCertService.cpp @@ -16,7 +16,6 @@ #include "cert.h" #include "certdb.h" #include "CryptoTask.h" -#include "nsCxPusher.h" #include "nsIDOMFile.h" #include "nsIWifiService.h" #include "nsNetUtil.h" diff --git a/dom/wifi/WifiProxyService.cpp b/dom/wifi/WifiProxyService.cpp index 78bc7076a20c..113c6fcb2b78 100644 --- a/dom/wifi/WifiProxyService.cpp +++ b/dom/wifi/WifiProxyService.cpp @@ -9,7 +9,6 @@ #include "mozilla/dom/ToJSValue.h" #include "nsXULAppAPI.h" #include "WifiUtils.h" -#include "nsCxPusher.h" #ifdef MOZ_TASK_TRACER #include "GeckoTaskTracer.h" diff --git a/dom/wifi/WifiUtils.h b/dom/wifi/WifiUtils.h index 41e20f1b0a12..7aacf6935eda 100644 --- a/dom/wifi/WifiUtils.h +++ b/dom/wifi/WifiUtils.h @@ -15,7 +15,6 @@ #include "mozilla/dom/WifiOptionsBinding.h" #include "mozilla/dom/network/NetUtils.h" #include "WifiHotspotUtils.h" -#include "nsCxPusher.h" // Needed to add a copy constructor to WifiCommandOptions. struct CommandOptions diff --git a/dom/workers/ServiceWorkerManager.cpp b/dom/workers/ServiceWorkerManager.cpp index 6b9a5454cb7a..97282f4982a8 100644 --- a/dom/workers/ServiceWorkerManager.cpp +++ b/dom/workers/ServiceWorkerManager.cpp @@ -18,7 +18,6 @@ #include "mozilla/dom/PromiseNativeHandler.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsNetUtil.h" #include "nsProxyRelease.h" #include "nsTArray.h" diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index 26cd35fe4736..c5ca440f22c4 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -53,7 +53,6 @@ #include "mozilla/Preferences.h" #include "nsAlgorithm.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsError.h" #include "nsDOMJSUtils.h" #include "nsHostObjectProtocolHandler.h" diff --git a/dom/workers/XMLHttpRequest.cpp b/dom/workers/XMLHttpRequest.cpp index 9db5f6908b8b..111d3046b096 100644 --- a/dom/workers/XMLHttpRequest.cpp +++ b/dom/workers/XMLHttpRequest.cpp @@ -18,7 +18,6 @@ #include "mozilla/dom/ProgressEvent.h" #include "nsComponentManagerUtils.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsJSUtils.h" #include "nsThreadUtils.h" diff --git a/dom/xbl/nsXBLDocumentInfo.cpp b/dom/xbl/nsXBLDocumentInfo.cpp index 851dfb70f28e..3931f8666ac3 100644 --- a/dom/xbl/nsXBLDocumentInfo.cpp +++ b/dom/xbl/nsXBLDocumentInfo.cpp @@ -23,7 +23,6 @@ #include "nsJSPrincipals.h" #include "nsIScriptSecurityManager.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsDOMJSUtils.h" #include "mozilla/Services.h" #include "xpcpublic.h" diff --git a/dom/xbl/nsXBLProtoImpl.cpp b/dom/xbl/nsXBLProtoImpl.cpp index e18fbd2ce14c..560202026009 100644 --- a/dom/xbl/nsXBLProtoImpl.cpp +++ b/dom/xbl/nsXBLProtoImpl.cpp @@ -9,7 +9,6 @@ #include "nsIContent.h" #include "nsIDocument.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIXPConnect.h" #include "nsIServiceManager.h" #include "nsIDOMNode.h" diff --git a/dom/xbl/nsXBLProtoImplMethod.cpp b/dom/xbl/nsXBLProtoImplMethod.cpp index 437d844fe7cb..798d07eeb6e8 100644 --- a/dom/xbl/nsXBLProtoImplMethod.cpp +++ b/dom/xbl/nsXBLProtoImplMethod.cpp @@ -14,7 +14,6 @@ #include "nsXBLProtoImplMethod.h" #include "nsJSUtils.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIScriptSecurityManager.h" #include "nsIXPConnect.h" #include "xpcpublic.h" diff --git a/dom/xbl/nsXBLProtoImplProperty.cpp b/dom/xbl/nsXBLProtoImplProperty.cpp index eaa8e672dcad..295f63db05c0 100644 --- a/dom/xbl/nsXBLProtoImplProperty.cpp +++ b/dom/xbl/nsXBLProtoImplProperty.cpp @@ -9,7 +9,6 @@ #include "nsIContent.h" #include "nsXBLProtoImplProperty.h" #include "nsUnicharUtils.h" -#include "nsCxPusher.h" #include "nsReadableUtils.h" #include "nsJSUtils.h" #include "nsXBLPrototypeBinding.h" diff --git a/dom/xbl/nsXBLPrototypeHandler.cpp b/dom/xbl/nsXBLPrototypeHandler.cpp index 1663738cfffd..01df4b48c792 100644 --- a/dom/xbl/nsXBLPrototypeHandler.cpp +++ b/dom/xbl/nsXBLPrototypeHandler.cpp @@ -9,7 +9,6 @@ #include "nsXBLPrototypeHandler.h" #include "nsXBLPrototypeBinding.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsGlobalWindow.h" #include "nsIContent.h" #include "nsIAtom.h" diff --git a/dom/xbl/nsXBLSerialize.cpp b/dom/xbl/nsXBLSerialize.cpp index d57e13573b00..d29f987cfedd 100644 --- a/dom/xbl/nsXBLSerialize.cpp +++ b/dom/xbl/nsXBLSerialize.cpp @@ -10,7 +10,6 @@ #include "nsXBLPrototypeBinding.h" #include "nsIXPConnect.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" using namespace mozilla; diff --git a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp index 99287dad61ef..904cf531482f 100644 --- a/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp +++ b/extensions/pref/autoconfig/src/nsJSConfigTriggers.cpp @@ -19,7 +19,6 @@ #include "mozilla/Attributes.h" #include "mozilla/Maybe.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsIScriptSecurityManager.h" #include "nsJSPrincipals.h" #include "jswrapper.h" diff --git a/ipc/testshell/XPCShellEnvironment.cpp b/ipc/testshell/XPCShellEnvironment.cpp index 238707ff3e40..921e120e6d5b 100644 --- a/ipc/testshell/XPCShellEnvironment.cpp +++ b/ipc/testshell/XPCShellEnvironment.cpp @@ -33,7 +33,6 @@ #include "nsIXPConnect.h" #include "nsIXPCScriptable.h" -#include "nsCxPusher.h" #include "nsJSUtils.h" #include "nsJSPrincipals.h" #include "nsThreadUtils.h" diff --git a/js/ipc/JavaScriptChild.cpp b/js/ipc/JavaScriptChild.cpp index a8d65997637c..02c936471847 100644 --- a/js/ipc/JavaScriptChild.cpp +++ b/js/ipc/JavaScriptChild.cpp @@ -12,7 +12,6 @@ #include "nsContentUtils.h" #include "xpcprivate.h" #include "jsfriendapi.h" -#include "nsCxPusher.h" #include "AccessCheck.h" using namespace JS; diff --git a/js/ipc/WrapperAnswer.cpp b/js/ipc/WrapperAnswer.cpp index db8c7b11e5ed..7ad31f7607d4 100644 --- a/js/ipc/WrapperAnswer.cpp +++ b/js/ipc/WrapperAnswer.cpp @@ -12,7 +12,6 @@ #include "nsContentUtils.h" #include "xpcprivate.h" #include "jsfriendapi.h" -#include "nsCxPusher.h" using namespace JS; using namespace mozilla; diff --git a/js/xpconnect/loader/mozJSComponentLoader.h b/js/xpconnect/loader/mozJSComponentLoader.h index 67f55352e60c..fcd02fb63393 100644 --- a/js/xpconnect/loader/mozJSComponentLoader.h +++ b/js/xpconnect/loader/mozJSComponentLoader.h @@ -7,6 +7,7 @@ #ifndef mozJSComponentLoader_h #define mozJSComponentLoader_h +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/MemoryReporting.h" #include "mozilla/ModuleLoader.h" #include "nsISupports.h" @@ -14,7 +15,6 @@ #include "nsIURI.h" #include "xpcIJSModuleLoader.h" #include "nsClassHashtable.h" -#include "nsCxPusher.h" #include "nsDataHashtable.h" #include "jsapi.h" diff --git a/js/xpconnect/src/Sandbox.cpp b/js/xpconnect/src/Sandbox.cpp index 513c284d2e93..9eaa4d530388 100644 --- a/js/xpconnect/src/Sandbox.cpp +++ b/js/xpconnect/src/Sandbox.cpp @@ -14,7 +14,6 @@ #include "js/OldDebugAPI.h" #include "js/StructuredClone.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsGlobalWindow.h" #include "nsIScriptContext.h" #include "nsIScriptObjectPrincipal.h" diff --git a/js/xpconnect/src/XPCJSRuntime.cpp b/js/xpconnect/src/XPCJSRuntime.cpp index 45d1beeaf85a..bf8f372fc0a4 100644 --- a/js/xpconnect/src/XPCJSRuntime.cpp +++ b/js/xpconnect/src/XPCJSRuntime.cpp @@ -29,7 +29,6 @@ #include "mozilla/Services.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include "nsCCUncollectableMarker.h" #include "nsCycleCollectionNoteRootCallback.h" #include "nsScriptLoader.h" diff --git a/js/xpconnect/src/XPCVariant.cpp b/js/xpconnect/src/XPCVariant.cpp index 245c56225adf..89e679f9740a 100644 --- a/js/xpconnect/src/XPCVariant.cpp +++ b/js/xpconnect/src/XPCVariant.cpp @@ -9,7 +9,6 @@ #include "mozilla/Range.h" #include "xpcprivate.h" -#include "nsCxPusher.h" #include "jsfriendapi.h" #include "jsprf.h" diff --git a/js/xpconnect/src/XPCWrappedJS.cpp b/js/xpconnect/src/XPCWrappedJS.cpp index 20b4d7579aea..1835bbfed179 100644 --- a/js/xpconnect/src/XPCWrappedJS.cpp +++ b/js/xpconnect/src/XPCWrappedJS.cpp @@ -9,7 +9,6 @@ #include "xpcprivate.h" #include "jsprf.h" #include "nsCCUncollectableMarker.h" -#include "nsCxPusher.h" #include "nsContentUtils.h" #include "nsThreadUtils.h" #include "JavaScriptParent.h" diff --git a/js/xpconnect/src/XPCWrappedNative.cpp b/js/xpconnect/src/XPCWrappedNative.cpp index 75da46970b45..e77f13cf55d7 100644 --- a/js/xpconnect/src/XPCWrappedNative.cpp +++ b/js/xpconnect/src/XPCWrappedNative.cpp @@ -15,7 +15,6 @@ #include "XrayWrapper.h" #include "nsContentUtils.h" -#include "nsCxPusher.h" #include #include "mozilla/Likely.h" diff --git a/js/xpconnect/src/XPCWrappedNativeInfo.cpp b/js/xpconnect/src/XPCWrappedNativeInfo.cpp index 304b85f04263..a5682fc78a1e 100644 --- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp +++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp @@ -8,7 +8,6 @@ #include "xpcprivate.h" #include "jswrapper.h" -#include "nsCxPusher.h" #include "mozilla/MemoryReporting.h" #include "mozilla/XPTInterfaceInfoManager.h" diff --git a/js/xpconnect/src/XPCWrappedNativeProto.cpp b/js/xpconnect/src/XPCWrappedNativeProto.cpp index 617cd8a320ee..1fa9a370c48d 100644 --- a/js/xpconnect/src/XPCWrappedNativeProto.cpp +++ b/js/xpconnect/src/XPCWrappedNativeProto.cpp @@ -7,7 +7,6 @@ /* Shared proto object for XPCWrappedNative. */ #include "xpcprivate.h" -#include "nsCxPusher.h" #include "pratom.h" using namespace mozilla; diff --git a/js/xpconnect/src/moz.build b/js/xpconnect/src/moz.build index 755f9caafcd2..bdc7cd378027 100644 --- a/js/xpconnect/src/moz.build +++ b/js/xpconnect/src/moz.build @@ -6,7 +6,6 @@ EXPORTS += [ 'BackstagePass.h', - 'nsCxPusher.h', 'qsObjectHelper.h', 'XPCJSMemoryReporter.h', 'xpcObjectHelper.h', @@ -15,7 +14,6 @@ EXPORTS += [ UNIFIED_SOURCES += [ 'ExportHelpers.cpp', - 'nsCxPusher.cpp', 'nsScriptError.cpp', 'nsXPConnect.cpp', 'Sandbox.cpp', diff --git a/js/xpconnect/src/nsCxPusher.cpp b/js/xpconnect/src/nsCxPusher.cpp deleted file mode 100644 index 7f237c4dc5e6..000000000000 --- a/js/xpconnect/src/nsCxPusher.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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/. */ - -#include "nsCxPusher.h" - -#include "nsIScriptContext.h" -#include "nsDOMJSUtils.h" -#include "xpcprivate.h" -#include "WorkerPrivate.h" - -using mozilla::DebugOnly; - -namespace mozilla { - -AutoJSContext::AutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) - : mCx(nullptr) -{ - Init(false MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT); -} - -AutoJSContext::AutoJSContext(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) - : mCx(nullptr) -{ - Init(aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT); -} - -void -AutoJSContext::Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL) -{ - JS::AutoSuppressGCAnalysis nogc; - MOZ_ASSERT(!mCx, "mCx should not be initialized!"); - - MOZ_GUARD_OBJECT_NOTIFIER_INIT; - - nsXPConnect *xpc = nsXPConnect::XPConnect(); - if (!aSafe) { - mCx = xpc->GetCurrentJSContext(); - } - - if (!mCx) { - mCx = xpc->GetSafeJSContext(); - mPusher.emplace(mCx); - } -} - -AutoJSContext::operator JSContext*() const -{ - return mCx; -} - -ThreadsafeAutoJSContext::ThreadsafeAutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) -{ - MOZ_GUARD_OBJECT_NOTIFIER_INIT; - - if (NS_IsMainThread()) { - mCx = nullptr; - mAutoJSContext.emplace(); - } else { - mCx = mozilla::dom::workers::GetCurrentThreadJSContext(); - mRequest.emplace(mCx); - } -} - -ThreadsafeAutoJSContext::operator JSContext*() const -{ - if (mCx) { - return mCx; - } else { - return *mAutoJSContext; - } -} - -AutoSafeJSContext::AutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) - : AutoJSContext(true MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT) - , mAc(mCx, XPCJSRuntime::Get()->GetJSContextStack()->GetSafeJSContextGlobal()) -{ -} - -ThreadsafeAutoSafeJSContext::ThreadsafeAutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL) -{ - MOZ_GUARD_OBJECT_NOTIFIER_INIT; - - if (NS_IsMainThread()) { - mCx = nullptr; - mAutoSafeJSContext.emplace(); - } else { - mCx = mozilla::dom::workers::GetCurrentThreadJSContext(); - mRequest.emplace(mCx); - } -} - -ThreadsafeAutoSafeJSContext::operator JSContext*() const -{ - if (mCx) { - return mCx; - } else { - return *mAutoSafeJSContext; - } -} - -} // namespace mozilla diff --git a/js/xpconnect/src/nsCxPusher.h b/js/xpconnect/src/nsCxPusher.h deleted file mode 100644 index 18f38a229a55..000000000000 --- a/js/xpconnect/src/nsCxPusher.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* 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 nsCxPusher_h -#define nsCxPusher_h - -#include "jsapi.h" -#include "mozilla/Maybe.h" -#include "mozilla/dom/ScriptSettings.h" -#include "nsCOMPtr.h" - -class nsIScriptContext; - -namespace mozilla { - -/** - * Use AutoJSContext when you need a JS context on the stack but don't have one - * passed as a parameter. AutoJSContext will take care of finding the most - * appropriate JS context and release it when leaving the stack. - */ -class MOZ_STACK_CLASS AutoJSContext { -public: - explicit AutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); - operator JSContext*() const; - -protected: - explicit AutoJSContext(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM); - - // We need this Init() method because we can't use delegating constructor for - // the moment. It is a C++11 feature and we do not require C++11 to be - // supported to be able to compile Gecko. - void Init(bool aSafe MOZ_GUARD_OBJECT_NOTIFIER_PARAM); - - JSContext* mCx; - Maybe mPusher; - MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER -}; - -/** - * Use ThreadsafeAutoJSContext when you want an AutoJSContext but might be - * running on a worker thread. - */ -class MOZ_STACK_CLASS ThreadsafeAutoJSContext { -public: - explicit ThreadsafeAutoJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); - operator JSContext*() const; - -private: - JSContext* mCx; // Used on workers. Null means mainthread. - Maybe mRequest; // Used on workers. - Maybe mAutoJSContext; // Used on main thread. - MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER -}; - -/** - * AutoSafeJSContext is similar to AutoJSContext but will only return the safe - * JS context. That means it will never call ::GetCurrentJSContext(). - */ -class MOZ_STACK_CLASS AutoSafeJSContext : public AutoJSContext { -public: - explicit AutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); -private: - JSAutoCompartment mAc; -}; - -/** - * Like AutoSafeJSContext but can be used safely on worker threads. - */ -class MOZ_STACK_CLASS ThreadsafeAutoSafeJSContext { -public: - explicit ThreadsafeAutoSafeJSContext(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM); - operator JSContext*() const; - -private: - JSContext* mCx; // Used on workers. Null means mainthread. - Maybe mRequest; // Used on workers. - Maybe mAutoSafeJSContext; // Used on main thread. - MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER -}; - -} // namespace mozilla - -#endif /* nsCxPusher_h */ diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index 42f64478dce7..a17623f66961 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -85,6 +85,8 @@ #include "mozilla/Preferences.h" #include "mozilla/TimeStamp.h" +#include "mozilla/dom/ScriptSettings.h" + #include #include #include @@ -157,7 +159,6 @@ #include "SandboxPrivate.h" #include "BackstagePass.h" -#include "nsCxPusher.h" #include "nsAXPCNativeCallContext.h" #ifdef XP_WIN @@ -2833,6 +2834,14 @@ void PopJSContextNoScriptContext(); } /* namespace xpc */ +namespace mozilla { +namespace dom { +namespace danger { +class AutoCxPusher; +} +} +} + class XPCJSContextStack { public: diff --git a/netwerk/base/src/Dashboard.cpp b/netwerk/base/src/Dashboard.cpp index fee88a5e6ce6..7e758a2e53a6 100644 --- a/netwerk/base/src/Dashboard.cpp +++ b/netwerk/base/src/Dashboard.cpp @@ -6,7 +6,6 @@ #include "mozilla/dom/ToJSValue.h" #include "mozilla/net/Dashboard.h" #include "mozilla/net/HttpInfo.h" -#include "nsCxPusher.h" #include "nsHttp.h" #include "nsICancelable.h" #include "nsIDNSService.h" diff --git a/netwerk/protocol/app/AppProtocolHandler.cpp b/netwerk/protocol/app/AppProtocolHandler.cpp index ac19890063c8..4f13047c4967 100644 --- a/netwerk/protocol/app/AppProtocolHandler.cpp +++ b/netwerk/protocol/app/AppProtocolHandler.cpp @@ -10,9 +10,10 @@ #include "nsNetCID.h" #include "nsIAppsService.h" #include "nsILoadInfo.h" -#include "nsCxPusher.h" #include "nsXULAppAPI.h" +#include "mozilla/dom/ScriptSettings.h" + /** * This dummy channel implementation only provides enough functionality * to return a fake 404 error when the caller asks for an app:// URL diff --git a/toolkit/mozapps/extensions/AddonPathService.cpp b/toolkit/mozapps/extensions/AddonPathService.cpp index 5e312dd942bd..3681de016be8 100644 --- a/toolkit/mozapps/extensions/AddonPathService.cpp +++ b/toolkit/mozapps/extensions/AddonPathService.cpp @@ -9,7 +9,6 @@ #include "nsIURI.h" #include "nsXULAppAPI.h" #include "jsapi.h" -#include "nsCxPusher.h" #include "nsServiceManagerUtils.h" #include "nsLiteralString.h" #include "nsThreadUtils.h" @@ -19,6 +18,7 @@ #include "nsIChromeRegistry.h" #include "nsIJARURI.h" #include "nsJSUtils.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/AddonPathService.h" #include "mozilla/Omnijar.h" diff --git a/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp b/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp index c091eddf6e56..2515a0b553ac 100644 --- a/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp +++ b/xpcom/reflect/xptinfo/xptiInterfaceInfo.cpp @@ -6,10 +6,10 @@ /* Implementation of xptiInterfaceEntry and xptiInterfaceInfo. */ #include "xptiprivate.h" +#include "mozilla/dom/ScriptSettings.h" #include "mozilla/DebugOnly.h" #include "mozilla/XPTInterfaceInfoManager.h" #include "mozilla/PodOperations.h" -#include "nsCxPusher.h" #include "jsapi.h" using namespace mozilla;