mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 19:35:51 +00:00
Relanding radha's changes.
This commit is contained in:
parent
13eecfd21f
commit
50a188a67d
@ -4726,7 +4726,7 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
|||||||
nsIRequest** aRequest)
|
nsIRequest** aRequest)
|
||||||
{
|
{
|
||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
|
|
||||||
// Initialize aDocShell/aRequest
|
// Initialize aDocShell/aRequest
|
||||||
if (aDocShell) {
|
if (aDocShell) {
|
||||||
*aDocShell = nsnull;
|
*aDocShell = nsnull;
|
||||||
@ -4735,6 +4735,15 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
|||||||
*aRequest = nsnull;
|
*aRequest = nsnull;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// wyciwyg urls can only be loaded through history. Any normal load of
|
||||||
|
// wyciwyg through docshell is illegal. Disallow such loads.
|
||||||
|
if (aURI && (aLoadType & LOAD_CMD_NORMAL)) {
|
||||||
|
PRBool isWyciwyg = PR_FALSE;
|
||||||
|
rv = aURI->SchemeIs("wyciwyg", &isWyciwyg);
|
||||||
|
if ((isWyciwyg && NS_SUCCEEDED(rv)) || NS_FAILED(rv))
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// First, notify any nsIContentPolicy listeners about the document load.
|
// First, notify any nsIContentPolicy listeners about the document load.
|
||||||
// Only abort the load if a content policy listener explicitly vetos it!
|
// Only abort the load if a content policy listener explicitly vetos it!
|
||||||
|
Loading…
Reference in New Issue
Block a user