Bug 1034920, part 3 - nsNativeModuleLoader doesn't need to implement ModuleLoader. r=froydnj

It is only used as a field of gComponentManager, so the full nsISupports and COM treatment isn't needed.
This commit is contained in:
Andrew McCreight
2014-07-28 10:15:58 -07:00
parent 9b2a50b4c6
commit dff8f312cb
2 changed files with 10 additions and 30 deletions

View File

@@ -64,14 +64,6 @@ GetNativeModuleLoaderLog()
#define LOG(level, args) PR_LOG(GetNativeModuleLoaderLog(), level, args)
NS_IMPL_QUERY_INTERFACE(nsNativeModuleLoader,
mozilla::ModuleLoader)
NS_IMPL_ADDREF_USING_AGGREGATOR(nsNativeModuleLoader,
nsComponentManagerImpl::gComponentManager)
NS_IMPL_RELEASE_USING_AGGREGATOR(nsNativeModuleLoader,
nsComponentManagerImpl::gComponentManager)
nsresult
nsNativeModuleLoader::Init()
{
@@ -83,10 +75,11 @@ nsNativeModuleLoader::Init()
class LoadModuleMainThreadRunnable : public nsRunnable
{
public:
LoadModuleMainThreadRunnable(nsNativeModuleLoader* loader,
FileLocation &file)
: mLoader(loader)
, mFile(file)
LoadModuleMainThreadRunnable(nsNativeModuleLoader* aLoader,
FileLocation &aFile)
: mManager(nsComponentManagerImpl::gComponentManager)
, mLoader(aLoader)
, mFile(aFile)
, mResult(nullptr)
{ }
@@ -96,7 +89,8 @@ public:
return NS_OK;
}
nsRefPtr<nsNativeModuleLoader> mLoader;
nsRefPtr<nsComponentManagerImpl> mManager;
nsNativeModuleLoader* mLoader;
FileLocation mFile;
const mozilla::Module* mResult;
};