Title: [290375] trunk
Revision
290375
Author
[email protected]
Date
2022-02-23 08:33:40 -0800 (Wed, 23 Feb 2022)

Log Message

[GStreamer] De-initialize GStreamer before terminating WebProcess
https://bugs.webkit.org/show_bug.cgi?id=237084

Patch by Philippe Normand <[email protected]> on 2022-02-23
Reviewed by Carlos Garcia Campos.

Source/WebKit:

Allowing the leak tracer to report/log leaks. There is an issue though, if the UIProcess
exits too early, the leak tracer reporting will be interrupted potentially too early. The
workaround is to have 2 tabs open in the GTK MiniBrowser, closing the one where media
handling and leak tracing was done and keeping the second tab open.

* WebProcess/glib/WebProcessGLib.cpp:
(WebKit::WebProcess::stopRunLoop):

Tools:

* flatpak/flatpakutils.py:
(WebkitFlatpak.setup_gstbuild): Do not add extra quotes to GST_TRACERS, this is not supposed
to store paths.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (290374 => 290375)


--- trunk/Source/WebKit/ChangeLog	2022-02-23 16:09:16 UTC (rev 290374)
+++ trunk/Source/WebKit/ChangeLog	2022-02-23 16:33:40 UTC (rev 290375)
@@ -1,3 +1,18 @@
+2022-02-23  Philippe Normand  <[email protected]>
+
+        [GStreamer] De-initialize GStreamer before terminating WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=237084
+
+        Reviewed by Carlos Garcia Campos.
+
+        Allowing the leak tracer to report/log leaks. There is an issue though, if the UIProcess
+        exits too early, the leak tracer reporting will be interrupted potentially too early. The
+        workaround is to have 2 tabs open in the GTK MiniBrowser, closing the one where media
+        handling and leak tracing was done and keeping the second tab open.
+
+        * WebProcess/glib/WebProcessGLib.cpp:
+        (WebKit::WebProcess::stopRunLoop):
+
 2022-02-23  Youenn Fablet  <[email protected]>
 
         RemoteSampleBufferDisplayLayer::enqueueSample should not change media samples owned by its object heap

Modified: trunk/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp (290374 => 290375)


--- trunk/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp	2022-02-23 16:09:16 UTC (rev 290374)
+++ trunk/Source/WebKit/WebProcess/gtk/WebProcessMainGtk.cpp	2022-02-23 16:33:40 UTC (rev 290375)
@@ -36,6 +36,10 @@
 #include <X11/Xlib.h>
 #endif
 
+#if USE(GSTREAMER)
+#include <gst/gst.h>
+#endif
+
 #if USE(GCRYPT)
 #include <pal/crypto/gcrypt/Initialization.h>
 #endif
@@ -67,6 +71,13 @@
 
         return true;
     }
+
+    void platformFinalize() override
+    {
+#if USE(GSTREAMER)
+        gst_deinit();
+#endif
+    }
 };
 
 int WebProcessMain(int argc, char** argv)

Modified: trunk/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp (290374 => 290375)


--- trunk/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp	2022-02-23 16:09:16 UTC (rev 290374)
+++ trunk/Source/WebKit/WebProcess/wpe/WebProcessMainWPE.cpp	2022-02-23 16:33:40 UTC (rev 290375)
@@ -40,6 +40,10 @@
 #include <pal/crypto/gcrypt/Initialization.h>
 #endif
 
+#if USE(GSTREAMER)
+#include <gst/gst.h>
+#endif
+
 namespace WebKit {
 using namespace WebCore;
 
@@ -99,6 +103,13 @@
 
         return true;
     }
+
+    void platformFinalize() override
+    {
+#if USE(GSTREAMER)
+        gst_deinit();
+#endif
+    }
 };
 
 int WebProcessMain(int argc, char** argv)

Modified: trunk/Tools/ChangeLog (290374 => 290375)


--- trunk/Tools/ChangeLog	2022-02-23 16:09:16 UTC (rev 290374)
+++ trunk/Tools/ChangeLog	2022-02-23 16:33:40 UTC (rev 290375)
@@ -1,3 +1,14 @@
+2022-02-23  Philippe Normand  <[email protected]>
+
+        [GStreamer] De-initialize GStreamer before terminating WebProcess
+        https://bugs.webkit.org/show_bug.cgi?id=237084
+
+        Reviewed by Carlos Garcia Campos.
+
+        * flatpak/flatpakutils.py:
+        (WebkitFlatpak.setup_gstbuild): Do not add extra quotes to GST_TRACERS, this is not supposed
+        to store paths.
+
 2022-02-23  Alex Christensen  <[email protected]>
 
         Call WKNavigationDelegate.didFailProvisionalNavigation even after a cross-origin navigation with COOP

Modified: trunk/Tools/flatpak/flatpakutils.py (290374 => 290375)


--- trunk/Tools/flatpak/flatpakutils.py	2022-02-23 16:09:16 UTC (rev 290374)
+++ trunk/Tools/flatpak/flatpakutils.py	2022-02-23 16:33:40 UTC (rev 290375)
@@ -691,7 +691,7 @@
         command = [os.path.join(gst_dir, 'gst-env.py'), '--builddir', gst_builddir, '--srcdir', gst_dir, "--only-environment"]
         gst_env = run_sanitized(command, gather_output=True)
         allowlist = ("LD_LIBRARY_PATH", "PATH", "PKG_CONFIG_PATH")
-        nopathlist = ("GST_DEBUG", "GST_VERSION", "GST_ENV")
+        nopathlist = ("GST_DEBUG", "GST_VERSION", "GST_ENV", "GST_TRACERS")
         env = {}
         for line in [line for line in gst_env.splitlines() if not line.startswith("export")]:
             tokens = line.split("=")
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to