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.
Created attachment 417173 [details] Patch
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
(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.
Committed r271353: <https://trac.webkit.org/changeset/271353>
<rdar://problem/72988084>
Committed r271385: <https://trac.webkit.org/changeset/271385>
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