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

Side by Side Diff: Source/core/inspector/V8Debugger.h

Issue 1214863013: [DevTools] Remove ScriptDebugListener from V8Debugger. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/ScriptDebuggerBase.cpp ('k') | Source/core/inspector/V8Debugger.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 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 25 matching lines...) Expand all
36 #include "core/inspector/ScriptBreakpoint.h" 36 #include "core/inspector/ScriptBreakpoint.h"
37 #include "platform/heap/Handle.h" 37 #include "platform/heap/Handle.h"
38 #include "wtf/Forward.h" 38 #include "wtf/Forward.h"
39 39
40 #include <v8-debug.h> 40 #include <v8-debug.h>
41 #include <v8.h> 41 #include <v8.h>
42 42
43 namespace blink { 43 namespace blink {
44 44
45 class ScriptState; 45 class ScriptState;
46 class ScriptDebugListener;
47 class ScriptValue; 46 class ScriptValue;
48 class JavaScriptCallFrame; 47 class JavaScriptCallFrame;
49 48
50 class CORE_EXPORT V8Debugger : public NoBaseWillBeGarbageCollectedFinalized<V8De bugger> { 49 class CORE_EXPORT V8Debugger : public NoBaseWillBeGarbageCollectedFinalized<V8De bugger> {
51 WTF_MAKE_NONCOPYABLE(V8Debugger); 50 WTF_MAKE_NONCOPYABLE(V8Debugger);
52 public: 51 public:
53 class Script { 52 class Script {
54 public: 53 public:
55 Script(); 54 Script();
56 55
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 struct ParsedScript { 111 struct ParsedScript {
113 String scriptId; 112 String scriptId;
114 Script script; 113 Script script;
115 CompileResult compileResult; 114 CompileResult compileResult;
116 }; 115 };
117 116
118 class CORE_EXPORT Client : public WillBeGarbageCollectedMixin { 117 class CORE_EXPORT Client : public WillBeGarbageCollectedMixin {
119 public: 118 public:
120 virtual ~Client() { } 119 virtual ~Client() { }
121 virtual v8::Local<v8::Object> compileDebuggerScript() = 0; 120 virtual v8::Local<v8::Object> compileDebuggerScript() = 0;
122 virtual ScriptDebugListener* getDebugListenerForContext(v8::Local<v8::Co ntext>) = 0;
123 virtual void runMessageLoopOnPause(v8::Local<v8::Context>) = 0; 121 virtual void runMessageLoopOnPause(v8::Local<v8::Context>) = 0;
124 virtual void quitMessageLoopOnPause() = 0; 122 virtual void quitMessageLoopOnPause() = 0;
123 virtual void didParseSource(v8::Local<v8::Context>, const ParsedScript&) = 0;
124 virtual SkipPauseRequest didPause(ScriptState*, const ScriptValue& callF rames, const ScriptValue& exception, const Vector<String>& hitBreakpoints, bool isPromiseRejection) = 0;
125 virtual bool v8AsyncTaskEventsEnabled(ScriptState*) = 0;
126 virtual void didReceiveV8AsyncTaskEvent(ScriptState*, const String& even tType, const String& eventName, int id) = 0;
127 virtual bool v8PromiseEventsEnabled(ScriptState*) = 0;
128 virtual void didReceiveV8PromiseEvent(ScriptState*, v8::Local<v8::Object > promise, v8::Local<v8::Value> parentPromise, int status) = 0;
125 129
126 DEFINE_INLINE_VIRTUAL_TRACE() { } 130 DEFINE_INLINE_VIRTUAL_TRACE() { }
127 }; 131 };
128 132
129 static PassOwnPtrWillBeRawPtr<V8Debugger> create(v8::Isolate* isolate, Clien t* client) 133 static PassOwnPtrWillBeRawPtr<V8Debugger> create(v8::Isolate* isolate, Clien t* client)
130 { 134 {
131 return adoptPtrWillBeNoop(new V8Debugger(isolate, client)); 135 return adoptPtrWillBeNoop(new V8Debugger(isolate, client));
132 } 136 }
133 137
134 virtual ~V8Debugger(); 138 virtual ~V8Debugger();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 206
203 v8::Local<v8::String> v8InternalizedString(const char*) const; 207 v8::Local<v8::String> v8InternalizedString(const char*) const;
204 208
205 enum ScopeInfoDetails { 209 enum ScopeInfoDetails {
206 AllScopes, 210 AllScopes,
207 FastAsyncScopes, 211 FastAsyncScopes,
208 NoScopes // Should be the last option. 212 NoScopes // Should be the last option.
209 }; 213 };
210 ScriptValue currentCallFramesInner(ScopeInfoDetails); 214 ScriptValue currentCallFramesInner(ScopeInfoDetails);
211 PassRefPtr<JavaScriptCallFrame> wrapCallFrames(int maximumLimit, ScopeInfoDe tails); 215 PassRefPtr<JavaScriptCallFrame> wrapCallFrames(int maximumLimit, ScopeInfoDe tails);
212 void handleV8AsyncTaskEvent(ScriptDebugListener*, ScriptState* pausedScriptS tate, v8::Local<v8::Object> executionState, v8::Local<v8::Object> eventData); 216 void handleV8AsyncTaskEvent(ScriptState* pausedScriptState, v8::Local<v8::Ob ject> executionState, v8::Local<v8::Object> eventData);
213 void handleV8PromiseEvent(ScriptDebugListener*, ScriptState* pausedScriptSta te, v8::Local<v8::Object> executionState, v8::Local<v8::Object> eventData); 217 void handleV8PromiseEvent(ScriptState* pausedScriptState, v8::Local<v8::Obje ct> executionState, v8::Local<v8::Object> eventData);
214 218
215 v8::Isolate* m_isolate; 219 v8::Isolate* m_isolate;
216 Client* m_client; 220 Client* m_client;
217 bool m_breakpointsActivated; 221 bool m_breakpointsActivated;
218 v8::UniquePersistent<v8::FunctionTemplate> m_breakProgramCallbackTemplate; 222 v8::UniquePersistent<v8::FunctionTemplate> m_breakProgramCallbackTemplate;
219 v8::UniquePersistent<v8::Object> m_debuggerScript; 223 v8::UniquePersistent<v8::Object> m_debuggerScript;
220 v8::UniquePersistent<v8::Context> m_debuggerContext; 224 v8::UniquePersistent<v8::Context> m_debuggerContext;
221 v8::UniquePersistent<v8::FunctionTemplate> m_callFrameWrapperTemplate; 225 v8::UniquePersistent<v8::FunctionTemplate> m_callFrameWrapperTemplate;
222 v8::Local<v8::Object> m_executionState; 226 v8::Local<v8::Object> m_executionState;
223 RefPtr<ScriptState> m_pausedScriptState; 227 RefPtr<ScriptState> m_pausedScriptState;
224 bool m_runningNestedMessageLoop; 228 bool m_runningNestedMessageLoop;
225 }; 229 };
226 230
227 } // namespace blink 231 } // namespace blink
228 232
229 233
230 #endif // V8Debugger_h 234 #endif // V8Debugger_h
OLDNEW
« no previous file with comments | « Source/core/inspector/ScriptDebuggerBase.cpp ('k') | Source/core/inspector/V8Debugger.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698