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

Unified Diff: Source/core/inspector/InspectorDOMAgent.cpp

Issue 307943002: Oilpan: Prepare moving InspectorController and InspectorAgents to oilpan. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed Created 6 years, 6 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
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index 8cf962e87e9c346f6df13bdf2c6cafd77a6838ef..87d30e359bafcbc834962e75fba1f3ff2468a45c 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -231,19 +231,21 @@ InspectorDOMAgent::InspectorDOMAgent(InspectorPageAgent* pageAgent, InjectedScri
, m_injectedScriptManager(injectedScriptManager)
, m_overlay(overlay)
, m_frontend(0)
- , m_domListener(0)
+ , m_domListener(nullptr)
, m_documentNodeToIdMap(adoptPtrWillBeNoop(new NodeToIdMap()))
, m_lastNodeId(1)
, m_searchingForNode(NotSearching)
, m_suppressAttributeModifiedEvent(false)
- , m_listener(0)
+ , m_listener(nullptr)
{
}
InspectorDOMAgent::~InspectorDOMAgent()
{
+#if !ENABLE(OILPAN)
reset();
ASSERT(m_searchingForNode == NotSearching);
+#endif
}
void InspectorDOMAgent::setFrontend(InspectorFrontend* frontend)
@@ -281,9 +283,9 @@ void InspectorDOMAgent::restore()
setDocument(m_pageAgent->mainFrame()->document());
}
-Vector<Document*> InspectorDOMAgent::documents()
+WillBeHeapVector<RawPtrWillBeMember<Document> > InspectorDOMAgent::documents()
{
- Vector<Document*> result;
+ WillBeHeapVector<RawPtrWillBeMember<Document> > result;
for (Frame* frame = m_document->frame(); frame; frame = frame->tree().traverseNext()) {
if (!frame->isLocalFrame())
continue;
@@ -951,10 +953,10 @@ void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
if (endQuoteFound)
attributeQuery = attributeQuery.left(attributeQuery.length() - 1);
- Vector<Document*> docs = documents();
+ WillBeHeapVector<RawPtrWillBeMember<Document> > docs = documents();
ListHashSet<Node*> resultCollector;
- for (Vector<Document*>::iterator it = docs.begin(); it != docs.end(); ++it) {
+ for (WillBeHeapVector<RawPtrWillBeMember<Document> >::iterator it = docs.begin(); it != docs.end(); ++it) {
Document* document = *it;
Node* node = document->documentElement();
if (!node)
@@ -1008,7 +1010,7 @@ void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
}
// XPath evaluation
- for (Vector<Document*>::iterator it = docs.begin(); it != docs.end(); ++it) {
+ for (WillBeHeapVector<RawPtrWillBeMember<Document> >::iterator it = docs.begin(); it != docs.end(); ++it) {
Document* document = *it;
ASSERT(document);
TrackExceptionState exceptionState;
@@ -1029,7 +1031,7 @@ void InspectorDOMAgent::performSearch(ErrorString*, const String& whitespaceTrim
}
// Selector evaluation
- for (Vector<Document*>::iterator it = docs.begin(); it != docs.end(); ++it) {
+ for (WillBeHeapVector<RawPtrWillBeMember<Document> >::iterator it = docs.begin(); it != docs.end(); ++it) {
Document* document = *it;
TrackExceptionState exceptionState;
RefPtrWillBeRawPtr<NodeList> nodeList = document->querySelectorAll(AtomicString(whitespaceTrimmedQuery), exceptionState);
@@ -2103,5 +2105,23 @@ bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorSt
return true;
}
+void InspectorDOMAgent::trace(Visitor* visitor)
+{
+ visitor->trace(m_domListener);
+ visitor->trace(m_pageAgent);
+#if ENABLE(OILPAN)
+ visitor->trace(m_documentNodeToIdMap);
+ visitor->trace(m_danglingNodeToIdMaps);
+ visitor->trace(m_idToNode);
+#endif
+ visitor->trace(m_idToNodesMap);
+ visitor->trace(m_document);
+ visitor->trace(m_searchResults);
+ visitor->trace(m_history);
+ visitor->trace(m_domEditor);
+ visitor->trace(m_listener);
+ InspectorBaseAgent::trace(visitor);
+}
+
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698