Bug 212126 - [GTK4] Build error with gtk4 on PluginProcessMainUnix.cpp
Summary: [GTK4] Build error with gtk4 on PluginProcessMainUnix.cpp
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-19 22:05 PDT by Santosh Mahto
Modified: 2020-05-21 05:37 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.22 KB, patch)
2020-05-19 22:19 PDT, Santosh Mahto
no flags Details | Formatted Diff | Diff
Patch (1.19 KB, patch)
2020-05-19 22:27 PDT, Santosh Mahto
no flags Details | Formatted Diff | Diff
Patch (1.11 KB, patch)
2020-05-20 02:51 PDT, Santosh Mahto
mcatanzaro: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Santosh Mahto 2020-05-19 22:05:41 PDT
In gtk4, gtk_init doesn't take any command line arguments, but PluginProcessMainUnix.cpp still uses the gtk3 based gtk_init call.
which result in error while building with gtk4
Comment 1 Santosh Mahto 2020-05-19 22:19:09 PDT
Created attachment 399809 [details]
Patch
Comment 2 Santosh Mahto 2020-05-19 22:23:05 PDT
It would be nice if
Comment 3 Santosh Mahto 2020-05-19 22:23:45 PDT
It would be nice if someone can review this simple build error fix for gtk4
Comment 4 Santosh Mahto 2020-05-19 22:27:25 PDT
Created attachment 399810 [details]
Patch
Comment 5 Adrian Perez 2020-05-20 00:30:21 PDT
Comment on attachment 399810 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=399810&action=review

> Source/WebKit/ChangeLog:8
> +        * PluginProcess/unix/PluginProcessMainUnix.cpp:

NPAPI plug-in support is disabled for GTK4 builds. We are not planning
to support them, given that all major browsers are phasing out the support
(or have already).

> Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.cpp:64
>          gtk_init(nullptr, nullptr);

…anyway, instead of doing this, you should leave the call to gtk_init()
unchanged and instead the <WebCore/GtkVersioning.h>, which has utility
functions that avoid the need for preprocessor guards.
Comment 6 Santosh Mahto 2020-05-20 02:49:58 PDT
(In reply to Adrian Perez from comment #5)
> Comment on attachment 399810 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399810&action=review
> 
> > Source/WebKit/ChangeLog:8
> > +        * PluginProcess/unix/PluginProcessMainUnix.cpp:
> 
> NPAPI plug-in support is disabled for GTK4 builds. We are not planning
> to support them, given that all major browsers are phasing out the support
> (or have already).
> 
> > Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.cpp:64
> >          gtk_init(nullptr, nullptr);
> 
> …anyway, instead of doing this, you should leave the call to gtk_init()
> unchanged and instead the <WebCore/GtkVersioning.h>, which has utility
> functions that avoid the need for preprocessor guards.


Thanks for review,
I will update the patch with WebCore/GtkVersioning.h inclusion, If you feel it should be part of main tree(at least until PluginProcessMainUnix.cpp code is removed), you can further review/merge it.
Comment 7 Santosh Mahto 2020-05-20 02:51:09 PDT
Created attachment 399824 [details]
Patch
Comment 8 Michael Catanzaro 2020-05-20 08:03:07 PDT
$0.02: I think it's time to delete WebKitPluginProcess entirely, nobody should be using this anymore.
Comment 9 Santosh Mahto 2020-05-21 03:35:12 PDT
(In reply to Michael Catanzaro from comment #8)
> $0.02: I think it's time to delete WebKitPluginProcess entirely, nobody
> should be using this anymore.

Should I open new bug to remove WebKitPluginProcess and mark it as "wontFix"?
I guess this is to remove complete plugin support from webkit.
Comment 10 Michael Catanzaro 2020-05-21 05:36:52 PDT
Well we need to see if GTK port maintainers agree with me before opening a bug to remove the plugin process entirely.

But this one should be WONTFIX because it's definitely not going to be available in GTK4, yes.