Added some null ptr tests to net new EventQueueService code...
git-svn-id: svn://10.0.0.236/trunk@17307 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d1d8c0129f
commit
ae0b875228
@ -135,6 +135,7 @@ nsNetlibService::nsNetlibService()
|
||||
* Cache the EventQueueService...
|
||||
*/
|
||||
// XXX: What if this fails?
|
||||
mEventQService = nsnull;
|
||||
rv = nsServiceManager::GetService(kEventQueueServiceCID,
|
||||
kIEventQueueServiceIID,
|
||||
(nsISupports **)&mEventQService);
|
||||
@ -321,7 +322,9 @@ nsresult nsNetlibService::OpenStream(nsIURL *aUrl,
|
||||
}
|
||||
|
||||
#if defined(NETLIB_THREAD)
|
||||
mEventQService->GetThreadEventQueue(PR_GetCurrentThread(), &evQueue);
|
||||
if (nsnull != mEventQService) {
|
||||
mEventQService->GetThreadEventQueue(PR_GetCurrentThread(), &evQueue);
|
||||
}
|
||||
if (nsnull == evQueue) {
|
||||
return NS_FALSE;
|
||||
}
|
||||
@ -445,7 +448,9 @@ nsresult nsNetlibService::OpenBlockingStream(nsIURL *aUrl,
|
||||
|
||||
if (NULL != aUrl) {
|
||||
#if defined(NETLIB_THREAD)
|
||||
mEventQService->GetThreadEventQueue(PR_GetCurrentThread(), &evQueue);
|
||||
if (nsnull != mEventQService) {
|
||||
mEventQService->GetThreadEventQueue(PR_GetCurrentThread(), &evQueue);
|
||||
}
|
||||
if (nsnull == evQueue) {
|
||||
goto loser;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user