| Index: src/inspector/v8-debugger-agent-impl.h
|
| diff --git a/src/inspector/v8-debugger-agent-impl.h b/src/inspector/v8-debugger-agent-impl.h
|
| index c2f73c3002c5935c8fcaea70d24ca25945feb7d4..d0c8bb5b7acdb3d541fb701213f7157526ffc6d1 100644
|
| --- a/src/inspector/v8-debugger-agent-impl.h
|
| +++ b/src/inspector/v8-debugger-agent-impl.h
|
| @@ -24,8 +24,8 @@ class V8InspectorSessionImpl;
|
| class V8Regex;
|
| class V8StackTraceImpl;
|
|
|
| -using protocol::ErrorString;
|
| using protocol::Maybe;
|
| +using protocol::Response;
|
|
|
| class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
|
| public:
|
| @@ -49,67 +49,64 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
|
| void restore();
|
|
|
| // Part of the protocol.
|
| - void enable(ErrorString*) override;
|
| - void disable(ErrorString*) override;
|
| - void setBreakpointsActive(ErrorString*, bool active) override;
|
| - void setSkipAllPauses(ErrorString*, bool skip) override;
|
| - void setBreakpointByUrl(
|
| - ErrorString*, int lineNumber, const Maybe<String16>& optionalURL,
|
| - const Maybe<String16>& optionalURLRegex,
|
| - const Maybe<int>& optionalColumnNumber,
|
| - const Maybe<String16>& optionalCondition, String16*,
|
| + Response enable() override;
|
| + Response disable() override;
|
| + Response setBreakpointsActive(bool active) override;
|
| + Response setSkipAllPauses(bool skip) override;
|
| + Response setBreakpointByUrl(
|
| + int lineNumber, Maybe<String16> optionalURL,
|
| + Maybe<String16> optionalURLRegex, Maybe<int> optionalColumnNumber,
|
| + Maybe<String16> optionalCondition, String16*,
|
| std::unique_ptr<protocol::Array<protocol::Debugger::Location>>* locations)
|
| override;
|
| - void setBreakpoint(
|
| - ErrorString*, std::unique_ptr<protocol::Debugger::Location>,
|
| - const Maybe<String16>& optionalCondition, String16*,
|
| + Response setBreakpoint(
|
| + std::unique_ptr<protocol::Debugger::Location>,
|
| + Maybe<String16> optionalCondition, String16*,
|
| std::unique_ptr<protocol::Debugger::Location>* actualLocation) override;
|
| - void removeBreakpoint(ErrorString*, const String16& breakpointId) override;
|
| - void continueToLocation(
|
| - ErrorString*, std::unique_ptr<protocol::Debugger::Location>) override;
|
| - void searchInContent(
|
| - ErrorString*, const String16& scriptId, const String16& query,
|
| - const Maybe<bool>& optionalCaseSensitive,
|
| - const Maybe<bool>& optionalIsRegex,
|
| + Response removeBreakpoint(const String16& breakpointId) override;
|
| + Response continueToLocation(
|
| + std::unique_ptr<protocol::Debugger::Location>) override;
|
| + Response searchInContent(
|
| + const String16& scriptId, const String16& query,
|
| + Maybe<bool> optionalCaseSensitive, Maybe<bool> optionalIsRegex,
|
| std::unique_ptr<protocol::Array<protocol::Debugger::SearchMatch>>*)
|
| override;
|
| - void setScriptSource(
|
| - ErrorString*, const String16& inScriptId, const String16& inScriptSource,
|
| - const Maybe<bool>& dryRun,
|
| + Response setScriptSource(
|
| + const String16& inScriptId, const String16& inScriptSource,
|
| + Maybe<bool> dryRun,
|
| Maybe<protocol::Array<protocol::Debugger::CallFrame>>* optOutCallFrames,
|
| Maybe<bool>* optOutStackChanged,
|
| Maybe<protocol::Runtime::StackTrace>* optOutAsyncStackTrace,
|
| Maybe<protocol::Runtime::ExceptionDetails>* optOutCompileError) override;
|
| - void restartFrame(
|
| - ErrorString*, const String16& callFrameId,
|
| + Response restartFrame(
|
| + const String16& callFrameId,
|
| std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>>*
|
| newCallFrames,
|
| Maybe<protocol::Runtime::StackTrace>* asyncStackTrace) override;
|
| - void getScriptSource(ErrorString*, const String16& scriptId,
|
| - String16* scriptSource) override;
|
| - void pause(ErrorString*) override;
|
| - void resume(ErrorString*) override;
|
| - void stepOver(ErrorString*) override;
|
| - void stepInto(ErrorString*) override;
|
| - void stepOut(ErrorString*) override;
|
| - void setPauseOnExceptions(ErrorString*, const String16& pauseState) override;
|
| - void evaluateOnCallFrame(
|
| - ErrorString*, const String16& callFrameId, const String16& expression,
|
| - const Maybe<String16>& objectGroup,
|
| - const Maybe<bool>& includeCommandLineAPI, const Maybe<bool>& silent,
|
| - const Maybe<bool>& returnByValue, const Maybe<bool>& generatePreview,
|
| + Response getScriptSource(const String16& scriptId,
|
| + String16* scriptSource) override;
|
| + Response pause() override;
|
| + Response resume() override;
|
| + Response stepOver() override;
|
| + Response stepInto() override;
|
| + Response stepOut() override;
|
| + Response setPauseOnExceptions(const String16& pauseState) override;
|
| + Response evaluateOnCallFrame(
|
| + const String16& callFrameId, const String16& expression,
|
| + Maybe<String16> objectGroup, Maybe<bool> includeCommandLineAPI,
|
| + Maybe<bool> silent, Maybe<bool> returnByValue,
|
| + Maybe<bool> generatePreview,
|
| std::unique_ptr<protocol::Runtime::RemoteObject>* result,
|
| Maybe<protocol::Runtime::ExceptionDetails>*) override;
|
| - void setVariableValue(
|
| - ErrorString*, int scopeNumber, const String16& variableName,
|
| + Response setVariableValue(
|
| + int scopeNumber, const String16& variableName,
|
| std::unique_ptr<protocol::Runtime::CallArgument> newValue,
|
| const String16& callFrame) override;
|
| - void setAsyncCallStackDepth(ErrorString*, int depth) override;
|
| - void setBlackboxPatterns(
|
| - ErrorString*,
|
| + Response setAsyncCallStackDepth(int depth) override;
|
| + Response setBlackboxPatterns(
|
| std::unique_ptr<protocol::Array<String16>> patterns) override;
|
| - void setBlackboxedRanges(
|
| - ErrorString*, const String16& scriptId,
|
| + Response setBlackboxedRanges(
|
| + const String16& scriptId,
|
| std::unique_ptr<protocol::Array<protocol::Debugger::ScriptPosition>>
|
| positions) override;
|
|
|
| @@ -144,16 +141,15 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
|
| v8::Isolate* isolate() { return m_isolate; }
|
|
|
| private:
|
| - bool checkEnabled(ErrorString*);
|
| - void enable();
|
| + void enableImpl();
|
|
|
| SkipPauseRequest shouldSkipExceptionPause(JavaScriptCallFrame* topCallFrame);
|
| SkipPauseRequest shouldSkipStepPause(JavaScriptCallFrame* topCallFrame);
|
|
|
| void schedulePauseOnNextStatementIfSteppingInto();
|
|
|
| - std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>>
|
| - currentCallFrames(ErrorString*);
|
| + Response currentCallFrames(
|
| + std::unique_ptr<protocol::Array<protocol::Debugger::CallFrame>>*);
|
| std::unique_ptr<protocol::Runtime::StackTrace> currentAsyncStackTrace();
|
|
|
| void changeJavaScriptRecursionLevel(int step);
|
| @@ -163,8 +159,7 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
|
| std::unique_ptr<protocol::Debugger::Location> resolveBreakpoint(
|
| const String16& breakpointId, const String16& scriptId,
|
| const ScriptBreakpoint&, BreakpointSource);
|
| - void removeBreakpoint(const String16& breakpointId);
|
| - bool assertPaused(ErrorString*);
|
| + void removeBreakpointImpl(const String16& breakpointId);
|
| void clearBreakDetails();
|
|
|
| bool isCurrentCallStackEmptyOrBlackboxed();
|
| @@ -174,7 +169,7 @@ class V8DebuggerAgentImpl : public protocol::Debugger::Backend {
|
| void internalSetAsyncCallStackDepth(int);
|
| void increaseCachedSkipStackGeneration();
|
|
|
| - bool setBlackboxPattern(ErrorString*, const String16& pattern);
|
| + Response setBlackboxPattern(const String16& pattern);
|
|
|
| using ScriptsMap =
|
| protocol::HashMap<String16, std::unique_ptr<V8DebuggerScript>>;
|
|
|