Bug 62981 - [X11] Do not call NPP_SetWindow with a null window handle on destroy
Summary: [X11] Do not call NPP_SetWindow with a null window handle on destroy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, Qt
Depends on:
Blocks:
 
Reported: 2011-06-20 06:10 PDT by Carlos Garcia Campos
Modified: 2011-06-24 09:27 PDT (History)
1 user (show)

See Also:


Attachments
Patch (7.30 KB, patch)
2011-06-20 06:17 PDT, Carlos Garcia Campos
no flags Details | Formatted Diff | Diff
New patch (1.13 KB, patch)
2011-06-24 09:14 PDT, Carlos Garcia Campos
mrobinson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlos Garcia Campos 2011-06-20 06:10:41 PDT
Some plugins crash or hang on NPP_Destroy when NPP_SetWindow is called with a null window handle.
Comment 1 Carlos Garcia Campos 2011-06-20 06:17:48 PDT
Created attachment 97791 [details]
Patch

This patch depends on bug #62899, with current code it's not possible to call getPluginInfo() fom determineQuirks() because the wrong netspace browser funcs are used and it crashes.
Comment 2 Anders Carlsson 2011-06-20 11:11:00 PDT
Comment on attachment 97791 [details]
Patch

I think the Chrome X11 plug-in implementation never calls NPP_SetWindow with a null window handle on destroy, maybe we don't need to do that either?
Comment 3 Carlos Garcia Campos 2011-06-20 23:42:17 PDT
Sure, I added the quirk to match webkit1, but if we don't really need it, not calling NPP_SetWindow on destroy would be much easier.
Comment 4 Carlos Garcia Campos 2011-06-24 02:04:15 PDT
(In reply to comment #2)
> (From update of attachment 97791 [details])
> I think the Chrome X11 plug-in implementation never calls NPP_SetWindow with a null window handle on destroy, maybe we don't need to do that either?

The windows port uses it also in webkit1 for the VLC plugin, I'm not sure it's still needed, though.
Comment 5 Carlos Garcia Campos 2011-06-24 09:14:28 PDT
Created attachment 98499 [details]
New patch
Comment 6 Carlos Garcia Campos 2011-06-24 09:27:16 PDT
Committed r89678: <http://trac.webkit.org/changeset/89678>