Changeset 246606 in webkit
- Timestamp:
- Jun 19, 2019, 12:44:10 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/WebProcessProxy.cpp (modified) (1 diff)
-
UIProcess/WebProcessProxy.h (modified) (1 diff)
-
UIProcess/WebsiteData/WebsiteDataStore.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r246605 r246606 1 2019-06-19 Sihui Liu <sihui_liu@apple.com> 2 3 Crash at com.apple.WebKit: WebKit::WebsiteDataStore::processPools const 4 https://bugs.webkit.org/show_bug.cgi?id=198935 5 <rdar://problem/51549308> 6 7 Reviewed by Geoffrey Garen. 8 9 When WebProcessProxy is in WebProcessCache or is pre-warmed, it does not hold a strong reference of 10 WebProcessPool. In this case, we should not store the raw pointer of WebProcessPool and perform websiteDataStore 11 operations with it. 12 This patch should fix the crash at dereferencing null pointer of WebProcessPool in 13 WebsiteDataStore::processPools, but it is unclear why websiteDataStore comes to observe cached or prewarmed web 14 process that should not have web page. The release log may help us find the cause. 15 16 * UIProcess/WebProcessProxy.cpp: 17 (WebKit::WebProcessProxy::processPoolIfExists const): 18 * UIProcess/WebProcessProxy.h: 19 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 20 (WebKit::WebsiteDataStore::processPools const): 21 1 22 2019-06-19 Alex Christensen <achristensen@webkit.org> 2 23 -
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
r246452 r246606 1517 1517 } 1518 1518 1519 WebProcessPool* WebProcessProxy::processPoolIfExists() const 1520 { 1521 if (m_isPrewarmed || m_isInProcessCache) 1522 RELEASE_LOG_ERROR(Process, "%p - WebProcessProxy::processPoolIfExists: trying to get WebProcessPool from an inactive WebProcessProxy %i", this, processIdentifier()); 1523 else 1524 ASSERT(m_processPool); 1525 return m_processPool.get(); 1526 } 1527 1519 1528 WebProcessPool& WebProcessProxy::processPool() const 1520 1529 { -
trunk/Source/WebKit/UIProcess/WebProcessProxy.h
r246413 r246606 120 120 void decrementSuspendedPageCount(); 121 121 122 WebProcessPool* processPoolIfExists() const; 122 123 WebProcessPool& processPool() const; 123 124 -
trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
r246530 r246606 1718 1718 { 1719 1719 HashSet<RefPtr<WebProcessPool>> processPools; 1720 for (auto& process : processes()) 1721 processPools.add(&process->processPool()); 1720 for (auto& process : processes()) { 1721 if (auto* processPool = process->processPoolIfExists()) 1722 processPools.add(processPool); 1723 } 1722 1724 1723 1725 if (processPools.isEmpty()) {
Note:
See TracChangeset
for help on using the changeset viewer.