RESOLVED FIXED 220407
[GStreamer] Do not use the registry scanner singleton from the UI process
https://bugs.webkit.org/show_bug.cgi?id=220407
Summary [GStreamer] Do not use the registry scanner singleton from the UI process
Carlos Garcia Campos
Reported 2021-01-07 04:37:47 PST
The registry scanner is used from the UI process only to initialize the MIME type registry, so it's called once and the results are cached forever. Using the singleton keeps the instance alive forever, so we can just create a temporary registry to get the supported types.
Attachments
Patch (13.12 KB, patch)
2021-01-07 04:44 PST, Carlos Garcia Campos
calvaris: review+
Carlos Garcia Campos
Comment 1 2021-01-07 04:44:45 PST
Víctor M. Jáquez L.
Comment 2 2021-01-08 06:15:00 PST
Comment on attachment 417173 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417173&action=review > Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h:44 > + ~GStreamerRegistryScanner() = default; I wonder if it 's worth to have a if (!isInWebProcess()) gst_deinit() In the destructor
Carlos Garcia Campos
Comment 3 2021-01-11 00:20:07 PST
(In reply to Víctor M. Jáquez L. from comment #2) > Comment on attachment 417173 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=417173&action=review > > > Source/WebCore/platform/graphics/gstreamer/GStreamerRegistryScanner.h:44 > > + ~GStreamerRegistryScanner() = default; > > I wonder if it 's worth to have a > > if (!isInWebProcess()) > gst_deinit() > > In the destructor No, init and deinit are not balanced. It's ok to call init even if the app already called it, because it does nothing, but not the other way around.
Carlos Garcia Campos
Comment 4 2021-01-11 00:35:50 PST
Radar WebKit Bug Importer
Comment 5 2021-01-11 00:36:13 PST
Fujii Hironori
Comment 6 2021-01-11 16:12:05 PST
Fujii Hironori
Comment 7 2021-01-11 21:04:40 PST
Comment on attachment 417173 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417173&action=review > Source/WebCore/ChangeLog:11 > + * platform/glib/RuntimeApplicationChecksGLib.cpp: Added. I'd like to remove this file. Bug 220529 – Reimplement WebCore::isInWebProcess() family as cross-platform by using AuxiliaryProcessInitializationParameters.processType
Note You need to log in before you can comment on or make changes to this bug.