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

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

Issue 1913283003: [DevTools] Rework idle{Started,Finished} instrumentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@1907663005
Patch Set: rebased Created 4 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 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/ScriptCallStack.h" 7 #include "bindings/core/v8/ScriptCallStack.h"
8 #include "bindings/core/v8/ScriptValue.h" 8 #include "bindings/core/v8/ScriptValue.h"
9 #include "bindings/core/v8/V8Binding.h" 9 #include "bindings/core/v8/V8Binding.h"
10 #include "bindings/core/v8/V8DOMException.h" 10 #include "bindings/core/v8/V8DOMException.h"
(...skipping 29 matching lines...) Expand all
40 data->threadDebugger()->debugger()->willExecuteScript(isolate->GetCurren tContext(), scriptId); 40 data->threadDebugger()->debugger()->willExecuteScript(isolate->GetCurren tContext(), scriptId);
41 } 41 }
42 42
43 void ThreadDebugger::didExecuteScript(v8::Isolate* isolate) 43 void ThreadDebugger::didExecuteScript(v8::Isolate* isolate)
44 { 44 {
45 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 45 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
46 if (data && data->threadDebugger()) 46 if (data && data->threadDebugger())
47 data->threadDebugger()->debugger()->didExecuteScript(isolate->GetCurrent Context()); 47 data->threadDebugger()->debugger()->didExecuteScript(isolate->GetCurrent Context());
48 } 48 }
49 49
50 void ThreadDebugger::idleStarted(v8::Isolate* isolate)
51 {
52 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
53 if (data && data->threadDebugger())
54 data->threadDebugger()->debugger()->idleStarted();
55 }
56
57 void ThreadDebugger::idleFinished(v8::Isolate* isolate)
58 {
59 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
60 if (data && data->threadDebugger())
61 data->threadDebugger()->debugger()->idleFinished();
62 }
63
50 void ThreadDebugger::eventListeners(v8::Local<v8::Value> value, V8EventListenerI nfoList& result) 64 void ThreadDebugger::eventListeners(v8::Local<v8::Value> value, V8EventListenerI nfoList& result)
51 { 65 {
52 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(m_isolate, value, res ult); 66 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(m_isolate, value, res ult);
53 } 67 }
54 68
55 String16 ThreadDebugger::valueSubtype(v8::Local<v8::Value> value) 69 String16 ThreadDebugger::valueSubtype(v8::Local<v8::Value> value)
56 { 70 {
57 if (V8Node::hasInstance(value, m_isolate)) 71 if (V8Node::hasInstance(value, m_isolate))
58 return "node"; 72 return "node";
59 if (V8NodeList::hasInstance(value, m_isolate) 73 if (V8NodeList::hasInstance(value, m_isolate)
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 m_timers.remove(id); 167 m_timers.remove(id);
154 } 168 }
155 169
156 void ThreadDebugger::onTimer(Timer<ThreadDebugger>* timer) 170 void ThreadDebugger::onTimer(Timer<ThreadDebugger>* timer)
157 { 171 {
158 ASSERT(m_timerCallbacks.contains(timer)); 172 ASSERT(m_timerCallbacks.contains(timer));
159 (*m_timerCallbacks.get(timer))(); 173 (*m_timerCallbacks.get(timer))();
160 } 174 }
161 175
162 } // namespace blink 176 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/ThreadDebugger.h ('k') | third_party/WebKit/Source/core/workers/WorkerThread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698