Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
nsScriptSecurityManager.h File Reference
#include "nsIScriptSecurityManager.h"
#include "nsIPrincipal.h"
#include "jsapi.h"
#include "jsdbgapi.h"
#include "nsIXPCSecurityManager.h"
#include "nsInterfaceHashtable.h"
#include "nsHashtable.h"
#include "nsCOMPtr.h"
#include "nsIPrefService.h"
#include "nsISecurityPref.h"
#include "nsIJSContextStack.h"
#include "nsIObserver.h"
#include "pldhash.h"
#include "plstr.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  PrincipalKey
union  SecurityLevel
struct  PropertyPolicy
struct  ClassPolicy
class  DomainPolicy
class  nsScriptSecurityManager

Defines

#define SCRIPT_SECURITY_UNDEFINED_ACCESS   0
#define SCRIPT_SECURITY_ACCESS_IS_SET_BIT   1
#define SCRIPT_SECURITY_NO_ACCESS   ((1 << 0) | SCRIPT_SECURITY_ACCESS_IS_SET_BIT)
#define SCRIPT_SECURITY_SAME_ORIGIN_ACCESS   ((1 << 1) | SCRIPT_SECURITY_ACCESS_IS_SET_BIT)
#define SCRIPT_SECURITY_ALL_ACCESS   ((1 << 2) | SCRIPT_SECURITY_ACCESS_IS_SET_BIT)
#define SECURITY_ACCESS_LEVEL_FLAG(_sl)
#define NO_POLICY_FOR_CLASS   (ClassPolicy*)1
#define NS_SCRIPTSECURITYMANAGER_CID

Functions

 InitPropertyPolicyEntry (PLDHashTable *table, PLDHashEntryHdr *entry, const void *key)
 ClearPropertyPolicyEntry (PLDHashTable *table, PLDHashEntryHdr *entry)
 ClearClassPolicyEntry (PLDHashTable *table, PLDHashEntryHdr *entry)
 MoveClassPolicyEntry (PLDHashTable *table, const PLDHashEntryHdr *from, PLDHashEntryHdr *to)
 InitClassPolicyEntry (PLDHashTable *table, PLDHashEntryHdr *entry, const void *key)

Class Documentation

union SecurityLevel

Definition at line 152 of file nsScriptSecurityManager.h.

Class Members
char * capability
PRInt32 level

Define Documentation

Definition at line 206 of file nsScriptSecurityManager.h.

Value:
{ 0x7ee2a4c0, 0x4b93, 0x17d3, \
{ 0xba, 0x18, 0x00, 0x60, 0xb0, 0xf1, 0x99, 0xa2 }}

Definition at line 372 of file nsScriptSecurityManager.h.

Definition at line 166 of file nsScriptSecurityManager.h.

Definition at line 171 of file nsScriptSecurityManager.h.

Definition at line 167 of file nsScriptSecurityManager.h.

Definition at line 169 of file nsScriptSecurityManager.h.

Definition at line 165 of file nsScriptSecurityManager.h.

Value:
((_sl.level == 0) || \
            (_sl.level & SCRIPT_SECURITY_ACCESS_IS_SET_BIT))

Definition at line 174 of file nsScriptSecurityManager.h.


Function Documentation

Definition at line 219 of file nsScriptSecurityManager.h.

{
    ClassPolicy* cp = (ClassPolicy *)entry;
    if (cp->key)
    {
        PL_strfree(cp->key);
        cp->key = nsnull;
    }
    PL_DHashTableDestroy(cp->mPolicy);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 199 of file nsScriptSecurityManager.h.

{
    PropertyPolicy* pp = (PropertyPolicy*)entry;
    pp->key = JSVAL_VOID;
}

Here is the caller graph for this function:

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

Definition at line 238 of file nsScriptSecurityManager.h.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 187 of file nsScriptSecurityManager.h.

Here is the caller graph for this function:

Definition at line 353 of file nsScriptSecurityManager.h.

{
    memcpy(to, from, table->entrySize);

    // Now update the mDefaultPolicy pointer that points to us, if any.
    ClassPolicy* cp = NS_STATIC_CAST(ClassPolicy*, to);
    if (cp->mDomainWeAreWildcardFor) {
        NS_ASSERTION(cp->mDomainWeAreWildcardFor->mWildcardPolicy ==
                     NS_STATIC_CAST(const ClassPolicy*, from),
                     "Unexpected wildcard policy on mDomainWeAreWildcardFor");
        cp->mDomainWeAreWildcardFor->mWildcardPolicy = cp;
    }
}

Here is the call graph for this function:

Here is the caller graph for this function: