Adding this SPI will allow other applications to create "stub" WebContent processes that are hard linked to an injected bundle. This makes the dlopen call in InjectedBundle::initialize free.
Created attachment 346679 [details] Patch
Comment on attachment 346679 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346679&action=review > Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h:154 > + const WTF::String& optimizedWebProcessName() const { return m_optimizedWebProcessName; } > + void setOptimizedWebProcessName(const WTF::String& optimizedWebProcessName) { m_optimizedWebProcessName = optimizedWebProcessName; } I think calling this "optimized web process name" is confusing because we're not changing the process name per se. What we're modifying is the XPC service we're launching. As we discussed in person, setAlternateWebContentServiceBundleIdentifier / setCustomWebContentServiceBundleIdentifier sounds better to me. > Source/WebKit/UIProcess/WebProcessProxy.cpp:166 > + if (!m_processPool->optimizedWebProcessName().isNull()) > + launchOptions.extraInitializationData.add("OptimizedWebProcessName", m_processPool->optimizedWebProcessName()); It's a bit weird to put this on extraInitializationData since that's what gets sent to web content process as a parameter. Why don't we just add a new field to launchOptions as we discussed in person?
Created attachment 346683 [details] Patch
Comment on attachment 346683 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=346683&action=review > Source/WebKit/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:163 > +using namespace WebKit; This seems unnecessary. Just use WebKit:: in one place. > Source/WebKit/UIProcess/WebProcessProxy.cpp:166 > + launchOptions.customWebContentServiceBundleIdentifier = m_processPool->customWebContentServiceBundleIdentifier().ascii(); https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070 says the bundle identifier must be ascii. Could we use utf8 just in case, though? There's no reason not to. Or maybe we could just add a "contains only ascii" check to our "Guard against API misuse" check above.
Created attachment 346716 [details] Patch for landing
Let's let EWS run before cq+
Comment on attachment 346716 [details] Patch for landing Clearing flags on attachment: 346716 Committed r234668: <https://trac.webkit.org/changeset/234668>
All reviewed patches have been landed. Closing bug.
<rdar://problem/43019446>