libv8-node 16.10.0.0-x86_64-linux-musl → 18.8.0.0-x86_64-linux-musl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +4 -4
  2. data/ext/libv8-node/paths.rb +5 -1
  3. data/lib/libv8/node/version.rb +3 -3
  4. data/vendor/v8/include/cppgc/allocation.h +100 -22
  5. data/vendor/v8/include/cppgc/cross-thread-persistent.h +114 -33
  6. data/vendor/v8/include/cppgc/default-platform.h +2 -10
  7. data/vendor/v8/include/cppgc/explicit-management.h +22 -4
  8. data/vendor/v8/include/cppgc/garbage-collected.h +15 -26
  9. data/vendor/v8/include/cppgc/heap-consistency.h +30 -0
  10. data/vendor/v8/include/cppgc/heap-state.h +12 -0
  11. data/vendor/v8/include/cppgc/heap.h +7 -2
  12. data/vendor/v8/include/cppgc/internal/api-constants.h +8 -0
  13. data/vendor/v8/include/cppgc/internal/caged-heap-local-data.h +25 -14
  14. data/vendor/v8/include/cppgc/internal/finalizer-trait.h +4 -1
  15. data/vendor/v8/include/cppgc/internal/gc-info.h +90 -10
  16. data/vendor/v8/include/cppgc/internal/logging.h +3 -3
  17. data/vendor/v8/include/cppgc/internal/name-trait.h +11 -0
  18. data/vendor/v8/include/cppgc/internal/persistent-node.h +73 -29
  19. data/vendor/v8/include/cppgc/internal/pointer-policies.h +26 -15
  20. data/vendor/v8/include/cppgc/internal/write-barrier.h +62 -23
  21. data/vendor/v8/include/cppgc/liveness-broker.h +4 -1
  22. data/vendor/v8/include/cppgc/member.h +7 -2
  23. data/vendor/v8/include/cppgc/persistent.h +38 -33
  24. data/vendor/v8/include/cppgc/platform.h +4 -1
  25. data/vendor/v8/include/cppgc/prefinalizer.h +35 -12
  26. data/vendor/v8/include/cppgc/testing.h +9 -2
  27. data/vendor/v8/include/cppgc/type-traits.h +6 -13
  28. data/vendor/v8/include/cppgc/visitor.h +9 -7
  29. data/vendor/v8/include/libplatform/libplatform.h +0 -11
  30. data/vendor/v8/include/libplatform/v8-tracing.h +0 -1
  31. data/vendor/v8/include/v8-array-buffer.h +445 -0
  32. data/vendor/v8/include/v8-callbacks.h +397 -0
  33. data/vendor/v8/include/v8-container.h +129 -0
  34. data/vendor/v8/include/v8-context.h +407 -0
  35. data/vendor/v8/include/v8-cppgc.h +21 -128
  36. data/vendor/v8/include/v8-data.h +80 -0
  37. data/vendor/v8/include/v8-date.h +43 -0
  38. data/vendor/v8/include/v8-debug.h +168 -0
  39. data/vendor/v8/include/v8-embedder-heap.h +218 -0
  40. data/vendor/v8/include/v8-embedder-state-scope.h +51 -0
  41. data/vendor/v8/include/v8-exception.h +217 -0
  42. data/vendor/v8/include/v8-extension.h +62 -0
  43. data/vendor/v8/include/v8-external.h +37 -0
  44. data/vendor/v8/include/v8-fast-api-calls.h +172 -24
  45. data/vendor/v8/include/v8-forward.h +81 -0
  46. data/vendor/v8/include/v8-function-callback.h +475 -0
  47. data/vendor/v8/include/v8-function.h +125 -0
  48. data/vendor/v8/include/v8-initialization.h +315 -0
  49. data/vendor/v8/include/v8-inspector.h +56 -28
  50. data/vendor/v8/include/v8-internal.h +217 -55
  51. data/vendor/v8/include/v8-isolate.h +1709 -0
  52. data/vendor/v8/include/v8-json.h +47 -0
  53. data/vendor/v8/include/v8-local-handle.h +455 -0
  54. data/vendor/v8/include/v8-locker.h +149 -0
  55. data/vendor/v8/include/v8-maybe.h +137 -0
  56. data/vendor/v8/include/v8-memory-span.h +43 -0
  57. data/vendor/v8/include/v8-message.h +216 -0
  58. data/vendor/v8/include/v8-metrics.h +69 -16
  59. data/vendor/v8/include/v8-microtask-queue.h +152 -0
  60. data/vendor/v8/include/v8-microtask.h +28 -0
  61. data/vendor/v8/include/v8-object.h +775 -0
  62. data/vendor/v8/include/v8-persistent-handle.h +590 -0
  63. data/vendor/v8/include/v8-platform.h +400 -17
  64. data/vendor/v8/include/v8-primitive-object.h +118 -0
  65. data/vendor/v8/include/v8-primitive.h +866 -0
  66. data/vendor/v8/include/v8-profiler.h +88 -13
  67. data/vendor/v8/include/v8-promise.h +174 -0
  68. data/vendor/v8/include/v8-proxy.h +50 -0
  69. data/vendor/v8/include/v8-regexp.h +105 -0
  70. data/vendor/v8/include/v8-script.h +747 -0
  71. data/vendor/v8/include/v8-snapshot.h +196 -0
  72. data/vendor/v8/include/v8-statistics.h +217 -0
  73. data/vendor/v8/include/v8-template.h +1079 -0
  74. data/vendor/v8/include/v8-traced-handle.h +420 -0
  75. data/vendor/v8/include/v8-typed-array.h +282 -0
  76. data/vendor/v8/include/v8-unwinder-state.h +4 -3
  77. data/vendor/v8/include/v8-unwinder.h +132 -0
  78. data/vendor/v8/include/v8-util.h +7 -1
  79. data/vendor/v8/include/v8-value-serializer-version.h +1 -1
  80. data/vendor/v8/include/v8-value-serializer.h +279 -0
  81. data/vendor/v8/include/v8-value.h +526 -0
  82. data/vendor/v8/include/v8-version.h +4 -4
  83. data/vendor/v8/include/v8-wasm.h +257 -0
  84. data/vendor/v8/include/v8-weak-callback-info.h +87 -0
  85. data/vendor/v8/include/v8.h +41 -12601
  86. data/vendor/v8/include/v8config.h +102 -12
  87. data/vendor/v8/x86_64-linux-musl/libv8/obj/libv8_monolith.a +0 -0
  88. metadata +50 -8
  89. data/vendor/v8/include/cppgc/internal/prefinalizer-handler.h +0 -30
@@ -0,0 +1,315 @@
1
+ // Copyright 2021 the V8 project authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ #ifndef INCLUDE_V8_INITIALIZATION_H_
6
+ #define INCLUDE_V8_INITIALIZATION_H_
7
+
8
+ #include <stddef.h>
9
+ #include <stdint.h>
10
+
11
+ #include "v8-callbacks.h" // NOLINT(build/include_directory)
12
+ #include "v8-internal.h" // NOLINT(build/include_directory)
13
+ #include "v8-isolate.h" // NOLINT(build/include_directory)
14
+ #include "v8-platform.h" // NOLINT(build/include_directory)
15
+ #include "v8config.h" // NOLINT(build/include_directory)
16
+
17
+ // We reserve the V8_* prefix for macros defined in V8 public API and
18
+ // assume there are no name conflicts with the embedder's code.
19
+
20
+ /**
21
+ * The v8 JavaScript engine.
22
+ */
23
+ namespace v8 {
24
+
25
+ class PageAllocator;
26
+ class Platform;
27
+ template <class K, class V, class T>
28
+ class PersistentValueMapBase;
29
+
30
+ /**
31
+ * EntropySource is used as a callback function when v8 needs a source
32
+ * of entropy.
33
+ */
34
+ using EntropySource = bool (*)(unsigned char* buffer, size_t length);
35
+
36
+ /**
37
+ * ReturnAddressLocationResolver is used as a callback function when v8 is
38
+ * resolving the location of a return address on the stack. Profilers that
39
+ * change the return address on the stack can use this to resolve the stack
40
+ * location to wherever the profiler stashed the original return address.
41
+ *
42
+ * \param return_addr_location A location on stack where a machine
43
+ * return address resides.
44
+ * \returns Either return_addr_location, or else a pointer to the profiler's
45
+ * copy of the original return address.
46
+ *
47
+ * \note The resolver function must not cause garbage collection.
48
+ */
49
+ using ReturnAddressLocationResolver =
50
+ uintptr_t (*)(uintptr_t return_addr_location);
51
+
52
+ using DcheckErrorCallback = void (*)(const char* file, int line,
53
+ const char* message);
54
+
55
+ /**
56
+ * Container class for static utility functions.
57
+ */
58
+ class V8_EXPORT V8 {
59
+ public:
60
+ /**
61
+ * Hand startup data to V8, in case the embedder has chosen to build
62
+ * V8 with external startup data.
63
+ *
64
+ * Note:
65
+ * - By default the startup data is linked into the V8 library, in which
66
+ * case this function is not meaningful.
67
+ * - If this needs to be called, it needs to be called before V8
68
+ * tries to make use of its built-ins.
69
+ * - To avoid unnecessary copies of data, V8 will point directly into the
70
+ * given data blob, so pretty please keep it around until V8 exit.
71
+ * - Compression of the startup blob might be useful, but needs to
72
+ * handled entirely on the embedders' side.
73
+ * - The call will abort if the data is invalid.
74
+ */
75
+ static void SetSnapshotDataBlob(StartupData* startup_blob);
76
+
77
+ /** Set the callback to invoke in case of Dcheck failures. */
78
+ static void SetDcheckErrorHandler(DcheckErrorCallback that);
79
+
80
+ /**
81
+ * Sets V8 flags from a string.
82
+ */
83
+ static void SetFlagsFromString(const char* str);
84
+ static void SetFlagsFromString(const char* str, size_t length);
85
+
86
+ /**
87
+ * Sets V8 flags from the command line.
88
+ */
89
+ static void SetFlagsFromCommandLine(int* argc, char** argv,
90
+ bool remove_flags);
91
+
92
+ /** Get the version string. */
93
+ static const char* GetVersion();
94
+
95
+ /**
96
+ * Initializes V8. This function needs to be called before the first Isolate
97
+ * is created. It always returns true.
98
+ */
99
+ V8_INLINE static bool Initialize() {
100
+ const int kBuildConfiguration =
101
+ (internal::PointerCompressionIsEnabled() ? kPointerCompression : 0) |
102
+ (internal::SmiValuesAre31Bits() ? k31BitSmis : 0) |
103
+ (internal::SandboxedExternalPointersAreEnabled()
104
+ ? kSandboxedExternalPointers
105
+ : 0) |
106
+ (internal::SandboxIsEnabled() ? kSandbox : 0);
107
+ return Initialize(kBuildConfiguration);
108
+ }
109
+
110
+ /**
111
+ * Allows the host application to provide a callback which can be used
112
+ * as a source of entropy for random number generators.
113
+ */
114
+ static void SetEntropySource(EntropySource source);
115
+
116
+ /**
117
+ * Allows the host application to provide a callback that allows v8 to
118
+ * cooperate with a profiler that rewrites return addresses on stack.
119
+ */
120
+ static void SetReturnAddressLocationResolver(
121
+ ReturnAddressLocationResolver return_address_resolver);
122
+
123
+ /**
124
+ * Releases any resources used by v8 and stops any utility threads
125
+ * that may be running. Note that disposing v8 is permanent, it
126
+ * cannot be reinitialized.
127
+ *
128
+ * It should generally not be necessary to dispose v8 before exiting
129
+ * a process, this should happen automatically. It is only necessary
130
+ * to use if the process needs the resources taken up by v8.
131
+ */
132
+ static bool Dispose();
133
+
134
+ /**
135
+ * Initialize the ICU library bundled with V8. The embedder should only
136
+ * invoke this method when using the bundled ICU. Returns true on success.
137
+ *
138
+ * If V8 was compiled with the ICU data in an external file, the location
139
+ * of the data file has to be provided.
140
+ */
141
+ static bool InitializeICU(const char* icu_data_file = nullptr);
142
+
143
+ /**
144
+ * Initialize the ICU library bundled with V8. The embedder should only
145
+ * invoke this method when using the bundled ICU. If V8 was compiled with
146
+ * the ICU data in an external file and when the default location of that
147
+ * file should be used, a path to the executable must be provided.
148
+ * Returns true on success.
149
+ *
150
+ * The default is a file called icudtl.dat side-by-side with the executable.
151
+ *
152
+ * Optionally, the location of the data file can be provided to override the
153
+ * default.
154
+ */
155
+ static bool InitializeICUDefaultLocation(const char* exec_path,
156
+ const char* icu_data_file = nullptr);
157
+
158
+ /**
159
+ * Initialize the external startup data. The embedder only needs to
160
+ * invoke this method when external startup data was enabled in a build.
161
+ *
162
+ * If V8 was compiled with the startup data in an external file, then
163
+ * V8 needs to be given those external files during startup. There are
164
+ * three ways to do this:
165
+ * - InitializeExternalStartupData(const char*)
166
+ * This will look in the given directory for the file "snapshot_blob.bin".
167
+ * - InitializeExternalStartupDataFromFile(const char*)
168
+ * As above, but will directly use the given file name.
169
+ * - Call SetSnapshotDataBlob.
170
+ * This will read the blobs from the given data structure and will
171
+ * not perform any file IO.
172
+ */
173
+ static void InitializeExternalStartupData(const char* directory_path);
174
+ static void InitializeExternalStartupDataFromFile(const char* snapshot_blob);
175
+
176
+ /**
177
+ * Sets the v8::Platform to use. This should be invoked before V8 is
178
+ * initialized.
179
+ */
180
+ static void InitializePlatform(Platform* platform);
181
+
182
+ /**
183
+ * Clears all references to the v8::Platform. This should be invoked after
184
+ * V8 was disposed.
185
+ */
186
+ static void DisposePlatform();
187
+ V8_DEPRECATED("Use DisposePlatform()")
188
+ static void ShutdownPlatform() { DisposePlatform(); }
189
+
190
+ #ifdef V8_SANDBOX
191
+ //
192
+ // Sandbox related API.
193
+ //
194
+ // This API is not yet stable and subject to changes in the future.
195
+ //
196
+
197
+ /**
198
+ * Initializes the V8 sandbox.
199
+ *
200
+ * This must be invoked after the platform was initialized but before V8 is
201
+ * initialized. The sandbox is torn down during platform shutdown.
202
+ * Returns true on success, false otherwise.
203
+ *
204
+ * TODO(saelo) Once it is no longer optional to initialize the sandbox when
205
+ * compiling with V8_SANDBOX, the sandbox initialization will likely happen
206
+ * as part of V8::Initialize, at which point this function should be removed.
207
+ */
208
+ static bool InitializeSandbox();
209
+ V8_DEPRECATE_SOON("Use InitializeSandbox()")
210
+ static bool InitializeVirtualMemoryCage() { return InitializeSandbox(); }
211
+
212
+ /**
213
+ * Provides access to the virtual address subspace backing the sandbox.
214
+ *
215
+ * This can be used to allocate pages inside the sandbox, for example to
216
+ * obtain virtual memory for ArrayBuffer backing stores, which must be
217
+ * located inside the sandbox.
218
+ *
219
+ * It should be assumed that an attacker can corrupt data inside the sandbox,
220
+ * and so in particular the contents of pages allocagted in this virtual
221
+ * address space, arbitrarily and concurrently. Due to this, it is
222
+ * recommended to to only place pure data buffers in them.
223
+ *
224
+ * This function must only be called after initializing the sandbox.
225
+ */
226
+ static VirtualAddressSpace* GetSandboxAddressSpace();
227
+ V8_DEPRECATE_SOON("Use GetSandboxAddressSpace()")
228
+ static PageAllocator* GetVirtualMemoryCagePageAllocator();
229
+
230
+ /**
231
+ * Returns the size of the sandbox in bytes.
232
+ *
233
+ * If the sandbox has not been initialized, or if the initialization failed,
234
+ * this returns zero.
235
+ */
236
+ static size_t GetSandboxSizeInBytes();
237
+ V8_DEPRECATE_SOON("Use GetSandboxSizeInBytes()")
238
+ static size_t GetVirtualMemoryCageSizeInBytes() {
239
+ return GetSandboxSizeInBytes();
240
+ }
241
+
242
+ /**
243
+ * Returns whether the sandbox is configured securely.
244
+ *
245
+ * If V8 cannot create a proper sandbox, it will fall back to creating a
246
+ * sandbox that doesn't have the desired security properties but at least
247
+ * still allows V8 to function. This API can be used to determine if such an
248
+ * insecure sandbox is being used, in which case it will return false.
249
+ */
250
+ static bool IsSandboxConfiguredSecurely();
251
+ V8_DEPRECATE_SOON("Use IsSandboxConfiguredSecurely()")
252
+ static bool IsUsingSecureVirtualMemoryCage() {
253
+ return IsSandboxConfiguredSecurely();
254
+ }
255
+ #endif
256
+
257
+ /**
258
+ * Activate trap-based bounds checking for WebAssembly.
259
+ *
260
+ * \param use_v8_signal_handler Whether V8 should install its own signal
261
+ * handler or rely on the embedder's.
262
+ */
263
+ static bool EnableWebAssemblyTrapHandler(bool use_v8_signal_handler);
264
+
265
+ #if defined(V8_OS_WIN)
266
+ /**
267
+ * On Win64, by default V8 does not emit unwinding data for jitted code,
268
+ * which means the OS cannot walk the stack frames and the system Structured
269
+ * Exception Handling (SEH) cannot unwind through V8-generated code:
270
+ * https://code.google.com/p/v8/issues/detail?id=3598.
271
+ *
272
+ * This function allows embedders to register a custom exception handler for
273
+ * exceptions in V8-generated code.
274
+ */
275
+ static void SetUnhandledExceptionCallback(
276
+ UnhandledExceptionCallback unhandled_exception_callback);
277
+ #endif
278
+
279
+ /**
280
+ * Allows the host application to provide a callback that will be called when
281
+ * v8 has encountered a fatal failure to allocate memory and is about to
282
+ * terminate.
283
+ */
284
+
285
+ static void SetFatalMemoryErrorCallback(OOMErrorCallback oom_error_callback);
286
+
287
+ /**
288
+ * Get statistics about the shared memory usage.
289
+ */
290
+ static void GetSharedMemoryStatistics(SharedMemoryStatistics* statistics);
291
+
292
+ private:
293
+ V8();
294
+
295
+ enum BuildConfigurationFeatures {
296
+ kPointerCompression = 1 << 0,
297
+ k31BitSmis = 1 << 1,
298
+ kSandboxedExternalPointers = 1 << 2,
299
+ kSandbox = 1 << 3,
300
+ };
301
+
302
+ /**
303
+ * Checks that the embedder build configuration is compatible with
304
+ * the V8 binary and if so initializes V8.
305
+ */
306
+ static bool Initialize(int build_config);
307
+
308
+ friend class Context;
309
+ template <class K, class V, class T>
310
+ friend class PersistentValueMapBase;
311
+ };
312
+
313
+ } // namespace v8
314
+
315
+ #endif // INCLUDE_V8_INITIALIZATION_H_
@@ -6,15 +6,27 @@
6
6
  #define V8_V8_INSPECTOR_H_
7
7
 
8
8
  #include <stdint.h>
9
- #include <cctype>
10
9
 
10
+ #include <cctype>
11
11
  #include <memory>
12
- #include <unordered_map>
13
12
 
14
- #include "v8.h" // NOLINT(build/include_directory)
13
+ #include "v8-isolate.h" // NOLINT(build/include_directory)
14
+ #include "v8-local-handle.h" // NOLINT(build/include_directory)
15
+
16
+ namespace v8 {
17
+ class Context;
18
+ class Name;
19
+ class Object;
20
+ class StackTrace;
21
+ class Value;
22
+ } // namespace v8
15
23
 
16
24
  namespace v8_inspector {
17
25
 
26
+ namespace internal {
27
+ class V8DebuggerId;
28
+ } // namespace internal
29
+
18
30
  namespace protocol {
19
31
  namespace Debugger {
20
32
  namespace API {
@@ -98,6 +110,30 @@ class V8_EXPORT V8ContextInfo {
98
110
  V8ContextInfo& operator=(const V8ContextInfo&) = delete;
99
111
  };
100
112
 
113
+ // This debugger id tries to be unique by generating two random
114
+ // numbers, which should most likely avoid collisions.
115
+ // Debugger id has a 1:1 mapping to context group. It is used to
116
+ // attribute stack traces to a particular debugging, when doing any
117
+ // cross-debugger operations (e.g. async step in).
118
+ // See also Runtime.UniqueDebuggerId in the protocol.
119
+ class V8_EXPORT V8DebuggerId {
120
+ public:
121
+ V8DebuggerId() = default;
122
+ V8DebuggerId(const V8DebuggerId&) = default;
123
+ V8DebuggerId& operator=(const V8DebuggerId&) = default;
124
+
125
+ std::unique_ptr<StringBuffer> toString() const;
126
+ bool isValid() const;
127
+ std::pair<int64_t, int64_t> pair() const;
128
+
129
+ private:
130
+ friend class internal::V8DebuggerId;
131
+ explicit V8DebuggerId(std::pair<int64_t, int64_t>);
132
+
133
+ int64_t m_first = 0;
134
+ int64_t m_second = 0;
135
+ };
136
+
101
137
  class V8_EXPORT V8StackTrace {
102
138
  public:
103
139
  virtual StringView firstNonEmptySourceURL() const = 0;
@@ -106,14 +142,10 @@ class V8_EXPORT V8StackTrace {
106
142
  virtual int topLineNumber() const = 0;
107
143
  virtual int topColumnNumber() const = 0;
108
144
  virtual int topScriptId() const = 0;
109
- V8_DEPRECATE_SOON("Use V8::StackTrace::topScriptId() instead.")
110
- int topScriptIdAsInteger() const { return topScriptId(); }
111
145
  virtual StringView topFunctionName() const = 0;
112
146
 
113
147
  virtual ~V8StackTrace() = default;
114
148
  virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
115
- buildInspectorObject() const = 0;
116
- virtual std::unique_ptr<protocol::Runtime::API::StackTrace>
117
149
  buildInspectorObject(int maxAsyncDepth) const = 0;
118
150
  virtual std::unique_ptr<StringBuffer> toString() const = 0;
119
151
 
@@ -173,6 +205,15 @@ class V8_EXPORT V8InspectorSession {
173
205
  virtual void triggerPreciseCoverageDeltaUpdate(StringView occasion) = 0;
174
206
  };
175
207
 
208
+ class V8_EXPORT WebDriverValue {
209
+ public:
210
+ explicit WebDriverValue(StringView type, v8::MaybeLocal<v8::Value> value = {})
211
+ : type(type), value(value) {}
212
+
213
+ StringView type;
214
+ v8::MaybeLocal<v8::Value> value;
215
+ };
216
+
176
217
  class V8_EXPORT V8InspectorClient {
177
218
  public:
178
219
  virtual ~V8InspectorClient() = default;
@@ -187,6 +228,10 @@ class V8_EXPORT V8InspectorClient {
187
228
  virtual void beginUserGesture() {}
188
229
  virtual void endUserGesture() {}
189
230
 
231
+ virtual std::unique_ptr<WebDriverValue> serializeToWebDriverValue(
232
+ v8::Local<v8::Value> v8_value, int max_depth) {
233
+ return nullptr;
234
+ }
190
235
  virtual std::unique_ptr<StringBuffer> valueSubtype(v8::Local<v8::Value>) {
191
236
  return nullptr;
192
237
  }
@@ -194,9 +239,6 @@ class V8_EXPORT V8InspectorClient {
194
239
  v8::Local<v8::Context>, v8::Local<v8::Value>) {
195
240
  return nullptr;
196
241
  }
197
- virtual bool formatAccessorsAsProperties(v8::Local<v8::Value>) {
198
- return false;
199
- }
200
242
  virtual bool isInspectableHeapObject(v8::Local<v8::Object>) { return true; }
201
243
 
202
244
  virtual v8::Local<v8::Context> ensureDefaultContextInGroup(
@@ -241,6 +283,9 @@ class V8_EXPORT V8InspectorClient {
241
283
  // The caller would defer to generating a random 64 bit integer if
242
284
  // this method returns 0.
243
285
  virtual int64_t generateUniqueId() { return 0; }
286
+
287
+ virtual void dispatchError(v8::Local<v8::Context>, v8::Local<v8::Message>,
288
+ v8::Local<v8::Value>) {}
244
289
  };
245
290
 
246
291
  // These stack trace ids are intended to be passed between debuggers and be
@@ -275,6 +320,7 @@ class V8_EXPORT V8Inspector {
275
320
  virtual void contextDestroyed(v8::Local<v8::Context>) = 0;
276
321
  virtual void resetContextGroup(int contextGroupId) = 0;
277
322
  virtual v8::MaybeLocal<v8::Context> contextById(int contextId) = 0;
323
+ virtual V8DebuggerId uniqueDebuggerId(int contextId) = 0;
278
324
 
279
325
  // Various instrumentation.
280
326
  virtual void idleStarted() = 0;
@@ -323,24 +369,6 @@ class V8_EXPORT V8Inspector {
323
369
  virtual std::unique_ptr<V8StackTrace> createStackTrace(
324
370
  v8::Local<v8::StackTrace>) = 0;
325
371
  virtual std::unique_ptr<V8StackTrace> captureStackTrace(bool fullStack) = 0;
326
-
327
- // Performance counters.
328
- class V8_EXPORT Counters : public std::enable_shared_from_this<Counters> {
329
- public:
330
- explicit Counters(v8::Isolate* isolate);
331
- ~Counters();
332
- const std::unordered_map<std::string, int>& getCountersMap() const {
333
- return m_countersMap;
334
- }
335
-
336
- private:
337
- static int* getCounterPtr(const char* name);
338
-
339
- v8::Isolate* m_isolate;
340
- std::unordered_map<std::string, int> m_countersMap;
341
- };
342
-
343
- virtual std::shared_ptr<Counters> enableCounters() = 0;
344
372
  };
345
373
 
346
374
  } // namespace v8_inspector