deps: patch V8 to be API/ABI compatible with 7.4 (from 7.6) · nodejs/node@53c7fac · GitHub
Skip to content

Commit 53c7fac

Browse files
targosaddaleax
andcommitted
deps: patch V8 to be API/ABI compatible with 7.4 (from 7.6)
Reverts v8/v8@4214933. Reverts v8/v8@c76f377. Reverts v8/v8@e0d7f81. Co-authored-by: Anna Henningsen <anna@addaleax.net> PR-URL: #28955
1 parent 7b8eb83 commit 53c7fac

12 files changed

Lines changed: 657 additions & 222 deletions

File tree

deps/v8/include/v8-internal.h

Lines changed: 2 additions & 0 deletions

deps/v8/include/v8-profiler.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,9 @@ class V8_EXPORT CpuProfiler {
356356
* initialized. The profiler object must be disposed after use by calling
357357
* |Dispose| method.
358358
*/
359+
static CpuProfiler* New(Isolate* isolate);
359360
static CpuProfiler* New(Isolate* isolate,
360-
CpuProfilingNamingMode = kDebugNaming);
361+
CpuProfilingNamingMode mode);
361362

362363
/**
363364
* Synchronously collect current stack sample in all profilers attached to
@@ -406,8 +407,10 @@ class V8_EXPORT CpuProfiler {
406407
* discarded.
407408
*/
408409
void StartProfiling(
409-
Local<String> title, CpuProfilingMode mode, bool record_samples = false,
410-
unsigned max_samples = CpuProfilingOptions::kNoSampleLimit);
410+
Local<String> title, CpuProfilingMode mode, bool record_samples = false);
411+
void StartProfiling(
412+
Local<String> title, CpuProfilingMode mode, bool record_samples,
413+
unsigned max_samples);
411414
/**
412415
* The same as StartProfiling above, but the CpuProfilingMode defaults to
413416
* kLeafNodeLineNumbers mode, which was the previous default behavior of the

deps/v8/include/v8-util.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,14 @@ class PersistentValueMapBase {
194194
return SetReturnValueFromVal(&returnValue, Traits::Get(&impl_, key));
195195
}
196196

197+
/**
198+
* Call V8::RegisterExternallyReferencedObject with the map value for given
199+
* key.
200+
*/
201+
V8_DEPRECATED(
202+
"Used TracedGlobal and EmbedderHeapTracer::RegisterEmbedderReference",
203+
inline void RegisterExternallyReferencedObject(K& key));
204+
197205
/**
198206
* Return value for key and remove it from the map.
199207
*/
@@ -344,6 +352,16 @@ class PersistentValueMapBase {
344352
const char* label_;
345353
};
346354

355+
template <typename K, typename V, typename Traits>
356+
inline void
357+
PersistentValueMapBase<K, V, Traits>::RegisterExternallyReferencedObject(
358+
K& key) {
359+
assert(Contains(key));
360+
V8::RegisterExternallyReferencedObject(
361+
reinterpret_cast<internal::Address*>(FromVal(Traits::Get(&impl_, key))),
362+
reinterpret_cast<internal::Isolate*>(GetIsolate()));
363+
}
364+
347365
template <typename K, typename V, typename Traits>
348366
class PersistentValueMap : public PersistentValueMapBase<K, V, Traits> {
349367
public:

deps/v8/include/v8.h

Lines changed: 177 additions & 9 deletions

0 commit comments

Comments
 (0)