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

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

Issue 2139363003: [DevTools] Cleanup v8_inspector API part 1. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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 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/ScriptValue.h" 7 #include "bindings/core/v8/ScriptValue.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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 if (info.Length() < 1) 291 if (info.Length() < 1)
292 return; 292 return;
293 293
294 ThreadDebugger* debugger = static_cast<ThreadDebugger*>(v8::Local<v8::Extern al>::Cast(info.Data())->Value()); 294 ThreadDebugger* debugger = static_cast<ThreadDebugger*>(v8::Local<v8::Extern al>::Cast(info.Data())->Value());
295 DCHECK(debugger); 295 DCHECK(debugger);
296 v8::Isolate* isolate = info.GetIsolate(); 296 v8::Isolate* isolate = info.GetIsolate();
297 297
298 V8EventListenerInfoList listenerInfo; 298 V8EventListenerInfoList listenerInfo;
299 // eventListeners call can produce message on ErrorEvent during lazy event l istener compilation. 299 // eventListeners call can produce message on ErrorEvent during lazy event l istener compilation.
300 debugger->muteWarningsAndDeprecations(); 300 debugger->muteWarningsAndDeprecations();
301 debugger->debugger()->muteConsole();
302 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(isolate, info[0], lis tenerInfo); 301 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(isolate, info[0], lis tenerInfo);
303 debugger->debugger()->unmuteConsole();
304 debugger->unmuteWarningsAndDeprecations(); 302 debugger->unmuteWarningsAndDeprecations();
305 303
306 v8::Local<v8::Object> result = v8::Object::New(isolate); 304 v8::Local<v8::Object> result = v8::Object::New(isolate);
307 AtomicString currentEventType; 305 AtomicString currentEventType;
308 v8::Local<v8::Array> listeners; 306 v8::Local<v8::Array> listeners;
309 size_t outputIndex = 0; 307 size_t outputIndex = 0;
310 for (auto& info : listenerInfo) { 308 for (auto& info : listenerInfo) {
311 if (currentEventType != info.eventType) { 309 if (currentEventType != info.eventType) {
312 currentEventType = info.eventType; 310 currentEventType = info.eventType;
313 listeners = v8::Array::New(isolate); 311 listeners = v8::Array::New(isolate);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 { 370 {
373 for (size_t index = 0; index < m_timers.size(); ++index) { 371 for (size_t index = 0; index < m_timers.size(); ++index) {
374 if (m_timers[index].get() == timer) { 372 if (m_timers[index].get() == timer) {
375 m_timerCallbacks[index](m_timerData[index]); 373 m_timerCallbacks[index](m_timerData[index]);
376 return; 374 return;
377 } 375 }
378 } 376 }
379 } 377 }
380 378
381 } // namespace blink 379 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698