Bug 1635217 [wpt PR 23388] - Add WPT tests for bug 1074317, a=testonly
[gecko.git] / mozglue / dllservices / ModuleLoadFrame.h
blob9a31455b8a5646b6691108239c4e3b1595624037
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_glue_ModuleLoadFrame_h
8 #define mozilla_glue_ModuleLoadFrame_h
10 #include "mozilla/Attributes.h"
11 #include "mozilla/LoaderAPIInterfaces.h"
13 namespace mozilla {
14 namespace glue {
16 class MOZ_RAII ModuleLoadFrame final {
17 public:
18 explicit ModuleLoadFrame(PCUNICODE_STRING aRequestedDllName);
19 ~ModuleLoadFrame();
21 void SetLoadStatus(NTSTATUS aNtStatus, HANDLE aHandle);
23 ModuleLoadFrame(const ModuleLoadFrame&) = delete;
24 ModuleLoadFrame(ModuleLoadFrame&&) = delete;
25 ModuleLoadFrame& operator=(const ModuleLoadFrame&) = delete;
26 ModuleLoadFrame& operator=(ModuleLoadFrame&&) = delete;
28 static nt::LoaderAPI::InitDllBlocklistOOPFnPtr StaticInit(
29 nt::LoaderObserver* aNewObserver);
31 private:
32 bool mAlreadyLoaded;
33 void* mContext;
34 NTSTATUS mDllLoadStatus;
35 ModuleLoadInfo mLoadInfo;
37 private:
38 static nt::LoaderAPI* sLoaderAPI;
41 } // namespace glue
42 } // namespace mozilla
44 #endif // mozilla_glue_ModuleLoadFrame_h