VirtualBox

Ignore:
Timestamp:
Feb 16, 2010 11:03:52 AM (15 years ago)
Author:
vboxsync
Message:

XPCOM: back out r57733 which breaks automatic SVC startup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/ipc/ipcd/client/src/ipcdclient.cpp

    r26555 r26566  
    405405      break;
    406406    }
    407 #ifdef VBOX
    408     else
    409     {
    410       /* Special client liveness check if there is no message to process.
    411        * This is necessary as there might be several threads waiting for
    412        * a message from a single client, and only one gets the DOWN msg. */
    413       PRBool alive = (aSelector)(aArg, td, NULL);
    414       if (!alive)
    415       {
    416         *aMsg = NULL;
    417         break;
    418       }
    419     }
    420 #endif /* VBOX */
    421407
    422408    PRIntervalTime t = PR_IntervalNow();
     
    601587WaitIPCMResponseSelector(void *arg, ipcTargetData *td, const ipcMessage *msg)
    602588{
    603 #ifdef VBOX
    604   if (!msg)
    605     return PR_TRUE;
    606 #endif /* VBOX */
    607589  PRUint32 requestIndex = *(PRUint32 *) arg;
    608590  return IPCM_GetRequestIndex(msg) == requestIndex;
     
    932914{
    933915  WaitMessageSelectorData *data = (WaitMessageSelectorData *) arg;
    934 #ifdef VBOX
    935   if (!msg)
    936   {
    937     /* Special NULL message which asks to check whether the client is
    938      * still alive. Called when there is nothing suitable in the queue. */
    939     ipcIMessageObserver *obs = data->observer;
    940     if (!obs)
    941       obs = td->observer;
    942     NS_ASSERTION(obs, "must at least have a default observer");
    943 
    944     nsresult rv = obs->OnMessageAvailable(IPC_SENDER_ANY, nsID(), 0, 0);
    945     if (rv != IPC_WAIT_NEXT_MESSAGE)
    946     {
    947       data->senderDead = PR_TRUE;
    948       return PR_FALSE;
    949     }
    950     return PR_TRUE;
    951   }
    952 #endif /* VBOX */
    953916
    954917  // process the specially forwarded client state message to see if the
     
    980943          {
    981944            // otherwise inform the observer about the client death using a special
    982             // null message with an empty target id, and fail IPC_WaitMessage call
     945            // null message with an emply target id, and fail IPC_WaitMessage call
    983946            // with NS_ERROR_xxx only if the observer accepts this message.
    984947
     
    996959          }
    997960        }
    998 #ifdef VBOX
    999         else if ((data->senderID == IPC_SENDER_ANY ||
    1000                   status->ClientID() == data->senderID) &&
    1001                  status->ClientState() == IPCM_CLIENT_STATE_UP)
    1002         {
    1003           LOG(("sender (%d) we're waiting a message from (%d) has come up\n",
    1004                status->ClientID(), data->senderID));
    1005           if (data->senderID == IPC_SENDER_ANY)
    1006           {
    1007             // inform the observer about the client appearance using a special
    1008             // null message with an empty target id, but a length of 1.
    1009 
    1010             ipcIMessageObserver *obs = data->observer;
    1011             if (!obs)
    1012               obs = td->observer;
    1013             NS_ASSERTION(obs, "must at least have a default observer");
    1014 
    1015             nsresult rv = obs->OnMessageAvailable(status->ClientID(), nsID(), 0, 1);
    1016             if (rv != IPC_WAIT_NEXT_MESSAGE)
    1017             {
    1018               /* It might sound a bit paradoxical to declare the sender as
    1019                * dead, but the fact that a client up message is received
    1020                * while waiting for a message from this client clearly
    1021                * indicates that this is no longer the client we were waiting
    1022                * for, but a new one got the same client ID (due to wraparound).
    1023                * Shouldn't happen in real life, but better be safe. */
    1024               data->senderDead = PR_TRUE;
    1025               return PR_TRUE; // consume the message
    1026             }
    1027           }
    1028         }
    1029 #endif /* VBOX */
    1030961        break;
    1031962      }
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