Changeset 223436 in webkit
- Timestamp:
- Oct 16, 2017 1:52:04 PM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r223432 r223436 1 2017-10-16 Chris Dumez <cdumez@apple.com> 2 3 Log using differential privacy domains where the WebContent process crashes 4 https://bugs.webkit.org/show_bug.cgi?id=178346 5 <rdar://problem/33293830> 6 7 Reviewed by Alex Christensen. 8 9 Add new diagnostic logging key for domain causing crashes. 10 11 * page/DiagnosticLoggingKeys.cpp: 12 (WebCore::DiagnosticLoggingKeys::domainCausingCrashKey): 13 * page/DiagnosticLoggingKeys.h: 14 1 15 2017-10-16 Sam Weinig <sam@webkit.org> 2 16 -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.cpp
r220734 r223436 344 344 } 345 345 346 String DiagnosticLoggingKeys::domainCausingCrashKey() 347 { 348 return ASCIILiteral("DomainCausingCrash"); 349 } 350 346 351 String DiagnosticLoggingKeys::domainCausingEnergyDrainKey() 347 352 { -
trunk/Source/WebCore/page/DiagnosticLoggingKeys.h
r220734 r223436 50 50 static String diskCacheAfterValidationKey(); 51 51 static String documentLoaderStoppingKey(); 52 WEBCORE_EXPORT static String domainCausingCrashKey(); 52 53 static String domainCausingEnergyDrainKey(); 53 54 WEBCORE_EXPORT static String domainCausingJetsamKey(); -
trunk/Source/WebKit/ChangeLog
r223433 r223436 1 2017-10-16 Chris Dumez <cdumez@apple.com> 2 3 Log using differential privacy domains where the WebContent process crashes 4 https://bugs.webkit.org/show_bug.cgi?id=178346 5 <rdar://problem/33293830> 6 7 Reviewed by Alex Christensen. 8 9 * UIProcess/WebPageProxy.cpp: 10 (WebKit::WebPageProxy::reload): 11 (WebKit::WebPageProxy::currentURL const): 12 (WebKit::WebPageProxy::processDidTerminate): 13 * UIProcess/WebPageProxy.h: 14 * UIProcess/WebProcessProxy.cpp: 15 (WebKit::WebProcessProxy::didClose): 16 1 17 2017-10-16 Youenn Fablet <youenn@apple.com> 2 18 -
trunk/Source/WebKit/UIProcess/WebPageProxy.cpp
r223413 r223436 1074 1074 SandboxExtension::Handle sandboxExtensionHandle; 1075 1075 1076 String url = m_pageLoadState.activeURL(); 1077 if (url.isEmpty() && m_backForwardList->currentItem()) 1078 url = m_backForwardList->currentItem()->url(); 1079 1076 String url = currentURL(); 1080 1077 if (!url.isEmpty()) { 1081 1078 auto transaction = m_pageLoadState.transaction(); … … 5441 5438 } 5442 5439 5440 String WebPageProxy::currentURL() const 5441 { 5442 String url = m_pageLoadState.activeURL(); 5443 if (url.isEmpty() && m_backForwardList->currentItem()) 5444 url = m_backForwardList->currentItem()->url(); 5445 return url; 5446 } 5447 5443 5448 void WebPageProxy::processDidTerminate(ProcessTerminationReason reason) 5444 5449 { … … 5447 5452 #if PLATFORM(IOS) 5448 5453 if (m_process->isUnderMemoryPressure()) { 5449 String url = m_pageLoadState.activeURL(); 5450 if (url.isEmpty() && m_backForwardList->currentItem()) 5451 url = m_backForwardList->currentItem()->url(); 5452 String domain = WebCore::topPrivatelyControlledDomain(WebCore::URL(WebCore::ParsedURLString, url).host()); 5454 String domain = WebCore::topPrivatelyControlledDomain(WebCore::URL(WebCore::ParsedURLString, currentURL()).host()); 5453 5455 if (!domain.isEmpty()) 5454 5456 logDiagnosticMessageWithEnhancedPrivacy(WebCore::DiagnosticLoggingKeys::domainCausingJetsamKey(), domain, WebCore::ShouldSample::No); -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r223413 r223436 424 424 void setDrawsBackground(bool); 425 425 426 String currentURL() const; 427 426 428 float topContentInset() const { return m_topContentInset; } 427 429 void setTopContentInset(float); -
trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp
r223191 r223436 51 51 #include "WebsiteData.h" 52 52 #include <WebCore/DiagnosticLoggingKeys.h> 53 #include <WebCore/PublicSuffix.h> 53 54 #include <WebCore/SuddenTermination.h> 54 55 #include <WebCore/URL.h> … … 627 628 shutDown(); 628 629 630 #if ENABLE(PUBLIC_SUFFIX_LIST) 631 if (pages.size() == 1) { 632 auto& page = *pages[0]; 633 String domain = topPrivatelyControlledDomain(WebCore::URL(WebCore::ParsedURLString, page.currentURL()).host()); 634 if (!domain.isEmpty()) 635 page.logDiagnosticMessageWithEnhancedPrivacy(WebCore::DiagnosticLoggingKeys::domainCausingCrashKey(), domain, WebCore::ShouldSample::No); 636 } 637 #endif 638 629 639 for (auto& page : pages) 630 640 page->processDidTerminate(ProcessTerminationReason::Crash);
Note: See TracChangeset
for help on using the changeset viewer.