зеркало из https://github.com/mozilla/gecko-dev.git
Fix for 48083. r=danm
This commit is contained in:
Родитель
6c14f21233
Коммит
715e3f8ccb
|
@ -37,6 +37,7 @@
|
||||||
#include "nsIEventQueueService.h"
|
#include "nsIEventQueueService.h"
|
||||||
#include "nsIIOService.h"
|
#include "nsIIOService.h"
|
||||||
#include "nsILoadGroup.h"
|
#include "nsILoadGroup.h"
|
||||||
|
#include "nsIResChannel.h"
|
||||||
#include "nsIScriptSecurityManager.h"
|
#include "nsIScriptSecurityManager.h"
|
||||||
#include "nsIStreamListener.h"
|
#include "nsIStreamListener.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
@ -694,6 +695,15 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI,
|
||||||
rv = serv->NewChannelFromURI(chromeURI, getter_AddRefs(result));
|
rv = serv->NewChannelFromURI(chromeURI, getter_AddRefs(result));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
// XXX Will be removed someday when we handle remote chrome.
|
||||||
|
nsCOMPtr<nsIResChannel> res(do_QueryInterface(result));
|
||||||
|
nsCOMPtr<nsIFileChannel> file(do_QueryInterface(result));
|
||||||
|
if (!res && !file) {
|
||||||
|
NS_WARNING("Remote chrome not allowed! Only file: and resource: are valid.\n");
|
||||||
|
result = nsnull;
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure that the channel remembers where it was
|
// Make sure that the channel remembers where it was
|
||||||
// originally loaded from.
|
// originally loaded from.
|
||||||
rv = result->SetOriginalURI(aURI);
|
rv = result->SetOriginalURI(aURI);
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "nsIEventQueueService.h"
|
#include "nsIEventQueueService.h"
|
||||||
#include "nsIIOService.h"
|
#include "nsIIOService.h"
|
||||||
#include "nsILoadGroup.h"
|
#include "nsILoadGroup.h"
|
||||||
|
#include "nsIResChannel.h"
|
||||||
#include "nsIScriptSecurityManager.h"
|
#include "nsIScriptSecurityManager.h"
|
||||||
#include "nsIStreamListener.h"
|
#include "nsIStreamListener.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
|
@ -694,6 +695,15 @@ nsChromeProtocolHandler::NewChannel(nsIURI* aURI,
|
||||||
rv = serv->NewChannelFromURI(chromeURI, getter_AddRefs(result));
|
rv = serv->NewChannelFromURI(chromeURI, getter_AddRefs(result));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
|
// XXX Will be removed someday when we handle remote chrome.
|
||||||
|
nsCOMPtr<nsIResChannel> res(do_QueryInterface(result));
|
||||||
|
nsCOMPtr<nsIFileChannel> file(do_QueryInterface(result));
|
||||||
|
if (!res && !file) {
|
||||||
|
NS_WARNING("Remote chrome not allowed! Only file: and resource: are valid.\n");
|
||||||
|
result = nsnull;
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
// Make sure that the channel remembers where it was
|
// Make sure that the channel remembers where it was
|
||||||
// originally loaded from.
|
// originally loaded from.
|
||||||
rv = result->SetOriginalURI(aURI);
|
rv = result->SetOriginalURI(aURI);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче