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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp

Issue 1428383002: Make ResourceFetcher::m_documentResources use WeakPtr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add TODOs Created 5 years 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
Index: third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
index eb017f008f1094cd01ae0f8f84582aa3d2a731e7..34171461fdc36f5325885632efe96afb27f6b65a 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
@@ -430,6 +430,8 @@ static void cachedResourcesForDocument(Document* document, WillBeHeapVector<RawP
const ResourceFetcher::DocumentResourceMap& allResources = document->fetcher()->allResources();
for (const auto& resource : allResources) {
Resource* cachedResource = resource.value.get();
+ if (!cachedResource)
+ continue;
switch (cachedResource->type()) {
case Resource::Image:

Powered by Google App Engine
This is Rietveld 408576698