Bug 913653: Remove lock from IOInterposer and add IOInterposer thread registration; r=froydnj
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "prlog.h"
|
||||
#include "nsIObserverService.h"
|
||||
#include "mozilla/HangMonitor.h"
|
||||
#include "mozilla/IOInterposer.h"
|
||||
#include "mozilla/Services.h"
|
||||
#include "nsXPCOMPrivate.h"
|
||||
#include "mozilla/ChaosMode.h"
|
||||
@@ -291,6 +292,8 @@ nsThread::ThreadFunc(void *arg)
|
||||
// Inform the ThreadManager
|
||||
nsThreadManager::get()->RegisterCurrentThread(self);
|
||||
|
||||
mozilla::IOInterposer::RegisterCurrentThread();
|
||||
|
||||
// Wait for and process startup event
|
||||
nsCOMPtr<nsIRunnable> event;
|
||||
if (!self->GetEvent(true, getter_AddRefs(event))) {
|
||||
@@ -328,6 +331,8 @@ nsThread::ThreadFunc(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
mozilla::IOInterposer::UnregisterCurrentThread();
|
||||
|
||||
// Inform the threadmanager that this thread is going away
|
||||
nsThreadManager::get()->UnregisterCurrentThread(self);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user