зеркало из https://github.com/mozilla/gecko-dev.git
We do want to execute javascript: URLs that plug-ins load. Bug 372346, r+sr=jst
This commit is contained in:
Родитель
4407b113f5
Коммит
56d506f5d2
|
@ -88,6 +88,7 @@
|
|||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsPluginLogging.h"
|
||||
#include "nsIPrefBranch2.h"
|
||||
#include "nsIScriptChannel.h"
|
||||
|
||||
// Friggin' X11 has to "#define None". Lame!
|
||||
#ifdef None
|
||||
|
@ -5755,6 +5756,13 @@ NS_IMETHODIMP nsPluginHostImpl::NewPluginURLStream(const nsString& aURL,
|
|||
{
|
||||
// Set the owner of channel to the document principal...
|
||||
channel->SetOwner(doc->NodePrincipal());
|
||||
|
||||
// And if it's a script allow it to execute against the
|
||||
// document's script context.
|
||||
nsCOMPtr<nsIScriptChannel> scriptChannel(do_QueryInterface(channel));
|
||||
if (scriptChannel) {
|
||||
scriptChannel->SetExecutionPolicy(nsIScriptChannel::EXECUTE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
// deal with headers and post data
|
||||
|
|
Загрузка…
Ссылка в новой задаче