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

Unified Diff: Source/core/workers/WorkerEventQueue.cpp

Issue 333333002: DevTools: Instrument DOMWindowEventQueue for async stacks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased 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
« no previous file with comments | « Source/core/inspector/InspectorInstrumentation.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerEventQueue.cpp
diff --git a/Source/core/workers/WorkerEventQueue.cpp b/Source/core/workers/WorkerEventQueue.cpp
index 95931943a0e7c4d3254d09a993ca7d4636b0c69b..a705b81e2fca2562cef183119ae3d0f3c1daf648 100644
--- a/Source/core/workers/WorkerEventQueue.cpp
+++ b/Source/core/workers/WorkerEventQueue.cpp
@@ -30,6 +30,7 @@
#include "core/dom/ExecutionContext.h"
#include "core/dom/ExecutionContextTask.h"
#include "core/events/Event.h"
+#include "core/inspector/InspectorInstrumentation.h"
namespace WebCore {
@@ -104,6 +105,7 @@ private:
void WorkerEventQueue::removeEvent(Event* event)
{
+ InspectorInstrumentation::didRemoveEvent(event->target(), event);
m_eventTaskMap.remove(event);
}
@@ -112,6 +114,7 @@ bool WorkerEventQueue::enqueueEvent(PassRefPtrWillBeRawPtr<Event> prpEvent)
if (m_isClosed)
return false;
RefPtrWillBeRawPtr<Event> event = prpEvent;
+ InspectorInstrumentation::didEnqueueEvent(event->target(), event.get());
OwnPtr<EventDispatcherTask> task = EventDispatcherTask::create(event, this);
m_eventTaskMap.add(event.release(), task.get());
m_executionContext->postTask(task.release());
@@ -132,7 +135,9 @@ void WorkerEventQueue::close()
{
m_isClosed = true;
for (EventTaskMap::iterator it = m_eventTaskMap.begin(); it != m_eventTaskMap.end(); ++it) {
+ Event* event = it->key.get();
EventDispatcherTask* task = it->value;
+ InspectorInstrumentation::didRemoveEvent(event->target(), event);
task->cancel();
}
m_eventTaskMap.clear();
« no previous file with comments | « Source/core/inspector/InspectorInstrumentation.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698