зеркало из https://github.com/mozilla/gecko-dev.git
Bug 692122 - nsToolkit::StartAllowingD3D9 leaks the nsToolkit object; r=roc
--HG-- extra : rebase_source : ca6010965c59296b4c3c9db3ec57c4e7af92a310
This commit is contained in:
Родитель
00d4b497d6
Коммит
d32edc7414
|
@ -47,10 +47,12 @@ static PRUintn gToolkitTLSIndex = 0;
|
|||
|
||||
nsToolkit::nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsToolkit);
|
||||
}
|
||||
|
||||
nsToolkit::~nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsToolkit);
|
||||
PR_SetThreadPrivate(gToolkitTLSIndex, nsnull);
|
||||
}
|
||||
|
||||
|
|
|
@ -90,10 +90,12 @@ nsToolkit::nsToolkit()
|
|||
, mEventTapPort(nsnull)
|
||||
, mEventTapRLS(nsnull)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsToolkit);
|
||||
}
|
||||
|
||||
nsToolkit::~nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsToolkit);
|
||||
RemoveSleepWakeNotifcations();
|
||||
UnregisterAllProcessMouseEventHandlers();
|
||||
// Remove the TLS reference to the toolkit...
|
||||
|
|
|
@ -55,6 +55,7 @@ static PRUintn gToolkitTLSIndex = 0;
|
|||
//-------------------------------------------------------------------------
|
||||
nsToolkit::nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsToolkit);
|
||||
}
|
||||
|
||||
|
||||
|
@ -65,6 +66,7 @@ nsToolkit::nsToolkit()
|
|||
//-------------------------------------------------------------------------
|
||||
nsToolkit::~nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsToolkit);
|
||||
// Remove the TLS reference to the toolkit...
|
||||
PR_SetThreadPrivate(gToolkitTLSIndex, nsnull);
|
||||
}
|
||||
|
|
|
@ -55,6 +55,7 @@ static PRUintn gToolkitTLSIndex = 0;
|
|||
//-------------------------------------------------------------------------
|
||||
nsToolkit::nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsToolkit);
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
@ -62,6 +63,7 @@ nsToolkit::nsToolkit()
|
|||
//-------------------------------------------------------------------------
|
||||
nsToolkit::~nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsToolkit);
|
||||
// Remove the TLS reference to the toolkit...
|
||||
PR_SetThreadPrivate(gToolkitTLSIndex, nsnull);
|
||||
}
|
||||
|
|
|
@ -117,6 +117,7 @@ void RunPump(void* arg)
|
|||
//-------------------------------------------------------------------------
|
||||
nsToolkit::nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsToolkit);
|
||||
mGuiThread = NULL;
|
||||
mDispatchWnd = 0;
|
||||
|
||||
|
@ -135,6 +136,7 @@ nsToolkit::nsToolkit()
|
|||
//-------------------------------------------------------------------------
|
||||
nsToolkit::~nsToolkit()
|
||||
{
|
||||
MOZ_COUNT_DTOR(nsToolkit);
|
||||
NS_PRECONDITION(::IsWindow(mDispatchWnd), "Invalid window handle");
|
||||
|
||||
// Destroy the Dispatch Window
|
||||
|
@ -193,9 +195,9 @@ nsToolkit::Shutdown()
|
|||
void
|
||||
nsToolkit::StartAllowingD3D9()
|
||||
{
|
||||
nsIToolkit *toolkit;
|
||||
NS_GetCurrentToolkit(&toolkit);
|
||||
static_cast<nsToolkit*>(toolkit)->mD3D9Timer->Cancel();
|
||||
nsRefPtr<nsIToolkit> toolkit;
|
||||
NS_GetCurrentToolkit(getter_AddRefs(toolkit));
|
||||
static_cast<nsToolkit*>(toolkit.get())->mD3D9Timer->Cancel();
|
||||
nsWindow::StartAllowingD3D9(false);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче