Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsJARChannel.cpp File Reference
#include "nsJARChannel.h"
#include "nsJARProtocolHandler.h"
#include "nsMimeTypes.h"
#include "nsNetUtil.h"
#include "nsInt64.h"
#include "nsIPrefService.h"
#include "nsIPrefBranch.h"
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "nsIFileURL.h"
#include "nsIJAR.h"

Go to the source code of this file.

Classes

class  nsJARInputThunk

Defines

#define LOG(args)   PR_LOG(gJarProtocolLog, PR_LOG_DEBUG, args)
#define LOG_ENABLED()   PR_LOG_TEST(gJarProtocolLog, 4)

Functions

static NS_DEFINE_CID (kZipReaderCID, NS_ZIPREADER_CID)
 NS_IMPL_ISUPPORTS7 (nsJARChannel, nsIRequest, nsIChannel, nsIStreamListener, nsIRequestObserver, nsIDownloadObserver, nsIJARChannel, nsIJARChannel_MOZILLA_1_8_BRANCH) nsresult nsJARChannel

Define Documentation

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

Definition at line 63 of file nsJARChannel.cpp.

#define LOG_ENABLED ( )    PR_LOG_TEST(gJarProtocolLog, 4)

Definition at line 64 of file nsJARChannel.cpp.


Function Documentation

static NS_DEFINE_CID ( kZipReaderCID  ,
NS_ZIPREADER_CID   
) [static]

Definition at line 220 of file nsJARChannel.cpp.

{
    nsresult rv;
    mJarURI = do_QueryInterface(uri, &rv);
    if (NS_FAILED(rv))
        return rv;

    // Prevent loading jar:javascript URIs (see bug 290982).
    nsCOMPtr<nsIURI> innerURI;
    rv = mJarURI->GetJARFile(getter_AddRefs(innerURI));
    if (NS_FAILED(rv))
        return rv;
    PRBool isJS;
    rv = innerURI->SchemeIs("javascript", &isJS);
    if (NS_FAILED(rv))
        return rv;
    if (isJS) {
        NS_WARNING("blocking jar:javascript:");
        return NS_ERROR_INVALID_ARG;
    }

#if defined(PR_LOGGING)
    mJarURI->GetSpec(mSpec);
#endif
    return rv;
}

Here is the call graph for this function: