Backing out the fix for bug 235457 since it made typing URLs, and autocomplete in the the URL bar not work.
git-svn-id: svn://10.0.0.236/trunk@154028 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1990,15 +1990,16 @@ nsScriptSecurityManager::IsCapabilityEnabled(const char *capability,
|
||||
nsresult rv;
|
||||
JSStackFrame *fp = nsnull;
|
||||
JSContext *cx = GetCurrentJSContext();
|
||||
if (!cx)
|
||||
fp = cx ? JS_FrameIterator(cx, &fp) : nsnull;
|
||||
if (!fp)
|
||||
{
|
||||
// No context reachable. Allow execution.
|
||||
// No script code on stack. Allow execution.
|
||||
*result = PR_TRUE;
|
||||
return NS_OK;
|
||||
}
|
||||
*result = PR_FALSE;
|
||||
nsCOMPtr<nsIPrincipal> previousPrincipal;
|
||||
while ((fp = JS_FrameIterator(cx, &fp)) != nsnull)
|
||||
do
|
||||
{
|
||||
nsCOMPtr<nsIPrincipal> principal;
|
||||
if (NS_FAILED(GetFramePrincipal(cx, fp, getter_AddRefs(principal))))
|
||||
@@ -2030,7 +2031,7 @@ nsScriptSecurityManager::IsCapabilityEnabled(const char *capability,
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
if (*result)
|
||||
return NS_OK;
|
||||
}
|
||||
} while ((fp = JS_FrameIterator(cx, &fp)) != nsnull);
|
||||
|
||||
if (!previousPrincipal)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user