#ifndef V8_DEBUG_DEBUG_INTERFACE_H_
#define V8_DEBUG_DEBUG_INTERFACE_H_
#include <memory>
#include "include/v8-callbacks.h"
#include "include/v8-date.h"
#include "include/v8-debug.h"
#include "include/v8-embedder-heap.h"
#include "include/v8-isolate.h"
#include "include/v8-local-handle.h"
#include "include/v8-memory-span.h"
#include "include/v8-promise.h"
#include "include/v8-script.h"
#include "include/v8-util.h"
#include "src/base/enum-set.h"
#include "src/base/vector.h"
#include "src/common/globals.h"
#include "src/debug/interface-types.h"
namespace v8_inspector {
class V8Inspector;
}
namespace v8 {
class Platform;
namespace internal {
struct CoverageBlock;
struct CoverageFunction;
struct CoverageScript;
class Coverage;
class DisableBreak;
class PostponeInterruptsScope;
class Script;
}
namespace debug {
void SetContextId(Local<Context> context, int id);
int GetContextId(Local<Context> context);
void SetInspector(Isolate* isolate, v8_inspector::V8Inspector*);
v8_inspector::V8Inspector* GetInspector(Isolate* isolate);
Local<String> GetBigIntStringValue(Isolate* isolate, Local<BigInt> bigint);
Local<String> GetBigIntDescription(Isolate* isolate, Local<BigInt> bigint);
Local<String> GetDateDescription(Local<Date> date);
Local<String> GetFunctionDescription(Local<Function> function);
V8_EXPORT_PRIVATE void SetBreakOnNextFunctionCall(Isolate* isolate);
V8_EXPORT_PRIVATE void ClearBreakOnNextFunctionCall(Isolate* isolate);
MaybeLocal<Array> GetInternalProperties(Isolate* isolate, Local<Value> value);
enum class PrivateMemberFilter { … };
V8_EXPORT_PRIVATE bool GetPrivateMembers(Local<Context> context,
Local<Object> value, int filter,
LocalVector<Value>* names_out,
LocalVector<Value>* values_out);
MaybeLocal<Context> GetCreationContext(Local<Object> value);
enum ExceptionBreakState { … };
void ChangeBreakOnException(Isolate* isolate, ExceptionBreakState state);
void RemoveBreakpoint(Isolate* isolate, BreakpointId id);
void SetBreakPointsActive(Isolate* isolate, bool is_active);
enum StepAction { … };
enum class BreakReason : uint8_t { … };
BreakReasons;
void PrepareStep(Isolate* isolate, StepAction action);
bool PrepareRestartFrame(Isolate* isolate, int callFrameOrdinal);
void ClearStepping(Isolate* isolate);
V8_EXPORT_PRIVATE void BreakRightNow(
Isolate* isolate, base::EnumSet<BreakReason> break_reason = { … };
V8_EXPORT_PRIVATE void SetTerminateOnResume(Isolate* isolate);
bool CanBreakProgram(Isolate* isolate);
class Script;
struct LiveEditResult { … };
class V8_EXPORT_PRIVATE ScriptSource { … };
class V8_EXPORT_PRIVATE Script { … };
class DisassemblyCollector { … };
#if V8_ENABLE_WEBASSEMBLY
class WasmScript : public Script { … };
void Disassemble(base::Vector<const uint8_t> wire_bytes,
DisassemblyCollector* collector,
std::vector<int>* function_body_offsets);
#endif
V8_EXPORT_PRIVATE void GetLoadedScripts(
Isolate* isolate, std::vector<v8::Global<Script>>& scripts);
MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
Local<String> source);
enum ExceptionType { … };
class DebugDelegate { … };
V8_EXPORT_PRIVATE void SetDebugDelegate(Isolate* isolate,
DebugDelegate* listener);
#if V8_ENABLE_WEBASSEMBLY
V8_EXPORT_PRIVATE void EnterDebuggingForIsolate(Isolate* isolate);
V8_EXPORT_PRIVATE void LeaveDebuggingForIsolate(Isolate* isolate);
#endif
class AsyncEventDelegate { … };
V8_EXPORT_PRIVATE void SetAsyncEventDelegate(Isolate* isolate,
AsyncEventDelegate* delegate);
void ResetBlackboxedStateCache(Isolate* isolate,
v8::Local<debug::Script> script);
int EstimatedValueSize(Isolate* isolate, v8::Local<v8::Value> value);
enum Builtin { … };
Local<Function> GetBuiltin(Isolate* isolate, Builtin builtin);
V8_EXPORT_PRIVATE void SetConsoleDelegate(Isolate* isolate,
ConsoleDelegate* delegate);
V8_EXPORT_PRIVATE v8::Local<v8::Message> CreateMessageFromException(
Isolate* isolate, v8::Local<v8::Value> error);
class GeneratorObject { … };
class V8_EXPORT_PRIVATE Coverage { … };
class V8_EXPORT_PRIVATE ScopeIterator { … };
class V8_EXPORT_PRIVATE StackTraceIterator { … };
void GlobalLexicalScopeNames(v8::Local<v8::Context> context,
std::vector<v8::Global<v8::String>>* names);
void SetReturnValue(v8::Isolate* isolate, v8::Local<v8::Value> value);
enum class NativeAccessorType { … };
int64_t GetNextRandomInt64(v8::Isolate* isolate);
MaybeLocal<Value> CallFunctionOn(Local<Context> context,
Local<Function> function, Local<Value> recv,
int argc, Global<Value> argv[],
bool throw_on_side_effect);
enum class EvaluateGlobalMode { … };
V8_EXPORT_PRIVATE v8::MaybeLocal<v8::Value> EvaluateGlobal(
v8::Isolate* isolate, v8::Local<v8::String> source, EvaluateGlobalMode mode,
bool repl_mode = false);
int GetDebuggingId(v8::Local<v8::Function> function);
V8_EXPORT_PRIVATE bool SetFunctionBreakpoint(v8::Local<v8::Function> function,
v8::Local<v8::String> condition,
BreakpointId* id);
v8::Platform* GetCurrentPlatform();
void ForceGarbageCollection(v8::Isolate* isolate,
v8::StackState embedder_stack_state);
class V8_NODISCARD PostponeInterruptsScope { … };
class V8_NODISCARD DisableBreakScope { … };
class EphemeronTable : public v8::Object { … };
class V8_EXPORT_PRIVATE AccessorPair : public v8::Value { … };
struct PropertyDescriptor { … };
class V8_EXPORT_PRIVATE PropertyIterator { … };
#if V8_ENABLE_WEBASSEMBLY
class V8_EXPORT_PRIVATE WasmValueObject : public v8::Object { … };
#endif
AccessorPair* AccessorPair::Cast(v8::Value* value) { … }
MaybeLocal<Message> GetMessageFromPromise(Local<Promise> promise);
void RecordAsyncStackTaggingCreateTaskCall(v8::Isolate* isolate);
void NotifyDebuggerPausedEventSent(v8::Isolate* isolate);
}
}
#endif