Diff
Modified: branches/safari-604-branch/Source/WebCore/ChangeLog (223681 => 223682)
--- branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-19 07:41:41 UTC (rev 223681)
+++ branches/safari-604-branch/Source/WebCore/ChangeLog 2017-10-19 08:20:59 UTC (rev 223682)
@@ -1,3 +1,21 @@
+2017-10-19 Jason Marcell <jmarc...@apple.com>
+
+ Cherry-pick r223436. rdar://problem/35061711
+
+ 2017-10-16 Chris Dumez <cdu...@apple.com>
+
+ Log using differential privacy domains where the WebContent process crashes
+ https://bugs.webkit.org/show_bug.cgi?id=178346
+ <rdar://problem/33293830>
+
+ Reviewed by Alex Christensen.
+
+ Add new diagnostic logging key for domain causing crashes.
+
+ * page/DiagnosticLoggingKeys.cpp:
+ (WebCore::DiagnosticLoggingKeys::domainCausingCrashKey):
+ * page/DiagnosticLoggingKeys.h:
+
2017-10-18 Jason Marcell <jmarc...@apple.com>
Cherry-pick r221921. rdar://problem/35041482
Modified: branches/safari-604-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp (223681 => 223682)
--- branches/safari-604-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp 2017-10-19 07:41:41 UTC (rev 223681)
+++ branches/safari-604-branch/Source/WebCore/page/DiagnosticLoggingKeys.cpp 2017-10-19 08:20:59 UTC (rev 223682)
@@ -343,6 +343,11 @@
return ASCIILiteral("documentLoaderStopping");
}
+String DiagnosticLoggingKeys::domainCausingCrashKey()
+{
+ return ASCIILiteral("DomainCausingCrash");
+}
+
String DiagnosticLoggingKeys::domainCausingEnergyDrainKey()
{
return ASCIILiteral("DomainCausingEnergyDrain");
Modified: branches/safari-604-branch/Source/WebCore/page/DiagnosticLoggingKeys.h (223681 => 223682)
--- branches/safari-604-branch/Source/WebCore/page/DiagnosticLoggingKeys.h 2017-10-19 07:41:41 UTC (rev 223681)
+++ branches/safari-604-branch/Source/WebCore/page/DiagnosticLoggingKeys.h 2017-10-19 08:20:59 UTC (rev 223682)
@@ -50,6 +50,7 @@
static String diskCacheKey();
static String diskCacheAfterValidationKey();
static String documentLoaderStoppingKey();
+ WEBCORE_EXPORT static String domainCausingCrashKey();
static String domainCausingEnergyDrainKey();
WEBCORE_EXPORT static String domainCausingJetsamKey();
WEBCORE_EXPORT static String simulatedPageCrashKey();
Modified: branches/safari-604-branch/Source/WebKit/ChangeLog (223681 => 223682)
--- branches/safari-604-branch/Source/WebKit/ChangeLog 2017-10-19 07:41:41 UTC (rev 223681)
+++ branches/safari-604-branch/Source/WebKit/ChangeLog 2017-10-19 08:20:59 UTC (rev 223682)
@@ -1,3 +1,23 @@
+2017-10-19 Jason Marcell <jmarc...@apple.com>
+
+ Cherry-pick r223436. rdar://problem/35061711
+
+ 2017-10-16 Chris Dumez <cdu...@apple.com>
+
+ Log using differential privacy domains where the WebContent process crashes
+ https://bugs.webkit.org/show_bug.cgi?id=178346
+ <rdar://problem/33293830>
+
+ Reviewed by Alex Christensen.
+
+ * UIProcess/WebPageProxy.cpp:
+ (WebKit::WebPageProxy::reload):
+ (WebKit::WebPageProxy::currentURL const):
+ (WebKit::WebPageProxy::processDidTerminate):
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebProcessProxy.cpp:
+ (WebKit::WebProcessProxy::didClose):
+
2017-10-18 Jason Marcell <jmarc...@apple.com>
Cherry-pick r223580. rdar://problem/34958773
Modified: branches/safari-604-branch/Source/WebKit/UIProcess/WebPageProxy.cpp (223681 => 223682)
--- branches/safari-604-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2017-10-19 07:41:41 UTC (rev 223681)
+++ branches/safari-604-branch/Source/WebKit/UIProcess/WebPageProxy.cpp 2017-10-19 08:20:59 UTC (rev 223682)
@@ -1065,10 +1065,7 @@
{
SandboxExtension::Handle sandboxExtensionHandle;
- String url = ""
- if (url.isEmpty() && m_backForwardList->currentItem())
- url = ""
-
+ String url = ""
if (!url.isEmpty()) {
auto transaction = m_pageLoadState.transaction();
m_pageLoadState.setPendingAPIRequestURL(transaction, url);
@@ -5407,6 +5404,14 @@
m_pageLoadState.didChangeProcessIsResponsive();
}
+String WebPageProxy::currentURL() const
+{
+ String url = ""
+ if (url.isEmpty() && m_backForwardList->currentItem())
+ url = ""
+ return url;
+}
+
void WebPageProxy::processDidTerminate(ProcessTerminationReason reason)
{
ASSERT(m_isValid);
@@ -5413,10 +5418,7 @@
#if PLATFORM(IOS)
if (m_process->isUnderMemoryPressure()) {
- String url = ""
- if (url.isEmpty() && m_backForwardList->currentItem())
- url = ""
- String domain = WebCore::topPrivatelyControlledDomain(WebCore::URL(WebCore::ParsedURLString, url).host());
+ String domain = WebCore::topPrivatelyControlledDomain(WebCore::URL(WebCore::ParsedURLString, currentURL()).host());
if (!domain.isEmpty())
logDiagnosticMessageWithEnhancedPrivacy(WebCore::DiagnosticLoggingKeys::domainCausingJetsamKey(), domain, WebCore::ShouldSample::No);
}
Modified: branches/safari-604-branch/Source/WebKit/UIProcess/WebPageProxy.h (223681 => 223682)
--- branches/safari-604-branch/Source/WebKit/UIProcess/WebPageProxy.h 2017-10-19 07:41:41 UTC (rev 223681)
+++ branches/safari-604-branch/Source/WebKit/UIProcess/WebPageProxy.h 2017-10-19 08:20:59 UTC (rev 223682)
@@ -421,6 +421,8 @@
bool drawsBackground() const { return m_drawsBackground; }
void setDrawsBackground(bool);
+ String currentURL() const;
+
float topContentInset() const { return m_topContentInset; }
void setTopContentInset(float);
Modified: branches/safari-604-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp (223681 => 223682)
--- branches/safari-604-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp 2017-10-19 07:41:41 UTC (rev 223681)
+++ branches/safari-604-branch/Source/WebKit/UIProcess/WebProcessProxy.cpp 2017-10-19 08:20:59 UTC (rev 223682)
@@ -51,6 +51,7 @@
#include "WebUserContentControllerProxy.h"
#include "WebsiteData.h"
#include <WebCore/DiagnosticLoggingKeys.h>
+#include <WebCore/PublicSuffix.h>
#include <WebCore/SuddenTermination.h>
#include <WebCore/URL.h>
#include <stdio.h>
@@ -682,6 +683,15 @@
shutDown();
+#if ENABLE(PUBLIC_SUFFIX_LIST)
+ if (pages.size() == 1) {
+ auto& page = *pages[0];
+ String domain = topPrivatelyControlledDomain(WebCore::URL(WebCore::ParsedURLString, page.currentURL()).host());
+ if (!domain.isEmpty())
+ page.logDiagnosticMessageWithEnhancedPrivacy(WebCore::DiagnosticLoggingKeys::domainCausingCrashKey(), domain, WebCore::ShouldSample::No);
+ }
+#endif
+
for (size_t i = 0, size = pages.size(); i < size; ++i)
pages[i]->processDidTerminate(ProcessTerminationReason::Crash);