From d04b8c72551b49cbd8443eaf0211c68ec27bf635 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Mon, 22 Jun 2009 15:08:22 -0400 Subject: webkit added their own initializeBrowserFuncs(), so we need to now call both theirs and ours --- WebCore/plugins/android/PluginPackageAndroid.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'WebCore/plugins') diff --git a/WebCore/plugins/android/PluginPackageAndroid.cpp b/WebCore/plugins/android/PluginPackageAndroid.cpp index 870226c..0dd8342 100644 --- a/WebCore/plugins/android/PluginPackageAndroid.cpp +++ b/WebCore/plugins/android/PluginPackageAndroid.cpp @@ -147,13 +147,8 @@ static void Android_NPN_PluginThreadAsyncCall(NPP instance, NPN_PluginThreadAsyncCall(instance, func, userData); } -static void initializeBrowserFuncs(NPNetscapeFuncs *funcs) +static void initializeExtraBrowserFuncs(NPNetscapeFuncs *funcs) { - // Initialize the NPN function pointers that we hand over to the - // plugin. - memset(funcs, 0, sizeof(*funcs)); - - funcs->size = sizeof(*funcs); funcs->version = NP_VERSION_MINOR; funcs->geturl = NPN_GetURL; funcs->posturl = NPN_PostURL; @@ -353,11 +348,17 @@ bool PluginPackage::load() PLUGIN_LOG("Couldn't find Initialize function\n"); return false; } - + // Provide the plugin with our browser function table and grab its // plugin table. Provide the Java environment and the Plugin which // can be used to override the defaults if the plugin wants. initializeBrowserFuncs(); + // call this afterwards, which may re-initialize some methods, but ensures + // that any additional (or changed) procs are set. There is no real attempt + // to have this step be minimal (i.e. only what we add/override), since the + // core version (initializeBrowserFuncs) can change in the future. + initializeExtraBrowserFuncs(&m_browserFuncs); + memset(&m_pluginFuncs, 0, sizeof(m_pluginFuncs)); m_pluginFuncs.size = sizeof(m_pluginFuncs); if(NP_Initialize(&m_browserFuncs, -- cgit v1.1