1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/. */
6 #ifndef nsNativeModuleLoader_h__
7 #define nsNativeModuleLoader_h__
9 #include "nsDataHashtable.h"
10 #include "nsHashKeys.h"
17 class nsNativeModuleLoader final
20 const mozilla::Module
* LoadModule(mozilla::FileLocation
& aFile
);
24 void UnloadLibraries();
29 NativeLoadData() : mModule(nullptr), mLibrary(nullptr) {}
31 const mozilla::Module
* mModule
;
35 static PLDHashOperator
36 ReleaserFunc(nsIHashable
* aHashedFile
, NativeLoadData
& aLoadData
, void*);
38 static PLDHashOperator
39 UnloaderFunc(nsIHashable
* aHashedFile
, NativeLoadData
& aLoadData
, void*);
41 nsDataHashtable
<nsHashableHashKey
, NativeLoadData
> mLibraries
;
44 #endif /* nsNativeModuleLoader_h__ */