Half-initialize the plug-in in NP_Initialize

Otherwise the check for attempting to load the wrapper template plug-in
fails in GTK WebKit (which tries to call NP_Initialize on every
plug-in).

Reported by Arch Linux users.
This commit is contained in:
David Benjamin 2011-05-17 12:23:31 -04:00
parent b19fd2707a
commit e87d49bdd6
1 changed files with 6 additions and 0 deletions

View File

@ -3622,6 +3622,12 @@ NP_Initialize(NPNetscapeFuncs *moz_funcs, NPPluginFuncs *plugin_funcs)
// for now, we only need fields up to including forceRedraw
if (moz_funcs->size < (offsetof(NPNetscapeFuncs, forceredraw) + sizeof(NPN_ForceRedrawProcPtr)))
return NPERR_INVALID_FUNCTABLE_ERROR;
if (g_plugin.initialized == 0)
plugin_init(0);
if (g_plugin.initialized <= 0)
return NPERR_GENERIC_ERROR;
if (g_plugin.is_wrapper)
return NPERR_NO_ERROR;