Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsRequestObserverProxy.cpp File Reference
#include "nscore.h"
#include "nsRequestObserverProxy.h"
#include "nsIRequest.h"
#include "nsIEventQueueService.h"
#include "nsIServiceManager.h"
#include "nsString.h"
#include "prlog.h"

Go to the source code of this file.

Classes

class  nsOnStartRequestEvent
class  nsOnStopRequestEvent

Defines

#define LOG(args)   PR_LOG(gRequestObserverProxyLog, PR_LOG_DEBUG, args)

Functions

static NS_DEFINE_CID (kEventQueueService, NS_EVENTQUEUESERVICE_CID)
static void *PR_CALLBACK ProxyRelease_EventHandlerFunc (PLEvent *ev)
static void PR_CALLBACK ProxyRelease_EventCleanupFunc (PLEvent *ev)
static void ProxyRelease (nsIEventQueue *eventQ, nsIRequestObserver *obs)
 NS_IMPL_THREADSAFE_ISUPPORTS2 (nsRequestObserverProxy, nsIRequestObserver, nsIRequestObserverProxy) NS_IMETHODIMP nsRequestObserverProxy

Define Documentation

#define LOG (   args)    PR_LOG(gRequestObserverProxyLog, PR_LOG_DEBUG, args)

Definition at line 51 of file nsRequestObserverProxy.cpp.


Function Documentation

static NS_DEFINE_CID ( kEventQueueService  ,
NS_EVENTQUEUESERVICE_CID   
) [static]

Definition at line 237 of file nsRequestObserverProxy.cpp.

{
    LOG(("nsRequestObserverProxy::OnStartRequest [this=%x req=%x]\n", this, request));

    nsOnStartRequestEvent *ev = 
        new nsOnStartRequestEvent(this, request, context);
    if (!ev)
        return NS_ERROR_OUT_OF_MEMORY;

    LOG(("post startevent=%8lX queue=%8lX\n",(long)ev,(long)mEventQ.get()));
    nsresult rv = FireEvent(ev);
    if (NS_FAILED(rv))
        delete ev;
    return rv;
}

Here is the call graph for this function:

static void ProxyRelease ( nsIEventQueue eventQ,
nsIRequestObserver obs 
) [static]

Definition at line 75 of file nsRequestObserverProxy.cpp.

{
    PLEvent *ev = new PLEvent;
    if (!ev) {
        NS_ERROR("failed to allocate PLEvent");
        return;
    }

    PL_InitEvent(ev, (void *) obs,
            ProxyRelease_EventHandlerFunc,
            ProxyRelease_EventCleanupFunc);

    nsresult rv = eventQ->PostEvent(ev);
    NS_ASSERTION(NS_SUCCEEDED(rv), "PostEvent failed");
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 69 of file nsRequestObserverProxy.cpp.

{
    delete ev;
}

Here is the caller graph for this function:

Definition at line 60 of file nsRequestObserverProxy.cpp.

Here is the call graph for this function:

Here is the caller graph for this function: