Bug 18882 - nspluginwrapper causes segfault in WebKit
Summary: nspluginwrapper causes segfault in WebKit
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: marcoil
Depends on:
Reported: 2008-05-04 03:55 PDT by Chris Lord
Modified: 2008-05-20 04:36 PDT (History)
2 users (show)

See Also:

Backtrace (2.97 KB, text/plain)
2008-05-04 03:55 PDT, Chris Lord
no flags Details
Patch that fixes the problem (1.76 KB, patch)
2008-05-04 03:56 PDT, Chris Lord
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Lord 2008-05-04 03:55:10 PDT
nspluginwrapper causes webkit to segfault when it calls NPN_GetURLNotify with a NULL instance. Attached backtrace and patch that fixes it.

It seems that plugins expect to be able to call NPN functions with a NULL instance after the browser has called into an NPP function - Should all m_plugin->pluginFuncs()->*() be wrapped in a setCurrentPluginView(this/0) block?
Comment 1 Chris Lord 2008-05-04 03:55:47 PDT
Created attachment 20957 [details]
Comment 2 Chris Lord 2008-05-04 03:56:53 PDT
Created attachment 20958 [details]
Patch that fixes the problem
Comment 3 marcoil 2008-05-07 02:31:54 PDT
(In reply to comment #2)
> Created an attachment (id=20958) [edit]
> Patch that fixes the problem

I've made a patch for bug #18892 (attachment #20998 [details]) that includes your fix, could you test it with nspluginwrapper? Thanks!
Comment 4 marcos pinto 2008-05-07 15:47:40 PDT
works perfectly here, thanks.  hope it gets committed soon
Comment 5 marcoil 2008-05-19 03:15:46 PDT
Patch landed in r33570.
Comment 6 marcoil 2008-05-20 04:36:47 PDT
Chris Lord's patch that fixes this was included in my patch for bug #18892 and landed in r33750, so I'm closing this one. Thanks, Chris!