We do want to execute javascript: URLs that plug-ins load. Bug 372346, r+sr=jst

This commit is contained in:
bzbarsky%mit.edu 2007-03-02 08:38:31 +00:00
Родитель 4407b113f5
Коммит 56d506f5d2
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -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