mozglue/build/WindowsDllBlocklist.h

branch
TOR_BUG_9701
changeset 8
97036ab72558
equal deleted inserted replaced
-1:000000000000 0:31aee2563461
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6 #ifndef mozilla_windowsdllblocklist_h
7 #define mozilla_windowsdllblocklist_h
8
9 #if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
10
11 #include <windows.h>
12 #include "mozilla/GuardObjects.h"
13 #include "nscore.h"
14
15 #define HAS_DLL_BLOCKLIST
16
17 NS_IMPORT void DllBlocklist_Initialize();
18 NS_IMPORT void DllBlocklist_SetInXPCOMLoadOnMainThread(bool inXPCOMLoadOnMainThread);
19 NS_IMPORT void DllBlocklist_WriteNotes(HANDLE file);
20
21 class AutoSetXPCOMLoadOnMainThread
22 {
23 public:
24 AutoSetXPCOMLoadOnMainThread(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM) {
25 MOZ_GUARD_OBJECT_NOTIFIER_INIT;
26 DllBlocklist_SetInXPCOMLoadOnMainThread(true);
27 }
28
29 ~AutoSetXPCOMLoadOnMainThread() {
30 DllBlocklist_SetInXPCOMLoadOnMainThread(false);
31 }
32
33 private:
34 MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
35 };
36
37 #endif // defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
38 #endif // mozilla_windowsdllblocklist_h

mercurial