[Webkit-unassigned] [Bug 221771] New: [GTK][WPE] Signal "window-object-cleared" not emitted for a non default WebKitScriptWorld

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 11 12:33:27 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221771

            Bug ID: 221771
           Summary: [GTK][WPE] Signal "window-object-cleared" not emitted
                    for a non default WebKitScriptWorld
           Product: WebKit
           Version: WebKit Local Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: aperez at igalia.com

Created attachment 420028

  --> https://bugs.webkit.org/attachment.cgi?id=420028&action=review

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210211/dd319718/attachment-0001.htm>


More information about the webkit-unassigned mailing list