diff options
Diffstat (limited to 'deps/v8/src/debug/debug-interface.h')
-rw-r--r-- | deps/v8/src/debug/debug-interface.h | 48 |
1 files changed, 31 insertions, 17 deletions
diff --git a/deps/v8/src/debug/debug-interface.h b/deps/v8/src/debug/debug-interface.h index 3d9f7c5c9f..95d6a8177b 100644 --- a/deps/v8/src/debug/debug-interface.h +++ b/deps/v8/src/debug/debug-interface.h @@ -75,19 +75,25 @@ V8_EXPORT_PRIVATE void ClearBreakOnNextFunctionCall(Isolate* isolate); */ MaybeLocal<Array> GetInternalProperties(Isolate* isolate, Local<Value> value); +enum class PrivateMemberFilter { + kPrivateMethods = 1, + kPrivateFields = 1 << 1, + kPrivateAccessors = 1 << 2, +}; + /** + * Retrieve both instance and static private members on an object. + * filter should be a combination of PrivateMemberFilter. * Returns through the out parameters names_out a vector of names - * in v8::String for private members, including fields, methods, - * accessors specific to the value type. - * The values are returned through the out parameter values_out in the - * corresponding indices. Private fields and methods are returned directly - * while accessors are returned as v8::debug::AccessorPair. Missing components - * in the accessor pairs are null. + * in v8::String and through values_out the corresponding values. + * Private fields and methods are returned directly while accessors are + * returned as v8::debug::AccessorPair. Missing components in the accessor + * pairs are null. * If an exception occurs, false is returned. Otherwise true is returned. * Results will be allocated in the current context and handle scope. */ V8_EXPORT_PRIVATE bool GetPrivateMembers(Local<Context> context, - Local<Object> value, + Local<Object> value, int filter, std::vector<Local<Value>>* names_out, std::vector<Local<Value>>* values_out); @@ -158,7 +164,8 @@ struct LiveEditResult { OK, COMPILE_ERROR, BLOCKED_BY_RUNNING_GENERATOR, - BLOCKED_BY_ACTIVE_FUNCTION + BLOCKED_BY_ACTIVE_FUNCTION, + BLOCKED_BY_TOP_LEVEL_ES_MODULE_CHANGE, }; Status status = OK; bool stack_changed = false; @@ -287,14 +294,15 @@ class DebugDelegate { v8::Local<v8::Context> paused_context, const std::vector<debug::BreakpointId>& inspector_break_points_hit, base::EnumSet<BreakReason> break_reasons = {}) {} - enum PauseAfterInstrumentation { - kPauseAfterInstrumentationRequested, - kNoPauseAfterInstrumentationRequested + enum class ActionAfterInstrumentation { + kPause, + kPauseIfBreakpointsHit, + kContinue }; - virtual PauseAfterInstrumentation BreakOnInstrumentation( + virtual ActionAfterInstrumentation BreakOnInstrumentation( v8::Local<v8::Context> paused_context, const debug::BreakpointId instrumentationId) { - return kNoPauseAfterInstrumentationRequested; + return ActionAfterInstrumentation::kPauseIfBreakpointsHit; } virtual void ExceptionThrown(v8::Local<v8::Context> paused_context, v8::Local<v8::Value> exception, @@ -309,14 +317,21 @@ class DebugDelegate { int column) { return false; } + + // Called every time a breakpoint condition is evaluated. This method is + // called before `BreakProgramRequested` if the condition is truthy. + virtual void BreakpointConditionEvaluated(v8::Local<v8::Context> context, + debug::BreakpointId breakpoint_id, + bool exception_thrown, + v8::Local<v8::Value> exception) {} }; V8_EXPORT_PRIVATE void SetDebugDelegate(Isolate* isolate, DebugDelegate* listener); #if V8_ENABLE_WEBASSEMBLY -V8_EXPORT_PRIVATE void TierDownAllModulesPerIsolate(Isolate* isolate); -V8_EXPORT_PRIVATE void TierUpAllModulesPerIsolate(Isolate* isolate); +V8_EXPORT_PRIVATE void EnterDebuggingForIsolate(Isolate* isolate); +V8_EXPORT_PRIVATE void LeaveDebuggingForIsolate(Isolate* isolate); #endif // V8_ENABLE_WEBASSEMBLY class AsyncEventDelegate { @@ -499,6 +514,7 @@ class V8_EXPORT_PRIVATE StackTraceIterator { virtual v8::Local<v8::String> GetFunctionDebugName() const = 0; virtual v8::Local<v8::debug::Script> GetScript() const = 0; virtual debug::Location GetSourceLocation() const = 0; + virtual debug::Location GetFunctionLocation() const = 0; virtual v8::Local<v8::Function> GetFunction() const = 0; virtual std::unique_ptr<ScopeIterator> GetScopeIterator() const = 0; virtual bool CanBeRestarted() const = 0; @@ -678,8 +694,6 @@ AccessorPair* AccessorPair::Cast(v8::Value* value) { MaybeLocal<Message> GetMessageFromPromise(Local<Promise> promise); -bool isExperimentalRemoveInternalScopesPropertyEnabled(); - void RecordAsyncStackTaggingCreateTaskCall(v8::Isolate* isolate); void NotifyDebuggerPausedEventSent(v8::Isolate* isolate); |