Changeset 242050 in webkit
- Timestamp:
- Feb 25, 2019 11:11:57 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r242045 r242050 1 2019-02-25 Per Arne Vollan <pvollan@apple.com> 2 3 A prewarmed Web process should have a process assertion. 4 https://bugs.webkit.org/show_bug.cgi?id=195006 5 6 Reviewed by Geoffrey Garen. 7 8 To make sure the prewarm message is handled in the Web process before the process is suspended, 9 the process should have a process assertion. This can be fixed by sending the prewarm message 10 inside WebProcessPool::initializeNewWebProcess, since all message sent inside this method are 11 guaranteed to be handled before the WebContent process is suspended. 12 13 This patch is based on Chris Dumez' idea and obervation of the issue. 14 15 * UIProcess/WebProcessPool.cpp: 16 (WebKit::WebProcessPool::createNewWebProcess): 17 (WebKit::WebProcessPool::initializeNewWebProcess): 18 * UIProcess/WebProcessPool.h: 19 1 20 2019-02-25 Michael Catanzaro <mcatanzaro@igalia.com> 2 21 -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r241928 r242050 765 765 auto processProxy = WebProcessProxy::create(*this, websiteDataStore, isPrewarmed); 766 766 auto& process = processProxy.get(); 767 initializeNewWebProcess(process, websiteDataStore );767 initializeNewWebProcess(process, websiteDataStore, isPrewarmed); 768 768 m_processes.append(WTFMove(processProxy)); 769 if (isPrewarmed == WebProcessProxy::IsPrewarmed::Yes) {770 ASSERT(!m_prewarmedProcess);771 m_prewarmedProcess = &process;772 773 m_prewarmedProcess->send(Messages::WebProcess::PrewarmGlobally(), 0);774 }775 769 776 770 if (m_serviceWorkerProcessesTerminationTimer.isActive()) … … 814 808 #endif 815 809 816 void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDataStore& websiteDataStore )810 void WebProcessPool::initializeNewWebProcess(WebProcessProxy& process, WebsiteDataStore& websiteDataStore, WebProcessProxy::IsPrewarmed isPrewarmed) 817 811 { 818 812 auto initializationActivityToken = process.throttler().backgroundActivityToken(); … … 964 958 965 959 ASSERT(m_messagesToInjectedBundlePostedToEmptyContext.isEmpty()); 960 961 if (isPrewarmed == WebProcessProxy::IsPrewarmed::Yes) { 962 ASSERT(!m_prewarmedProcess); 963 m_prewarmedProcess = &process; 964 process.send(Messages::WebProcess::PrewarmGlobally(), 0); 965 } 966 966 967 967 #if ENABLE(REMOTE_INSPECTOR) -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r241928 r242050 506 506 507 507 WebProcessProxy& createNewWebProcess(WebsiteDataStore&, WebProcessProxy::IsPrewarmed = WebProcessProxy::IsPrewarmed::No); 508 void initializeNewWebProcess(WebProcessProxy&, WebsiteDataStore& );508 void initializeNewWebProcess(WebProcessProxy&, WebsiteDataStore&, WebProcessProxy::IsPrewarmed = WebProcessProxy::IsPrewarmed::No); 509 509 510 510 void requestWebContentStatistics(StatisticsRequest&);
Note: See TracChangeset
for help on using the changeset viewer.