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

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

Issue 2687003002: DevTools RDP: add parameters to DOMDebugger.getEventListeners (Closed)
Patch Set: f-e compile Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/inspector/ThreadDebugger.h" 5 #include "core/inspector/ThreadDebugger.h"
6 6
7 #include "bindings/core/v8/SourceLocation.h" 7 #include "bindings/core/v8/SourceLocation.h"
8 #include "bindings/core/v8/V8Binding.h" 8 #include "bindings/core/v8/V8Binding.h"
9 #include "bindings/core/v8/V8DOMException.h" 9 #include "bindings/core/v8/V8DOMException.h"
10 #include "bindings/core/v8/V8DOMTokenList.h" 10 #include "bindings/core/v8/V8DOMTokenList.h"
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 v8::Isolate* isolate = info.GetIsolate(); 387 v8::Isolate* isolate = info.GetIsolate();
388 v8::Local<v8::Context> context = isolate->GetCurrentContext(); 388 v8::Local<v8::Context> context = isolate->GetCurrentContext();
389 int groupId = debugger->contextGroupId(toExecutionContext(context)); 389 int groupId = debugger->contextGroupId(toExecutionContext(context));
390 390
391 V8EventListenerInfoList listenerInfo; 391 V8EventListenerInfoList listenerInfo;
392 // eventListeners call can produce message on ErrorEvent during lazy event 392 // eventListeners call can produce message on ErrorEvent during lazy event
393 // listener compilation. 393 // listener compilation.
394 if (groupId) 394 if (groupId)
395 debugger->muteMetrics(groupId); 395 debugger->muteMetrics(groupId);
396 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(isolate, info[0], 396 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(isolate, info[0],
397 listenerInfo); 397 &listenerInfo);
398 if (groupId) 398 if (groupId)
399 debugger->unmuteMetrics(groupId); 399 debugger->unmuteMetrics(groupId);
400 400
401 v8::Local<v8::Object> result = v8::Object::New(isolate); 401 v8::Local<v8::Object> result = v8::Object::New(isolate);
402 AtomicString currentEventType; 402 AtomicString currentEventType;
403 v8::Local<v8::Array> listeners; 403 v8::Local<v8::Array> listeners;
404 size_t outputIndex = 0; 404 size_t outputIndex = 0;
405 for (auto& info : listenerInfo) { 405 for (auto& info : listenerInfo) {
406 if (currentEventType != info.eventType) { 406 if (currentEventType != info.eventType) {
407 currentEventType = info.eventType; 407 currentEventType = info.eventType;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 void ThreadDebugger::onTimer(TimerBase* timer) { 485 void ThreadDebugger::onTimer(TimerBase* timer) {
486 for (size_t index = 0; index < m_timers.size(); ++index) { 486 for (size_t index = 0; index < m_timers.size(); ++index) {
487 if (m_timers[index].get() == timer) { 487 if (m_timers[index].get() == timer) {
488 m_timerCallbacks[index](m_timerData[index]); 488 m_timerCallbacks[index](m_timerData[index]);
489 return; 489 return;
490 } 490 }
491 } 491 }
492 } 492 }
493 493
494 } // namespace blink 494 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698