Move ObserverManager to XPCOM ServiceManager. Fix Netlib bug

where data not complete


git-svn-id: svn://10.0.0.236/trunk@12601 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
spider%netscape.com
1998-10-12 20:16:50 +00:00
parent df8ee4f952
commit d27980931b
14 changed files with 70 additions and 80 deletions

View File

@@ -146,28 +146,14 @@ nsresult nsShellInstance::Init()
return res;
}
static nsITimer* gNetTimer;
static void
PollNet(nsITimer *aTimer, void *aClosure)
{
NET_PollSockets();
NS_IF_RELEASE(gNetTimer);
if (NS_OK == NS_NewTimer(&gNetTimer)) {
gNetTimer->Init(PollNet, nsnull, 1000 / 50);
}
}
nsresult nsShellInstance::Run()
{
#ifdef NS_WIN32
MSG msg;
PollNet(0, 0);
while (GetMessage(&msg, NULL, 0, 0)) {
TranslateMessage(&msg);
DispatchMessage(&msg);
NET_PollSockets();
}
return ((nsresult)msg.wParam);
#elif NS_UNIX