Changeset 246101 in webkit
- Timestamp:
- Jun 5, 2019, 12:42:09 AM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/WebProcessPool.cpp (modified) (1 diff)
-
UIProcess/glib/WebProcessPoolGLib.cpp (modified) (1 diff)
-
UIProcess/glib/WebProcessProxyGLib.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r246097 r246101 1 2019-06-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK][WPE] Re-enable process warming 4 https://bugs.webkit.org/show_bug.cgi?id=198526 5 6 Reviewed by Michael Catanzaro. 7 8 It was disabled in r243490 because bubblewrap sandbox needs a valid WebsiteDataStore before launching the web 9 process. We can use the default WebsiteDataStore from the WebProcessPool and only use the prewarmed process 10 later if the given WebsiteDataStore is the same as the WebProcessPool one. 11 12 * UIProcess/WebProcessPool.cpp: 13 (WebKit::WebProcessPool::tryTakePrewarmedProcess): Do not use the prewarmed process if WebsiteDataStore is 14 different than the one used to launch the process when sandboxing is enabled. 15 * UIProcess/glib/WebProcessPoolGLib.cpp: 16 (WebKit::WebProcessPool::platformInitialize): Do not disable process warming. 17 * UIProcess/glib/WebProcessProxyGLib.cpp: 18 (WebKit::WebProcessProxy::platformGetLaunchOptions): Use the WebsiteDataStore from the WebProcessPool if process 19 is prewarmed and sandboxing is enabled. 20 1 21 2019-06-04 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r245807 r246101 821 821 return nullptr; 822 822 823 #if PLATFORM(GTK) || PLATFORM(WPE) 824 // In platforms using Bubblewrap for sandboxing, prewarmed process is launched using the WebProcessPool primary WebsiteDataStore, 825 // so we don't use it in case of using a different WebsiteDataStore. 826 if (m_sandboxEnabled && m_websiteDataStore && &m_websiteDataStore->websiteDataStore() != &websiteDataStore) 827 return nullptr; 828 #endif 829 823 830 ASSERT(m_prewarmedProcess->isPrewarmed()); 824 831 m_prewarmedProcess->markIsNoLongerInPrewarmedPool(); -
trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp
r245807 r246101 99 99 if (!memoryPressureMonitorDisabled()) 100 100 installMemoryPressureHandler(); 101 102 // Process warming is incompatible with the fact our WebProcessProxy::platformGetLaunchOptions()103 // requires a valid WebsiteDataStore at initialization time for our sandbox permissions.104 // FIXME: With process warming disabled, the performance of105 // process-swap-on-navigation is not going to be great. So this needs to be106 // re-enabled when we enable PSON.107 configuration().setIsAutomaticProcessWarmingEnabled(false);108 101 } 109 102 -
trunk/Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp
r245807 r246101 39 39 launchOptions.extraInitializationData.set("enable-sandbox", m_processPool->sandboxEnabled() ? "true" : "false"); 40 40 41 websiteDataStore().resolveDirectoriesIfNecessary(); 42 launchOptions.extraInitializationData.set("webSQLDatabaseDirectory", websiteDataStore().resolvedDatabaseDirectory()); 43 launchOptions.extraInitializationData.set("mediaKeysDirectory", websiteDataStore().resolvedMediaKeysDirectory()); 44 launchOptions.extraInitializationData.set("applicationCacheDirectory", websiteDataStore().resolvedApplicationCacheDirectory()); 41 if (m_processPool->sandboxEnabled()) { 42 WebsiteDataStore* dataStore = m_websiteDataStore.get(); 43 if (!dataStore) { 44 // Prewarmed processes don't have a WebsiteDataStore yet, so use the primary WebsiteDataStore from the WebProcessPool. 45 // The process won't be used if current WebsiteDataStore is different than the WebProcessPool primary one. 46 if (auto* apiDataStore = m_processPool->websiteDataStore()) 47 dataStore = &apiDataStore->websiteDataStore(); 48 } 45 49 46 launchOptions.extraWebProcessSandboxPaths = m_processPool->sandboxPaths(); 50 ASSERT(dataStore); 51 dataStore->resolveDirectoriesIfNecessary(); 52 launchOptions.extraInitializationData.set("webSQLDatabaseDirectory", dataStore->resolvedDatabaseDirectory()); 53 launchOptions.extraInitializationData.set("mediaKeysDirectory", dataStore->resolvedMediaKeysDirectory()); 54 launchOptions.extraInitializationData.set("applicationCacheDirectory", dataStore->resolvedApplicationCacheDirectory()); 55 56 launchOptions.extraWebProcessSandboxPaths = m_processPool->sandboxPaths(); 57 } 47 58 } 48 59
Note:
See TracChangeset
for help on using the changeset viewer.