Fix for #92798 - Asserts in nsParser.cpp when registering JS components

r=valseki, sr=blizzard


git-svn-id: svn://10.0.0.236/trunk@100225 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
chak%netscape.com
2001-08-02 20:31:54 +00:00
parent 9ac31b20f3
commit 85802ea20c

View File

@@ -95,6 +95,18 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
#endif
}
// Create the Event Queue for the UI thread...
//
// If an event queue already exists for the thread, then
// CreateThreadEventQueue(...) will fail...
// CreateThread0ueue(...) will fail...
nsCOMPtr<nsIEventQueueService> eventQService(
do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv));
if (NS_FAILED(rv))
return rv;
eventQService->CreateThreadEventQueue();
// Register components
if (!sRegistryInitializedFlag)
{
@@ -117,20 +129,6 @@ nsresult NS_InitEmbedding(nsILocalFile *mozBinDirectory,
return rv;
mStartupNotifier->Observe(nsnull, APPSTARTUP_TOPIC, nsnull);
// Create the Event Queue for the UI thread...
//
// If an event queue already exists for the thread, then
// CreateThreadEventQueue(...) will fail...
// CreateThread0ueue(...) will fail...
nsCOMPtr<nsIEventQueueService> eventQService;
rv = sServiceManager->GetService(NS_EVENTQUEUESERVICE_CONTRACTID,
nsIEventQueueService::GetIID(),
getter_AddRefs(eventQService));
if (NS_FAILED(rv))
return rv;
eventQService->CreateThreadEventQueue();
#ifdef HACK_AROUND_THREADING_ISSUES
// XXX force certain objects to be created on the main thread
nsCOMPtr<nsIStringBundleService> sBundleService;