Chromium Code Reviews

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: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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 28 matching lines...)
39 data->threadDebugger()->debugger()->willExecuteScript(isolate->GetCurren tContext(), scriptId); 39 data->threadDebugger()->debugger()->willExecuteScript(isolate->GetCurren tContext(), scriptId);
40 } 40 }
41 41
42 void ThreadDebugger::didExecuteScript(v8::Isolate* isolate) 42 void ThreadDebugger::didExecuteScript(v8::Isolate* isolate)
43 { 43 {
44 V8PerIsolateData* data = V8PerIsolateData::from(isolate); 44 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
45 if (data && data->threadDebugger()) 45 if (data && data->threadDebugger())
46 data->threadDebugger()->debugger()->didExecuteScript(isolate->GetCurrent Context()); 46 data->threadDebugger()->debugger()->didExecuteScript(isolate->GetCurrent Context());
47 } 47 }
48 48
49 void ThreadDebugger::idleStarted(v8::Isolate* isolate)
50 {
51 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
52 if (data && data->threadDebugger())
53 data->threadDebugger()->debugger()->idleStarted();
54 }
55
56 void ThreadDebugger::idleFinished(v8::Isolate*isolate)
alph 2016/04/23 01:46:49 nit: missing space
dgozman 2016/04/25 21:30:25 Done.
57 {
58 V8PerIsolateData* data = V8PerIsolateData::from(isolate);
59 if (data && data->threadDebugger())
60 data->threadDebugger()->debugger()->idleFinished();
61 }
62
49 void ThreadDebugger::eventListeners(v8::Local<v8::Value> value, V8EventListenerI nfoList& result) 63 void ThreadDebugger::eventListeners(v8::Local<v8::Value> value, V8EventListenerI nfoList& result)
50 { 64 {
51 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(m_isolate, value, res ult); 65 InspectorDOMDebuggerAgent::eventListenersInfoForTarget(m_isolate, value, res ult);
52 } 66 }
53 67
54 String16 ThreadDebugger::valueSubtype(v8::Local<v8::Value> value) 68 String16 ThreadDebugger::valueSubtype(v8::Local<v8::Value> value)
55 { 69 {
56 if (V8Node::hasInstance(value, m_isolate)) 70 if (V8Node::hasInstance(value, m_isolate))
57 return "node"; 71 return "node";
58 if (V8NodeList::hasInstance(value, m_isolate) 72 if (V8NodeList::hasInstance(value, m_isolate)
(...skipping 54 matching lines...)
113 TRACE_EVENT_COPY_ASYNC_END0("blink.console", String(title).utf8().data(), th is); 127 TRACE_EVENT_COPY_ASYNC_END0("blink.console", String(title).utf8().data(), th is);
114 } 128 }
115 129
116 void ThreadDebugger::consoleTimeStamp(const String16& title) 130 void ThreadDebugger::consoleTimeStamp(const String16& title)
117 { 131 {
118 v8::Isolate* isolate = m_isolate; 132 v8::Isolate* isolate = m_isolate;
119 TRACE_EVENT_INSTANT1("devtools.timeline", "TimeStamp", TRACE_EVENT_SCOPE_THR EAD, "data", InspectorTimeStampEvent::data(currentExecutionContext(isolate), tit le)); 133 TRACE_EVENT_INSTANT1("devtools.timeline", "TimeStamp", TRACE_EVENT_SCOPE_THR EAD, "data", InspectorTimeStampEvent::data(currentExecutionContext(isolate), tit le));
120 } 134 }
121 135
122 } // namespace blink 136 } // 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