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