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

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

Issue 2197723002: [DevTools] Always instrument async tasks in V8Debugger. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef ThreadDebugger_h 5 #ifndef ThreadDebugger_h
6 #define ThreadDebugger_h 6 #define ThreadDebugger_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "platform/Timer.h" 9 #include "platform/Timer.h"
10 #include "platform/UserGestureIndicator.h" 10 #include "platform/UserGestureIndicator.h"
(...skipping 30 matching lines...) Expand all
41 unsigned promiseRejected(v8::Local<v8::Context>, const String16& errorMessag e, v8::Local<v8::Value> exception, std::unique_ptr<SourceLocation>); 41 unsigned promiseRejected(v8::Local<v8::Context>, const String16& errorMessag e, v8::Local<v8::Value> exception, std::unique_ptr<SourceLocation>);
42 42
43 // V8DebuggerClient implementation. 43 // V8DebuggerClient implementation.
44 void beginUserGesture() override; 44 void beginUserGesture() override;
45 void endUserGesture() override; 45 void endUserGesture() override;
46 String16 valueSubtype(v8::Local<v8::Value>) override; 46 String16 valueSubtype(v8::Local<v8::Value>) override;
47 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override; 47 bool formatAccessorsAsProperties(v8::Local<v8::Value>) override;
48 bool isExecutionAllowed() override; 48 bool isExecutionAllowed() override;
49 double currentTimeMS() override; 49 double currentTimeMS() override;
50 bool isInspectableHeapObject(v8::Local<v8::Object>) override; 50 bool isInspectableHeapObject(v8::Local<v8::Object>) override;
51 void enableAsyncInstrumentation() override;
52 void disableAsyncInstrumentation() override;
53 void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Local<v8::O bject>) override; 51 void installAdditionalCommandLineAPI(v8::Local<v8::Context>, v8::Local<v8::O bject>) override;
54 void consoleTime(const String16& title) override; 52 void consoleTime(const String16& title) override;
55 void consoleTimeEnd(const String16& title) override; 53 void consoleTimeEnd(const String16& title) override;
56 void consoleTimeStamp(const String16& title) override; 54 void consoleTimeStamp(const String16& title) override;
57 void startRepeatingTimer(double, V8DebuggerClient::TimerCallback, void* data ) override; 55 void startRepeatingTimer(double, V8DebuggerClient::TimerCallback, void* data ) override;
58 void cancelTimer(void* data) override; 56 void cancelTimer(void* data) override;
59 57
60 V8Debugger* debugger() const { return m_debugger.get(); } 58 V8Debugger* debugger() const { return m_debugger.get(); }
61 virtual bool isWorker() { return true; } 59 virtual bool isWorker() { return true; }
62 virtual void reportConsoleMessage(ExecutionContext*, ConsoleMessage*) = 0; 60 virtual void reportConsoleMessage(ExecutionContext*, ConsoleMessage*) = 0;
63 virtual int contextGroupId(ExecutionContext*) = 0; 61 virtual int contextGroupId(ExecutionContext*) = 0;
64 62
65 protected: 63 protected:
66 void createFunctionProperty(v8::Local<v8::Context>, v8::Local<v8::Object>, c onst char* name, v8::FunctionCallback, const char* description); 64 void createFunctionProperty(v8::Local<v8::Context>, v8::Local<v8::Object>, c onst char* name, v8::FunctionCallback, const char* description);
67 void onTimer(TimerBase*); 65 void onTimer(TimerBase*);
68 66
69 v8::Isolate* m_isolate; 67 v8::Isolate* m_isolate;
70 std::unique_ptr<V8Debugger> m_debugger; 68 std::unique_ptr<V8Debugger> m_debugger;
71 69
72 private: 70 private:
73 static void setMonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Valu e>&, bool enabled); 71 static void setMonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Valu e>&, bool enabled);
74 static void monitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>& ); 72 static void monitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value>& );
75 static void unmonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value >&); 73 static void unmonitorEventsCallback(const v8::FunctionCallbackInfo<v8::Value >&);
76 74
77 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val ue>&); 75 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val ue>&);
78 76
79 bool m_asyncInstrumentationEnabled;
80 Vector<std::unique_ptr<Timer<ThreadDebugger>>> m_timers; 77 Vector<std::unique_ptr<Timer<ThreadDebugger>>> m_timers;
81 Vector<V8DebuggerClient::TimerCallback> m_timerCallbacks; 78 Vector<V8DebuggerClient::TimerCallback> m_timerCallbacks;
82 Vector<void*> m_timerData; 79 Vector<void*> m_timerData;
83 std::unique_ptr<UserGestureIndicator> m_userGestureIndicator; 80 std::unique_ptr<UserGestureIndicator> m_userGestureIndicator;
84 }; 81 };
85 82
86 } // namespace blink 83 } // namespace blink
87 84
88 #endif // ThreadDebugger_h 85 #endif // ThreadDebugger_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/inspector/ThreadDebugger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698