mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 998795: Use nsAutoPtr to initialize MainThreadIOLoggerImpl(); r=froydnj
This commit is contained in:
parent
66e8ec5020
commit
237eb0b915
@ -11,6 +11,7 @@
|
||||
#include "mozilla/IOInterposer.h"
|
||||
#include "mozilla/StaticPtr.h"
|
||||
#include "mozilla/TimeStamp.h"
|
||||
#include "nsAutoPtr.h"
|
||||
|
||||
/**
|
||||
* This code uses NSPR stuff and STL containers because it must be detached
|
||||
@ -207,10 +208,11 @@ namespace MainThreadIOLogger {
|
||||
bool
|
||||
Init()
|
||||
{
|
||||
sImpl = new MainThreadIOLoggerImpl();
|
||||
if (!sImpl->Init()) {
|
||||
nsAutoPtr<MainThreadIOLoggerImpl> impl(new MainThreadIOLoggerImpl());
|
||||
if (!impl->Init()) {
|
||||
return false;
|
||||
}
|
||||
sImpl = impl.forget();
|
||||
IOInterposer::Register(IOInterposeObserver::OpAllWithStaging, sImpl);
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user