27
27
#include " aliased_buffer.h"
28
28
#if HAVE_INSPECTOR
29
29
#include " inspector_agent.h"
30
+ #include " inspector_profiler.h"
30
31
#endif
31
32
#include " handle_wrap.h"
32
33
#include " node.h"
@@ -67,6 +68,12 @@ namespace tracing {
67
68
class AgentWriterHandle ;
68
69
}
69
70
71
+ #if HAVE_INSPECTOR
72
+ namespace profiler {
73
+ class V8CoverageConnection ;
74
+ } // namespace profiler
75
+ #endif // HAVE_INSPECTOR
76
+
70
77
namespace worker {
71
78
class Worker ;
72
79
}
@@ -366,7 +373,6 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2;
366
373
V (async_hooks_init_function, v8::Function) \
367
374
V (async_hooks_promise_resolve_function, v8::Function) \
368
375
V (buffer_prototype_object, v8::Object) \
369
- V (coverage_connection, v8::Object) \
370
376
V (crypto_key_object_constructor, v8::Function) \
371
377
V (domain_callback, v8::Function) \
372
378
V (domexception_function, v8::Function) \
@@ -390,7 +396,6 @@ constexpr size_t kFsStatsBufferLength = kFsStatsFieldsNumber * 2;
390
396
V (inspector_console_extension_installer, v8::Function) \
391
397
V (message_port, v8::Object) \
392
398
V (native_module_require, v8::Function) \
393
- V (on_coverage_message_function, v8::Function) \
394
399
V (performance_entry_callback, v8::Function) \
395
400
V (performance_entry_template, v8::Function) \
396
401
V (process_object, v8::Object) \
@@ -1116,6 +1121,15 @@ class Environment : public MemoryRetainer {
1116
1121
1117
1122
inline AsyncRequest* thread_stopper () { return &thread_stopper_; }
1118
1123
1124
+ #if HAVE_INSPECTOR
1125
+ void set_coverage_connection (
1126
+ std::unique_ptr<profiler::V8CoverageConnection> connection);
1127
+ profiler::V8CoverageConnection* coverage_connection ();
1128
+
1129
+ inline void set_coverage_directory (const char * directory);
1130
+ inline const std::string& coverage_directory () const ;
1131
+ #endif // HAVE_INSPECTOR
1132
+
1119
1133
private:
1120
1134
inline void CreateImmediate (native_immediate_callback cb,
1121
1135
void * data,
@@ -1146,6 +1160,11 @@ class Environment : public MemoryRetainer {
1146
1160
size_t async_callback_scope_depth_ = 0 ;
1147
1161
std::vector<double > destroy_async_id_list_;
1148
1162
1163
+ #if HAVE_INSPECTOR
1164
+ std::unique_ptr<profiler::V8CoverageConnection> coverage_connection_;
1165
+ std::string coverage_directory_;
1166
+ #endif // HAVE_INSPECTOR
1167
+
1149
1168
std::shared_ptr<EnvironmentOptions> options_;
1150
1169
// options_ contains debug options parsed from CLI arguments,
1151
1170
// while inspector_host_port_ stores the actual inspector host
0 commit comments