Bug 1097804 - Part 1, Create a library containing nsISocketTransportService and nsIDNS that can be used to support standalone WebRTC r=mcmanus

This commit is contained in:
Randall Barker
2015-04-02 12:13:28 -07:00
parent 762a6748a9
commit 41cbee3921
11 changed files with 247 additions and 2 deletions

View File

@@ -13,6 +13,8 @@
#include "nsDebugImpl.h"
#include "nsIErrorService.h"
#include "nsMemoryImpl.h"
#include "nsNetCID.h"
#include "nsNetModuleStandalone.h"
#include "nsObserverService.h"
#include "nsThreadManager.h"
#include "nsThreadPool.h"
@@ -98,6 +100,8 @@ NS_InitXPCOMRT()
return rv;
}
mozilla::InitNetModuleStandalone();
return NS_OK;
}
@@ -152,6 +156,11 @@ NS_ShutdownXPCOMRT()
NS_ProcessPendingEvents(thread);
// Net module needs to be shutdown before the thread manager or else
// the thread manager will hang waiting for the socket transport
// service to shutdown.
mozilla::ShutdownNetModuleStandalone();
// Shutdown all remaining threads. This method does not return until
// all threads created using the thread manager (with the exception of
// the main thread) have exited.