Changeset 28992 in vbox for trunk/src/libs/xpcom18a4/xpcom/build
- Timestamp:
- May 4, 2010 5:55:32 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 61016
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/build/nsXPComInit.cpp
r20282 r28992 71 71 #ifdef VBOX 72 72 # include "nsEventQueueUtils.h" 73 # include "nsProxyRelease.h" 73 74 #endif /* VBOX */ 74 75 … … 230 231 if (NS_FAILED(rv)) return rv; 231 232 232 rv = registrar->RegisterFactory(info->mCID, 233 rv = registrar->RegisterFactory(info->mCID, 233 234 info->mDescription, 234 info->mContractID, 235 info->mContractID, 235 236 fact); 236 237 NS_RELEASE(fact); … … 247 248 nsresult rv; 248 249 nsCOMPtr<nsIProperties> directoryService; 249 nsDirectoryService::Create(nsnull, 250 NS_GET_IID(nsIProperties), 251 getter_AddRefs(directoryService)); 252 253 if (!directoryService) 250 nsDirectoryService::Create(nsnull, 251 NS_GET_IID(nsIProperties), 252 getter_AddRefs(directoryService)); 253 254 if (!directoryService) 254 255 return PR_FALSE; 255 256 256 257 nsCOMPtr<nsIFile> file; 257 rv = directoryService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, 258 NS_GET_IID(nsIFile), 258 rv = directoryService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, 259 NS_GET_IID(nsIFile), 259 260 getter_AddRefs(file)); 260 261 … … 265 266 266 267 file->AppendNative(nsDependentCString(".autoreg")); 267 268 268 269 PRBool exists; 269 270 file->Exists(&exists); … … 276 277 getter_AddRefs(compregFile)); 277 278 278 279 279 280 if (NS_FAILED(rv)) { 280 281 NS_WARNING("Getting NS_XPCOM_COMPONENT_REGISTRY_FILE failed"); … … 327 328 nsCOMPtr<nsICategoryManager> catman(do_GetService(NS_CATEGORYMANAGER_CONTRACTID)); 328 329 if (catman) 329 catman->DeleteCategoryEntry(NS_XPCOM_STARTUP_OBSERVER_ID, 330 catman->DeleteCategoryEntry(NS_XPCOM_STARTUP_OBSERVER_ID, 330 331 IPC_DCONNECTSERVICE_CONTRACTID, PR_TRUE); 331 332 return NS_OK; … … 482 483 if (!gDebug) 483 484 { 484 rv = nsDebugImpl::Create(nsnull, 485 NS_GET_IID(nsIDebug), 485 rv = nsDebugImpl::Create(nsnull, 486 NS_GET_IID(nsIDebug), 486 487 (void**)&gDebug); 487 488 } … … 501 502 if (!gTraceRefcnt) 502 503 { 503 rv = nsTraceRefcntImpl::Create(nsnull, 504 NS_GET_IID(nsITraceRefcnt), 504 rv = nsTraceRefcntImpl::Create(nsnull, 505 NS_GET_IID(nsITraceRefcnt), 505 506 (void**)&gTraceRefcnt); 506 507 } … … 544 545 545 546 // If the locale hasn't already been setup by our embedder, 546 // get us out of the "C" locale and into the system 547 // get us out of the "C" locale and into the system 547 548 if (strcmp(setlocale(LC_ALL, NULL), "C") == 0) 548 549 setlocale(LC_ALL, ""); … … 578 579 return NS_ERROR_OUT_OF_MEMORY; 579 580 NS_ADDREF(compMgr); 580 581 581 582 nsCOMPtr<nsIFile> xpcomLib; 582 583 583 584 PRBool value; 584 585 if (binDirectory) … … 592 593 } 593 594 else { 594 gDirectoryService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, 595 NS_GET_IID(nsIFile), 595 gDirectoryService->Get(NS_XPCOM_CURRENT_PROCESS_DIR, 596 NS_GET_IID(nsIFile), 596 597 getter_AddRefs(xpcomLib)); 597 598 } … … 601 602 gDirectoryService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib); 602 603 } 603 604 604 605 if (appFileLocationProvider) { 605 606 rv = dirService->RegisterProvider(appFileLocationProvider); … … 666 667 } 667 668 rv = nsComponentManagerImpl::gComponentManager->ReadPersistentRegistry(); 668 #ifdef DEBUG 669 #ifdef DEBUG 669 670 if (NS_FAILED(rv)) { 670 printf("No Persistent Registry Found.\n"); 671 printf("No Persistent Registry Found.\n"); 671 672 } 672 673 #endif … … 683 684 nsComponentManagerImpl::gComponentManager->AutoRegister(nsnull); 684 685 685 // If the application is using a GRE, then, 686 // If the application is using a GRE, then, 686 687 // auto register components in the GRE directory as well. 687 688 // … … 713 714 int loaderCount = nsComponentManagerImpl::gComponentManager->GetLoaderCount(); 714 715 rv = nsComponentManagerImpl::gComponentManager->AutoRegister(greDir); 715 716 if (loaderCount != nsComponentManagerImpl::gComponentManager->GetLoaderCount()) 717 nsComponentManagerImpl::gComponentManager->AutoRegisterNonNativeComponents(nsnull); 716 717 if (loaderCount != nsComponentManagerImpl::gComponentManager->GetLoaderCount()) 718 nsComponentManagerImpl::gComponentManager->AutoRegisterNonNativeComponents(nsnull); 718 719 719 720 #ifdef DEBUG_dougt 720 721 printf("end - Registering GRE components\n"); 721 #endif 722 #endif 722 723 if (NS_FAILED(rv)) { 723 724 NS_ERROR("Could not AutoRegister GRE components"); … … 760 761 compregFile->SetLastModifiedTime(PR_Now() / 1000); 761 762 } 762 763 763 764 // Pay the cost at startup time of starting this singleton. 764 765 nsIInterfaceInfoManager* iim = XPTI_GetInterfaceInfoManager(); … … 772 773 if (NS_FAILED(rv)) { 773 774 NS_ERROR("Could not create event queue for main thread"); 775 /* this is just a build-time hack, to reference NS_ProxyRelease */ 776 if (rv == 666) 777 NS_ProxyRelease(nsnull, nsnull); 774 778 return rv; 775 779 } … … 777 781 778 782 // Notify observers of xpcom autoregistration start 779 NS_CreateServicesFromCategory(NS_XPCOM_STARTUP_OBSERVER_ID, 783 NS_CreateServicesFromCategory(NS_XPCOM_STARTUP_OBSERVER_ID, 780 784 nsnull, 781 785 NS_XPCOM_STARTUP_OBSERVER_ID); 782 786 783 787 return NS_OK; 784 788 } … … 906 910 currentQ = 0; 907 911 } 908 912 909 913 nsProxyObjectManager::Shutdown(); 910 914
Note:
See TracChangeset
for help on using the changeset viewer.