Added an mRequestingThread member to nsConnectionInfo... This is a PRThread pointer to the thread which made the network request (ie. the UI thread, etc)... This information is necessary when marshelling information back to the requesting thread...

This commit is contained in:
rpotts%netscape.com 1999-03-11 08:19:54 +00:00
parent 4788fda605
commit a4358133d0
2 changed files with 11 additions and 0 deletions

View File

@ -44,6 +44,16 @@ nsConnectionInfo::nsConnectionInfo(nsIURL *aURL,
{
NS_INIT_REFCNT();
/*
* Cache the thread which is making the network request. Any cross-thread
* marshalling events will be sent to its event queue...
*
* XXX: Currently, this assumes that the nsConnectionInfo is *always*
* created on the requesting thread... The requesting thread
* should really be passed in via the public APIs...
*/
mRequestingThread = PR_GetCurrentThread();
mStatus = nsConnectionActive;
pURL = aURL;
pNetStream = aStream;

View File

@ -61,6 +61,7 @@ public:
nsNetlibStream *pNetStream;
nsIStreamListener *pConsumer;
nsConnectionStatus mStatus;
PRThread* mRequestingThread;
};