Bug 997067 - Remove the special behavior for chrome navigating non-chrome windows. r=bz

Considering what is actually done with sourceWindow here, I don't think this
check is doing anything useful in the modern world.
This commit is contained in:
Bobby Holley 2014-04-17 00:02:36 -07:00
parent ae9818372b
commit ee7c8202be

View File

@ -12462,9 +12462,8 @@ nsresult
nsGlobalWindow::SecurityCheckURL(const char *aURL)
{
nsCOMPtr<nsPIDOMWindow> sourceWindow;
nsCOMPtr<nsIDOMChromeWindow> asChrome = do_QueryObject(this);
JSContext *topCx = nsContentUtils::GetCurrentJSContext();
if (nsContentUtils::IsCallerChrome() && !asChrome && topCx) {
JSContext* topCx = nsContentUtils::GetCurrentJSContext();
if (topCx) {
sourceWindow = do_QueryInterface(nsJSUtils::GetDynamicScriptGlobal(topCx));
}
if (!sourceWindow) {