diff options
author | Mike Reed <reed@google.com> | 2009-06-22 15:08:22 -0400 |
---|---|---|
committer | Mike Reed <reed@google.com> | 2009-06-22 15:08:22 -0400 |
commit | d04b8c72551b49cbd8443eaf0211c68ec27bf635 (patch) | |
tree | bdee95523591df59cda506471a50fd7c7e49c7ee /WebCore/plugins | |
parent | 263a3894c3719057dcbd85b9094eba072da13511 (diff) | |
download | external_webkit-d04b8c72551b49cbd8443eaf0211c68ec27bf635.zip external_webkit-d04b8c72551b49cbd8443eaf0211c68ec27bf635.tar.gz external_webkit-d04b8c72551b49cbd8443eaf0211c68ec27bf635.tar.bz2 |
webkit added their own initializeBrowserFuncs(), so we need to now call both theirs and ours
Diffstat (limited to 'WebCore/plugins')
-rw-r--r-- | WebCore/plugins/android/PluginPackageAndroid.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
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, |