diff options
Diffstat (limited to 'Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp')
-rw-r--r-- | Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp index 75838ec80..3a428e63a 100644 --- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp +++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp @@ -688,14 +688,20 @@ static void NPN_ReleaseObject(NPObject *npObject) static bool NPN_Invoke(NPP npp, NPObject *npObject, NPIdentifier methodName, const NPVariant* arguments, uint32_t argumentCount, NPVariant* result) { + RefPtr<NetscapePlugin> plugin = NetscapePlugin::fromNPP(npp); + PluginDestructionProtector protector(plugin.get()); + if (npObject->_class->invoke) return npObject->_class->invoke(npObject, methodName, arguments, argumentCount, result); return false; } -static bool NPN_InvokeDefault(NPP, NPObject *npObject, const NPVariant* arguments, uint32_t argumentCount, NPVariant* result) +static bool NPN_InvokeDefault(NPP npp, NPObject *npObject, const NPVariant* arguments, uint32_t argumentCount, NPVariant* result) { + RefPtr<NetscapePlugin> plugin = NetscapePlugin::fromNPP(npp); + PluginDestructionProtector protector(plugin.get()); + if (npObject->_class->invokeDefault) return npObject->_class->invokeDefault(npObject, arguments, argumentCount, result); |