Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Unified Diff: Source/core/fetch/ResourceFetcher.cpp

Issue 23498018: [Resource Timing] Fix potential double free problem (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add layout test Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/http/tests/misc/stop-loading-on-resource-timing-buffer-full-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fetch/ResourceFetcher.cpp
diff --git a/Source/core/fetch/ResourceFetcher.cpp b/Source/core/fetch/ResourceFetcher.cpp
index 79663dbd5eec9c04caaa06168820b5dc953d5e82..e19a9294552b9b9277af4339274120aac2aed1b3 100644
--- a/Source/core/fetch/ResourceFetcher.cpp
+++ b/Source/core/fetch/ResourceFetcher.cpp
@@ -947,12 +947,12 @@ void ResourceFetcher::didLoadResource(Resource* resource)
initiatorDocument = document()->parentDocument();
ASSERT(initiatorDocument);
RefPtr<ResourceTimingInfo> info = it->value;
+ m_resourceTimingInfoMap.remove(it);
info->setInitialRequest(resource->resourceRequest());
info->setFinalResponse(resource->response());
info->setLoadFinishTime(resource->loadFinishTime());
if (DOMWindow* initiatorWindow = initiatorDocument->domWindow())
initiatorWindow->performance()->addResourceTiming(*info, initiatorDocument);
- m_resourceTimingInfoMap.remove(it);
}
}
« no previous file with comments | « LayoutTests/http/tests/misc/stop-loading-on-resource-timing-buffer-full-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698