mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 12:54:38 +03:00
Update chromedp to fix console errors (#1521)
This commit is contained in:
119
vendor/github.com/chromedp/cdproto/debugger/debugger.go
generated
vendored
119
vendor/github.com/chromedp/cdproto/debugger/debugger.go
generated
vendored
@@ -204,57 +204,6 @@ func (p *EvaluateOnCallFrameParams) Do(ctx context.Context) (result *runtime.Rem
|
||||
return res.Result, res.ExceptionDetails, nil
|
||||
}
|
||||
|
||||
// ExecuteWasmEvaluatorParams execute a Wasm Evaluator module on a given call
|
||||
// frame.
|
||||
type ExecuteWasmEvaluatorParams struct {
|
||||
CallFrameID CallFrameID `json:"callFrameId"` // WebAssembly call frame identifier to evaluate on.
|
||||
Evaluator string `json:"evaluator"` // Code of the evaluator module.
|
||||
Timeout runtime.TimeDelta `json:"timeout,omitempty"` // Terminate execution after timing out (number of milliseconds).
|
||||
}
|
||||
|
||||
// ExecuteWasmEvaluator execute a Wasm Evaluator module on a given call
|
||||
// frame.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-executeWasmEvaluator
|
||||
//
|
||||
// parameters:
|
||||
// callFrameID - WebAssembly call frame identifier to evaluate on.
|
||||
// evaluator - Code of the evaluator module.
|
||||
func ExecuteWasmEvaluator(callFrameID CallFrameID, evaluator string) *ExecuteWasmEvaluatorParams {
|
||||
return &ExecuteWasmEvaluatorParams{
|
||||
CallFrameID: callFrameID,
|
||||
Evaluator: evaluator,
|
||||
}
|
||||
}
|
||||
|
||||
// WithTimeout terminate execution after timing out (number of milliseconds).
|
||||
func (p ExecuteWasmEvaluatorParams) WithTimeout(timeout runtime.TimeDelta) *ExecuteWasmEvaluatorParams {
|
||||
p.Timeout = timeout
|
||||
return &p
|
||||
}
|
||||
|
||||
// ExecuteWasmEvaluatorReturns return values.
|
||||
type ExecuteWasmEvaluatorReturns struct {
|
||||
Result *runtime.RemoteObject `json:"result,omitempty"` // Object wrapper for the evaluation result.
|
||||
ExceptionDetails *runtime.ExceptionDetails `json:"exceptionDetails,omitempty"` // Exception details.
|
||||
}
|
||||
|
||||
// Do executes Debugger.executeWasmEvaluator against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// result - Object wrapper for the evaluation result.
|
||||
// exceptionDetails - Exception details.
|
||||
func (p *ExecuteWasmEvaluatorParams) Do(ctx context.Context) (result *runtime.RemoteObject, exceptionDetails *runtime.ExceptionDetails, err error) {
|
||||
// execute
|
||||
var res ExecuteWasmEvaluatorReturns
|
||||
err = cdp.Execute(ctx, CommandExecuteWasmEvaluator, p, &res)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
||||
return res.Result, res.ExceptionDetails, nil
|
||||
}
|
||||
|
||||
// GetPossibleBreakpointsParams returns possible locations for breakpoint.
|
||||
// scriptId in start and end range locations should be the same.
|
||||
type GetPossibleBreakpointsParams struct {
|
||||
@@ -429,47 +378,6 @@ func (p *RemoveBreakpointParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandRemoveBreakpoint, p, nil)
|
||||
}
|
||||
|
||||
// RestartFrameParams restarts particular call frame from the beginning.
|
||||
type RestartFrameParams struct {
|
||||
CallFrameID CallFrameID `json:"callFrameId"` // Call frame identifier to evaluate on.
|
||||
}
|
||||
|
||||
// RestartFrame restarts particular call frame from the beginning.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-restartFrame
|
||||
//
|
||||
// parameters:
|
||||
// callFrameID - Call frame identifier to evaluate on.
|
||||
func RestartFrame(callFrameID CallFrameID) *RestartFrameParams {
|
||||
return &RestartFrameParams{
|
||||
CallFrameID: callFrameID,
|
||||
}
|
||||
}
|
||||
|
||||
// RestartFrameReturns return values.
|
||||
type RestartFrameReturns struct {
|
||||
CallFrames []*CallFrame `json:"callFrames,omitempty"` // New stack trace.
|
||||
AsyncStackTrace *runtime.StackTrace `json:"asyncStackTrace,omitempty"` // Async stack trace, if any.
|
||||
AsyncStackTraceID *runtime.StackTraceID `json:"asyncStackTraceId,omitempty"` // Async stack trace, if any.
|
||||
}
|
||||
|
||||
// Do executes Debugger.restartFrame against the provided context.
|
||||
//
|
||||
// returns:
|
||||
// callFrames - New stack trace.
|
||||
// asyncStackTrace - Async stack trace, if any.
|
||||
// asyncStackTraceID - Async stack trace, if any.
|
||||
func (p *RestartFrameParams) Do(ctx context.Context) (callFrames []*CallFrame, asyncStackTrace *runtime.StackTrace, asyncStackTraceID *runtime.StackTraceID, err error) {
|
||||
// execute
|
||||
var res RestartFrameReturns
|
||||
err = cdp.Execute(ctx, CommandRestartFrame, p, &res)
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
|
||||
return res.CallFrames, res.AsyncStackTrace, res.AsyncStackTraceID, nil
|
||||
}
|
||||
|
||||
// ResumeParams resumes JavaScript execution.
|
||||
type ResumeParams struct {
|
||||
TerminateOnResume bool `json:"terminateOnResume,omitempty"` // Set to true to terminate execution upon resuming execution. In contrast to Runtime.terminateExecution, this will allows to execute further JavaScript (i.e. via evaluation) until execution of the paused code is actually resumed, at which point termination is triggered. If execution is currently not paused, this parameter has no effect.
|
||||
@@ -1045,7 +953,8 @@ func (p *SetVariableValueParams) Do(ctx context.Context) (err error) {
|
||||
|
||||
// StepIntoParams steps into the function call.
|
||||
type StepIntoParams struct {
|
||||
BreakOnAsyncCall bool `json:"breakOnAsyncCall,omitempty"` // Debugger will pause on the execution of the first async task which was scheduled before next pause.
|
||||
BreakOnAsyncCall bool `json:"breakOnAsyncCall,omitempty"` // Debugger will pause on the execution of the first async task which was scheduled before next pause.
|
||||
SkipList []*LocationRange `json:"skipList,omitempty"` // The skipList specifies location ranges that should be skipped on step into.
|
||||
}
|
||||
|
||||
// StepInto steps into the function call.
|
||||
@@ -1064,6 +973,13 @@ func (p StepIntoParams) WithBreakOnAsyncCall(breakOnAsyncCall bool) *StepIntoPar
|
||||
return &p
|
||||
}
|
||||
|
||||
// WithSkipList the skipList specifies location ranges that should be skipped
|
||||
// on step into.
|
||||
func (p StepIntoParams) WithSkipList(skipList []*LocationRange) *StepIntoParams {
|
||||
p.SkipList = skipList
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Debugger.stepInto against the provided context.
|
||||
func (p *StepIntoParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStepInto, p, nil)
|
||||
@@ -1085,18 +1001,29 @@ func (p *StepOutParams) Do(ctx context.Context) (err error) {
|
||||
}
|
||||
|
||||
// StepOverParams steps over the statement.
|
||||
type StepOverParams struct{}
|
||||
type StepOverParams struct {
|
||||
SkipList []*LocationRange `json:"skipList,omitempty"` // The skipList specifies location ranges that should be skipped on step over.
|
||||
}
|
||||
|
||||
// StepOver steps over the statement.
|
||||
//
|
||||
// See: https://chromedevtools.github.io/devtools-protocol/tot/Debugger#method-stepOver
|
||||
//
|
||||
// parameters:
|
||||
func StepOver() *StepOverParams {
|
||||
return &StepOverParams{}
|
||||
}
|
||||
|
||||
// WithSkipList the skipList specifies location ranges that should be skipped
|
||||
// on step over.
|
||||
func (p StepOverParams) WithSkipList(skipList []*LocationRange) *StepOverParams {
|
||||
p.SkipList = skipList
|
||||
return &p
|
||||
}
|
||||
|
||||
// Do executes Debugger.stepOver against the provided context.
|
||||
func (p *StepOverParams) Do(ctx context.Context) (err error) {
|
||||
return cdp.Execute(ctx, CommandStepOver, nil, nil)
|
||||
return cdp.Execute(ctx, CommandStepOver, p, nil)
|
||||
}
|
||||
|
||||
// Command names.
|
||||
@@ -1105,13 +1032,11 @@ const (
|
||||
CommandDisable = "Debugger.disable"
|
||||
CommandEnable = "Debugger.enable"
|
||||
CommandEvaluateOnCallFrame = "Debugger.evaluateOnCallFrame"
|
||||
CommandExecuteWasmEvaluator = "Debugger.executeWasmEvaluator"
|
||||
CommandGetPossibleBreakpoints = "Debugger.getPossibleBreakpoints"
|
||||
CommandGetScriptSource = "Debugger.getScriptSource"
|
||||
CommandGetStackTrace = "Debugger.getStackTrace"
|
||||
CommandPause = "Debugger.pause"
|
||||
CommandRemoveBreakpoint = "Debugger.removeBreakpoint"
|
||||
CommandRestartFrame = "Debugger.restartFrame"
|
||||
CommandResume = "Debugger.resume"
|
||||
CommandSearchInContent = "Debugger.searchInContent"
|
||||
CommandSetAsyncCallStackDepth = "Debugger.setAsyncCallStackDepth"
|
||||
|
||||
Reference in New Issue
Block a user