VirtualBox

Ignore:
Timestamp:
May 4, 2010 5:55:32 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
61016
Message:

xpcom: spaces, temp hack to fetch proxy release into the image on darwin - right fix is to add all .a into final library unconditionally, like done on Linux and Solaris

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/build/nsXPComInit.cpp

    r20282 r28992  
    7171#ifdef VBOX
    7272# include "nsEventQueueUtils.h"
     73# include "nsProxyRelease.h"
    7374#endif /* VBOX */
    7475
     
    230231    if (NS_FAILED(rv)) return rv;
    231232
    232     rv = registrar->RegisterFactory(info->mCID, 
     233    rv = registrar->RegisterFactory(info->mCID,
    233234                                    info->mDescription,
    234                                     info->mContractID, 
     235                                    info->mContractID,
    235236                                    fact);
    236237    NS_RELEASE(fact);
     
    247248    nsresult rv;
    248249    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)
    254255        return PR_FALSE;
    255256
    256257    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),
    259260                               getter_AddRefs(file));
    260261
     
    265266
    266267    file->AppendNative(nsDependentCString(".autoreg"));
    267    
     268
    268269    PRBool exists;
    269270    file->Exists(&exists);
     
    276277                               getter_AddRefs(compregFile));
    277278
    278    
     279
    279280    if (NS_FAILED(rv)) {
    280281        NS_WARNING("Getting NS_XPCOM_COMPONENT_REGISTRY_FILE failed");
     
    327328    nsCOMPtr<nsICategoryManager> catman(do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
    328329    if (catman)
    329         catman->DeleteCategoryEntry(NS_XPCOM_STARTUP_OBSERVER_ID, 
     330        catman->DeleteCategoryEntry(NS_XPCOM_STARTUP_OBSERVER_ID,
    330331                                    IPC_DCONNECTSERVICE_CONTRACTID, PR_TRUE);
    331332    return NS_OK;
     
    482483    if (!gDebug)
    483484    {
    484         rv = nsDebugImpl::Create(nsnull, 
    485                                  NS_GET_IID(nsIDebug), 
     485        rv = nsDebugImpl::Create(nsnull,
     486                                 NS_GET_IID(nsIDebug),
    486487                                 (void**)&gDebug);
    487488    }
     
    501502    if (!gTraceRefcnt)
    502503    {
    503         rv = nsTraceRefcntImpl::Create(nsnull, 
    504                                        NS_GET_IID(nsITraceRefcnt), 
     504        rv = nsTraceRefcntImpl::Create(nsnull,
     505                                       NS_GET_IID(nsITraceRefcnt),
    505506                                       (void**)&gTraceRefcnt);
    506507    }
     
    544545
    545546    // 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
    547548    if (strcmp(setlocale(LC_ALL, NULL), "C") == 0)
    548549        setlocale(LC_ALL, "");
     
    578579            return NS_ERROR_OUT_OF_MEMORY;
    579580        NS_ADDREF(compMgr);
    580        
     581
    581582        nsCOMPtr<nsIFile> xpcomLib;
    582                
     583
    583584        PRBool value;
    584585        if (binDirectory)
     
    592593        }
    593594        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),
    596597                                   getter_AddRefs(xpcomLib));
    597598        }
     
    601602            gDirectoryService->Set(NS_XPCOM_LIBRARY_FILE, xpcomLib);
    602603        }
    603        
     604
    604605        if (appFileLocationProvider) {
    605606            rv = dirService->RegisterProvider(appFileLocationProvider);
     
    666667    }
    667668    rv = nsComponentManagerImpl::gComponentManager->ReadPersistentRegistry();
    668 #ifdef DEBUG   
     669#ifdef DEBUG
    669670    if (NS_FAILED(rv)) {
    670         printf("No Persistent Registry Found.\n");       
     671        printf("No Persistent Registry Found.\n");
    671672    }
    672673#endif
     
    683684        nsComponentManagerImpl::gComponentManager->AutoRegister(nsnull);
    684685
    685         // If the application is using a GRE, then, 
     686        // If the application is using a GRE, then,
    686687        // auto register components in the GRE directory as well.
    687688        //
     
    713714                int loaderCount = nsComponentManagerImpl::gComponentManager->GetLoaderCount();
    714715                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);
    718719
    719720#ifdef DEBUG_dougt
    720721                printf("end - Registering GRE components\n");
    721 #endif         
     722#endif
    722723                if (NS_FAILED(rv)) {
    723724                    NS_ERROR("Could not AutoRegister GRE components");
     
    760761        compregFile->SetLastModifiedTime(PR_Now() / 1000);
    761762    }
    762    
     763
    763764    // Pay the cost at startup time of starting this singleton.
    764765    nsIInterfaceInfoManager* iim = XPTI_GetInterfaceInfoManager();
     
    772773    if (NS_FAILED(rv)) {
    773774      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);
    774778      return rv;
    775779    }
     
    777781
    778782    // Notify observers of xpcom autoregistration start
    779     NS_CreateServicesFromCategory(NS_XPCOM_STARTUP_OBSERVER_ID, 
     783    NS_CreateServicesFromCategory(NS_XPCOM_STARTUP_OBSERVER_ID,
    780784                                  nsnull,
    781785                                  NS_XPCOM_STARTUP_OBSERVER_ID);
    782    
     786
    783787    return NS_OK;
    784788}
     
    906910        currentQ = 0;
    907911    }
    908    
     912
    909913    nsProxyObjectManager::Shutdown();
    910914
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette