OLD | NEW |
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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 return; | 297 return; |
298 | 298 |
299 ThreadDebugger* debugger = static_cast<ThreadDebugger*>(v8::Local<v8::Extern
al>::Cast(info.Data())->Value()); | 299 ThreadDebugger* debugger = static_cast<ThreadDebugger*>(v8::Local<v8::Extern
al>::Cast(info.Data())->Value()); |
300 DCHECK(debugger); | 300 DCHECK(debugger); |
301 v8::Isolate* isolate = info.GetIsolate(); | 301 v8::Isolate* isolate = info.GetIsolate(); |
302 int groupId = debugger->contextGroupId(toExecutionContext(isolate->GetCurren
tContext())); | 302 int groupId = debugger->contextGroupId(toExecutionContext(isolate->GetCurren
tContext())); |
303 | 303 |
304 V8EventListenerInfoList listenerInfo; | 304 V8EventListenerInfoList listenerInfo; |
305 // eventListeners call can produce message on ErrorEvent during lazy event l
istener compilation. | 305 // eventListeners call can produce message on ErrorEvent during lazy event l
istener compilation. |
306 if (groupId) | 306 if (groupId) |
307 debugger->muteWarningsAndDeprecations(groupId); | 307 debugger->muteMetrics(groupId); |
308 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(isolate, info[0], lis
tenerInfo); | 308 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(isolate, info[0], lis
tenerInfo); |
309 if (groupId) | 309 if (groupId) |
310 debugger->unmuteWarningsAndDeprecations(groupId); | 310 debugger->unmuteMetrics(groupId); |
311 | 311 |
312 v8::Local<v8::Object> result = v8::Object::New(isolate); | 312 v8::Local<v8::Object> result = v8::Object::New(isolate); |
313 AtomicString currentEventType; | 313 AtomicString currentEventType; |
314 v8::Local<v8::Array> listeners; | 314 v8::Local<v8::Array> listeners; |
315 size_t outputIndex = 0; | 315 size_t outputIndex = 0; |
316 for (auto& info : listenerInfo) { | 316 for (auto& info : listenerInfo) { |
317 if (currentEventType != info.eventType) { | 317 if (currentEventType != info.eventType) { |
318 currentEventType = info.eventType; | 318 currentEventType = info.eventType; |
319 listeners = v8::Array::New(isolate); | 319 listeners = v8::Array::New(isolate); |
320 outputIndex = 0; | 320 outputIndex = 0; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 { | 378 { |
379 for (size_t index = 0; index < m_timers.size(); ++index) { | 379 for (size_t index = 0; index < m_timers.size(); ++index) { |
380 if (m_timers[index].get() == timer) { | 380 if (m_timers[index].get() == timer) { |
381 m_timerCallbacks[index](m_timerData[index]); | 381 m_timerCallbacks[index](m_timerData[index]); |
382 return; | 382 return; |
383 } | 383 } |
384 } | 384 } |
385 } | 385 } |
386 | 386 |
387 } // namespace blink | 387 } // namespace blink |
OLD | NEW |