Fix double hash lookup in DocumentLoader::removeSubresourceLoader().
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2013 17:05:33 +0000 (17:05 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 May 2013 17:05:33 +0000 (17:05 +0000)
<http://webkit.org/b/117030>

Reviewed by Anders Carlsson.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::removeSubresourceLoader):

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

Source/WebCore/ChangeLog
Source/WebCore/loader/DocumentLoader.cpp

index 4bfee6d..de1809d 100644 (file)
@@ -1,5 +1,15 @@
 2013-05-30  Andreas Kling  <akling@apple.com>
 
+        Fix double hash lookup in DocumentLoader::removeSubresourceLoader().
+        <http://webkit.org/b/117030>
+
+        Reviewed by Anders Carlsson.
+
+        * loader/DocumentLoader.cpp:
+        (WebCore::DocumentLoader::removeSubresourceLoader):
+
+2013-05-30  Andreas Kling  <akling@apple.com>
+
         Fix double hash lookup in RenderView::repaintSelection() loop.
         <http://webkit.org/b/117029>
 
index 92eb805..935f4e8 100644 (file)
@@ -1287,9 +1287,10 @@ void DocumentLoader::addSubresourceLoader(ResourceLoader* loader)
 
 void DocumentLoader::removeSubresourceLoader(ResourceLoader* loader)
 {
-    if (!m_subresourceLoaders.contains(loader))
+    ResourceLoaderSet::iterator it = m_subresourceLoaders.find(loader);
+    if (it == m_subresourceLoaders.end())
         return;
-    m_subresourceLoaders.remove(loader);
+    m_subresourceLoaders.remove(it);
     checkLoadComplete();
     if (Frame* frame = m_frame)
         frame->loader()->checkLoadComplete();