Bug 1381916 - Remove support for plugins on Android r=jchen,bsmedberg
MozReview-Commit-ID: AcAIC1QQew2
This commit is contained in:
@@ -21,43 +21,10 @@ static int gNotOptimized;
|
||||
#define CALLING_CONVENTION_HACK
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
#include "AndroidBridge.h"
|
||||
#include "android_npapi.h"
|
||||
#include <android/log.h>
|
||||
#undef ALOG
|
||||
#define ALOG(args...) __android_log_print(ANDROID_LOG_INFO, "GeckoJavaEnv", ## args)
|
||||
#endif
|
||||
|
||||
using namespace mozilla::layers;
|
||||
|
||||
namespace mozilla {
|
||||
#ifdef MOZ_WIDGET_ANDROID
|
||||
nsresult
|
||||
PluginPRLibrary::NP_Initialize(NPNetscapeFuncs* bFuncs,
|
||||
NPPluginFuncs* pFuncs, NPError* error)
|
||||
{
|
||||
JNIEnv* env = jni::GetEnvForThread();
|
||||
|
||||
mozilla::AutoLocalJNIFrame jniFrame(env);
|
||||
|
||||
if (mNP_Initialize) {
|
||||
*error = mNP_Initialize(bFuncs, pFuncs, env);
|
||||
} else {
|
||||
NP_InitializeFunc pfNP_Initialize = (NP_InitializeFunc)
|
||||
PR_FindFunctionSymbol(mLibrary, "NP_Initialize");
|
||||
if (!pfNP_Initialize)
|
||||
return NS_ERROR_FAILURE;
|
||||
*error = pfNP_Initialize(bFuncs, pFuncs, env);
|
||||
}
|
||||
|
||||
// Save pointers to functions that get called through PluginLibrary itself.
|
||||
mNPP_New = pFuncs->newp;
|
||||
mNPP_ClearSiteData = pFuncs->clearsitedata;
|
||||
mNPP_GetSitesWithData = pFuncs->getsiteswithdata;
|
||||
return NS_OK;
|
||||
}
|
||||
#elif defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
#if defined(XP_UNIX) && !defined(XP_MACOSX)
|
||||
nsresult
|
||||
PluginPRLibrary::NP_Initialize(NPNetscapeFuncs* bFuncs,
|
||||
NPPluginFuncs* pFuncs, NPError* error)
|
||||
@@ -191,7 +158,6 @@ PluginPRLibrary::NPP_New(NPMIMEType pluginType, NPP instance,
|
||||
if (!mNPP_New)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
MAIN_THREAD_JNI_REF_GUARD;
|
||||
*error = mNPP_New(pluginType, instance, NP_EMBED, argc, argn, argv, saved);
|
||||
return NS_OK;
|
||||
}
|
||||
@@ -204,7 +170,6 @@ PluginPRLibrary::NPP_ClearSiteData(const char* site, uint64_t flags,
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
MAIN_THREAD_JNI_REF_GUARD;
|
||||
NPError result = mNPP_ClearSiteData(site, flags, maxAge);
|
||||
|
||||
nsresult rv;
|
||||
@@ -232,7 +197,6 @@ PluginPRLibrary::NPP_GetSitesWithData(nsCOMPtr<nsIGetSitesWithDataCallback> call
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
}
|
||||
|
||||
MAIN_THREAD_JNI_REF_GUARD;
|
||||
char** sites = mNPP_GetSitesWithData();
|
||||
if (!sites) {
|
||||
return NS_OK;
|
||||
|
||||
Reference in New Issue
Block a user