Changeset 185818 in webkit
- Timestamp:
- Jun 21, 2015 11:32:13 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r185802 r185818 1 2015-06-21 Gavin Barraclough <barraclough@apple.com> 2 3 Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542 4 https://bugs.webkit.org/show_bug.cgi?id=146198 5 6 Unreviewed rollout. 7 8 * wtf/glib/GUniquePtr.h: 9 1 10 2015-06-20 Michael Catanzaro <mcatanzaro@igalia.com> 2 11 … … 442 451 (WTF::TinyPtrSet::setReservedFlag): 443 452 444 2015-06-08 Michael Catanzaro <mcatanzaro@igalia.com>445 446 [SOUP] Performs DNS prefetch when a proxy is configured (information leak)447 https://bugs.webkit.org/show_bug.cgi?id=145542448 449 Reviewed by Alexey Proskuryakov.450 451 Add template specialization for GUniquePtr<char*>. This smart pointer will free its data452 with g_strfreev() (as opposed to g_free(), which is used for GUniquePtr<char>).453 454 * wtf/gobject/GUniquePtr.h:455 456 453 2015-06-05 Chris Dumez <cdumez@apple.com> 457 454 -
trunk/Source/WTF/wtf/glib/GUniquePtr.h
r185502 r185818 44 44 macro(GDir, g_dir_close) \ 45 45 macro(GTimer, g_timer_destroy) \ 46 macro(GKeyFile, g_key_file_free) \ 47 macro(char*, g_strfreev) 46 macro(GKeyFile, g_key_file_free) 48 47 49 48 #define WTF_DEFINE_GPTR_DELETER(typeName, deleterFunc) \ -
trunk/Source/WebCore/ChangeLog
r185816 r185818 1 2015-06-16 Gavin Barraclough <barraclough@apple.com> 2 3 Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542 4 https://bugs.webkit.org/show_bug.cgi?id=146198 5 6 Unreviewed rollout. 7 8 * platform/network/DNSResolveQueue.cpp: 9 (WebCore::DNSResolveQueue::DNSResolveQueue): 10 (WebCore::DNSResolveQueue::isUsingProxy): 11 (WebCore::DNSResolveQueue::add): 12 (WebCore::DNSResolveQueue::timerFired): 13 * platform/network/DNSResolveQueue.h: 14 * platform/network/cf/DNSCFNet.cpp: 15 (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): 16 (WebCore::clientCallback): 17 (WebCore::DNSResolveQueue::platformResolve): 18 (WebCore::proxyIsEnabledInSystemPreferences): Deleted. 19 (WebCore::isUsingProxy): Deleted. 20 (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted. 21 * platform/network/soup/DNSSoup.cpp: 22 1 23 2015-06-21 Alexey Proskuryakov <ap@apple.com> 2 24 -
trunk/Source/WebCore/platform/network/DNSResolveQueue.cpp
r185320 r185818 28 28 #include "DNSResolveQueue.h" 29 29 30 #include <wtf/CurrentTime.h> 30 31 #include <wtf/NeverDestroyed.h> 31 32 … … 60 61 : m_timer(*this, &DNSResolveQueue::timerFired) 61 62 , m_requestsInFlight(0) 63 , m_cachedProxyEnabledStatus(false) 64 , m_lastProxyEnabledStatusCheckTime(0) 62 65 { 66 } 67 68 bool DNSResolveQueue::isUsingProxy() 69 { 70 double time = monotonicallyIncreasingTime(); 71 static const double minimumProxyCheckDelay = 5; 72 if (time - m_lastProxyEnabledStatusCheckTime > minimumProxyCheckDelay) { 73 m_lastProxyEnabledStatusCheckTime = time; 74 m_cachedProxyEnabledStatus = platformProxyIsEnabledInSystemPreferences(); 75 } 76 return m_cachedProxyEnabledStatus; 63 77 } 64 78 … … 67 81 // If there are no names queued, and few enough are in flight, resolve immediately (the mouse may be over a link). 68 82 if (!m_names.size()) { 83 if (isUsingProxy()) 84 return; 69 85 if (++m_requestsInFlight <= gNamesToResolveImmediately) { 70 platform MaybeResolveHost(hostname);86 platformResolve(hostname); 71 87 return; 72 88 } … … 85 101 void DNSResolveQueue::timerFired() 86 102 { 103 if (isUsingProxy()) { 104 m_names.clear(); 105 return; 106 } 107 87 108 int requestsAllowed = gMaxSimultaneousRequests - m_requestsInFlight; 88 109 … … 90 111 ++m_requestsInFlight; 91 112 HashSet<String>::iterator currentName = m_names.begin(); 92 platform MaybeResolveHost(*currentName);113 platformResolve(*currentName); 93 114 m_names.remove(currentName); 94 115 } -
trunk/Source/WebCore/platform/network/DNSResolveQueue.h
r185320 r185818 51 51 DNSResolveQueue(); 52 52 53 // This function performs the actual DNS prefetch. Platforms must ensure that performing the 54 // prefetch will not violate the user's expectations of privacy; for example, if an HTTP proxy 55 // is in use, then performing a DNS lookup would be inappropriate, but this may be acceptable 56 // for other types of proxies (e.g. SOCKS proxies). 57 void platformMaybeResolveHost(const String&); 53 bool isUsingProxy(); 54 55 bool platformProxyIsEnabledInSystemPreferences(); 56 void platformResolve(const String&); 58 57 59 58 void timerFired(); … … 63 62 HashSet<String> m_names; 64 63 std::atomic<int> m_requestsInFlight; 64 bool m_cachedProxyEnabledStatus; 65 double m_lastProxyEnabledStatusCheckTime; 65 66 }; 66 67 -
trunk/Source/WebCore/platform/network/cf/DNSCFNet.cpp
r185320 r185818 32 32 #include "URL.h" 33 33 #include "Timer.h" 34 #include <wtf/CurrentTime.h>35 34 #include <wtf/HashSet.h> 36 35 #include <wtf/MainThread.h> … … 50 49 namespace WebCore { 51 50 52 static bool proxyIsEnabledInSystemPreferences()51 bool DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() 53 52 { 54 53 // Don't do DNS prefetch if proxies are involved. For many proxy types, the user agent is never exposed … … 77 76 } 78 77 79 static bool isUsingProxy()80 {81 static bool cachedProxyEnabledStatus = false;82 static double lastProxyEnabledStatusCheckTime = 0;83 static const double minimumProxyCheckDelay = 5;84 double time = monotonicallyIncreasingTime();85 if (time - lastProxyEnabledStatusCheckTime > minimumProxyCheckDelay) {86 lastProxyEnabledStatusCheckTime = time;87 cachedProxyEnabledStatus = proxyIsEnabledInSystemPreferences();88 }89 return cachedProxyEnabledStatus;90 }91 92 78 static void clientCallback(CFHostRef theHost, CFHostInfoType, const CFStreamError*, void*) 93 79 { … … 96 82 } 97 83 98 void DNSResolveQueue::platform MaybeResolveHost(const String& hostname)84 void DNSResolveQueue::platformResolve(const String& hostname) 99 85 { 100 86 ASSERT(isMainThread()); 101 87 102 88 RetainPtr<CFHostRef> host = adoptCF(CFHostCreateWithName(0, hostname.createCFString().get())); 103 if (!host || isUsingProxy()) {89 if (!host) { 104 90 decrementRequestCount(); 105 91 return; -
trunk/Source/WebCore/platform/network/soup/DNSSoup.cpp
r185502 r185818 1 1 /* 2 2 * Copyright (C) 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2009, 2012 , 2015Igalia S.L.3 * Copyright (C) 2009, 2012 Igalia S.L. 4 4 * 5 5 * Redistribution and use in source and binary forms, with or without -
trunk/Source/WebKit2/ChangeLog
r185817 r185818 1 2015-06-16 Gavin Barraclough <barraclough@apple.com> 2 3 Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542 4 https://bugs.webkit.org/show_bug.cgi?id=146198 5 6 Unreviewed rollout. 7 8 * UIProcess/API/gtk/WebKitWebContext.cpp: 9 (webkit_web_context_prefetch_dns): 10 1 11 2015-06-21 Hyungwook Lee <hyungwook.lee@navercorp.com> 2 12 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
r185634 r185818 1045 1045 * 1046 1046 * Resolve the domain name of the given @hostname in advance, so that if a URI 1047 * of @hostname is requested the load will be performed more quickly. This 1048 * function does nothing if the system has been configured to use a proxy to 1049 * resolve @hostname. 1047 * of @hostname is requested the load will be performed more quickly. 1050 1048 */ 1051 1049 void webkit_web_context_prefetch_dns(WebKitWebContext* context, const char* hostname)
Note: See TracChangeset
for help on using the changeset viewer.