Remove a document entry from NetworkMDNSRegister::m_services when document goes away
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2018 03:46:37 +0000 (03:46 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 6 Dec 2018 03:46:37 +0000 (03:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=192429

Reviewed by Eric Carlson.

* NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
(WebKit::NetworkMDNSRegister::unregisterMDNSNames):
We should remove the entry to limit the size of the map.

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

Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp

index caeb614..063a19a 100644 (file)
@@ -1,3 +1,14 @@
+2018-12-05  Youenn Fablet  <youenn@apple.com>
+
+        Remove a document entry from NetworkMDNSRegister::m_services when document goes away
+        https://bugs.webkit.org/show_bug.cgi?id=192429
+
+        Reviewed by Eric Carlson.
+
+        * NetworkProcess/webrtc/NetworkMDNSRegister.cpp:
+        (WebKit::NetworkMDNSRegister::unregisterMDNSNames):
+        We should remove the entry to limit the size of the map.
+
 2018-12-05  Jiewen Tan  <jiewen_tan@apple.com>
 
         [Mac] Layout Test http/wpt/webauthn/public-key-credential-create-success-hid.https.html and http/wpt/webauthn/public-key-credential-get-success-hid.https.html are flaky
index 5c19b81..9fd0df8 100644 (file)
@@ -60,6 +60,7 @@ void NetworkMDNSRegister::unregisterMDNSNames(WebCore::DocumentIdentifier docume
     if (iterator == m_services.end())
         return;
     DNSServiceRefDeallocate(iterator->value);
+    m_services.remove(iterator);
 }
 
 struct PendingRegistrationRequest {