Changeset 163433 in webkit
- Timestamp:
- Feb 5, 2014 1:46:25 AM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/gtk/ChangeLog
r163427 r163433 1 2014-02-05 Zan Dobersek <zdobersek@igalia.com> 2 3 [GTK] Replace DEFINE_STATIC_LOCAL with NeverDestroyed<T> in GTK WK1 and WK2 code 4 https://bugs.webkit.org/show_bug.cgi?id=128195 5 6 Reviewed by Martin Robinson. 7 8 Use static NeverDestroyed<T> variables instead of the DEFINE_STATIC_LOCAL macro. 9 10 * WebCoreSupport/PlatformStrategiesGtk.cpp: 11 (PlatformStrategiesGtk::initialize): 12 * WebCoreSupport/PlatformStrategiesGtk.h: 13 * webkit/webkitwebsettings.cpp: 14 (isGoogleDomain): 15 1 16 2014-02-04 Andreas Kling <akling@apple.com> 2 17 -
trunk/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.cpp
r156550 r163433 31 31 void PlatformStrategiesGtk::initialize() 32 32 { 33 DEFINE_STATIC_LOCAL(PlatformStrategiesGtk, platformStrategies, ());34 setPlatformStrategies(&platformStrategies );33 static NeverDestroyed<PlatformStrategiesGtk> platformStrategies; 34 setPlatformStrategies(&platformStrategies.get()); 35 35 } 36 36 -
trunk/Source/WebKit/gtk/WebCoreSupport/PlatformStrategiesGtk.h
r156550 r163433 29 29 #include "StorageStrategy.h" 30 30 #include "VisitedLinkStrategy.h" 31 #include <wtf/NeverDestroyed.h> 31 32 32 33 class PlatformStrategiesGtk : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::DatabaseStrategy, private WebCore::LoaderStrategy, private WebCore::PluginStrategy, private WebCore::SharedWorkerStrategy, private WebCore::StorageStrategy, private WebCore::VisitedLinkStrategy { … … 65 66 virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash, const WebCore::URL& baseURL, const WTF::AtomicString& attributeURL); 66 67 virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); 68 69 friend class NeverDestroyed<PlatformStrategiesGtk>; 67 70 }; 68 71 -
trunk/Source/WebKit/gtk/webkit/webkitwebsettings.cpp
r162644 r163433 36 36 #include "webkitversion.h" 37 37 #include "webkitwebsettingsprivate.h" 38 #include <glib/gi18n-lib.h> 39 #include <wtf/NeverDestroyed.h> 38 40 #include <wtf/gobject/GUniquePtr.h> 39 41 #include <wtf/text/CString.h> 40 42 #include <wtf/text/StringConcatenate.h> 41 #include <glib/gi18n-lib.h>42 43 43 44 /** … … 1587 1588 static bool isGoogleDomain(String host) 1588 1589 { 1589 DEFINE_STATIC_LOCAL(HashSet<String>, googleDomains, ());1590 DEFINE_STATIC_LOCAL(Vector<String>, otherGoogleDomains, ());1591 1592 if (googleDomains. isEmpty())1593 initializeDomainsList(googleDomains );1594 1595 if (otherGoogleDomains. isEmpty())1596 initializeOtherGoogleDomains(otherGoogleDomains );1590 static NeverDestroyed<HashSet<String>> googleDomains; 1591 static NeverDestroyed<Vector<String>> otherGoogleDomains; 1592 1593 if (googleDomains.get().isEmpty()) 1594 initializeDomainsList(googleDomains.get()); 1595 1596 if (otherGoogleDomains.get().isEmpty()) 1597 initializeOtherGoogleDomains(otherGoogleDomains.get()); 1597 1598 1598 1599 // First check if this is one of the various google.com international domains. 1599 1600 int position = host.find(".google."); 1600 if (position > 0 && googleDomains. contains(host.substring(position + sizeof(".google.") - 1)))1601 if (position > 0 && googleDomains.get().contains(host.substring(position + sizeof(".google.") - 1))) 1601 1602 return true; 1602 1603 1603 1604 // Then we check the possibility of it being one of the other, .com-only google domains. 1604 for (unsigned i nt i = 0; i < otherGoogleDomains.size(); i++) {1605 if (host.endsWith(otherGoogleDomains. at(i)))1605 for (unsigned i = 0; i < otherGoogleDomains.get().size(); i++) { 1606 if (host.endsWith(otherGoogleDomains.get().at(i))) 1606 1607 return true; 1607 1608 } -
trunk/Source/WebKit2/ChangeLog
r163427 r163433 1 2014-02-05 Zan Dobersek <zdobersek@igalia.com> 2 3 [GTK] Replace DEFINE_STATIC_LOCAL with NeverDestroyed<T> in GTK WK1 and WK2 code 4 https://bugs.webkit.org/show_bug.cgi?id=128195 5 6 Reviewed by Martin Robinson. 7 8 Use static NeverDestroyed<T> variables instead of the DEFINE_STATIC_LOCAL macro. 9 10 * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: 11 (historyItemsMap): 12 * UIProcess/API/gtk/WebKitWebContext.cpp: 13 (downloadsMap): 14 * UIProcess/gtk/WebPageProxyGtk.cpp: 15 (WebKit::pluginWindowMap): 16 * WebProcess/gtk/WebGtkExtensionManager.cpp: 17 (WebKit::WebGtkExtensionManager::shared): 18 * WebProcess/gtk/WebGtkExtensionManager.h: 19 1 20 2014-02-04 Andreas Kling <akling@apple.com> 2 21 -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitBackForwardListItem.cpp
r137469 r163433 24 24 #include "WebKitPrivate.h" 25 25 #include <wtf/HashMap.h> 26 #include <wtf/NeverDestroyed.h> 26 27 #include <wtf/gobject/GRefPtr.h> 27 28 #include <wtf/text/CString.h> … … 57 58 static HistoryItemsMap& historyItemsMap() 58 59 { 59 DEFINE_STATIC_LOCAL(HistoryItemsMap, itemsMap, ());60 static NeverDestroyed<HistoryItemsMap> itemsMap; 60 61 return itemsMap; 61 62 } -
trunk/Source/WebKit2/UIProcess/API/gtk/WebKitWebContext.cpp
r162928 r163433 48 48 #include <WebCore/Language.h> 49 49 #include <wtf/HashMap.h> 50 #include <wtf/NeverDestroyed.h> 50 51 #include <wtf/OwnPtr.h> 51 52 #include <wtf/PassRefPtr.h> … … 358 359 static DownloadsMap& downloadsMap() 359 360 { 360 DEFINE_STATIC_LOCAL(DownloadsMap, downloads, ());361 static NeverDestroyed<DownloadsMap> downloads; 361 362 return downloads; 362 363 } -
trunk/Source/WebKit2/UIProcess/gtk/WebPageProxyGtk.cpp
r159913 r163433 36 36 #include <WebCore/UserAgentGtk.h> 37 37 #include <gtk/gtkx.h> 38 #include <wtf/NeverDestroyed.h> 38 39 39 40 namespace WebKit { … … 80 81 static PluginWindowMap& pluginWindowMap() 81 82 { 82 DEFINE_STATIC_LOCAL(PluginWindowMap, map, ());83 static NeverDestroyed<PluginWindowMap> map; 83 84 return map; 84 85 } -
trunk/Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.cpp
r162533 r163433 35 35 WebGtkExtensionManager& WebGtkExtensionManager::shared() 36 36 { 37 DEFINE_STATIC_LOCAL(WebGtkExtensionManager, extensionManager, ());37 static NeverDestroyed<WebGtkExtensionManager> extensionManager; 38 38 return extensionManager; 39 39 } -
trunk/Source/WebKit2/WebProcess/gtk/WebGtkExtensionManager.h
r162441 r163433 23 23 #include "Module.h" 24 24 #include "WKBundle.h" 25 #include <wtf/NeverDestroyed.h> 25 26 #include <wtf/Noncopyable.h> 26 27 #include <wtf/Vector.h> … … 51 52 Vector<Module*> m_extensionModules; 52 53 GRefPtr<WebKitWebExtension> m_extension; 54 55 friend class NeverDestroyed<WebGtkExtensionManager>; 53 56 }; 54 57
Note: See TracChangeset
for help on using the changeset viewer.