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

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

Issue 323043002: Oilpan: Prepare moving InspectorAgent related classes to oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/core/inspector/InspectorDOMAgent.h ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorDOMAgent.cpp
diff --git a/Source/core/inspector/InspectorDOMAgent.cpp b/Source/core/inspector/InspectorDOMAgent.cpp
index a6855bd138a2487b255c1ea3f32e20d7619d8d84..2f52b47f826202f18a150f829955d3edf4e772b2 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -180,18 +180,19 @@ static Node* hoveredNodeForEvent(LocalFrame* frame, const PlatformTouchEvent& ev
return hoveredNodeForPoint(frame, roundedIntPoint(points[0].pos()), ignorePointerEventsNone);
}
-class RevalidateStyleAttributeTask {
- WTF_MAKE_FAST_ALLOCATED;
+class RevalidateStyleAttributeTask FINAL : public NoBaseWillBeGarbageCollectedFinalized<RevalidateStyleAttributeTask> {
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
- RevalidateStyleAttributeTask(InspectorDOMAgent*);
+ explicit RevalidateStyleAttributeTask(InspectorDOMAgent*);
void scheduleFor(Element*);
void reset() { m_timer.stop(); }
void onTimer(Timer<RevalidateStyleAttributeTask>*);
+ void trace(Visitor*);
private:
- InspectorDOMAgent* m_domAgent;
+ RawPtrWillBeMember<InspectorDOMAgent> m_domAgent;
Timer<RevalidateStyleAttributeTask> m_timer;
- WillBePersistentHeapHashSet<RefPtrWillBeMember<Element> > m_elements;
+ WillBeHeapHashSet<RefPtrWillBeMember<Element> > m_elements;
};
RevalidateStyleAttributeTask::RevalidateStyleAttributeTask(InspectorDOMAgent* domAgent)
@@ -218,6 +219,14 @@ void RevalidateStyleAttributeTask::onTimer(Timer<RevalidateStyleAttributeTask>*)
m_elements.clear();
}
+void RevalidateStyleAttributeTask::trace(Visitor* visitor)
+{
+ visitor->trace(m_domAgent);
+#if ENABLE(OILPAN)
+ visitor->trace(m_elements);
+#endif
+}
+
String InspectorDOMAgent::toErrorString(ExceptionState& exceptionState)
{
if (exceptionState.hadException())
@@ -655,8 +664,7 @@ int InspectorDOMAgent::pushNodePathToFrontend(Node* nodeToPush)
if (!m_document)
return 0;
- // FIXME: Oilpan: .get will be unnecessary if m_document is a Member<>.
- if (!m_documentNodeToIdMap->contains(m_document.get()))
+ if (!m_documentNodeToIdMap->contains(m_document))
return 0;
// Return id in case the node is known.
@@ -1936,7 +1944,7 @@ void InspectorDOMAgent::didInvalidateStyleAttr(Node* node)
return;
if (!m_revalidateStyleAttrTask)
- m_revalidateStyleAttrTask = adoptPtr(new RevalidateStyleAttributeTask(this));
+ m_revalidateStyleAttrTask = adoptPtrWillBeNoop(new RevalidateStyleAttributeTask(this));
m_revalidateStyleAttrTask->scheduleFor(toElement(node));
}
@@ -2116,8 +2124,7 @@ PassRefPtr<TypeBuilder::Runtime::RemoteObject> InspectorDOMAgent::resolveNode(No
bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorString)
{
- // FIXME: Oilpan: .get will be unnecessary if m_document is a Member<>.
- if (!m_documentNodeToIdMap->contains(m_document.get())) {
+ if (!m_documentNodeToIdMap->contains(m_document)) {
RefPtr<TypeBuilder::DOM::Node> root;
getDocument(errorString, root);
return errorString->isEmpty();
@@ -2129,12 +2136,14 @@ void InspectorDOMAgent::trace(Visitor* visitor)
{
visitor->trace(m_domListener);
visitor->trace(m_pageAgent);
+ visitor->trace(m_injectedScriptManager);
#if ENABLE(OILPAN)
visitor->trace(m_documentNodeToIdMap);
visitor->trace(m_danglingNodeToIdMaps);
visitor->trace(m_idToNode);
visitor->trace(m_idToNodesMap);
visitor->trace(m_document);
+ visitor->trace(m_revalidateStyleAttrTask);
visitor->trace(m_searchResults);
#endif
visitor->trace(m_history);
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.h ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698