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

Side by Side Diff: third_party/WebKit/Source/core/inspector/InspectorResourceContentLoader.cpp

Issue 1434383002: Oilpan: move InspectedFrames to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix incorrect OwnPtr<> use Created 5 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 #include "core/inspector/InspectorResourceContentLoader.h" 6 #include "core/inspector/InspectorResourceContentLoader.h"
7 7
8 #include "core/css/CSSStyleSheet.h" 8 #include "core/css/CSSStyleSheet.h"
9 #include "core/css/StyleSheetContents.h" 9 #include "core/css/StyleSheetContents.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 : m_allRequestsStarted(false) 86 : m_allRequestsStarted(false)
87 , m_started(false) 87 , m_started(false)
88 , m_inspectedFrame(inspectedFrame) 88 , m_inspectedFrame(inspectedFrame)
89 { 89 {
90 } 90 }
91 91
92 void InspectorResourceContentLoader::start() 92 void InspectorResourceContentLoader::start()
93 { 93 {
94 m_started = true; 94 m_started = true;
95 WillBeHeapVector<RawPtrWillBeMember<Document>> documents; 95 WillBeHeapVector<RawPtrWillBeMember<Document>> documents;
96 for (LocalFrame* frame : InspectedFrames(m_inspectedFrame)) { 96 OwnPtrWillBeRawPtr<InspectedFrames> inspectedFrames = InspectedFrames::creat e(m_inspectedFrame);
97 for (LocalFrame* frame : *inspectedFrames) {
97 documents.append(frame->document()); 98 documents.append(frame->document());
98 documents.appendVector(InspectorPageAgent::importsForFrame(frame)); 99 documents.appendVector(InspectorPageAgent::importsForFrame(frame));
99 } 100 }
100 for (Document* document : documents) { 101 for (Document* document : documents) {
101 HashSet<String> urlsToFetch; 102 HashSet<String> urlsToFetch;
102 103
103 ResourceRequest resourceRequest; 104 ResourceRequest resourceRequest;
104 HistoryItem* item = document->frame() ? document->frame()->loader().curr entItem() : nullptr; 105 HistoryItem* item = document->frame() ? document->frame()->loader().curr entItem() : nullptr;
105 if (item) { 106 if (item) {
106 resourceRequest = 107 resourceRequest =
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 (*callback)(); 211 (*callback)();
211 } 212 }
212 213
213 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client) 214 void InspectorResourceContentLoader::resourceFinished(ResourceClient* client)
214 { 215 {
215 m_pendingResourceClients.remove(client); 216 m_pendingResourceClients.remove(client);
216 checkDone(); 217 checkDone();
217 } 218 }
218 219
219 } // namespace blink 220 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698