Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsLoadGroup.cpp File Reference
#include "nsLoadGroup.h"
#include "nsISupportsArray.h"
#include "nsEnumeratorUtils.h"
#include "nsIServiceManager.h"
#include "nsIEventQueueService.h"
#include "nsCOMPtr.h"
#include "nsIURI.h"
#include "prlog.h"
#include "nsCRT.h"
#include "netCore.h"
#include "nsXPIDLString.h"
#include "nsReadableUtils.h"
#include "nsString.h"
#include "nsVoidArray.h"

Go to the source code of this file.

Classes

class  RequestMapEntry

Defines

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

Functions

 RequestHashGetKey (PLDHashTable *table, PLDHashEntryHdr *entry)
 RequestHashMatchEntry (PLDHashTable *table, const PLDHashEntryHdr *entry, const void *key)
 RequestHashClearEntry (PLDHashTable *table, PLDHashEntryHdr *entry)
 RequestHashInitEntry (PLDHashTable *table, PLDHashEntryHdr *entry, const void *key)
static void RescheduleRequest (nsIRequest *aRequest, PRInt32 delta)
 RescheduleRequests (PLDHashTable *table, PLDHashEntryHdr *hdr, PRUint32 number, void *arg)
 AppendRequestsToVoidArray (PLDHashTable *table, PLDHashEntryHdr *hdr, PRUint32 number, void *arg)
 ReleaseVoidArrayItems (void *aElement, void *aData)
 AppendRequestsToISupportsArray (PLDHashTable *table, PLDHashEntryHdr *hdr, PRUint32 number, void *arg)

Define Documentation

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

Definition at line 70 of file nsLoadGroup.cpp.


Function Documentation

AppendRequestsToISupportsArray ( PLDHashTable table,
PLDHashEntryHdr hdr,
PRUint32  number,
void arg 
)

Definition at line 754 of file nsLoadGroup.cpp.

Here is the call graph for this function:

AppendRequestsToVoidArray ( PLDHashTable table,
PLDHashEntryHdr hdr,
PRUint32  number,
void arg 
)

Definition at line 304 of file nsLoadGroup.cpp.

{
    RequestMapEntry *e = NS_STATIC_CAST(RequestMapEntry *, hdr);
    nsVoidArray *array = NS_STATIC_CAST(nsVoidArray *, arg);

    nsIRequest *request = e->mKey;
    NS_ASSERTION(request, "What? Null key in pldhash entry?");

    PRBool ok = array->AppendElement(request);

    if (!ok) {
        return PL_DHASH_STOP;
    }

    NS_ADDREF(request);

    return PL_DHASH_NEXT;
}

Here is the call graph for this function:

ReleaseVoidArrayItems ( void aElement,
void aData 
)

Definition at line 327 of file nsLoadGroup.cpp.

{
    nsISupports *s = NS_STATIC_CAST(nsISupports *, aElement);

    NS_RELEASE(s);

    return PR_TRUE;
}

Definition at line 105 of file nsLoadGroup.cpp.

{
    RequestMapEntry *e = NS_STATIC_CAST(RequestMapEntry *, entry);

    // An entry is being cleared, let the entry do its own cleanup.
    e->~RequestMapEntry();
}

Here is the caller graph for this function:

RequestHashGetKey ( PLDHashTable table,
PLDHashEntryHdr entry 
)

Definition at line 86 of file nsLoadGroup.cpp.

{
    RequestMapEntry *e = NS_STATIC_CAST(RequestMapEntry *, entry);

    return e->mKey.get();
}

Here is the call graph for this function:

Here is the caller graph for this function:

RequestHashInitEntry ( PLDHashTable table,
PLDHashEntryHdr entry,
const void key 
)

Definition at line 114 of file nsLoadGroup.cpp.

{
    const nsIRequest *const_request = NS_STATIC_CAST(const nsIRequest *, key);
    nsIRequest *request = NS_CONST_CAST(nsIRequest *, const_request);

    // Initialize the entry with placement new
    new (entry) RequestMapEntry(request);
    return PR_TRUE;
}

Here is the caller graph for this function:

RequestHashMatchEntry ( PLDHashTable table,
const PLDHashEntryHdr entry,
const void key 
)

Definition at line 94 of file nsLoadGroup.cpp.

{
    const RequestMapEntry *e =
        NS_STATIC_CAST(const RequestMapEntry *, entry);
    const nsIRequest *request = NS_STATIC_CAST(const nsIRequest *, key);

    return e->mKey == request;
}

Here is the caller graph for this function:

static void RescheduleRequest ( nsIRequest aRequest,
PRInt32  delta 
) [static]

Definition at line 127 of file nsLoadGroup.cpp.

{
    nsCOMPtr<nsISupportsPriority> p = do_QueryInterface(aRequest);
    if (p)
        p->AdjustPriority(delta);
}

Here is the call graph for this function:

Here is the caller graph for this function:

RescheduleRequests ( PLDHashTable table,
PLDHashEntryHdr hdr,
PRUint32  number,
void arg 
)

Definition at line 135 of file nsLoadGroup.cpp.

Here is the call graph for this function: