mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-06 22:53:08 +00:00
Bug 39089. Paint over the problem by special-casing 'javascript:' URIs. r=mscott
This commit is contained in:
parent
2fcf1e1f5e
commit
5b0788962d
@ -2528,7 +2528,15 @@ NS_IMETHODIMP nsDocShell::DoURILoad(nsIURI* aURI, nsIURI* aReferrerURI,
|
||||
}
|
||||
|
||||
//XXX Wrong, but needed for now. See bug 31818.
|
||||
channel->SetOriginalURI(aReferrerURI ? aReferrerURI : aURI);
|
||||
static const char kJavaScriptScheme[] = "javascript";
|
||||
nsXPIDLCString scheme;
|
||||
aURI->GetScheme(getter_Copies(scheme));
|
||||
if (0 == PL_strncmp(NS_STATIC_CAST(const char*, scheme), kJavaScriptScheme, sizeof(kJavaScriptScheme) - 1)) {
|
||||
channel->SetOriginalURI(aReferrerURI ? aReferrerURI : aURI);
|
||||
}
|
||||
else {
|
||||
channel->SetOriginalURI(aURI);
|
||||
}
|
||||
|
||||
// Mark the channel as being a document URI...
|
||||
nsLoadFlags loadAttribs = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user