WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
221771
[GTK][WPE] Signal "window-object-cleared" not emitted unless frame js context is get before
https://bugs.webkit.org/show_bug.cgi?id=221771
Summary
[GTK][WPE] Signal "window-object-cleared" not emitted unless frame js context...
Adrian Perez
Reported
2021-02-11 12:33:27 PST
Created
attachment 420028
[details]
Example web process extension source Using a custom WebKitScriptWorld in a web process extension never triggers the “window-object-cleared” signal. This can be verified with a simple web process extension like the attached one (“ext.c”). To reproduce the issue: 1. Build the example extension: $CC -shared -o libext.so ext.c \ $(pkg-config --libs --cflags wpe-web-extension-1.0) 2. The run Cog passing the path to the directory containing the built “libext.so” file: cog -P fdo --web-extensions-dir="$(pwd)" ddg.gg The expected (correct) output should include the following two lines: ** Message: 19:17:26.517: --> on_window_object_cleared ** Message: 19:17:26.517: <-- on_window_object_cleared Building the extension with “-DHACK_FOR_CUSTOM_SCRIPT_WORLD” will use a workaround that GNOME Web is currently using, see:
https://gitlab.gnome.org/GNOME/epiphany/-/blob/8f833666c384a9c9f5d376ff15595e8bbece90a3/embed/web-process-extension/ephy-web-process-extension.c#L234
Current trunk and stable versions of WebKit (2.30.x, both GTK and WPE ports) do *not* need the workaround when using the default WebKitScriptWorld.
Attachments
Example web process extension source
(2.00 KB, text/x-csrc)
2021-02-11 12:33 PST
,
Adrian Perez
no flags
Details
Patch
(12.56 KB, patch)
2021-06-04 07:03 PDT
,
Carlos Garcia Campos
mcatanzaro
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2021-06-04 06:57:02 PDT
This is happening for default script world too.
Carlos Garcia Campos
Comment 2
2021-06-04 07:03:20 PDT
Created
attachment 430573
[details]
Patch
EWS Watchlist
Comment 3
2021-06-04 07:04:10 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See
https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Carlos Garcia Campos
Comment 4
2021-06-07 01:21:13 PDT
Committed
r278548
(
238546@main
): <
https://commits.webkit.org/238546@main
>
Radar WebKit Bug Importer
Comment 5
2021-06-07 01:22:17 PDT
<
rdar://problem/78938532
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug