Bug 1352572 - Return NPERR_GENERIC_ERROR if plugin calls NPN_PostURLNotify(file=true); r?bsmedberg
NPN_PostURLNotify(file=true) is no longer supported in NPAPI.
MozReview-Commit-ID: 12JlYduC7R8
--- a/dom/plugins/ipc/PluginModuleChild.cpp
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -1171,16 +1171,21 @@ NPError
void* aNotifyData)
{
PLUGIN_LOG_DEBUG_FUNCTION;
ENSURE_PLUGIN_THREAD(NPERR_INVALID_PARAM);
if (!aBuffer)
return NPERR_INVALID_PARAM;
+ if (aIsFile) {
+ PLUGIN_LOG_DEBUG(("NPN_PostURLNotify with file=true is no longer supported"));
+ return NPERR_GENERIC_ERROR;
+ }
+
nsCString url = NullableString(aRelativeURL);
auto* sn = new StreamNotifyChild(url);
NPError err;
InstCast(aNPP)->CallPStreamNotifyConstructor(
sn, url, NullableString(aTarget), true,
nsCString(aBuffer, aLength), aIsFile, &err);