Modern IDB: IDBOpenDBRequest objects leak.
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2016 17:32:50 +0000 (17:32 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Jun 2016 17:32:50 +0000 (17:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158694

Reviewed by Alex Christensen.

No new tests (Currently have no testing strategy for guaranteeing lifetime of WebCore DOM objects)

* Modules/indexeddb/client/IDBConnectionProxy.cpp:
(WebCore::IDBClient::IDBConnectionProxy::completeOpenDBRequest): At this point we never need the
    request again, so remove it from the map.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201995 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/client/IDBConnectionProxy.cpp

index 707ab48..aadd5c1 100644 (file)
@@ -1,3 +1,16 @@
+2016-06-13  Brady Eidson  <beidson@apple.com>
+
+        Modern IDB: IDBOpenDBRequest objects leak.
+        https://bugs.webkit.org/show_bug.cgi?id=158694
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Currently have no testing strategy for guaranteeing lifetime of WebCore DOM objects)
+
+        * Modules/indexeddb/client/IDBConnectionProxy.cpp:
+        (WebCore::IDBClient::IDBConnectionProxy::completeOpenDBRequest): At this point we never need the
+            request again, so remove it from the map.
+
 2016-06-13  Chris Dumez  <cdumez@apple.com>
 
         Make sure HTTPHeaderMap gets a move constructor / assignment operator
index bb560b1..a1b1f44 100644 (file)
@@ -107,7 +107,7 @@ void IDBConnectionProxy::completeOpenDBRequest(const IDBResultData& resultData)
     RefPtr<IDBOpenDBRequest> request;
     {
         Locker<Lock> locker(m_openDBRequestMapLock);
-        request = m_openDBRequestMap.get(resultData.requestIdentifier());
+        request = m_openDBRequestMap.take(resultData.requestIdentifier());
     }
 
     if (!request)