mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-02 01:48:05 +00:00
Don't do a replace load unless explicitly requested if the script that set
location is running in a different window. Bug 178729, r+sr=jst
This commit is contained in:
parent
8230791f39
commit
24377c162f
@ -611,7 +611,13 @@ LocationImpl::SetHrefWithBase(const nsAString& aHref,
|
||||
nsJSUtils::GetDynamicScriptContext(cx);
|
||||
|
||||
if (scriptContext) {
|
||||
inScriptTag = scriptContext->GetProcessingScriptTag();
|
||||
if (scriptContext->GetProcessingScriptTag()) {
|
||||
// Now check to make sure that the script is running in our window,
|
||||
// since we only want to replace if the location is set by a
|
||||
// <script> tag in the same window. See bug 178729.
|
||||
nsCOMPtr<nsIScriptGlobalObject> ourGlobal(do_GetInterface(mDocShell));
|
||||
inScriptTag = (ourGlobal == scriptContext->GetGlobalObject());
|
||||
}
|
||||
}
|
||||
} //cx
|
||||
} // stack
|
||||
|
Loading…
Reference in New Issue
Block a user