mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Do something safe if this call fails
This commit is contained in:
parent
6b04c3b5fa
commit
84c0a0901a
@ -679,6 +679,9 @@ nsScriptSecurityManager::CanExecuteFunction(void *jsFuncObj,
|
||||
JSContext *cx = GetCurrentContext();
|
||||
if (!cx) {
|
||||
cx = GetSafeContext();
|
||||
if (!cx) {
|
||||
return NS_ERROR_UNEXPECTED;
|
||||
}
|
||||
}
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
nsresult rv = GetFunctionObjectPrincipal(cx, (JSObject *) jsFuncObj,
|
||||
|
Loading…
Reference in New Issue
Block a user