Title: [237070] trunk/Source/WebCore
- Revision
- 237070
- Author
- [email protected]
- Date
- 2018-10-12 10:14:12 -0700 (Fri, 12 Oct 2018)
Log Message
DOMCache should dereference itself as soon as stopped
https://bugs.webkit.org/show_bug.cgi?id=190441
Reviewed by Chris Dumez.
Dereference the DOMCache as soon as its context is stopped instead of waiting for garbage collection.
This allows freeing resources sooner in the network process.
No observable change of behavior since the DOMCache becomes no-op when its context is stopped.
* Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::~DOMCache):
(WebCore::DOMCache::stop):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (237069 => 237070)
--- trunk/Source/WebCore/ChangeLog 2018-10-12 16:57:02 UTC (rev 237069)
+++ trunk/Source/WebCore/ChangeLog 2018-10-12 17:14:12 UTC (rev 237070)
@@ -1,3 +1,18 @@
+2018-10-12 Youenn Fablet <[email protected]>
+
+ DOMCache should dereference itself as soon as stopped
+ https://bugs.webkit.org/show_bug.cgi?id=190441
+
+ Reviewed by Chris Dumez.
+
+ Dereference the DOMCache as soon as its context is stopped instead of waiting for garbage collection.
+ This allows freeing resources sooner in the network process.
+ No observable change of behavior since the DOMCache becomes no-op when its context is stopped.
+
+ * Modules/cache/DOMCache.cpp:
+ (WebCore::DOMCache::~DOMCache):
+ (WebCore::DOMCache::stop):
+
2018-10-12 Jer Noble <[email protected]>
CRASH in WebCore::MediaPlayerPrivateAVFoundation::setPreload
Modified: trunk/Source/WebCore/Modules/cache/DOMCache.cpp (237069 => 237070)
--- trunk/Source/WebCore/Modules/cache/DOMCache.cpp 2018-10-12 16:57:02 UTC (rev 237069)
+++ trunk/Source/WebCore/Modules/cache/DOMCache.cpp 2018-10-12 17:14:12 UTC (rev 237070)
@@ -51,7 +51,8 @@
DOMCache::~DOMCache()
{
- m_connection->dereference(m_identifier);
+ if (!m_isStopped)
+ m_connection->dereference(m_identifier);
}
void DOMCache::match(RequestInfo&& info, CacheQueryOptions&& options, Ref<DeferredPromise>&& promise)
@@ -570,7 +571,10 @@
void DOMCache::stop()
{
+ if (m_isStopped)
+ return;
m_isStopped = true;
+ m_connection->dereference(m_identifier);
}
const char* DOMCache::activeDOMObjectName() const
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes