Revert "[build] Separate out inspector as a shared library"
This reverts commit 92bfb63cac
.
Reason for revert: Broke build https://ci.chromium.org/ui/p/v8/builders/ci/V8%20Linux%20-%20shared/43249/overview
Original change's description:
> [build] Separate out inspector as a shared library
>
> This makes src/inspector:inspector into a v8_component producing a
> shared library in component builds. To enable this, all of its exported
> are now marked with V8_INSPECTOR_EXPORT.
>
> This also inverts the dependency between src/inspector:inspector and
> :v8_base_without_compiler, and instead makes d8 and some tests depend on
> inspector rather than getting it via v8.
>
> As a result, the no_check_targets exclusions list in .gn is reduced.
>
> Ultimately embedders like chromium should depend on :v8 and optionally
> src/inspector:inspector, but to allow that transition to occur, this
> renames :v8 to :v8_lib and introduces a new :v8 which depends on v8 and
> inspector. Once all embedders have changed to reflect the new structure,
> this part can be reverted.
>
> Bug: v8:11917
> Change-Id: Ia8b15f07fb15acc5e1f111b1a80248def4285fd0
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2999088
> Reviewed-by: Clemens Backes <clemensb@chromium.org>
> Reviewed-by: Michael Achenbach <machenbach@chromium.org>
> Reviewed-by: Yang Guo <yangguo@chromium.org>
> Commit-Queue: Dan Elphick <delphick@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#75532}
Bug: v8:11917
Change-Id: I0ed27ed95211d13b8b3438a8c0a42d577806c475
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3003452
Auto-Submit: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/master@{#75533}
This commit is contained in:
parent
92bfb63cac
commit
50fb0a2fa6
2
.gn
2
.gn
@ -18,6 +18,8 @@ script_executable = "python3"
|
|||||||
no_check_targets = [
|
no_check_targets = [
|
||||||
"//:cppgc_base",
|
"//:cppgc_base",
|
||||||
"//:v8_internal_headers",
|
"//:v8_internal_headers",
|
||||||
|
"//src/inspector:inspector",
|
||||||
|
"//test/cctest:cctest_sources",
|
||||||
"//third_party/icu:*",
|
"//third_party/icu:*",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -716,6 +716,8 @@ filegroup(
|
|||||||
":generated_bytecode_builtins_list",
|
":generated_bytecode_builtins_list",
|
||||||
"base/trace_event/common/trace_event_common.h",
|
"base/trace_event/common/trace_event_common.h",
|
||||||
"include/cppgc/common.h",
|
"include/cppgc/common.h",
|
||||||
|
"include/v8-inspector-protocol.h",
|
||||||
|
"include/v8-inspector.h",
|
||||||
"include/v8-metrics.h",
|
"include/v8-metrics.h",
|
||||||
"include/v8-unwinder-state.h",
|
"include/v8-unwinder-state.h",
|
||||||
"include/v8-wasm-trap-handler-posix.h",
|
"include/v8-wasm-trap-handler-posix.h",
|
||||||
@ -2539,8 +2541,6 @@ filegroup(
|
|||||||
filegroup(
|
filegroup(
|
||||||
name = "v8_inspector_files",
|
name = "v8_inspector_files",
|
||||||
srcs = [
|
srcs = [
|
||||||
"include/v8-inspector-protocol.h",
|
|
||||||
"include/v8-inspector.h",
|
|
||||||
"src/inspector/custom-preview.cc",
|
"src/inspector/custom-preview.cc",
|
||||||
"src/inspector/custom-preview.h",
|
"src/inspector/custom-preview.h",
|
||||||
"src/inspector/injected-script.cc",
|
"src/inspector/injected-script.cc",
|
||||||
|
32
BUILD.gn
32
BUILD.gn
@ -2385,6 +2385,8 @@ v8_header_set("v8_internal_headers") {
|
|||||||
"$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
|
"$target_gen_dir/builtins-generated/bytecodes-builtins-list.h",
|
||||||
"//base/trace_event/common/trace_event_common.h",
|
"//base/trace_event/common/trace_event_common.h",
|
||||||
"include/cppgc/common.h",
|
"include/cppgc/common.h",
|
||||||
|
"include/v8-inspector-protocol.h",
|
||||||
|
"include/v8-inspector.h",
|
||||||
"include/v8-metrics.h",
|
"include/v8-metrics.h",
|
||||||
"include/v8-unwinder-state.h",
|
"include/v8-unwinder-state.h",
|
||||||
"include/v8-wasm-trap-handler-posix.h",
|
"include/v8-wasm-trap-handler-posix.h",
|
||||||
@ -4403,6 +4405,7 @@ v8_source_set("v8_base_without_compiler") {
|
|||||||
":v8_shared_internal_headers",
|
":v8_shared_internal_headers",
|
||||||
":v8_tracing",
|
":v8_tracing",
|
||||||
":v8_version",
|
":v8_version",
|
||||||
|
"src/inspector:inspector",
|
||||||
]
|
]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
@ -5199,13 +5202,7 @@ if (v8_check_header_includes) {
|
|||||||
# if the "check_v8_header_includes" gclient variable is set.
|
# if the "check_v8_header_includes" gclient variable is set.
|
||||||
import("check-header-includes/sources.gni")
|
import("check-header-includes/sources.gni")
|
||||||
v8_source_set("check_headers") {
|
v8_source_set("check_headers") {
|
||||||
# Doesn't include internal_config as that would bring in the
|
configs = [ ":internal_config" ]
|
||||||
# BUILDING_V8_SHARED defines which breaks builds due to the dependency on
|
|
||||||
# inspector which brings in the USING_V8_SHARED define.
|
|
||||||
configs = [
|
|
||||||
":internal_config_base",
|
|
||||||
":v8_header_features",
|
|
||||||
]
|
|
||||||
sources = check_header_includes_sources
|
sources = check_header_includes_sources
|
||||||
|
|
||||||
# Any rules that contain headers files should be added here either directly
|
# Any rules that contain headers files should be added here either directly
|
||||||
@ -5562,20 +5559,9 @@ group("v8_fuzzers") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_component_build) {
|
if (is_component_build) {
|
||||||
# TODO(v8:11917) Remove this redirect to v8_lib (and rename that to v8), when
|
|
||||||
# chromium depends on inspector directly.
|
|
||||||
v8_component("v8") {
|
v8_component("v8") {
|
||||||
sources = [ "src/utils/v8dll-main.cc" ]
|
sources = [ "src/utils/v8dll-main.cc" ]
|
||||||
|
|
||||||
public_deps = [
|
|
||||||
":v8_lib",
|
|
||||||
"src/inspector:inspector",
|
|
||||||
]
|
|
||||||
configs = []
|
|
||||||
public_configs = [ ":external_config" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
v8_component("v8_lib") {
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":v8_base",
|
":v8_base",
|
||||||
":v8_snapshot",
|
":v8_snapshot",
|
||||||
@ -5640,16 +5626,7 @@ if (is_component_build) {
|
|||||||
public_configs = [ ":external_config" ]
|
public_configs = [ ":external_config" ]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
# TODO(v8:11917) Remove this redirect to v8_lib (and rename that to v8), when
|
|
||||||
# chromium depends on inspector directly.
|
|
||||||
group("v8") {
|
group("v8") {
|
||||||
public_deps = [
|
|
||||||
":v8_lib",
|
|
||||||
"src/inspector:inspector",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
group("v8_lib") {
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
":v8_base",
|
":v8_base",
|
||||||
":v8_snapshot",
|
":v8_snapshot",
|
||||||
@ -5739,7 +5716,6 @@ v8_executable("d8") {
|
|||||||
":v8_libbase",
|
":v8_libbase",
|
||||||
":v8_libplatform",
|
":v8_libplatform",
|
||||||
":v8_tracing",
|
":v8_tracing",
|
||||||
"src/inspector:inspector",
|
|
||||||
"//build/win:default_exe_manifest",
|
"//build/win:default_exe_manifest",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class Domain;
|
|||||||
}
|
}
|
||||||
} // namespace protocol
|
} // namespace protocol
|
||||||
|
|
||||||
class V8_INSPECTOR_EXPORT StringView {
|
class V8_EXPORT StringView {
|
||||||
public:
|
public:
|
||||||
StringView() : m_is8Bit(true), m_length(0), m_characters8(nullptr) {}
|
StringView() : m_is8Bit(true), m_length(0), m_characters8(nullptr) {}
|
||||||
|
|
||||||
@ -62,7 +62,7 @@ class V8_INSPECTOR_EXPORT StringView {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_INSPECTOR_EXPORT StringBuffer {
|
class V8_EXPORT StringBuffer {
|
||||||
public:
|
public:
|
||||||
virtual ~StringBuffer() = default;
|
virtual ~StringBuffer() = default;
|
||||||
virtual StringView string() const = 0;
|
virtual StringView string() const = 0;
|
||||||
@ -70,7 +70,7 @@ class V8_INSPECTOR_EXPORT StringBuffer {
|
|||||||
static std::unique_ptr<StringBuffer> create(StringView);
|
static std::unique_ptr<StringBuffer> create(StringView);
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_INSPECTOR_EXPORT V8ContextInfo {
|
class V8_EXPORT V8ContextInfo {
|
||||||
public:
|
public:
|
||||||
V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId,
|
V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId,
|
||||||
StringView humanReadableName)
|
StringView humanReadableName)
|
||||||
@ -98,7 +98,7 @@ class V8_INSPECTOR_EXPORT V8ContextInfo {
|
|||||||
V8ContextInfo& operator=(const V8ContextInfo&) = delete;
|
V8ContextInfo& operator=(const V8ContextInfo&) = delete;
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_INSPECTOR_EXPORT V8StackTrace {
|
class V8_EXPORT V8StackTrace {
|
||||||
public:
|
public:
|
||||||
virtual StringView firstNonEmptySourceURL() const = 0;
|
virtual StringView firstNonEmptySourceURL() const = 0;
|
||||||
virtual bool isEmpty() const = 0;
|
virtual bool isEmpty() const = 0;
|
||||||
@ -121,17 +121,17 @@ class V8_INSPECTOR_EXPORT V8StackTrace {
|
|||||||
virtual std::unique_ptr<V8StackTrace> clone() = 0;
|
virtual std::unique_ptr<V8StackTrace> clone() = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_INSPECTOR_EXPORT V8InspectorSession {
|
class V8_EXPORT V8InspectorSession {
|
||||||
public:
|
public:
|
||||||
virtual ~V8InspectorSession() = default;
|
virtual ~V8InspectorSession() = default;
|
||||||
|
|
||||||
// Cross-context inspectable values (DOM nodes in different worlds, etc.).
|
// Cross-context inspectable values (DOM nodes in different worlds, etc.).
|
||||||
class V8_INSPECTOR_EXPORT Inspectable {
|
class V8_EXPORT Inspectable {
|
||||||
public:
|
public:
|
||||||
virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0;
|
virtual v8::Local<v8::Value> get(v8::Local<v8::Context>) = 0;
|
||||||
virtual ~Inspectable() = default;
|
virtual ~Inspectable() = default;
|
||||||
};
|
};
|
||||||
class V8_INSPECTOR_EXPORT CommandLineAPIScope {
|
class V8_EXPORT CommandLineAPIScope {
|
||||||
public:
|
public:
|
||||||
virtual ~CommandLineAPIScope() = default;
|
virtual ~CommandLineAPIScope() = default;
|
||||||
};
|
};
|
||||||
@ -173,7 +173,7 @@ class V8_INSPECTOR_EXPORT V8InspectorSession {
|
|||||||
virtual void triggerPreciseCoverageDeltaUpdate(StringView occasion) = 0;
|
virtual void triggerPreciseCoverageDeltaUpdate(StringView occasion) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_INSPECTOR_EXPORT V8InspectorClient {
|
class V8_EXPORT V8InspectorClient {
|
||||||
public:
|
public:
|
||||||
virtual ~V8InspectorClient() = default;
|
virtual ~V8InspectorClient() = default;
|
||||||
|
|
||||||
@ -246,7 +246,7 @@ class V8_INSPECTOR_EXPORT V8InspectorClient {
|
|||||||
// These stack trace ids are intended to be passed between debuggers and be
|
// These stack trace ids are intended to be passed between debuggers and be
|
||||||
// resolved later. This allows to track cross-debugger calls and step between
|
// resolved later. This allows to track cross-debugger calls and step between
|
||||||
// them if a single client connects to multiple debuggers.
|
// them if a single client connects to multiple debuggers.
|
||||||
struct V8_INSPECTOR_EXPORT V8StackTraceId {
|
struct V8_EXPORT V8StackTraceId {
|
||||||
uintptr_t id;
|
uintptr_t id;
|
||||||
std::pair<int64_t, int64_t> debugger_id;
|
std::pair<int64_t, int64_t> debugger_id;
|
||||||
bool should_pause = false;
|
bool should_pause = false;
|
||||||
@ -265,7 +265,7 @@ struct V8_INSPECTOR_EXPORT V8StackTraceId {
|
|||||||
std::unique_ptr<StringBuffer> ToString();
|
std::unique_ptr<StringBuffer> ToString();
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_INSPECTOR_EXPORT V8Inspector {
|
class V8_EXPORT V8Inspector {
|
||||||
public:
|
public:
|
||||||
static std::unique_ptr<V8Inspector> create(v8::Isolate*, V8InspectorClient*);
|
static std::unique_ptr<V8Inspector> create(v8::Isolate*, V8InspectorClient*);
|
||||||
virtual ~V8Inspector() = default;
|
virtual ~V8Inspector() = default;
|
||||||
@ -307,7 +307,7 @@ class V8_INSPECTOR_EXPORT V8Inspector {
|
|||||||
v8::Local<v8::Value> value) = 0;
|
v8::Local<v8::Value> value) = 0;
|
||||||
|
|
||||||
// Connection.
|
// Connection.
|
||||||
class V8_INSPECTOR_EXPORT Channel {
|
class V8_EXPORT Channel {
|
||||||
public:
|
public:
|
||||||
virtual ~Channel() = default;
|
virtual ~Channel() = default;
|
||||||
virtual void sendResponse(int callId,
|
virtual void sendResponse(int callId,
|
||||||
@ -325,8 +325,7 @@ class V8_INSPECTOR_EXPORT V8Inspector {
|
|||||||
virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0;
|
virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0;
|
||||||
|
|
||||||
// Performance counters.
|
// Performance counters.
|
||||||
class V8_INSPECTOR_EXPORT Counters
|
class V8_EXPORT Counters : public std::enable_shared_from_this<Counters> {
|
||||||
: public std::enable_shared_from_this<Counters> {
|
|
||||||
public:
|
public:
|
||||||
explicit Counters(v8::Isolate* isolate);
|
explicit Counters(v8::Isolate* isolate);
|
||||||
~Counters();
|
~Counters();
|
||||||
|
@ -508,37 +508,6 @@ V8 shared library set USING_V8_SHARED.
|
|||||||
|
|
||||||
#endif // V8_OS_WIN
|
#endif // V8_OS_WIN
|
||||||
|
|
||||||
#ifdef V8_OS_WIN
|
|
||||||
|
|
||||||
// Setup for Windows DLL export/import. When building the V8 DLL the
|
|
||||||
// BUILDING_V8_INSPECTOR_SHARED needs to be defined. When building a program
|
|
||||||
// which uses the inspector DLL USING_V8_INSPECTOR_SHARED needs to be defined.
|
|
||||||
// When either building the V8 static library or building a program which uses
|
|
||||||
// the inspector static library neither BUILDING_V8_INSPECTOR_SHARED nor
|
|
||||||
// USING_V8_INSPECTOR_SHARED should be defined.
|
|
||||||
#ifdef BUILDING_V8_INSPECTOR_SHARED
|
|
||||||
# define V8_INSPECTOR_EXPORT __declspec(dllexport)
|
|
||||||
#elif USING_V8_INSPECTOR_SHARED
|
|
||||||
# define V8_INSPECTOR_EXPORT __declspec(dllimport)
|
|
||||||
#else
|
|
||||||
# define V8_INSPECTOR_EXPORT
|
|
||||||
#endif // BUILDING_V8_INSPECTOR_SHARED
|
|
||||||
|
|
||||||
#else // V8_OS_WIN
|
|
||||||
|
|
||||||
// Setup for Linux shared library export.
|
|
||||||
#if V8_HAS_ATTRIBUTE_VISIBILITY
|
|
||||||
# ifdef BUILDING_V8_INSPECTOR_SHARED
|
|
||||||
# define V8_INSPECTOR_EXPORT __attribute__ ((visibility("default")))
|
|
||||||
# else
|
|
||||||
# define V8_INSPECTOR_EXPORT
|
|
||||||
# endif
|
|
||||||
#else
|
|
||||||
# define V8_INSPECTOR_EXPORT
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // V8_OS_WIN
|
|
||||||
|
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
#undef V8_HAS_CPP_ATTRIBUTE
|
#undef V8_HAS_CPP_ATTRIBUTE
|
||||||
|
@ -35,23 +35,21 @@ class TypeProfile;
|
|||||||
|
|
||||||
namespace debug {
|
namespace debug {
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void SetContextId(Local<Context> context, int id);
|
void SetContextId(Local<Context> context, int id);
|
||||||
V8_EXPORT_PRIVATE int GetContextId(Local<Context> context);
|
int GetContextId(Local<Context> context);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void SetInspector(Isolate* isolate,
|
void SetInspector(Isolate* isolate, v8_inspector::V8Inspector*);
|
||||||
v8_inspector::V8Inspector*);
|
v8_inspector::V8Inspector* GetInspector(Isolate* isolate);
|
||||||
V8_EXPORT_PRIVATE v8_inspector::V8Inspector* GetInspector(Isolate* isolate);
|
|
||||||
|
|
||||||
// Returns the debug name for the function, which is supposed to be used
|
// Returns the debug name for the function, which is supposed to be used
|
||||||
// by the debugger and the developer tools. This can thus be different from
|
// by the debugger and the developer tools. This can thus be different from
|
||||||
// the name returned by the StackFrame::GetFunctionName() method. For example,
|
// the name returned by the StackFrame::GetFunctionName() method. For example,
|
||||||
// in case of WebAssembly, the debug name is WAT-compatible and thus always
|
// in case of WebAssembly, the debug name is WAT-compatible and thus always
|
||||||
// preceeded by a dollar ('$').
|
// preceeded by a dollar ('$').
|
||||||
V8_EXPORT_PRIVATE Local<String> GetFunctionDebugName(Local<StackFrame> frame);
|
Local<String> GetFunctionDebugName(Local<StackFrame> frame);
|
||||||
|
|
||||||
// Returns a debug string representation of the function.
|
// Returns a debug string representation of the function.
|
||||||
V8_EXPORT_PRIVATE Local<String> GetFunctionDescription(
|
Local<String> GetFunctionDescription(Local<Function> function);
|
||||||
Local<Function> function);
|
|
||||||
|
|
||||||
// Schedule a debugger break to happen when function is called inside given
|
// Schedule a debugger break to happen when function is called inside given
|
||||||
// isolate.
|
// isolate.
|
||||||
@ -66,8 +64,7 @@ V8_EXPORT_PRIVATE void ClearBreakOnNextFunctionCall(Isolate* isolate);
|
|||||||
* the following format: [<name>, <value>,...,<name>, <value>]. Result array
|
* the following format: [<name>, <value>,...,<name>, <value>]. Result array
|
||||||
* will be allocated in the current context.
|
* will be allocated in the current context.
|
||||||
*/
|
*/
|
||||||
V8_EXPORT_PRIVATE MaybeLocal<Array> GetInternalProperties(Isolate* isolate,
|
MaybeLocal<Array> GetInternalProperties(Isolate* isolate, Local<Value> value);
|
||||||
Local<Value> value);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns through the out parameters names_out a vector of names
|
* Returns through the out parameters names_out a vector of names
|
||||||
@ -89,7 +86,7 @@ V8_EXPORT_PRIVATE bool GetPrivateMembers(Local<Context> context,
|
|||||||
* Forwards to v8::Object::CreationContext, but with special handling for
|
* Forwards to v8::Object::CreationContext, but with special handling for
|
||||||
* JSGlobalProxy objects.
|
* JSGlobalProxy objects.
|
||||||
*/
|
*/
|
||||||
V8_EXPORT_PRIVATE MaybeLocal<Context> GetCreationContext(Local<Object> value);
|
MaybeLocal<Context> GetCreationContext(Local<Object> value);
|
||||||
|
|
||||||
enum ExceptionBreakState {
|
enum ExceptionBreakState {
|
||||||
NoBreakOnException = 0,
|
NoBreakOnException = 0,
|
||||||
@ -103,11 +100,10 @@ enum ExceptionBreakState {
|
|||||||
* exception, if BreakOnUncaughtException is set then VM will pause only on
|
* exception, if BreakOnUncaughtException is set then VM will pause only on
|
||||||
* uncaught exception, otherwise VM won't stop on any exception.
|
* uncaught exception, otherwise VM won't stop on any exception.
|
||||||
*/
|
*/
|
||||||
V8_EXPORT_PRIVATE void ChangeBreakOnException(Isolate* isolate,
|
void ChangeBreakOnException(Isolate* isolate, ExceptionBreakState state);
|
||||||
ExceptionBreakState state);
|
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void RemoveBreakpoint(Isolate* isolate, BreakpointId id);
|
void RemoveBreakpoint(Isolate* isolate, BreakpointId id);
|
||||||
V8_EXPORT_PRIVATE void SetBreakPointsActive(Isolate* isolate, bool is_active);
|
void SetBreakPointsActive(Isolate* isolate, bool is_active);
|
||||||
|
|
||||||
enum StepAction {
|
enum StepAction {
|
||||||
StepOut = 0, // Step out of the current function.
|
StepOut = 0, // Step out of the current function.
|
||||||
@ -116,8 +112,8 @@ enum StepAction {
|
|||||||
// in the current function.
|
// in the current function.
|
||||||
};
|
};
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void PrepareStep(Isolate* isolate, StepAction action);
|
void PrepareStep(Isolate* isolate, StepAction action);
|
||||||
V8_EXPORT_PRIVATE void ClearStepping(Isolate* isolate);
|
void ClearStepping(Isolate* isolate);
|
||||||
V8_EXPORT_PRIVATE void BreakRightNow(Isolate* isolate);
|
V8_EXPORT_PRIVATE void BreakRightNow(Isolate* isolate);
|
||||||
|
|
||||||
// Use `SetTerminateOnResume` to indicate that an TerminateExecution interrupt
|
// Use `SetTerminateOnResume` to indicate that an TerminateExecution interrupt
|
||||||
@ -127,7 +123,7 @@ V8_EXPORT_PRIVATE void BreakRightNow(Isolate* isolate);
|
|||||||
// the isolate to be entered for further JavaScript execution.
|
// the isolate to be entered for further JavaScript execution.
|
||||||
V8_EXPORT_PRIVATE void SetTerminateOnResume(Isolate* isolate);
|
V8_EXPORT_PRIVATE void SetTerminateOnResume(Isolate* isolate);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE bool CanBreakProgram(Isolate* isolate);
|
bool CanBreakProgram(Isolate* isolate);
|
||||||
|
|
||||||
class Script;
|
class Script;
|
||||||
|
|
||||||
@ -187,7 +183,7 @@ class V8_EXPORT_PRIVATE Script {
|
|||||||
|
|
||||||
#if V8_ENABLE_WEBASSEMBLY
|
#if V8_ENABLE_WEBASSEMBLY
|
||||||
// Specialization for wasm Scripts.
|
// Specialization for wasm Scripts.
|
||||||
class V8_EXPORT_PRIVATE WasmScript : public Script {
|
class WasmScript : public Script {
|
||||||
public:
|
public:
|
||||||
static WasmScript* Cast(Script* script);
|
static WasmScript* Cast(Script* script);
|
||||||
|
|
||||||
@ -211,8 +207,8 @@ class V8_EXPORT_PRIVATE WasmScript : public Script {
|
|||||||
V8_EXPORT_PRIVATE void GetLoadedScripts(Isolate* isolate,
|
V8_EXPORT_PRIVATE void GetLoadedScripts(Isolate* isolate,
|
||||||
PersistentValueVector<Script>& scripts);
|
PersistentValueVector<Script>& scripts);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE MaybeLocal<UnboundScript> CompileInspectorScript(
|
MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
|
||||||
Isolate* isolate, Local<String> source);
|
Local<String> source);
|
||||||
|
|
||||||
enum ExceptionType { kException, kPromiseRejection };
|
enum ExceptionType { kException, kPromiseRejection };
|
||||||
|
|
||||||
@ -256,18 +252,16 @@ class AsyncEventDelegate {
|
|||||||
bool is_blackboxed) = 0;
|
bool is_blackboxed) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void SetAsyncEventDelegate(Isolate* isolate,
|
void SetAsyncEventDelegate(Isolate* isolate, AsyncEventDelegate* delegate);
|
||||||
AsyncEventDelegate* delegate);
|
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void ResetBlackboxedStateCache(
|
void ResetBlackboxedStateCache(Isolate* isolate,
|
||||||
Isolate* isolate, v8::Local<debug::Script> script);
|
v8::Local<debug::Script> script);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE int EstimatedValueSize(Isolate* isolate,
|
int EstimatedValueSize(Isolate* isolate, v8::Local<v8::Value> value);
|
||||||
v8::Local<v8::Value> value);
|
|
||||||
|
|
||||||
enum Builtin { kStringToLowerCase };
|
enum Builtin { kStringToLowerCase };
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE Local<Function> GetBuiltin(Isolate* isolate, Builtin builtin);
|
Local<Function> GetBuiltin(Isolate* isolate, Builtin builtin);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void SetConsoleDelegate(Isolate* isolate,
|
V8_EXPORT_PRIVATE void SetConsoleDelegate(Isolate* isolate,
|
||||||
ConsoleDelegate* delegate);
|
ConsoleDelegate* delegate);
|
||||||
@ -275,13 +269,13 @@ V8_EXPORT_PRIVATE void SetConsoleDelegate(Isolate* isolate,
|
|||||||
V8_DEPRECATED("See http://crbug.com/v8/10566.")
|
V8_DEPRECATED("See http://crbug.com/v8/10566.")
|
||||||
int GetStackFrameId(v8::Local<v8::StackFrame> frame);
|
int GetStackFrameId(v8::Local<v8::StackFrame> frame);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE v8::Local<v8::StackTrace> GetDetailedStackTrace(
|
v8::Local<v8::StackTrace> GetDetailedStackTrace(Isolate* isolate,
|
||||||
Isolate* isolate, v8::Local<v8::Object> error);
|
v8::Local<v8::Object> error);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Native wrapper around v8::internal::JSGeneratorObject object.
|
* Native wrapper around v8::internal::JSGeneratorObject object.
|
||||||
*/
|
*/
|
||||||
class V8_EXPORT_PRIVATE GeneratorObject {
|
class GeneratorObject {
|
||||||
public:
|
public:
|
||||||
v8::MaybeLocal<debug::Script> Script();
|
v8::MaybeLocal<debug::Script> Script();
|
||||||
v8::Local<v8::Function> Function();
|
v8::Local<v8::Function> Function();
|
||||||
@ -504,16 +498,14 @@ class QueryObjectPredicate {
|
|||||||
virtual bool Filter(v8::Local<v8::Object> object) = 0;
|
virtual bool Filter(v8::Local<v8::Object> object) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void QueryObjects(
|
void QueryObjects(v8::Local<v8::Context> context,
|
||||||
v8::Local<v8::Context> context, QueryObjectPredicate* predicate,
|
QueryObjectPredicate* predicate,
|
||||||
v8::PersistentValueVector<v8::Object>* objects);
|
v8::PersistentValueVector<v8::Object>* objects);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void GlobalLexicalScopeNames(
|
void GlobalLexicalScopeNames(v8::Local<v8::Context> context,
|
||||||
v8::Local<v8::Context> context,
|
|
||||||
v8::PersistentValueVector<v8::String>* names);
|
v8::PersistentValueVector<v8::String>* names);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void SetReturnValue(v8::Isolate* isolate,
|
void SetReturnValue(v8::Isolate* isolate, v8::Local<v8::Value> value);
|
||||||
v8::Local<v8::Value> value);
|
|
||||||
|
|
||||||
enum class NativeAccessorType {
|
enum class NativeAccessorType {
|
||||||
None = 0,
|
None = 0,
|
||||||
@ -521,12 +513,12 @@ enum class NativeAccessorType {
|
|||||||
HasSetter = 1 << 1
|
HasSetter = 1 << 1
|
||||||
};
|
};
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE int64_t GetNextRandomInt64(v8::Isolate* isolate);
|
int64_t GetNextRandomInt64(v8::Isolate* isolate);
|
||||||
|
|
||||||
using RuntimeCallCounterCallback =
|
using RuntimeCallCounterCallback =
|
||||||
std::function<void(const char* name, int64_t count, base::TimeDelta time)>;
|
std::function<void(const char* name, int64_t count, base::TimeDelta time)>;
|
||||||
V8_EXPORT_PRIVATE void EnumerateRuntimeCallCounters(
|
void EnumerateRuntimeCallCounters(v8::Isolate* isolate,
|
||||||
v8::Isolate* isolate, RuntimeCallCounterCallback callback);
|
RuntimeCallCounterCallback callback);
|
||||||
|
|
||||||
enum class EvaluateGlobalMode {
|
enum class EvaluateGlobalMode {
|
||||||
kDefault,
|
kDefault,
|
||||||
@ -542,15 +534,14 @@ V8_EXPORT_PRIVATE v8::MaybeLocal<v8::Value> EvaluateGlobalForTesting(
|
|||||||
v8::Isolate* isolate, v8::Local<v8::Script> function,
|
v8::Isolate* isolate, v8::Local<v8::Script> function,
|
||||||
v8::debug::EvaluateGlobalMode mode, bool repl);
|
v8::debug::EvaluateGlobalMode mode, bool repl);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE int GetDebuggingId(v8::Local<v8::Function> function);
|
int GetDebuggingId(v8::Local<v8::Function> function);
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE bool SetFunctionBreakpoint(v8::Local<v8::Function> function,
|
bool SetFunctionBreakpoint(v8::Local<v8::Function> function,
|
||||||
v8::Local<v8::String> condition,
|
v8::Local<v8::String> condition, BreakpointId* id);
|
||||||
BreakpointId* id);
|
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE v8::Platform* GetCurrentPlatform();
|
v8::Platform* GetCurrentPlatform();
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE void ForceGarbageCollection(
|
void ForceGarbageCollection(
|
||||||
v8::Isolate* isolate,
|
v8::Isolate* isolate,
|
||||||
v8::EmbedderHeapTracer::EmbedderStackState embedder_stack_state);
|
v8::EmbedderHeapTracer::EmbedderStackState embedder_stack_state);
|
||||||
|
|
||||||
@ -563,7 +554,7 @@ class V8_NODISCARD PostponeInterruptsScope {
|
|||||||
std::unique_ptr<i::PostponeInterruptsScope> scope_;
|
std::unique_ptr<i::PostponeInterruptsScope> scope_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_EXPORT_PRIVATE V8_NODISCARD DisableBreakScope {
|
class V8_NODISCARD DisableBreakScope {
|
||||||
public:
|
public:
|
||||||
explicit DisableBreakScope(v8::Isolate* isolate);
|
explicit DisableBreakScope(v8::Isolate* isolate);
|
||||||
~DisableBreakScope();
|
~DisableBreakScope();
|
||||||
@ -618,7 +609,7 @@ struct PropertyDescriptor {
|
|||||||
v8::Local<v8::Value> set;
|
v8::Local<v8::Value> set;
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_EXPORT_PRIVATE PropertyIterator {
|
class PropertyIterator {
|
||||||
public:
|
public:
|
||||||
// Creating a PropertyIterator can potentially throw an exception.
|
// Creating a PropertyIterator can potentially throw an exception.
|
||||||
// The returned std::unique_ptr is empty iff that happens.
|
// The returned std::unique_ptr is empty iff that happens.
|
||||||
@ -670,8 +661,7 @@ AccessorPair* AccessorPair::Cast(v8::Value* value) {
|
|||||||
return static_cast<AccessorPair*>(value);
|
return static_cast<AccessorPair*>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
V8_EXPORT_PRIVATE MaybeLocal<Message> GetMessageFromPromise(
|
MaybeLocal<Message> GetMessageFromPromise(Local<Promise> promise);
|
||||||
Local<Promise> promise);
|
|
||||||
|
|
||||||
} // namespace debug
|
} // namespace debug
|
||||||
} // namespace v8
|
} // namespace v8
|
||||||
|
@ -94,8 +94,7 @@ class V8_EXPORT_PRIVATE BreakLocation : public Location {
|
|||||||
BreakLocationType type_;
|
BreakLocationType type_;
|
||||||
};
|
};
|
||||||
|
|
||||||
class V8_EXPORT_PRIVATE ConsoleCallArguments
|
class ConsoleCallArguments : private v8::FunctionCallbackInfo<v8::Value> {
|
||||||
: private v8::FunctionCallbackInfo<v8::Value> {
|
|
||||||
public:
|
public:
|
||||||
int Length() const { return v8::FunctionCallbackInfo<v8::Value>::Length(); }
|
int Length() const { return v8::FunctionCallbackInfo<v8::Value>::Length(); }
|
||||||
V8_INLINE Local<Value> operator[](int i) const {
|
V8_INLINE Local<Value> operator[](int i) const {
|
||||||
|
@ -55,18 +55,19 @@ inspector_protocol_generate("protocol_generated_sources") {
|
|||||||
outputs = _protocol_generated
|
outputs = _protocol_generated
|
||||||
}
|
}
|
||||||
|
|
||||||
config("external_config") {
|
config("inspector_config") {
|
||||||
if (is_component_build) {
|
visibility = [ ":*" ] # Only targets in this file can depend on this.
|
||||||
defines = [ "USING_V8_INSPECTOR_SHARED" ]
|
|
||||||
}
|
configs = [ "../../:internal_config" ]
|
||||||
|
include_dirs = [ "../../include" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
config("internal_config") {
|
v8_header_set("inspector_test_headers") {
|
||||||
visibility = [ ":*" ]
|
configs = [ ":inspector_config" ]
|
||||||
configs = [ "../../:internal_config_base" ]
|
|
||||||
if (is_component_build) {
|
public_deps = [ "../..:v8_headers" ]
|
||||||
defines = [ "BUILDING_V8_INSPECTOR_SHARED" ]
|
|
||||||
}
|
sources = [ "test-interface.h" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
v8_source_set("inspector_string_conversions") {
|
v8_source_set("inspector_string_conversions") {
|
||||||
@ -78,7 +79,7 @@ v8_source_set("inspector_string_conversions") {
|
|||||||
deps = [ "../..:v8_libbase" ]
|
deps = [ "../..:v8_libbase" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
v8_component("inspector") {
|
v8_source_set("inspector") {
|
||||||
deps = [
|
deps = [
|
||||||
":inspector_string_conversions",
|
":inspector_string_conversions",
|
||||||
"../..:v8_tracing",
|
"../..:v8_tracing",
|
||||||
@ -87,14 +88,12 @@ v8_component("inspector") {
|
|||||||
]
|
]
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
|
":inspector_test_headers",
|
||||||
":protocol_generated_sources",
|
":protocol_generated_sources",
|
||||||
"../../:v8_lib",
|
|
||||||
"../../:v8_libbase",
|
"../../:v8_libbase",
|
||||||
]
|
]
|
||||||
|
|
||||||
configs = [ ":internal_config" ]
|
configs = [ ":inspector_config" ]
|
||||||
|
|
||||||
public_configs = [ ":external_config" ]
|
|
||||||
|
|
||||||
sources = rebase_path(_protocol_generated, ".", target_gen_dir)
|
sources = rebase_path(_protocol_generated, ".", target_gen_dir)
|
||||||
sources += [
|
sources += [
|
||||||
@ -117,7 +116,6 @@ v8_component("inspector") {
|
|||||||
"string-util.cc",
|
"string-util.cc",
|
||||||
"string-util.h",
|
"string-util.h",
|
||||||
"test-interface.cc",
|
"test-interface.cc",
|
||||||
"test-interface.h",
|
|
||||||
"v8-console-agent-impl.cc",
|
"v8-console-agent-impl.cc",
|
||||||
"v8-console-agent-impl.h",
|
"v8-console-agent-impl.h",
|
||||||
"v8-console-message.cc",
|
"v8-console-message.cc",
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
"string_in": "StringView",
|
"string_in": "StringView",
|
||||||
"string_out": "std::unique_ptr<StringBuffer>",
|
"string_out": "std::unique_ptr<StringBuffer>",
|
||||||
"to_string_out": "StringBufferFrom(std::move(%s))",
|
"to_string_out": "StringBufferFrom(std::move(%s))",
|
||||||
"export_macro": "V8_INSPECTOR_EXPORT"
|
"export_macro": "V8_EXPORT"
|
||||||
},
|
},
|
||||||
|
|
||||||
"lib": {
|
"lib": {
|
||||||
|
@ -27,8 +27,8 @@ class String16 {
|
|||||||
String16(const String16&) V8_NOEXCEPT = default;
|
String16(const String16&) V8_NOEXCEPT = default;
|
||||||
String16(String16&&) V8_NOEXCEPT = default;
|
String16(String16&&) V8_NOEXCEPT = default;
|
||||||
String16(const UChar* characters, size_t size);
|
String16(const UChar* characters, size_t size);
|
||||||
V8_INSPECTOR_EXPORT String16(const UChar* characters);
|
V8_EXPORT String16(const UChar* characters);
|
||||||
V8_INSPECTOR_EXPORT String16(const char* characters);
|
V8_EXPORT String16(const char* characters);
|
||||||
String16(const char* characters, size_t size);
|
String16(const char* characters, size_t size);
|
||||||
explicit String16(const std::basic_string<UChar>& impl);
|
explicit String16(const std::basic_string<UChar>& impl);
|
||||||
explicit String16(std::basic_string<UChar>&& impl);
|
explicit String16(std::basic_string<UChar>&& impl);
|
||||||
@ -70,13 +70,12 @@ class String16 {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convenience methods.
|
// Convenience methods.
|
||||||
V8_INSPECTOR_EXPORT std::string utf8() const;
|
V8_EXPORT std::string utf8() const;
|
||||||
V8_INSPECTOR_EXPORT static String16 fromUTF8(const char* stringStart,
|
V8_EXPORT static String16 fromUTF8(const char* stringStart, size_t length);
|
||||||
size_t length);
|
|
||||||
|
|
||||||
// Instantiates a String16 in native endianness from UTF16 LE.
|
// Instantiates a String16 in native endianness from UTF16 LE.
|
||||||
// On Big endian architectures, byte order needs to be flipped.
|
// On Big endian architectures, byte order needs to be flipped.
|
||||||
V8_INSPECTOR_EXPORT static String16 fromUTF16LE(const UChar* stringStart,
|
V8_EXPORT static String16 fromUTF16LE(const UChar* stringStart,
|
||||||
size_t length);
|
size_t length);
|
||||||
|
|
||||||
std::size_t hash() const {
|
std::size_t hash() const {
|
||||||
|
@ -42,7 +42,7 @@ class StringUtil {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// A read-only sequence of uninterpreted bytes with reference-counted storage.
|
// A read-only sequence of uninterpreted bytes with reference-counted storage.
|
||||||
class V8_INSPECTOR_EXPORT Binary {
|
class V8_EXPORT Binary {
|
||||||
public:
|
public:
|
||||||
Binary() = default;
|
Binary() = default;
|
||||||
|
|
||||||
|
@ -11,10 +11,8 @@ namespace v8_inspector {
|
|||||||
|
|
||||||
class V8Inspector;
|
class V8Inspector;
|
||||||
|
|
||||||
V8_INSPECTOR_EXPORT void SetMaxAsyncTaskStacksForTest(V8Inspector* inspector,
|
V8_EXPORT void SetMaxAsyncTaskStacksForTest(V8Inspector* inspector, int limit);
|
||||||
int limit);
|
V8_EXPORT void DumpAsyncTaskStacksStateForTest(V8Inspector* inspector);
|
||||||
V8_INSPECTOR_EXPORT void DumpAsyncTaskStacksStateForTest(
|
|
||||||
V8Inspector* inspector);
|
|
||||||
|
|
||||||
} // namespace v8_inspector
|
} // namespace v8_inspector
|
||||||
|
|
||||||
|
@ -127,7 +127,7 @@ V8_EXPORT_PRIVATE const char* IntToCString(int n, base::Vector<char> buffer);
|
|||||||
// The caller is responsible for calling free on the returned pointer.
|
// The caller is responsible for calling free on the returned pointer.
|
||||||
char* DoubleToFixedCString(double value, int f);
|
char* DoubleToFixedCString(double value, int f);
|
||||||
char* DoubleToExponentialCString(double value, int f);
|
char* DoubleToExponentialCString(double value, int f);
|
||||||
V8_EXPORT_PRIVATE char* DoubleToPrecisionCString(double value, int f);
|
char* DoubleToPrecisionCString(double value, int f);
|
||||||
char* DoubleToRadixCString(double value, int radix);
|
char* DoubleToRadixCString(double value, int radix);
|
||||||
|
|
||||||
static inline bool IsMinusZero(double value) {
|
static inline bool IsMinusZero(double value) {
|
||||||
|
@ -61,7 +61,6 @@ v8_header_set("cctest_headers") {
|
|||||||
"../..:v8_internal_headers",
|
"../..:v8_internal_headers",
|
||||||
"../..:v8_libbase",
|
"../..:v8_libbase",
|
||||||
"../..:v8_libplatform",
|
"../..:v8_libplatform",
|
||||||
"../../src/inspector:inspector",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
sources = [ "cctest.h" ]
|
sources = [ "cctest.h" ]
|
||||||
@ -470,7 +469,6 @@ v8_source_set("cctest_sources") {
|
|||||||
deps = [
|
deps = [
|
||||||
"../..:run_torque",
|
"../..:run_torque",
|
||||||
"../..:v8_shared_internal_headers",
|
"../..:v8_shared_internal_headers",
|
||||||
"../../src/inspector:inspector",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (v8_enable_i18n_support) {
|
if (v8_enable_i18n_support) {
|
||||||
|
@ -23,7 +23,7 @@ v8_source_set("inspector_test") {
|
|||||||
"../..:v8",
|
"../..:v8",
|
||||||
"../..:v8_libbase",
|
"../..:v8_libbase",
|
||||||
"../..:v8_libplatform",
|
"../..:v8_libplatform",
|
||||||
"../../src/inspector:inspector",
|
"../../src/inspector:inspector_test_headers",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user