return a better error code when content policy blocked the load

followup to bug 305565, r+sr=bz
This commit is contained in:
cbiesinger%web.de 2005-09-07 16:32:52 +00:00
parent a30113f5b5
commit 539905ea1a

View File

@ -170,6 +170,7 @@
#include "nsIScriptSecurityManager.h" #include "nsIScriptSecurityManager.h"
#include "nsIContentPolicy.h" #include "nsIContentPolicy.h"
#include "nsContentPolicyUtils.h" #include "nsContentPolicyUtils.h"
#include "nsContentErrors.h"
#ifdef XP_UNIX #ifdef XP_UNIX
#if defined(MOZ_WIDGET_GTK) || defined (MOZ_WIDGET_GTK2) #if defined(MOZ_WIDGET_GTK) || defined (MOZ_WIDGET_GTK2)
@ -3366,7 +3367,7 @@ NS_IMETHODIMP nsPluginHostImpl::InstantiateEmbeddedPlugin(const char *aMimeType,
nsnull, //extra nsnull, //extra
&shouldLoad); &shouldLoad);
if (NS_FAILED(rv) || NS_CP_REJECTED(shouldLoad)) if (NS_FAILED(rv) || NS_CP_REJECTED(shouldLoad))
return NS_ERROR_FAILURE; return NS_ERROR_CONTENT_BLOCKED_SHOW_ALT;
} }