1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mozglue/build/WindowsDllBlocklist.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,38 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozilla_windowsdllblocklist_h 1.10 +#define mozilla_windowsdllblocklist_h 1.11 + 1.12 +#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) 1.13 + 1.14 +#include <windows.h> 1.15 +#include "mozilla/GuardObjects.h" 1.16 +#include "nscore.h" 1.17 + 1.18 +#define HAS_DLL_BLOCKLIST 1.19 + 1.20 +NS_IMPORT void DllBlocklist_Initialize(); 1.21 +NS_IMPORT void DllBlocklist_SetInXPCOMLoadOnMainThread(bool inXPCOMLoadOnMainThread); 1.22 +NS_IMPORT void DllBlocklist_WriteNotes(HANDLE file); 1.23 + 1.24 +class AutoSetXPCOMLoadOnMainThread 1.25 +{ 1.26 + public: 1.27 + AutoSetXPCOMLoadOnMainThread(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM) { 1.28 + MOZ_GUARD_OBJECT_NOTIFIER_INIT; 1.29 + DllBlocklist_SetInXPCOMLoadOnMainThread(true); 1.30 + } 1.31 + 1.32 + ~AutoSetXPCOMLoadOnMainThread() { 1.33 + DllBlocklist_SetInXPCOMLoadOnMainThread(false); 1.34 + } 1.35 + 1.36 + private: 1.37 + MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER 1.38 +}; 1.39 + 1.40 +#endif // defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64)) 1.41 +#endif // mozilla_windowsdllblocklist_h