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

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

Issue 306053010: Tried using CrossThreadPersistent for workerDebuggerAgents (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/InspectorDOMDebuggerAgent.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 9a9012c9a4b913f5377e036eaeda01675634266e..70dcf52bdb51d9bab89e4999f3dbf62bc80878bd 100644
--- a/Source/core/inspector/InspectorDOMAgent.cpp
+++ b/Source/core/inspector/InspectorDOMAgent.cpp
@@ -180,16 +180,17 @@ static Node* hoveredNodeForEvent(LocalFrame* frame, const PlatformTouchEvent& ev
return hoveredNodeForPoint(frame, points[0].pos(), ignorePointerEventsNone);
}
-class RevalidateStyleAttributeTask {
- WTF_MAKE_FAST_ALLOCATED;
+class RevalidateStyleAttributeTask : public NoBaseWillBeGarbageCollectedFinalized<RevalidateStyleAttributeTask> {
+ WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED;
public:
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;
HashSet<RefPtr<Element> > m_elements;
};
@@ -218,6 +219,11 @@ void RevalidateStyleAttributeTask::onTimer(Timer<RevalidateStyleAttributeTask>*)
m_elements.clear();
}
+void RevalidateStyleAttributeTask::trace(Visitor* visitor)
+{
+ visitor->trace(m_domAgent);
+}
+
String InspectorDOMAgent::toErrorString(ExceptionState& exceptionState)
{
if (exceptionState.hadException())
@@ -248,8 +254,8 @@ InspectorDOMAgent::~InspectorDOMAgent()
void InspectorDOMAgent::setFrontend(InspectorFrontend* frontend)
{
ASSERT(!m_frontend);
- m_history = adoptPtr(new InspectorHistory());
- m_domEditor = adoptPtr(new DOMEditor(m_history.get()));
+ m_history = adoptPtrWillBeNoop(new InspectorHistory());
+ m_domEditor = adoptPtrWillBeNoop(new DOMEditor(m_history.get()));
m_frontend = frontend->dom();
m_instrumentingAgents->setInspectorDOMAgent(this);
@@ -1906,7 +1912,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));
}
@@ -2094,5 +2100,14 @@ bool InspectorDOMAgent::pushDocumentUponHandlelessOperation(ErrorString* errorSt
return true;
}
+void InspectorDOMAgent::trace(Visitor* visitor)
+{
+ visitor->trace(m_pageAgent);
+ visitor->trace(m_revalidateStyleAttrTask);
+ visitor->trace(m_history);
+ visitor->trace(m_domEditor);
+ InspectorBaseAgent::trace(visitor);
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/inspector/InspectorDOMAgent.h ('k') | Source/core/inspector/InspectorDOMDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698