summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 05:29:21 +0000
committerbbudge@chromium.org <bbudge@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 05:29:21 +0000
commiteae2eb5b17cbc5c27d51ff4ba6709672a2dc8b8a (patch)
tree809a55966b56f49162c05c5e4eba49117cd88383 /webkit
parent1578ae74ef991dfcb8620e608595f2f3f6313416 (diff)
downloadchromium_src-eae2eb5b17cbc5c27d51ff4ba6709672a2dc8b8a.zip
chromium_src-eae2eb5b17cbc5c27d51ff4ba6709672a2dc8b8a.tar.gz
chromium_src-eae2eb5b17cbc5c27d51ff4ba6709672a2dc8b8a.tar.bz2
Fix a crash in WebURLLoaderMockFactory caused by removing a loader that has been canceled.
BUG=NONE TEST=webkit_unit_tests AssociatedURLLoaderTest Review URL: http://codereview.chromium.org/9259004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/support/weburl_loader_mock_factory.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/webkit/support/weburl_loader_mock_factory.cc b/webkit/support/weburl_loader_mock_factory.cc
index 385316c..d6bcf09 100644
--- a/webkit/support/weburl_loader_mock_factory.cc
+++ b/webkit/support/weburl_loader_mock_factory.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -81,7 +81,8 @@ void WebURLLoaderMockFactory::ServeAsynchronousRequests() {
}
if (!loader->isDeferred())
loader->ServeAsynchronousRequest(response, data, error);
- pending_loaders_.erase(iter);
+ // If the load has been canceled, the loader may not be in the map.
+ pending_loaders_.erase(loader);
}
}