OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 PROTOCOL_DISALLOW_COPY(V8DebuggerImpl); | 51 PROTOCOL_DISALLOW_COPY(V8DebuggerImpl); |
52 public: | 52 public: |
53 V8DebuggerImpl(v8::Isolate*, V8DebuggerClient*); | 53 V8DebuggerImpl(v8::Isolate*, V8DebuggerClient*); |
54 ~V8DebuggerImpl() override; | 54 ~V8DebuggerImpl() override; |
55 | 55 |
56 bool enabled() const; | 56 bool enabled() const; |
57 | 57 |
58 void addAgent(int contextGroupId, V8DebuggerAgentImpl*); | 58 void addAgent(int contextGroupId, V8DebuggerAgentImpl*); |
59 void removeAgent(int contextGroupId); | 59 void removeAgent(int contextGroupId); |
60 | 60 |
61 String setBreakpoint(const String& sourceID, const ScriptBreakpoint&, int* a
ctualLineNumber, int* actualColumnNumber, bool interstatementLocation); | 61 String16 setBreakpoint(const String16& sourceID, const ScriptBreakpoint&, in
t* actualLineNumber, int* actualColumnNumber, bool interstatementLocation); |
62 void removeBreakpoint(const String& breakpointId); | 62 void removeBreakpoint(const String16& breakpointId); |
63 void setBreakpointsActivated(bool); | 63 void setBreakpointsActivated(bool); |
64 | 64 |
65 enum PauseOnExceptionsState { | 65 enum PauseOnExceptionsState { |
66 DontPauseOnExceptions, | 66 DontPauseOnExceptions, |
67 PauseOnAllExceptions, | 67 PauseOnAllExceptions, |
68 PauseOnUncaughtExceptions | 68 PauseOnUncaughtExceptions |
69 }; | 69 }; |
70 PauseOnExceptionsState getPauseOnExceptionsState(); | 70 PauseOnExceptionsState getPauseOnExceptionsState(); |
71 void setPauseOnExceptionsState(PauseOnExceptionsState); | 71 void setPauseOnExceptionsState(PauseOnExceptionsState); |
72 void setPauseOnNextStatement(bool); | 72 void setPauseOnNextStatement(bool); |
73 bool pausingOnNextStatement(); | 73 bool pausingOnNextStatement(); |
74 bool canBreakProgram(); | 74 bool canBreakProgram(); |
75 void breakProgram(); | 75 void breakProgram(); |
76 void continueProgram(); | 76 void continueProgram(); |
77 void stepIntoStatement(); | 77 void stepIntoStatement(); |
78 void stepOverStatement(); | 78 void stepOverStatement(); |
79 void stepOutOfFunction(); | 79 void stepOutOfFunction(); |
80 void clearStepping(); | 80 void clearStepping(); |
81 | 81 |
82 bool setScriptSource(const String& sourceID, const String& newContent, bool
preview, String* error, Maybe<protocol::Debugger::SetScriptSourceError>*, v8::Gl
obal<v8::Object>* newCallFrames, Maybe<bool>* stackChanged); | 82 bool setScriptSource(const String16& sourceID, const String16& newContent, b
ool preview, ErrorString*, Maybe<protocol::Debugger::SetScriptSourceError>*, v8:
:Global<v8::Object>* newCallFrames, Maybe<bool>* stackChanged); |
83 v8::Local<v8::Object> currentCallFrames(); | 83 v8::Local<v8::Object> currentCallFrames(); |
84 PassOwnPtr<JavaScriptCallFrame> callFrameNoScopes(int index); | 84 PassOwnPtr<JavaScriptCallFrame> callFrameNoScopes(int index); |
85 int frameCount(); | 85 int frameCount(); |
86 | 86 |
87 bool isPaused(); | 87 bool isPaused(); |
88 v8::Local<v8::Context> pausedContext() { return m_pausedContext; } | 88 v8::Local<v8::Context> pausedContext() { return m_pausedContext; } |
89 | 89 |
90 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Function>); | 90 v8::MaybeLocal<v8::Value> functionScopes(v8::Local<v8::Function>); |
91 v8::Local<v8::Value> generatorObjectDetails(v8::Local<v8::Object>&); | 91 v8::Local<v8::Value> generatorObjectDetails(v8::Local<v8::Object>&); |
92 v8::Local<v8::Value> collectionEntries(v8::Local<v8::Object>&); | 92 v8::Local<v8::Value> collectionEntries(v8::Local<v8::Object>&); |
93 v8::MaybeLocal<v8::Value> setFunctionVariableValue(v8::Local<v8::Value> func
tionValue, int scopeNumber, const String& variableName, v8::Local<v8::Value> new
Value); | 93 v8::MaybeLocal<v8::Value> setFunctionVariableValue(v8::Local<v8::Value> func
tionValue, int scopeNumber, const String16& variableName, v8::Local<v8::Value> n
ewValue); |
94 | 94 |
95 v8::Isolate* isolate() const { return m_isolate; } | 95 v8::Isolate* isolate() const { return m_isolate; } |
96 V8DebuggerClient* client() { return m_client; } | 96 V8DebuggerClient* client() { return m_client; } |
97 | 97 |
98 v8::Local<v8::Script> compileInternalScript(v8::Local<v8::Context>, v8::Loca
l<v8::String>, const String& fileName); | 98 v8::Local<v8::Script> compileInternalScript(v8::Local<v8::Context>, v8::Loca
l<v8::String>, const String16& fileName); |
99 v8::Local<v8::Context> regexContext(); | 99 v8::Local<v8::Context> regexContext(); |
100 | 100 |
101 // V8Debugger implementation | 101 // V8Debugger implementation |
102 PassOwnPtr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t
maxStackSize) override; | 102 PassOwnPtr<V8StackTrace> createStackTrace(v8::Local<v8::StackTrace>, size_t
maxStackSize) override; |
103 PassOwnPtr<V8StackTrace> captureStackTrace(size_t maxStackSize) override; | 103 PassOwnPtr<V8StackTrace> captureStackTrace(size_t maxStackSize) override; |
104 | 104 |
105 private: | 105 private: |
106 void enable(); | 106 void enable(); |
107 void disable(); | 107 void disable(); |
108 // Each script inherits debug data from v8::Context where it has been compil
ed. | 108 // Each script inherits debug data from v8::Context where it has been compil
ed. |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 v8::Local<v8::Object> m_executionState; | 142 v8::Local<v8::Object> m_executionState; |
143 v8::Local<v8::Context> m_pausedContext; | 143 v8::Local<v8::Context> m_pausedContext; |
144 bool m_runningNestedMessageLoop; | 144 bool m_runningNestedMessageLoop; |
145 v8::Global<v8::Context> m_regexContext; | 145 v8::Global<v8::Context> m_regexContext; |
146 }; | 146 }; |
147 | 147 |
148 } // namespace blink | 148 } // namespace blink |
149 | 149 |
150 | 150 |
151 #endif // V8DebuggerImpl_h | 151 #endif // V8DebuggerImpl_h |
OLD | NEW |