Fix bug 127185: don't crash with a null JS context if running without XPT files. Fixes nsScriptSecurityManager to do more thorough error checking on initialization. r=mstoltz, sr=jst. Fixes bustage.

This commit is contained in:
sfraser%netscape.com 2003-01-17 02:00:01 +00:00
parent 5c70292d51
commit ba78e7bec4

View File

@ -263,9 +263,6 @@ class nsScriptSecurityManager : public nsIScriptSecurityManager,
public nsIObserver
{
public:
nsScriptSecurityManager();
virtual ~nsScriptSecurityManager();
static void Shutdown();
NS_DEFINE_STATIC_CID_ACCESSOR(NS_SCRIPTSECURITYMANAGER_CID)
@ -292,6 +289,10 @@ public:
private:
// GetScriptSecurityManager is the only call that can make one
nsScriptSecurityManager();
virtual ~nsScriptSecurityManager();
static JSBool JS_DLL_CALLBACK
CheckJSFunctionCallerAccess(JSContext *cx, JSObject *obj,
jsval id, JSAccessMode mode,
@ -369,6 +370,9 @@ private:
CheckXPCPermissions(nsISupports* aObj,
const char* aObjectSecurityLevel);
nsresult
Init();
nsresult
InitPrefs();