diff --git a/dom/plugins/base/nsNPAPIPlugin.cpp b/dom/plugins/base/nsNPAPIPlugin.cpp index 5358d2ee60a0..48c621a63887 100644 --- a/dom/plugins/base/nsNPAPIPlugin.cpp +++ b/dom/plugins/base/nsNPAPIPlugin.cpp @@ -113,8 +113,8 @@ static NPNetscapeFuncs sBrowserFuncs = { _memfree, _memflush, _reloadplugins, - nullptr, // _getJavaEnv, unimplemented - nullptr, // _getJavaPeer, unimplemented + _getJavaEnv, + _getJavaPeer, _geturlnotify, _posturlnotify, _getvalue, @@ -1703,6 +1703,14 @@ _requestread(NPStream *pstream, NPByteRange *rangeList) return NPERR_STREAM_NOT_SEEKABLE; } +// Deprecated, only stubbed out +void* /* OJI type: JRIEnv* */ +_getJavaEnv() +{ + NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_GetJavaEnv\n")); + return nullptr; +} + const char * _useragent(NPP npp) { @@ -1736,6 +1744,14 @@ _memalloc (uint32_t size) return moz_xmalloc(size); } +// Deprecated, only stubbed out +void* /* OJI type: jref */ +_getJavaPeer(NPP npp) +{ + NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_GetJavaPeer: npp=%p\n", (void*)npp)); + return nullptr; +} + void _pushpopupsenabledstate(NPP npp, NPBool enabled) { diff --git a/dom/plugins/base/nsNPAPIPlugin.h b/dom/plugins/base/nsNPAPIPlugin.h index e8c51741fdad..5d012714dde0 100644 --- a/dom/plugins/base/nsNPAPIPlugin.h +++ b/dom/plugins/base/nsNPAPIPlugin.h @@ -279,6 +279,13 @@ _useragent(NPP npp); void* _memalloc (uint32_t size); +// Deprecated entry points for the old Java plugin. +void* /* OJI type: JRIEnv* */ +_getJavaEnv(); + +void* /* OJI type: jref */ +_getJavaPeer(NPP npp); + void _urlredirectresponse(NPP instance, void* notifyData, NPBool allow); diff --git a/dom/plugins/ipc/PluginModuleChild.cpp b/dom/plugins/ipc/PluginModuleChild.cpp index 68c6a956be13..55d18fcb27a1 100644 --- a/dom/plugins/ipc/PluginModuleChild.cpp +++ b/dom/plugins/ipc/PluginModuleChild.cpp @@ -875,6 +875,14 @@ _useragent(NPP aNPP); static void* _memalloc (uint32_t size); +// Deprecated entry points for the old Java plugin. +static void* /* OJI type: JRIEnv* */ +_getjavaenv(void); + +// Deprecated entry points for the old Java plugin. +static void* /* OJI type: jref */ +_getjavapeer(NPP aNPP); + static bool _invoke(NPP aNPP, NPObject* npobj, NPIdentifier method, const NPVariant *args, uint32_t argCount, NPVariant *result); @@ -979,8 +987,8 @@ const NPNetscapeFuncs PluginModuleChild::sBrowserFuncs = { mozilla::plugins::child::_memfree, mozilla::plugins::child::_memflush, mozilla::plugins::child::_reloadplugins, - nullptr, // _getjavaenv, unimplemented - nullptr, // _getjavapeer, unimplemented + mozilla::plugins::child::_getjavaenv, + mozilla::plugins::child::_getjavapeer, mozilla::plugins::child::_geturlnotify, mozilla::plugins::child::_posturlnotify, mozilla::plugins::child::_getvalue, @@ -1296,6 +1304,21 @@ _memalloc(uint32_t aSize) return moz_xmalloc(aSize); } +// Deprecated entry points for the old Java plugin. +void* /* OJI type: JRIEnv* */ +_getjavaenv(void) +{ + PLUGIN_LOG_DEBUG_FUNCTION; + return 0; +} + +void* /* OJI type: jref */ +_getjavapeer(NPP aNPP) +{ + PLUGIN_LOG_DEBUG_FUNCTION; + return 0; +} + bool _invoke(NPP aNPP, NPObject* aNPObj,