mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 19:39:13 +00:00
Run method now does an AddRef so it stays alive until the last message can
come through the pump.
This commit is contained in:
parent
1ec1bf28cc
commit
e054d0c8fa
@ -60,6 +60,7 @@ NS_METHOD nsAppShell::SetDispatchListener(nsDispatchListener* aDispatchListener)
|
||||
|
||||
nsresult nsAppShell::Run()
|
||||
{
|
||||
NS_ADDREF_THIS();
|
||||
// Process messages
|
||||
MSG msg;
|
||||
while (GetMessage(&msg, NULL, 0, 0)) {
|
||||
@ -68,6 +69,7 @@ nsresult nsAppShell::Run()
|
||||
if (mDispatchListener)
|
||||
mDispatchListener->AfterDispatch();
|
||||
}
|
||||
Release();
|
||||
return msg.wParam;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user