Diff
Modified: trunk/Source/WTF/ChangeLog (185817 => 185818)
--- trunk/Source/WTF/ChangeLog 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WTF/ChangeLog 2015-06-22 06:32:13 UTC (rev 185818)
@@ -1,3 +1,12 @@
+2015-06-21 Gavin Barraclough <[email protected]>
+
+ Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
+ https://bugs.webkit.org/show_bug.cgi?id=146198
+
+ Unreviewed rollout.
+
+ * wtf/glib/GUniquePtr.h:
+
2015-06-20 Michael Catanzaro <[email protected]>
[EFL][GTK] Define GLIB_VERSION_MIN_REQUIRED and require glib 2.36 for GTK
@@ -441,18 +450,6 @@
(WTF::TinyPtrSet::getReservedFlag):
(WTF::TinyPtrSet::setReservedFlag):
-2015-06-08 Michael Catanzaro <[email protected]>
-
- [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
- https://bugs.webkit.org/show_bug.cgi?id=145542
-
- Reviewed by Alexey Proskuryakov.
-
- Add template specialization for GUniquePtr<char*>. This smart pointer will free its data
- with g_strfreev() (as opposed to g_free(), which is used for GUniquePtr<char>).
-
- * wtf/gobject/GUniquePtr.h:
-
2015-06-05 Chris Dumez <[email protected]>
[WK2][iOS] Limit the number of vnodes used by the WebContent processes
Modified: trunk/Source/WTF/wtf/glib/GUniquePtr.h (185817 => 185818)
--- trunk/Source/WTF/wtf/glib/GUniquePtr.h 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WTF/wtf/glib/GUniquePtr.h 2015-06-22 06:32:13 UTC (rev 185818)
@@ -43,8 +43,7 @@
macro(GPatternSpec, g_pattern_spec_free) \
macro(GDir, g_dir_close) \
macro(GTimer, g_timer_destroy) \
- macro(GKeyFile, g_key_file_free) \
- macro(char*, g_strfreev)
+ macro(GKeyFile, g_key_file_free)
#define WTF_DEFINE_GPTR_DELETER(typeName, deleterFunc) \
template<> struct GPtrDeleter<typeName> \
Modified: trunk/Source/WebCore/ChangeLog (185817 => 185818)
--- trunk/Source/WebCore/ChangeLog 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WebCore/ChangeLog 2015-06-22 06:32:13 UTC (rev 185818)
@@ -1,3 +1,25 @@
+2015-06-16 Gavin Barraclough <[email protected]>
+
+ Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
+ https://bugs.webkit.org/show_bug.cgi?id=146198
+
+ Unreviewed rollout.
+
+ * platform/network/DNSResolveQueue.cpp:
+ (WebCore::DNSResolveQueue::DNSResolveQueue):
+ (WebCore::DNSResolveQueue::isUsingProxy):
+ (WebCore::DNSResolveQueue::add):
+ (WebCore::DNSResolveQueue::timerFired):
+ * platform/network/DNSResolveQueue.h:
+ * platform/network/cf/DNSCFNet.cpp:
+ (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
+ (WebCore::clientCallback):
+ (WebCore::DNSResolveQueue::platformResolve):
+ (WebCore::proxyIsEnabledInSystemPreferences): Deleted.
+ (WebCore::isUsingProxy): Deleted.
+ (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
+ * platform/network/soup/DNSSoup.cpp:
+
2015-06-21 Alexey Proskuryakov <[email protected]>
REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
Modified: trunk/Source/WebCore/platform/network/DNSResolveQueue.cpp (185817 => 185818)
--- trunk/Source/WebCore/platform/network/DNSResolveQueue.cpp 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WebCore/platform/network/DNSResolveQueue.cpp 2015-06-22 06:32:13 UTC (rev 185818)
@@ -27,6 +27,7 @@
#include "config.h"
#include "DNSResolveQueue.h"
+#include <wtf/CurrentTime.h>
#include <wtf/NeverDestroyed.h>
namespace WebCore {
@@ -59,15 +60,30 @@
DNSResolveQueue::DNSResolveQueue()
: m_timer(*this, &DNSResolveQueue::timerFired)
, m_requestsInFlight(0)
+ , m_cachedProxyEnabledStatus(false)
+ , m_lastProxyEnabledStatusCheckTime(0)
{
}
+bool DNSResolveQueue::isUsingProxy()
+{
+ double time = monotonicallyIncreasingTime();
+ static const double minimumProxyCheckDelay = 5;
+ if (time - m_lastProxyEnabledStatusCheckTime > minimumProxyCheckDelay) {
+ m_lastProxyEnabledStatusCheckTime = time;
+ m_cachedProxyEnabledStatus = platformProxyIsEnabledInSystemPreferences();
+ }
+ return m_cachedProxyEnabledStatus;
+}
+
void DNSResolveQueue::add(const String& hostname)
{
// If there are no names queued, and few enough are in flight, resolve immediately (the mouse may be over a link).
if (!m_names.size()) {
+ if (isUsingProxy())
+ return;
if (++m_requestsInFlight <= gNamesToResolveImmediately) {
- platformMaybeResolveHost(hostname);
+ platformResolve(hostname);
return;
}
--m_requestsInFlight;
@@ -84,12 +100,17 @@
void DNSResolveQueue::timerFired()
{
+ if (isUsingProxy()) {
+ m_names.clear();
+ return;
+ }
+
int requestsAllowed = gMaxSimultaneousRequests - m_requestsInFlight;
for (; !m_names.isEmpty() && requestsAllowed > 0; --requestsAllowed) {
++m_requestsInFlight;
HashSet<String>::iterator currentName = m_names.begin();
- platformMaybeResolveHost(*currentName);
+ platformResolve(*currentName);
m_names.remove(currentName);
}
Modified: trunk/Source/WebCore/platform/network/DNSResolveQueue.h (185817 => 185818)
--- trunk/Source/WebCore/platform/network/DNSResolveQueue.h 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WebCore/platform/network/DNSResolveQueue.h 2015-06-22 06:32:13 UTC (rev 185818)
@@ -50,18 +50,19 @@
private:
DNSResolveQueue();
- // This function performs the actual DNS prefetch. Platforms must ensure that performing the
- // prefetch will not violate the user's expectations of privacy; for example, if an HTTP proxy
- // is in use, then performing a DNS lookup would be inappropriate, but this may be acceptable
- // for other types of proxies (e.g. SOCKS proxies).
- void platformMaybeResolveHost(const String&);
+ bool isUsingProxy();
+ bool platformProxyIsEnabledInSystemPreferences();
+ void platformResolve(const String&);
+
void timerFired();
Timer m_timer;
HashSet<String> m_names;
std::atomic<int> m_requestsInFlight;
+ bool m_cachedProxyEnabledStatus;
+ double m_lastProxyEnabledStatusCheckTime;
};
}
Modified: trunk/Source/WebCore/platform/network/cf/DNSCFNet.cpp (185817 => 185818)
--- trunk/Source/WebCore/platform/network/cf/DNSCFNet.cpp 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WebCore/platform/network/cf/DNSCFNet.cpp 2015-06-22 06:32:13 UTC (rev 185818)
@@ -31,7 +31,6 @@
#include "URL.h"
#include "Timer.h"
-#include <wtf/CurrentTime.h>
#include <wtf/HashSet.h>
#include <wtf/MainThread.h>
#include <wtf/RetainPtr.h>
@@ -49,7 +48,7 @@
namespace WebCore {
-static bool proxyIsEnabledInSystemPreferences()
+bool DNSResolveQueue::platformProxyIsEnabledInSystemPreferences()
{
// Don't do DNS prefetch if proxies are involved. For many proxy types, the user agent is never exposed
// to the IP address during normal operation. Querying an internal DNS server may not help performance,
@@ -76,31 +75,18 @@
return httpProxyCount || httpsProxyCount;
}
-static bool isUsingProxy()
-{
- static bool cachedProxyEnabledStatus = false;
- static double lastProxyEnabledStatusCheckTime = 0;
- static const double minimumProxyCheckDelay = 5;
- double time = monotonicallyIncreasingTime();
- if (time - lastProxyEnabledStatusCheckTime > minimumProxyCheckDelay) {
- lastProxyEnabledStatusCheckTime = time;
- cachedProxyEnabledStatus = proxyIsEnabledInSystemPreferences();
- }
- return cachedProxyEnabledStatus;
-}
-
static void clientCallback(CFHostRef theHost, CFHostInfoType, const CFStreamError*, void*)
{
DNSResolveQueue::singleton().decrementRequestCount(); // It's ok to call singleton() from a secondary thread, the static variable has already been initialized by now.
CFRelease(theHost);
}
-void DNSResolveQueue::platformMaybeResolveHost(const String& hostname)
+void DNSResolveQueue::platformResolve(const String& hostname)
{
ASSERT(isMainThread());
RetainPtr<CFHostRef> host = adoptCF(CFHostCreateWithName(0, hostname.createCFString().get()));
- if (!host || isUsingProxy()) {
+ if (!host) {
decrementRequestCount();
return;
}
Modified: trunk/Source/WebCore/platform/network/soup/DNSSoup.cpp (185817 => 185818)
--- trunk/Source/WebCore/platform/network/soup/DNSSoup.cpp 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WebCore/platform/network/soup/DNSSoup.cpp 2015-06-22 06:32:13 UTC (rev 185818)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2009, 2012, 2015 Igalia S.L.
+ * Copyright (C) 2009, 2012 Igalia S.L.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
Modified: trunk/Source/WebKit2/ChangeLog (185817 => 185818)
--- trunk/Source/WebKit2/ChangeLog 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WebKit2/ChangeLog 2015-06-22 06:32:13 UTC (rev 185818)
@@ -1,3 +1,13 @@
+2015-06-16 Gavin Barraclough <[email protected]>
+
+ Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
+ https://bugs.webkit.org/show_bug.cgi?id=146198
+
+ Unreviewed rollout.
+
+ * UIProcess/API/gtk/WebKitWebContext.cpp:
+ (webkit_web_context_prefetch_dns):
+
2015-06-21 Hyungwook Lee <[email protected]>
WKApplicationCacheManagerDeleteEntriesForOrigin() has wrong WebsiteDataTypes.
Modified: trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp (185817 => 185818)
--- trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2015-06-22 04:48:04 UTC (rev 185817)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp 2015-06-22 06:32:13 UTC (rev 185818)
@@ -1044,9 +1044,7 @@
* @hostname: a hostname to be resolved
*
* Resolve the domain name of the given @hostname in advance, so that if a URI
- * of @hostname is requested the load will be performed more quickly. This
- * function does nothing if the system has been configured to use a proxy to
- * resolve @hostname.
+ * of @hostname is requested the load will be performed more quickly.
*/
void webkit_web_context_prefetch_dns(WebKitWebContext* context, const char* hostname)
{