Diff
Modified: trunk/Source/WebCore/ChangeLog (173987 => 173988)
--- trunk/Source/WebCore/ChangeLog 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebCore/ChangeLog 2014-09-26 00:39:20 UTC (rev 173988)
@@ -1,3 +1,18 @@
+2014-09-25 Brent Fulgham <[email protected]>
+
+ [Win] Debug builds of TestWebKitAPI are crashing.
+ https://bugs.webkit.org/show_bug.cgi?id=133553
+
+ Reviewed by Dean Jackson.
+
+ Avoid crash on shutdown due to invalid mutex state in the
+ HashMap debug implementation during a static destruction operation.
+
+ * dom/Node.cpp:
+ (WebCore::ignoreSet): Convert static value into a NeverDestroyed.
+ (WebCore::Node::trackForDebugging): Use new NeverDestroyed call.
+ (WebCore::Node::~Node): Ditto.
+
2014-09-25 Christophe Dumez <[email protected]>
Add support for is<SVGDocument>() / downcast<SVGDocument>()
Modified: trunk/Source/WebCore/dom/Node.cpp (173987 => 173988)
--- trunk/Source/WebCore/dom/Node.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebCore/dom/Node.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -253,10 +253,17 @@
}
DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, nodeCounter, ("WebCoreNode"));
-DEFINE_DEBUG_ONLY_GLOBAL(HashSet<Node*>, ignoreSet, );
#ifndef NDEBUG
static bool shouldIgnoreLeaks = false;
+
+static HashSet<Node*>& ignoreSet()
+{
+ static NeverDestroyed<HashSet<Node*>> ignore;
+
+ return ignore;
+}
+
#endif
void Node::startIgnoringLeaks()
@@ -277,7 +284,7 @@
{
#ifndef NDEBUG
if (shouldIgnoreLeaks)
- ignoreSet.add(this);
+ ignoreSet().add(this);
else
nodeCounter.increment();
#endif
@@ -304,7 +311,7 @@
Node::~Node()
{
#ifndef NDEBUG
- if (!ignoreSet.remove(this))
+ if (!ignoreSet().remove(this))
nodeCounter.decrement();
#endif
Modified: trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp (173987 => 173988)
--- trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebCore/platform/graphics/cg/PDFDocumentImage.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -227,6 +227,8 @@
void PDFDocumentImage::computeBoundsForCurrentPage()
{
+ size_t pageCount = CGPDFDocumentGetNumberOfPages(m_document.get());
+ ASSERT(pageCount > 0);
CGPDFPageRef cgPage = CGPDFDocumentGetPage(m_document.get(), 1);
CGRect mediaBox = CGPDFPageGetBoxRect(cgPage, kCGPDFMediaBox);
Modified: trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp (173987 => 173988)
--- trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebCore/platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -169,6 +169,7 @@
void SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading()
{
+ WTFLogAlways("CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
LOG(Network, "CFNet - SynchronousResourceHandleCFURLConnectionDelegate::didFinishLoading(handle=%p) (%s)", m_handle, m_handle->firstRequest().url().string().utf8().data());
#if USE(QUICK_LOOK)
Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj (173987 => 173988)
--- trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKit/WebKit.vcxproj 2014-09-26 00:39:20 UTC (rev 173988)
@@ -191,6 +191,9 @@
<Link />
<ClCompile />
<Link />
+ <Link>
+ <OptimizeReferences>false</OptimizeReferences>
+ </Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">
<ClCompile />
@@ -276,6 +279,11 @@
<Link />
<Link />
</ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <Link>
+ <EnableCOMDATFolding>false</EnableCOMDATFolding>
+ </Link>
+ </ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\cf\WebCoreSupport\WebInspectorClientCF.cpp" />
<ClCompile Include="..\..\win\AccessibleBase.cpp" />
Modified: trunk/Source/WebKit/win/AccessibleBase.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/AccessibleBase.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/AccessibleBase.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -64,13 +64,13 @@
ASSERT_ARG(obj, obj);
m_object->setWrapper(this);
++gClassCount;
- gClassNameCount.add("AccessibleBase");
+ gClassNameCount().add("AccessibleBase");
}
AccessibleBase::~AccessibleBase()
{
--gClassCount;
- gClassNameCount.remove("AccessibleBase");
+ gClassNameCount().remove("AccessibleBase");
}
AccessibleBase* AccessibleBase::createInstance(AccessibilityObject* obj, HWND window)
Modified: trunk/Source/WebKit/win/CFDictionaryPropertyBag.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/CFDictionaryPropertyBag.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/CFDictionaryPropertyBag.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -33,16 +33,16 @@
// CFDictionaryPropertyBag -----------------------------------------------
CFDictionaryPropertyBag::CFDictionaryPropertyBag()
-: m_refCount(0)
+ : m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("CFDictionaryPropertyBag");
+ gClassNameCount().add("CFDictionaryPropertyBag");
}
CFDictionaryPropertyBag::~CFDictionaryPropertyBag()
{
gClassCount--;
- gClassNameCount.remove("CFDictionaryPropertyBag");
+ gClassNameCount().remove("CFDictionaryPropertyBag");
}
COMPtr<CFDictionaryPropertyBag> CFDictionaryPropertyBag::createInstance()
Modified: trunk/Source/WebKit/win/ChangeLog (173987 => 173988)
--- trunk/Source/WebKit/win/ChangeLog 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/ChangeLog 2014-09-26 00:39:20 UTC (rev 173988)
@@ -1,3 +1,175 @@
+2014-09-25 Brent Fulgham <[email protected]>
+
+ [Win] Debug builds of TestWebKitAPI are crashing.
+ https://bugs.webkit.org/show_bug.cgi?id=133553
+
+ Reviewed by Dean Jackson.
+
+ Switch from global static HashTable to a NeverDestroyed object.
+ Modify all accessors of the global static to use the new
+ NeverDestroyed accessor method.
+
+ * AccessibleBase.cpp:
+ (AccessibleBase::AccessibleBase):
+ (AccessibleBase::~AccessibleBase):
+ * CFDictionaryPropertyBag.cpp:
+ (CFDictionaryPropertyBag::CFDictionaryPropertyBag):
+ (CFDictionaryPropertyBag::~CFDictionaryPropertyBag):
+ * DefaultDownloadDelegate.cpp:
+ (DefaultDownloadDelegate::DefaultDownloadDelegate):
+ (DefaultDownloadDelegate::~DefaultDownloadDelegate):
+ * DefaultPolicyDelegate.cpp:
+ (DefaultPolicyDelegate::DefaultPolicyDelegate):
+ (DefaultPolicyDelegate::~DefaultPolicyDelegate):
+ * MemoryStream.cpp:
+ (MemoryStream::MemoryStream):
+ (MemoryStream::~MemoryStream):
+ * WebActionPropertyBag.cpp:
+ (WebActionPropertyBag::WebActionPropertyBag):
+ (WebActionPropertyBag::~WebActionPropertyBag):
+ * WebArchive.cpp:
+ (WebArchive::WebArchive):
+ (WebArchive::~WebArchive):
+ * WebBackForwardList.cpp:
+ (WebBackForwardList::WebBackForwardList):
+ (WebBackForwardList::~WebBackForwardList):
+ * WebCache.cpp:
+ (WebCache::WebCache):
+ (WebCache::~WebCache):
+ * WebCookieManager.cpp:
+ (WebCookieManager::WebCookieManager):
+ (WebCookieManager::~WebCookieManager):
+ * WebCoreStatistics.cpp:
+ (WebCoreStatistics::WebCoreStatistics):
+ (WebCoreStatistics::~WebCoreStatistics):
+ * WebDataSource.cpp:
+ (WebDataSource::~WebDataSource):
+ * WebDatabaseManager.cpp:
+ (WebDatabaseManager::WebDatabaseManager):
+ (WebDatabaseManager::~WebDatabaseManager):
+ * WebDocumentLoader.cpp:
+ (WebDocumentLoader::WebDocumentLoader):
+ (WebDocumentLoader::~WebDocumentLoader):
+ * WebDownload.cpp:
+ (WebDownload::WebDownload):
+ (WebDownload::~WebDownload):
+ * WebDropSource.cpp:
+ (WebDropSource::WebDropSource):
+ (WebDropSource::~WebDropSource):
+ * WebElementPropertyBag.cpp:
+ (WebElementPropertyBag::WebElementPropertyBag):
+ (WebElementPropertyBag::~WebElementPropertyBag):
+ * WebError.cpp:
+ (WebError::WebError):
+ (WebError::~WebError):
+ * WebFrame.cpp:
+ (WebFrame::WebFrame):
+ (WebFrame::~WebFrame):
+ * WebFramePolicyListener.cpp:
+ (WebFramePolicyListener::WebFramePolicyListener):
+ (WebFramePolicyListener::~WebFramePolicyListener):
+ * WebGeolocationPolicyListener.cpp:
+ (WebGeolocationPolicyListener::WebGeolocationPolicyListener):
+ (WebGeolocationPolicyListener::~WebGeolocationPolicyListener):
+ * WebGeolocationPosition.cpp:
+ (WebGeolocationPosition::WebGeolocationPosition):
+ (WebGeolocationPosition::~WebGeolocationPosition):
+ * WebHTMLRepresentation.cpp:
+ (WebHTMLRepresentation::WebHTMLRepresentation):
+ (WebHTMLRepresentation::~WebHTMLRepresentation):
+ * WebHistory.cpp:
+ (WebHistory::WebHistory):
+ (WebHistory::~WebHistory):
+ * WebHistoryItem.cpp:
+ (WebHistoryItem::WebHistoryItem):
+ (WebHistoryItem::~WebHistoryItem):
+ * WebIconDatabase.cpp:
+ (WebIconDatabase::WebIconDatabase):
+ (WebIconDatabase::~WebIconDatabase):
+ * WebInspector.cpp:
+ (WebInspector::WebInspector):
+ (WebInspector::~WebInspector):
+ * WebJavaScriptCollector.cpp:
+ (WebJavaScriptCollector::WebJavaScriptCollector):
+ (WebJavaScriptCollector::~WebJavaScriptCollector):
+ * WebKitClassFactory.cpp:
+ (WebKitClassFactory::WebKitClassFactory):
+ (WebKitClassFactory::~WebKitClassFactory):
+ * WebKitDLL.cpp: Also switch to NeverDestroyed HashTable for
+ the global class name count.
+ * WebKitDLL.h:
+ * WebKitStatistics.cpp:
+ (WebKitStatistics::WebKitStatistics):
+ (WebKitStatistics::~WebKitStatistics):
+ (WebKitStatistics::comClassNameCounts):
+ * WebMutableURLRequest.cpp:
+ (WebMutableURLRequest::WebMutableURLRequest):
+ (WebMutableURLRequest::~WebMutableURLRequest):
+ * WebNavigationData.cpp:
+ (WebNavigationData::WebNavigationData):
+ (WebNavigationData::~WebNavigationData):
+ * WebNotification.cpp:
+ (WebNotification::WebNotification):
+ (WebNotification::~WebNotification):
+ * WebNotificationCenter.cpp:
+ (WebNotificationCenter::WebNotificationCenter):
+ (WebNotificationCenter::~WebNotificationCenter):
+ * WebPreferences.cpp:
+ (webPreferencesInstances):
+ (WebPreferences::WebPreferences):
+ (WebPreferences::~WebPreferences):
+ (WebPreferences::getInstanceForIdentifier):
+ (WebPreferences::setInstance):
+ (WebPreferences::removeReferenceForIdentifier):
+ * WebResource.cpp:
+ (WebResource::WebResource):
+ (WebResource::~WebResource):
+ * WebScriptObject.cpp:
+ (WebScriptObject::WebScriptObject):
+ (WebScriptObject::~WebScriptObject):
+ * WebScriptWorld.cpp:
+ (WebScriptWorld::WebScriptWorld):
+ (WebScriptWorld::~WebScriptWorld):
+ * WebSecurityOrigin.cpp:
+ (WebSecurityOrigin::WebSecurityOrigin):
+ (WebSecurityOrigin::~WebSecurityOrigin):
+ * WebSerializedJSValue.cpp:
+ (WebSerializedJSValue::WebSerializedJSValue):
+ (WebSerializedJSValue::~WebSerializedJSValue):
+ * WebTextRenderer.cpp:
+ (WebTextRenderer::WebTextRenderer):
+ (WebTextRenderer::~WebTextRenderer):
+ * WebURLAuthenticationChallenge.cpp:
+ (WebURLAuthenticationChallenge::WebURLAuthenticationChallenge):
+ (WebURLAuthenticationChallenge::~WebURLAuthenticationChallenge):
+ * WebURLAuthenticationChallengeSender.cpp:
+ (WebURLAuthenticationChallengeSender::WebURLAuthenticationChallengeSender):
+ (WebURLAuthenticationChallengeSender::~WebURLAuthenticationChallengeSender):
+ * WebURLCredential.cpp:
+ (WebURLCredential::WebURLCredential):
+ (WebURLCredential::~WebURLCredential):
+ * WebURLProtectionSpace.cpp:
+ (WebURLProtectionSpace::WebURLProtectionSpace):
+ (WebURLProtectionSpace::~WebURLProtectionSpace):
+ * WebURLResponse.cpp:
+ (:m_refCount):
+ (WebURLResponse::~WebURLResponse):
+ * WebUserContentURLPattern.cpp:
+ (WebUserContentURLPattern::WebUserContentURLPattern):
+ (WebUserContentURLPattern::~WebUserContentURLPattern):
+ * WebView.cpp:
+ (pendingDeleteBackingStoreSet): Switch from a global static
+ value to a NeverDestroyed object wrapped by an accessor function.
+ (WebView::WebView): Ditto.
+ (WebView::~WebView): Ditto.
+ (WebView::deleteBackingStore): Ditto.
+ (WebView::deleteBackingStoreSoon): Ditto,
+ (WebView::cancelDeleteBackingStoreSoon): Ditto.
+ * WebWorkersPrivate.cpp: Switch from a global static value for
+ the preferences objects t a NeverDestroyed container.
+ (WebWorkersPrivate::WebWorkersPrivate): Ditto.
+ (WebWorkersPrivate::~WebWorkersPrivate): Ditto.
+
2014-09-25 Christophe Dumez <[email protected]>
Use is<HTML*Element>() instead of isHTML*Element() - Part 2
Modified: trunk/Source/WebKit/win/DefaultDownloadDelegate.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/DefaultDownloadDelegate.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/DefaultDownloadDelegate.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -47,13 +47,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("DefaultDownloadDelegate");
+ gClassNameCount().add("DefaultDownloadDelegate");
}
DefaultDownloadDelegate::~DefaultDownloadDelegate()
{
gClassCount--;
- gClassNameCount.remove("DefaultDownloadDelegate");
+ gClassNameCount().remove("DefaultDownloadDelegate");
HashSet<IWebDownload*>::iterator i = m_downloads.begin();
for (;i != m_downloads.end(); ++i)
(*i)->Release();
Modified: trunk/Source/WebKit/win/DefaultPolicyDelegate.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/DefaultPolicyDelegate.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/DefaultPolicyDelegate.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -44,13 +44,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("DefaultPolicyDelegate");
+ gClassNameCount().add("DefaultPolicyDelegate");
}
DefaultPolicyDelegate::~DefaultPolicyDelegate()
{
gClassCount--;
- gClassNameCount.remove("DefaultPolicyDelegate");
+ gClassNameCount().remove("DefaultPolicyDelegate");
}
DefaultPolicyDelegate* DefaultPolicyDelegate::sharedInstance()
Modified: trunk/Source/WebKit/win/MemoryStream.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/MemoryStream.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/MemoryStream.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -33,18 +33,18 @@
// MemoryStream ---------------------------------------------------------------
MemoryStream::MemoryStream(PassRefPtr<SharedBuffer> buffer)
-: m_refCount(0)
-, m_buffer(buffer)
-, m_pos(0)
+ : m_refCount(0)
+ , m_buffer(buffer)
+ , m_pos(0)
{
gClassCount++;
- gClassNameCount.add("MemoryStream");
+ gClassNameCount().add("MemoryStream");
}
MemoryStream::~MemoryStream()
{
gClassCount--;
- gClassNameCount.remove("MemoryStream");
+ gClassNameCount().remove("MemoryStream");
}
COMPtr<MemoryStream> MemoryStream::createInstance(PassRefPtr<SharedBuffer> buffer)
Modified: trunk/Source/WebKit/win/WebActionPropertyBag.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebActionPropertyBag.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebActionPropertyBag.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -47,13 +47,13 @@
, m_frame(frame)
{
gClassCount++;
- gClassNameCount.add("WebActionPropertyBag");
+ gClassNameCount().add("WebActionPropertyBag");
}
WebActionPropertyBag::~WebActionPropertyBag()
{
gClassCount--;
- gClassNameCount.remove("WebActionPropertyBag");
+ gClassNameCount().remove("WebActionPropertyBag");
}
WebActionPropertyBag* WebActionPropertyBag::createInstance(const NavigationAction& action, PassRefPtr<HTMLFormElement> form, PassRefPtr<Frame> frame)
Modified: trunk/Source/WebKit/win/WebArchive.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebArchive.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebArchive.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -55,13 +55,13 @@
, m_archive(coreArchive)
{
gClassCount++;
- gClassNameCount.add("WebArchive");
+ gClassNameCount().add("WebArchive");
}
WebArchive::~WebArchive()
{
gClassCount--;
- gClassNameCount.remove("WebArchive");
+ gClassNameCount().remove("WebArchive");
}
HRESULT STDMETHODCALLTYPE WebArchive::QueryInterface(REFIID riid, void** ppvObject)
Modified: trunk/Source/WebKit/win/WebBackForwardList.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebBackForwardList.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebBackForwardList.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -56,7 +56,7 @@
backForwardListWrappers().set(m_backForwardList.get(), this);
gClassCount++;
- gClassNameCount.add("WebBackForwardList");
+ gClassNameCount().add("WebBackForwardList");
}
WebBackForwardList::~WebBackForwardList()
@@ -67,7 +67,7 @@
backForwardListWrappers().remove(m_backForwardList.get());
gClassCount--;
- gClassNameCount.remove("WebBackForwardList");
+ gClassNameCount().remove("WebBackForwardList");
}
WebBackForwardList* WebBackForwardList::createInstance(PassRefPtr<BackForwardList> backForwardList)
Modified: trunk/Source/WebKit/win/WebCache.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebCache.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebCache.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -40,16 +40,16 @@
// WebCache ---------------------------------------------------------------------------
WebCache::WebCache()
-: m_refCount(0)
+ : m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebCache");
+ gClassNameCount().add("WebCache");
}
WebCache::~WebCache()
{
gClassCount--;
- gClassNameCount.remove("WebCache");
+ gClassNameCount().remove("WebCache");
}
WebCache* WebCache::createInstance()
Modified: trunk/Source/WebKit/win/WebCookieManager.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebCookieManager.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebCookieManager.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -40,13 +40,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebCookieManager");
+ gClassNameCount().add("WebCookieManager");
}
WebCookieManager::~WebCookieManager()
{
gClassCount--;
- gClassNameCount.remove("WebCookieManager");
+ gClassNameCount().remove("WebCookieManager");
}
// IUnknown ---------------------------------------------------------------
Modified: trunk/Source/WebKit/win/WebCoreStatistics.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebCoreStatistics.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebCoreStatistics.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -49,13 +49,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebCoreStatistics");
+ gClassNameCount().add("WebCoreStatistics");
}
WebCoreStatistics::~WebCoreStatistics()
{
gClassCount--;
- gClassNameCount.remove("WebCoreStatistics");
+ gClassNameCount().remove("WebCoreStatistics");
}
WebCoreStatistics* WebCoreStatistics::createInstance()
Modified: trunk/Source/WebKit/win/WebDataSource.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebDataSource.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebDataSource.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -61,7 +61,7 @@
{
WebDataSourceCount++;
gClassCount++;
- gClassNameCount.add("WebDataSource");
+ gClassNameCount().add("WebDataSource");
}
WebDataSource::~WebDataSource()
@@ -70,7 +70,7 @@
m_loader->detachDataSource();
WebDataSourceCount--;
gClassCount--;
- gClassNameCount.remove("WebDataSource");
+ gClassNameCount().remove("WebDataSource");
}
WebDataSource* WebDataSource::createInstance(WebDocumentLoader* loader)
Modified: trunk/Source/WebKit/win/WebDatabaseManager.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebDatabaseManager.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebDatabaseManager.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -158,13 +158,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebDatabaseManager");
+ gClassNameCount().add("WebDatabaseManager");
}
WebDatabaseManager::~WebDatabaseManager()
{
gClassCount--;
- gClassNameCount.remove("WebDatabaseManager");
+ gClassNameCount().remove("WebDatabaseManager");
}
// IUnknown ------------------------------------------------------------------------
Modified: trunk/Source/WebKit/win/WebDocumentLoader.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebDocumentLoader.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebDocumentLoader.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -36,7 +36,7 @@
, m_detachedDataSource(0)
{
gClassCount++;
- gClassNameCount.add("WebDocumentLoader");
+ gClassNameCount().add("WebDocumentLoader");
}
PassRefPtr<WebDocumentLoader> WebDocumentLoader::create(const ResourceRequest& req, const SubstituteData& data)
@@ -47,7 +47,7 @@
WebDocumentLoader::~WebDocumentLoader()
{
gClassCount--;
- gClassNameCount.remove("WebDocumentLoader");
+ gClassNameCount().remove("WebDocumentLoader");
if (m_dataSource) {
ASSERT(!m_detachedDataSource);
m_dataSource->Release();
Modified: trunk/Source/WebKit/win/WebDownload.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebDownload.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebDownload.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -56,7 +56,7 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebDownload");
+ gClassNameCount().add("WebDownload");
}
WebDownload::~WebDownload()
@@ -64,7 +64,7 @@
LOG(Download, "WebDownload - Destroying download (%p)", this);
cancel();
gClassCount--;
- gClassNameCount.remove("WebDownload");
+ gClassNameCount().remove("WebDownload");
}
WebDownload* WebDownload::createInstance()
Modified: trunk/Source/WebKit/win/WebDropSource.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebDropSource.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebDropSource.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -57,13 +57,13 @@
, m_webView(webView)
{
gClassCount++;
- gClassNameCount.add("WebDropSource");
+ gClassNameCount().add("WebDropSource");
}
WebDropSource::~WebDropSource()
{
gClassCount--;
- gClassNameCount.remove("WebDropSource");
+ gClassNameCount().remove("WebDropSource");
}
STDMETHODIMP WebDropSource::QueryInterface(REFIID riid, void** ppvObject)
Modified: trunk/Source/WebKit/win/WebElementPropertyBag.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebElementPropertyBag.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebElementPropertyBag.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -48,13 +48,13 @@
, m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebElementPropertyBag");
+ gClassNameCount().add("WebElementPropertyBag");
}
WebElementPropertyBag::~WebElementPropertyBag()
{
gClassCount--;
- gClassNameCount.remove("WebElementPropertyBag");
+ gClassNameCount().remove("WebElementPropertyBag");
}
WebElementPropertyBag* WebElementPropertyBag::createInstance(const HitTestResult& result)
Modified: trunk/Source/WebKit/win/WebError.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebError.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebError.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -44,13 +44,13 @@
, m_userInfo(userInfo)
{
gClassCount++;
- gClassNameCount.add("WebError");
+ gClassNameCount().add("WebError");
}
WebError::~WebError()
{
gClassCount--;
- gClassNameCount.remove("WebError");
+ gClassNameCount().remove("WebError");
}
WebError* WebError::createInstance(const ResourceError& error, IPropertyBag* userInfo)
Modified: trunk/Source/WebKit/win/WebFrame.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebFrame.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebFrame.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -253,7 +253,7 @@
{
WebFrameCount++;
gClassCount++;
- gClassNameCount.add("WebFrame");
+ gClassNameCount().add("WebFrame");
}
WebFrame::~WebFrame()
@@ -261,7 +261,7 @@
delete d;
WebFrameCount--;
gClassCount--;
- gClassNameCount.remove("WebFrame");
+ gClassNameCount().remove("WebFrame");
}
WebFrame* WebFrame::createInstance()
Modified: trunk/Source/WebKit/win/WebFramePolicyListener.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebFramePolicyListener.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebFramePolicyListener.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -41,13 +41,13 @@
, m_frame(frame)
{
gClassCount++;
- gClassNameCount.add("WebFramePolicyListener");
+ gClassNameCount().add("WebFramePolicyListener");
}
WebFramePolicyListener::~WebFramePolicyListener()
{
gClassCount--;
- gClassNameCount.remove("WebFramePolicyListener");
+ gClassNameCount().remove("WebFramePolicyListener");
}
WebFramePolicyListener* WebFramePolicyListener::createInstance(PassRefPtr<Frame> frame)
Modified: trunk/Source/WebKit/win/WebGeolocationPolicyListener.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebGeolocationPolicyListener.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebGeolocationPolicyListener.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -43,13 +43,13 @@
, m_geolocation(geolocation)
{
gClassCount++;
- gClassNameCount.add("WebGeolocationPolicyListener");
+ gClassNameCount().add("WebGeolocationPolicyListener");
}
WebGeolocationPolicyListener::~WebGeolocationPolicyListener()
{
gClassCount--;
- gClassNameCount.remove("WebGeolocationPolicyListener");
+ gClassNameCount().remove("WebGeolocationPolicyListener");
}
// IUnknown -------------------------------------------------------------------
Modified: trunk/Source/WebKit/win/WebGeolocationPosition.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebGeolocationPosition.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebGeolocationPosition.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -40,13 +40,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebGeolocationPosition");
+ gClassNameCount().add("WebGeolocationPosition");
}
WebGeolocationPosition::~WebGeolocationPosition()
{
gClassCount--;
- gClassNameCount.remove("WebGeolocationPosition");
+ gClassNameCount().remove("WebGeolocationPosition");
}
HRESULT WebGeolocationPosition::QueryInterface(REFIID riid, void** ppvObject)
Modified: trunk/Source/WebKit/win/WebHTMLRepresentation.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebHTMLRepresentation.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebHTMLRepresentation.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -45,7 +45,7 @@
{
WebHTMLRepresentationCount++;
gClassCount++;
- gClassNameCount.add("WebHTMLRepresentation");
+ gClassNameCount().add("WebHTMLRepresentation");
}
WebHTMLRepresentation::~WebHTMLRepresentation()
@@ -57,7 +57,7 @@
WebHTMLRepresentationCount--;
gClassCount--;
- gClassNameCount.remove("WebHTMLRepresentation");
+ gClassNameCount().remove("WebHTMLRepresentation");
}
WebHTMLRepresentation* WebHTMLRepresentation::createInstance(WebFrame* frame)
Modified: trunk/Source/WebKit/win/WebHistory.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebHistory.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebHistory.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -158,7 +158,7 @@
, m_preferences(0)
{
gClassCount++;
- gClassNameCount.add("WebHistory");
+ gClassNameCount().add("WebHistory");
m_preferences = WebPreferences::sharedStandardPreferences();
}
@@ -166,7 +166,7 @@
WebHistory::~WebHistory()
{
gClassCount--;
- gClassNameCount.remove("WebHistory");
+ gClassNameCount().remove("WebHistory");
}
WebHistory* WebHistory::createInstance()
Modified: trunk/Source/WebKit/win/WebHistoryItem.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebHistoryItem.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebHistoryItem.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -56,7 +56,7 @@
historyItemWrappers().set(m_historyItem.get(), this);
gClassCount++;
- gClassNameCount.add("WebHistoryItem");
+ gClassNameCount().add("WebHistoryItem");
}
WebHistoryItem::~WebHistoryItem()
@@ -65,7 +65,7 @@
historyItemWrappers().remove(m_historyItem.get());
gClassCount--;
- gClassNameCount.remove("WebHistoryItem");
+ gClassNameCount().remove("WebHistoryItem");
}
WebHistoryItem* WebHistoryItem::createInstance()
Modified: trunk/Source/WebKit/win/WebIconDatabase.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebIconDatabase.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebIconDatabase.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -50,17 +50,17 @@
WebIconDatabase* WebIconDatabase::m_sharedWebIconDatabase = 0;
WebIconDatabase::WebIconDatabase()
-: m_refCount(0)
-, m_deliveryRequested(false)
+ : m_refCount(0)
+ , m_deliveryRequested(false)
{
gClassCount++;
- gClassNameCount.add("WebIconDatabase");
+ gClassNameCount().add("WebIconDatabase");
}
WebIconDatabase::~WebIconDatabase()
{
gClassCount--;
- gClassNameCount.remove("WebIconDatabase");
+ gClassNameCount().remove("WebIconDatabase");
}
void WebIconDatabase::init()
Modified: trunk/Source/WebKit/win/WebInspector.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebInspector.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebInspector.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -55,13 +55,13 @@
ASSERT_ARG(webView, webView);
gClassCount++;
- gClassNameCount.add("WebInspector");
+ gClassNameCount().add("WebInspector");
}
WebInspector::~WebInspector()
{
gClassCount--;
- gClassNameCount.remove("WebInspector");
+ gClassNameCount().remove("WebInspector");
}
WebInspectorFrontendClient* WebInspector::frontendClient()
Modified: trunk/Source/WebKit/win/WebJavaScriptCollector.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebJavaScriptCollector.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebJavaScriptCollector.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -42,13 +42,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebJavaScriptCollector");
+ gClassNameCount().add("WebJavaScriptCollector");
}
WebJavaScriptCollector::~WebJavaScriptCollector()
{
gClassCount--;
- gClassNameCount.remove("WebJavaScriptCollector");
+ gClassNameCount().remove("WebJavaScriptCollector");
}
WebJavaScriptCollector* WebJavaScriptCollector::createInstance()
Modified: trunk/Source/WebKit/win/WebKitClassFactory.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebKitClassFactory.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebKitClassFactory.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -88,13 +88,13 @@
WTF::initializeMainThread();
gClassCount++;
- gClassNameCount.add("WebKitClassFactory");
+ gClassNameCount().add("WebKitClassFactory");
}
WebKitClassFactory::~WebKitClassFactory()
{
gClassCount--;
- gClassNameCount.remove("WebKitClassFactory");
+ gClassNameCount().remove("WebKitClassFactory");
}
// IUnknown -------------------------------------------------------------------
Modified: trunk/Source/WebKit/win/WebKitDLL.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebKitDLL.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebKitDLL.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2006, 2007, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -40,13 +40,13 @@
#include <WebCore/Widget.h>
#include <olectl.h>
#include <wchar.h>
+#include <wtf/NeverDestroyed.h>
#include <wtf/Vector.h>
using namespace WebCore;
ULONG gLockCount;
ULONG gClassCount;
-HashCountedSet<String> gClassNameCount;
HINSTANCE gInstance;
#define CLSID_FOR_CLASS(cls) CLSID_##cls,
@@ -55,6 +55,13 @@
};
#undef CLSID_FOR_CLASS
+HashCountedSet<String>& gClassNameCount()
+{
+ static NeverDestroyed<HashCountedSet<String>> gClassNameCount;
+ return gClassNameCount.get();
+}
+
+
STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
{
switch (ul_reason_for_call) {
Modified: trunk/Source/WebKit/win/WebKitDLL.h (173987 => 173988)
--- trunk/Source/WebKit/win/WebKitDLL.h 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebKitDLL.h 2014-09-26 00:39:20 UTC (rev 173988)
@@ -48,7 +48,7 @@
extern ULONG gLockCount;
extern ULONG gClassCount;
-extern HashCountedSet<WTF::String> gClassNameCount;
+extern HashCountedSet<WTF::String>& gClassNameCount();
extern HINSTANCE gInstance;
extern CLSID gRegCLSIDs[];
Modified: trunk/Source/WebKit/win/WebKitStatistics.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebKitStatistics.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebKitStatistics.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2014 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -45,16 +45,16 @@
// WebKitStatistics ---------------------------------------------------------------------------
WebKitStatistics::WebKitStatistics()
-: m_refCount(0)
+ : m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebKitStatistics");
+ gClassNameCount().add("WebKitStatistics");
}
WebKitStatistics::~WebKitStatistics()
{
gClassCount--;
- gClassNameCount.remove("WebKitStatistics");
+ gClassNameCount().remove("WebKitStatistics");
}
WebKitStatistics* WebKitStatistics::createInstance()
@@ -138,11 +138,10 @@
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebKitStatistics::comClassNameCounts(
- /* [retval][out] */ BSTR *output)
+HRESULT WebKitStatistics::comClassNameCounts(BSTR* output)
{
StringBuilder builder;
- for (auto& slot : gClassNameCount) {
+ for (auto& slot : gClassNameCount()) {
builder.appendNumber(slot.value);
builder.append('\t');
builder.append(slot.key);
Modified: trunk/Source/WebKit/win/WebMutableURLRequest.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebMutableURLRequest.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebMutableURLRequest.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -54,7 +54,7 @@
, m_isMutable(isMutable)
{
gClassCount++;
- gClassNameCount.add("WebMutableURLRequest");
+ gClassNameCount().add("WebMutableURLRequest");
}
WebMutableURLRequest* WebMutableURLRequest::createInstance()
@@ -98,7 +98,7 @@
WebMutableURLRequest::~WebMutableURLRequest()
{
gClassCount--;
- gClassNameCount.remove("WebMutableURLRequest");
+ gClassNameCount().remove("WebMutableURLRequest");
}
// IUnknown -------------------------------------------------------------------
Modified: trunk/Source/WebKit/win/WebNavigationData.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebNavigationData.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebNavigationData.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -72,13 +72,13 @@
{
gClassCount++;
- gClassNameCount.add("WebNavigationData");
+ gClassNameCount().add("WebNavigationData");
}
WebNavigationData::~WebNavigationData()
{
gClassCount--;
- gClassNameCount.remove("WebNavigationData");
+ gClassNameCount().remove("WebNavigationData");
}
WebNavigationData* WebNavigationData::createInstance(const String& url, const String& title, IWebURLRequest* request, IWebURLResponse* response, bool hasSubstituteData, const String& clientRedirectSource)
Modified: trunk/Source/WebKit/win/WebNotification.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebNotification.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebNotification.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -46,7 +46,7 @@
m_userInfo->AddRef();
gClassCount++;
- gClassNameCount.add("WebNotification");
+ gClassNameCount().add("WebNotification");
}
WebNotification::~WebNotification()
@@ -59,7 +59,7 @@
m_userInfo->Release();
gClassCount--;
- gClassNameCount.remove("WebNotification");
+ gClassNameCount().remove("WebNotification");
}
WebNotification* WebNotification::createInstance(BSTR name /*=0*/, IUnknown* anObject /*=0*/, IPropertyBag* userInfo /*=0*/)
Modified: trunk/Source/WebKit/win/WebNotificationCenter.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebNotificationCenter.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebNotificationCenter.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -59,13 +59,13 @@
, d(adoptPtr(new WebNotificationCenterPrivate))
{
gClassCount++;
- gClassNameCount.add("WebNotificationCenter");
+ gClassNameCount().add("WebNotificationCenter");
}
WebNotificationCenter::~WebNotificationCenter()
{
gClassCount--;
- gClassNameCount.remove("WebNotificationCenter");
+ gClassNameCount().remove("WebNotificationCenter");
}
WebNotificationCenter* WebNotificationCenter::createInstance()
Modified: trunk/Source/WebKit/win/WebPreferences.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebPreferences.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebPreferences.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -40,6 +40,7 @@
#include <shlobj.h>
#include <wchar.h>
#include <wtf/HashMap.h>
+#include <wtf/NeverDestroyed.h>
#include <wtf/StdLibExtras.h>
#include <wtf/text/CString.h>
#include <wtf/text/StringHash.h>
@@ -101,7 +102,11 @@
static CFDictionaryRef defaultSettings;
-static HashMap<WTF::String, COMPtr<WebPreferences> > webPreferencesInstances;
+static HashMap<WTF::String, COMPtr<WebPreferences>>& webPreferencesInstances()
+{
+ static NeverDestroyed<HashMap<WTF::String, COMPtr<WebPreferences>>> webPreferencesInstances;
+ return webPreferencesInstances;
+}
WebPreferences* WebPreferences::sharedStandardPreferences()
{
@@ -122,13 +127,13 @@
, m_numWebViews(0)
{
gClassCount++;
- gClassNameCount.add("WebPreferences");
+ gClassNameCount().add("WebPreferences");
}
WebPreferences::~WebPreferences()
{
gClassCount--;
- gClassNameCount.remove("WebPreferences");
+ gClassNameCount().remove("WebPreferences");
}
WebPreferences* WebPreferences::createInstance()
@@ -157,7 +162,7 @@
if (identifierString.isEmpty())
return sharedStandardPreferences();
- return webPreferencesInstances.get(identifierString).get();
+ return webPreferencesInstances().get(identifierString).get();
}
void WebPreferences::setInstance(WebPreferences* instance, BSTR identifier)
@@ -167,20 +172,20 @@
WTF::String identifierString(identifier, SysStringLen(identifier));
if (identifierString.isEmpty())
return;
- webPreferencesInstances.add(identifierString, instance);
+ webPreferencesInstances().add(identifierString, instance);
}
void WebPreferences::removeReferenceForIdentifier(BSTR identifier)
{
- if (!identifier || webPreferencesInstances.isEmpty())
+ if (!identifier || webPreferencesInstances().isEmpty())
return;
WTF::String identifierString(identifier, SysStringLen(identifier));
if (identifierString.isEmpty())
return;
- WebPreferences* webPreference = webPreferencesInstances.get(identifierString).get();
+ WebPreferences* webPreference = webPreferencesInstances().get(identifierString).get();
if (webPreference && webPreference->m_refCount == 1)
- webPreferencesInstances.remove(identifierString);
+ webPreferencesInstances().remove(identifierString);
}
void WebPreferences::initializeDefaultSettings()
Modified: trunk/Source/WebKit/win/WebResource.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebResource.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebResource.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -44,13 +44,13 @@
, m_frameName(frameName)
{
gClassCount++;
- gClassNameCount.add("WebResource");
+ gClassNameCount().add("WebResource");
}
WebResource::~WebResource()
{
gClassCount--;
- gClassNameCount.remove("WebResource");
+ gClassNameCount().remove("WebResource");
}
WebResource* WebResource::createInstance(PassRefPtr<WebCore::SharedBuffer> data, const WebCore::ResourceResponse& response)
Modified: trunk/Source/WebKit/win/WebScriptObject.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebScriptObject.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebScriptObject.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -33,16 +33,16 @@
// WebScriptObject ------------------------------------------------------------
WebScriptObject::WebScriptObject()
-: m_refCount(0)
+ : m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebScriptObject");
+ gClassNameCount().add("WebScriptObject");
}
WebScriptObject::~WebScriptObject()
{
gClassCount--;
- gClassNameCount.remove("WebScriptObject");
+ gClassNameCount().remove("WebScriptObject");
}
// IUnknown -------------------------------------------------------------------
Modified: trunk/Source/WebKit/win/WebScriptWorld.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebScriptWorld.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebScriptWorld.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -49,7 +49,7 @@
allWorlds().add(m_world.get(), this);
++gClassCount;
- gClassNameCount.add("WebScriptWorld");
+ gClassNameCount().add("WebScriptWorld");
}
WebScriptWorld::~WebScriptWorld()
@@ -58,7 +58,7 @@
allWorlds().remove(m_world.get());
--gClassCount;
- gClassNameCount.remove("WebScriptWorld");
+ gClassNameCount().remove("WebScriptWorld");
}
WebScriptWorld* WebScriptWorld::standardWorld()
Modified: trunk/Source/WebKit/win/WebSecurityOrigin.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebSecurityOrigin.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebSecurityOrigin.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -48,13 +48,13 @@
, m_securityOrigin(securityOrigin)
{
gClassCount++;
- gClassNameCount.add("WebSecurityOrigin");
+ gClassNameCount().add("WebSecurityOrigin");
}
WebSecurityOrigin::~WebSecurityOrigin()
{
gClassCount--;
- gClassNameCount.remove("WebSecurityOrigin");
+ gClassNameCount().remove("WebSecurityOrigin");
}
// IUnknown ------------------------------------------------------------------------
Modified: trunk/Source/WebKit/win/WebSerializedJSValue.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebSerializedJSValue.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebSerializedJSValue.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -34,13 +34,13 @@
: m_refCount(0)
{
++gClassCount;
- gClassNameCount.add("WebSerializedJSValue");
+ gClassNameCount().add("WebSerializedJSValue");
}
WebSerializedJSValue::~WebSerializedJSValue()
{
--gClassCount;
- gClassNameCount.remove("WebSerializedJSValue");
+ gClassNameCount().remove("WebSerializedJSValue");
}
COMPtr<WebSerializedJSValue> WebSerializedJSValue::createInstance()
Modified: trunk/Source/WebKit/win/WebTextRenderer.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebTextRenderer.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebTextRenderer.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -42,13 +42,13 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebTextRenderer");
+ gClassNameCount().add("WebTextRenderer");
}
WebTextRenderer::~WebTextRenderer()
{
gClassCount--;
- gClassNameCount.remove("WebTextRenderer");
+ gClassNameCount().remove("WebTextRenderer");
}
HRESULT STDMETHODCALLTYPE WebTextRenderer::QueryInterface(const IID &riid, void** ppvObject)
Modified: trunk/Source/WebKit/win/WebURLAuthenticationChallenge.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebURLAuthenticationChallenge.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebURLAuthenticationChallenge.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -49,13 +49,13 @@
, m_sender(sender)
{
gClassCount++;
- gClassNameCount.add("WebURLAuthenticationChallenge");
+ gClassNameCount().add("WebURLAuthenticationChallenge");
}
WebURLAuthenticationChallenge::~WebURLAuthenticationChallenge()
{
gClassCount--;
- gClassNameCount.remove("WebURLAuthenticationChallenge");
+ gClassNameCount().remove("WebURLAuthenticationChallenge");
}
WebURLAuthenticationChallenge* WebURLAuthenticationChallenge::createInstance(const AuthenticationChallenge& authenticationChallenge)
Modified: trunk/Source/WebKit/win/WebURLAuthenticationChallengeSender.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebURLAuthenticationChallengeSender.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebURLAuthenticationChallengeSender.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -44,13 +44,13 @@
{
ASSERT(m_client);
gClassCount++;
- gClassNameCount.add("WebURLAuthenticationChallengeSender");
+ gClassNameCount().add("WebURLAuthenticationChallengeSender");
}
WebURLAuthenticationChallengeSender::~WebURLAuthenticationChallengeSender()
{
gClassCount--;
- gClassNameCount.remove("WebURLAuthenticationChallengeSender");
+ gClassNameCount().remove("WebURLAuthenticationChallengeSender");
}
WebURLAuthenticationChallengeSender* WebURLAuthenticationChallengeSender::createInstance(PassRefPtr<WebCore::AuthenticationClient> client)
Modified: trunk/Source/WebKit/win/WebURLCredential.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebURLCredential.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebURLCredential.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -39,13 +39,13 @@
, m_credential(credential)
{
gClassCount++;
- gClassNameCount.add("WebURLCredential");
+ gClassNameCount().add("WebURLCredential");
}
WebURLCredential::~WebURLCredential()
{
gClassCount--;
- gClassNameCount.remove("WebURLCredential");
+ gClassNameCount().remove("WebURLCredential");
}
WebURLCredential* WebURLCredential::createInstance()
Modified: trunk/Source/WebKit/win/WebURLProtectionSpace.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebURLProtectionSpace.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebURLProtectionSpace.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -39,13 +39,13 @@
, m_protectionSpace(protectionSpace)
{
gClassCount++;
- gClassNameCount.add("WebURLProtectionSpace");
+ gClassNameCount().add("WebURLProtectionSpace");
}
WebURLProtectionSpace::~WebURLProtectionSpace()
{
gClassCount--;
- gClassNameCount.remove("WebURLProtectionSpace");
+ gClassNameCount().remove("WebURLProtectionSpace");
}
WebURLProtectionSpace* WebURLProtectionSpace::createInstance()
Modified: trunk/Source/WebKit/win/WebURLResponse.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebURLResponse.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebURLResponse.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -212,13 +212,13 @@
:m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebURLResponse");
+ gClassNameCount().add("WebURLResponse");
}
WebURLResponse::~WebURLResponse()
{
gClassCount--;
- gClassNameCount.remove("WebURLResponse");
+ gClassNameCount().remove("WebURLResponse");
}
WebURLResponse* WebURLResponse::createInstance()
Modified: trunk/Source/WebKit/win/WebUserContentURLPattern.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebUserContentURLPattern.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebUserContentURLPattern.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -37,13 +37,13 @@
: m_refCount(0)
{
++gClassCount;
- gClassNameCount.add("WebUserContentURLPattern");
+ gClassNameCount().add("WebUserContentURLPattern");
}
WebUserContentURLPattern::~WebUserContentURLPattern()
{
--gClassCount;
- gClassNameCount.remove("WebUserContentURLPattern");
+ gClassNameCount().remove("WebUserContentURLPattern");
}
COMPtr<WebUserContentURLPattern> WebUserContentURLPattern::createInstance()
Modified: trunk/Source/WebKit/win/WebView.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebView.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebView.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -202,7 +202,11 @@
using JSC::JSLock;
static HMODULE accessibilityLib;
-static HashSet<WebView*> pendingDeleteBackingStoreSet;
+static HashSet<WebView*>& pendingDeleteBackingStoreSet()
+{
+ static NeverDestroyed<HashSet<WebView*>> pendingDeleteBackingStoreSet;
+ return pendingDeleteBackingStoreSet;
+}
static CFStringRef WebKitLocalCacheDefaultsKey = CFSTR("WebKitLocalCache");
@@ -424,7 +428,7 @@
WebViewCount++;
gClassCount++;
- gClassNameCount.add("WebView");
+ gClassNameCount().add("WebView");
}
WebView::~WebView()
@@ -445,7 +449,7 @@
WebViewCount--;
gClassCount--;
- gClassNameCount.remove("WebView");
+ gClassNameCount().remove("WebView");
}
WebView* WebView::createInstance()
@@ -815,7 +819,7 @@
void WebView::deleteBackingStore()
{
- pendingDeleteBackingStoreSet.remove(this);
+ pendingDeleteBackingStoreSet().remove(this);
if (m_deleteBackingStoreTimerActive) {
KillTimer(m_viewWindow, DeleteBackingStoreTimer);
@@ -3435,17 +3439,17 @@
void WebView::deleteBackingStoreSoon()
{
- if (pendingDeleteBackingStoreSet.size() > 2) {
+ if (pendingDeleteBackingStoreSet().size() > 2) {
Vector<WebView*> views;
- HashSet<WebView*>::iterator end = pendingDeleteBackingStoreSet.end();
- for (HashSet<WebView*>::iterator it = pendingDeleteBackingStoreSet.begin(); it != end; ++it)
+ HashSet<WebView*>::iterator end = pendingDeleteBackingStoreSet().end();
+ for (HashSet<WebView*>::iterator it = pendingDeleteBackingStoreSet().begin(); it != end; ++it)
views.append(*it);
for (int i = 0; i < views.size(); ++i)
views[i]->deleteBackingStore();
- ASSERT(pendingDeleteBackingStoreSet.isEmpty());
+ ASSERT(pendingDeleteBackingStoreSet().isEmpty());
}
- pendingDeleteBackingStoreSet.add(this);
+ pendingDeleteBackingStoreSet().add(this);
m_deleteBackingStoreTimerActive = true;
SetTimer(m_viewWindow, DeleteBackingStoreTimer, delayBeforeDeletingBackingStoreMsec, 0);
}
@@ -3454,7 +3458,7 @@
{
if (!m_deleteBackingStoreTimerActive)
return;
- pendingDeleteBackingStoreSet.remove(this);
+ pendingDeleteBackingStoreSet().remove(this);
m_deleteBackingStoreTimerActive = false;
KillTimer(m_viewWindow, DeleteBackingStoreTimer);
}
Modified: trunk/Source/WebKit/win/WebWorkersPrivate.cpp (173987 => 173988)
--- trunk/Source/WebKit/win/WebWorkersPrivate.cpp 2014-09-26 00:34:56 UTC (rev 173987)
+++ trunk/Source/WebKit/win/WebWorkersPrivate.cpp 2014-09-26 00:39:20 UTC (rev 173988)
@@ -90,11 +90,11 @@
: m_refCount(0)
{
gClassCount++;
- gClassNameCount.add("WebWorkersPrivate");
+ gClassNameCount().add("WebWorkersPrivate");
}
WebWorkersPrivate::~WebWorkersPrivate()
{
gClassCount--;
- gClassNameCount.remove("WebWorkersPrivate");
+ gClassNameCount().remove("WebWorkersPrivate");
}