VirtualBox

Ignore:
Timestamp:
Aug 15, 2013 5:51:36 PM (11 years ago)
Author:
vboxsync
Message:

libs/xpcom: suppress a normally not working attempt to initialize XPCOM. We don't rely on magic initialization, and it's actually not safe as this initialization attempt would lead to a limited depth recursion to find out the component search directory which isn't correct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/xpcom/components/nsComponentManager.cpp

    r39926 r47778  
    23762376    mon.Enter();
    23772377
    2378 #ifdef XPCOM_CHECK_PENDING_CIDS 
     2378#ifdef XPCOM_CHECK_PENDING_CIDS
    23792379    if (entry)
    23802380        RemovePendingCID(entry->mCid);
     
    37233723    if (nsComponentManagerImpl::gComponentManager == nsnull)
    37243724    {
     3725#ifdef VBOX
     3726        // While XPCOM might need initialization, we're not in a position
     3727        // to pass the right values to this call. This is actually triggered
     3728        // on object destruction, so there is no point in re-initializing,
     3729        // and actually the attempt would lead to nested calls to
     3730        // xptiInterfaceInfoManager::BuildFileSearchPath, which it detects
     3731        // as unsafe in debug builds. Just fail, no real problem.
     3732#ifdef DEBUG
     3733        printf("NS_GetServiceManager: no current instance, suppressed XPCOM initialization!\n");
     3734#endif
     3735        rv = NS_ERROR_SERVICE_NOT_AVAILABLE;
     3736#else /* !VBOX */
    37253737        // XPCOM needs initialization.
    37263738        rv = NS_InitXPCOM2(nsnull, nsnull, nsnull);
     3739#endif /* !VBOX */
    37273740    }
    37283741
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