Skip to content

Commit a3db203

Browse files
committed
deps: make V8 9.4 abi-compatible with 9.0
Revert "[api] Avoid handles for const API functions" This reverts commit aee471b2ff5b1a9e622426454885b748d226535b. Revert "[api] Remove deprecated [Shared]ArrayBuffer API" This reverts commit 578f6be77fc5d8af975005c2baf918e7225abb62. Revert "[Jobs]: Cleanup in v8 platform." This reverts commit baf2b088dd9f585aa597459f30d71431171666e2. Revert "Skip global registration of [Shared]ArrayBuffer backing stores" This reverts commit fcdf35e6d70d51699ece063e25dc705e80673308. Revert "[api] Remove previously deprecated Function::GetDisplayName()." This reverts commit 6165fef8cc9dde52973e54c915e6905221b3f8fb. Revert "[api] Remove deprecated Symbol::Name()" This reverts commit bbc72ef6c7d6d8e2c4dd074d7713e5c841003163. Revert API change for HeapProfiler::TakeHeapSnapshot This reverts a small part of 7f52e4f92d3d3ded9a1701ee2f93966075ae5004. Revert "[cpu-profiler] Reintroduce support for context filtering" This reverts commit 0aacfb2a6ecbeda1d1d97ca113afd8253a1b9670. Restore new argument for TakeHeapSnapshot method This creates a new TakeHeapSnapshotV8_92 method with the signature from 7f52e4f92d3d3ded9a1701ee2f93966075ae5004. It is necessary because the API is used internall by V8. Silence irrelevant warning V8 triggers it in the Name method. Revert "[api] Add v8::metrics::LongTaskStats for the LongTasks UKM" This reverts commit 521ae93bf652b0cc1fec1fdd788e3b80fb72a349. Move cage_base isolate data field Makes 3ada6f27404b4ffd6d3e97cf15be76672f60c10d ABI-compatible. Revert ABI-breaking change in FunctionTemplate::SetCallHandler Reverts part of a7980d43e030ba4bdb36813d4bc99f85982bf4ee and ad4eab00e7ec96730eb2c1b6ddcef14ba2e4becd. Revert "[api] Support PropertyAttribute in v8::Template::Set" This reverts commit 22a32f11f7a39e4a73105608a51ebab0ad97960f. Revert API change for FunctionTemplate::New This reverts the API change of 5f82dbbe534635a8b1e93f27e8fd7e68c0eaf291. Fix some reverts - constness of internal APIs has not external effect - restored API function must but adapted to moved internal API. Revert "[api] Add API for off-thread code cache deserialization" This reverts commit f888f48e4c65e3ccfd9fd831c71c1832b957c945. Revert "[api] Implement signature checks using instance types" This reverts commit 7df6678c32255ec5a1b1470f1e5a7e56b3b192fa. Revert "[api] Remove deprecated APIs" This reverts commit 390456678a8261827cd9a1b5f0c4dc8e4328af07. PR-URL: #40285 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent 5cc24e6 commit a3db203

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1454
-1525
lines changed

common.gypi

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.11',
39+
'v8_embedder_string': '-node.12',
4040

4141
##### V8 defaults for Node.js #####
4242

deps/v8/include/v8-internal.h

+2-16
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ const int kApiSystemPointerSize = sizeof(void*);
3636
const int kApiDoubleSize = sizeof(double);
3737
const int kApiInt32Size = sizeof(int32_t);
3838
const int kApiInt64Size = sizeof(int64_t);
39-
const int kApiSizetSize = sizeof(size_t);
4039

4140
// Tag information for HeapObject.
4241
const int kHeapObjectTag = 1;
@@ -188,8 +187,6 @@ V8_EXPORT internal::Isolate* IsolateFromNeverReadOnlySpaceObject(Address obj);
188187
// language mode is strict.
189188
V8_EXPORT bool ShouldThrowOnError(v8::internal::Isolate* isolate);
190189

191-
V8_EXPORT bool CanHaveInternalField(int instance_type);
192-
193190
/**
194191
* This class exports constants and functionality from within v8 that
195192
* is necessary to implement inline functions in the v8 api. Don't
@@ -236,12 +233,8 @@ class Internals {
236233
kIsolateFastCCallCallerFpOffset + kApiSystemPointerSize;
237234
static const int kIsolateFastApiCallTargetOffset =
238235
kIsolateFastCCallCallerPcOffset + kApiSystemPointerSize;
239-
static const int kIsolateCageBaseOffset =
240-
kIsolateFastApiCallTargetOffset + kApiSystemPointerSize;
241-
static const int kIsolateLongTaskStatsCounterOffset =
242-
kIsolateCageBaseOffset + kApiSystemPointerSize;
243236
static const int kIsolateStackGuardOffset =
244-
kIsolateLongTaskStatsCounterOffset + kApiSizetSize;
237+
kIsolateFastApiCallTargetOffset + kApiSystemPointerSize;
245238
static const int kIsolateRootsOffset =
246239
kIsolateStackGuardOffset + 7 * kApiSystemPointerSize;
247240

@@ -268,9 +261,8 @@ class Internals {
268261
static const int kOddballType = 0x43;
269262
static const int kForeignType = 0x46;
270263
static const int kJSSpecialApiObjectType = 0x410;
264+
static const int kJSApiObjectType = 0x420;
271265
static const int kJSObjectType = 0x421;
272-
static const int kFirstJSApiObjectType = 0x422;
273-
static const int kLastJSApiObjectType = 0x80A;
274266

275267
static const int kUndefinedOddballKind = 5;
276268
static const int kNullOddballKind = 3;
@@ -375,12 +367,6 @@ class Internals {
375367
return *reinterpret_cast<void* const*>(addr);
376368
}
377369

378-
V8_INLINE static void IncrementLongTasksStatsCounter(v8::Isolate* isolate) {
379-
internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
380-
kIsolateLongTaskStatsCounterOffset;
381-
++(*reinterpret_cast<size_t*>(addr));
382-
}
383-
384370
V8_INLINE static internal::Address* GetRoot(v8::Isolate* isolate, int index) {
385371
internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
386372
kIsolateRootsOffset +

deps/v8/include/v8-metrics.h

+1-28
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
#ifndef V8_METRICS_H_
66
#define V8_METRICS_H_
77

8-
#include "v8-internal.h" // NOLINT(build/include_directory)
9-
#include "v8.h" // NOLINT(build/include_directory)
8+
#include "v8.h" // NOLINT(build/include_directory)
109

1110
namespace v8 {
1211
namespace metrics {
@@ -197,32 +196,6 @@ class V8_EXPORT Recorder {
197196
static ContextId GetContextId(Local<Context> context);
198197
};
199198

200-
/**
201-
* Experimental API intended for the LongTasks UKM (crbug.com/1173527).
202-
* The Reset() method should be called at the start of a potential
203-
* long task. The Get() method returns durations of V8 work that
204-
* happened during the task.
205-
*
206-
* This API is experimental and may be removed/changed in the future.
207-
*/
208-
struct V8_EXPORT LongTaskStats {
209-
/**
210-
* Resets durations of V8 work for the new task.
211-
*/
212-
V8_INLINE static void Reset(Isolate* isolate) {
213-
v8::internal::Internals::IncrementLongTasksStatsCounter(isolate);
214-
}
215-
216-
/**
217-
* Returns durations of V8 work that happened since the last Reset().
218-
*/
219-
static LongTaskStats Get(Isolate* isolate);
220-
221-
int64_t gc_full_atomic_wall_clock_duration_us = 0;
222-
int64_t gc_full_incremental_wall_clock_duration_us = 0;
223-
int64_t gc_young_wall_clock_duration_us = 0;
224-
};
225-
226199
} // namespace metrics
227200
} // namespace v8
228201

deps/v8/include/v8-platform.h

+16-2
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,9 @@ class JobDelegate {
181181
/**
182182
* Returns true if the current task is called from the thread currently
183183
* running JobHandle::Join().
184+
* TODO(etiennep): Make pure virtual once custom embedders implement it.
184185
*/
185-
virtual bool IsJoiningThread() const = 0;
186+
virtual bool IsJoiningThread() const { return false; }
186187
};
187188

188189
/**
@@ -219,21 +220,30 @@ class JobHandle {
219220
* Forces all existing workers to yield ASAP but doesn’t wait for them.
220221
* Warning, this is dangerous if the Job's callback is bound to or has access
221222
* to state which may be deleted after this call.
223+
* TODO(etiennep): Cleanup once implemented by all embedders.
222224
*/
223-
virtual void CancelAndDetach() = 0;
225+
virtual void CancelAndDetach() { Cancel(); }
224226

225227
/**
226228
* Returns true if there's any work pending or any worker running.
227229
*/
228230
virtual bool IsActive() = 0;
229231

232+
// TODO(etiennep): Clean up once all overrides are removed.
233+
V8_DEPRECATED("Use !IsActive() instead.")
234+
virtual bool IsCompleted() { return !IsActive(); }
235+
230236
/**
231237
* Returns true if associated with a Job and other methods may be called.
232238
* Returns false after Join() or Cancel() was called. This may return true
233239
* even if no workers are running and IsCompleted() returns true
234240
*/
235241
virtual bool IsValid() = 0;
236242

243+
// TODO(etiennep): Clean up once all overrides are removed.
244+
V8_DEPRECATED("Use IsValid() instead.")
245+
virtual bool IsRunning() { return IsValid(); }
246+
237247
/**
238248
* Returns true if job priority can be changed.
239249
*/
@@ -262,6 +272,10 @@ class JobTask {
262272
* it must not call back any JobHandle methods.
263273
*/
264274
virtual size_t GetMaxConcurrency(size_t worker_count) const = 0;
275+
276+
// TODO(1114823): Clean up once all overrides are removed.
277+
V8_DEPRECATED("Use the version that takes |worker_count|.")
278+
virtual size_t GetMaxConcurrency() const { return 0; }
265279
};
266280

267281
/**

deps/v8/include/v8-profiler.h

+10-6
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ class V8_EXPORT CpuProfilingOptions {
289289
* interval, set via SetSamplingInterval(). If
290290
* zero, the sampling interval will be equal to
291291
* the profiler's sampling interval.
292-
* \param filter_context If specified, profiles will only contain frames
293-
* using this context. Other frames will be elided.
292+
* \param filter_context Deprecated option to filter by context, currently a
293+
* no-op.
294294
*/
295295
CpuProfilingOptions(
296296
CpuProfilingMode mode = kLeafNodeLineNumbers,
@@ -304,13 +304,9 @@ class V8_EXPORT CpuProfilingOptions {
304304
private:
305305
friend class internal::CpuProfile;
306306

307-
bool has_filter_context() const { return !filter_context_.IsEmpty(); }
308-
void* raw_filter_context() const;
309-
310307
CpuProfilingMode mode_;
311308
unsigned max_samples_;
312309
int sampling_interval_us_;
313-
CopyablePersistentTraits<Context>::CopyablePersistent filter_context_;
314310
};
315311

316312
/**
@@ -900,6 +896,14 @@ class V8_EXPORT HeapProfiler {
900896
* Takes a heap snapshot and returns it.
901897
*/
902898
const HeapSnapshot* TakeHeapSnapshot(
899+
ActivityControl* control = nullptr,
900+
ObjectNameResolver* global_object_name_resolver = nullptr,
901+
bool treat_global_objects_as_roots = true);
902+
903+
/**
904+
* Takes a heap snapshot and returns it.
905+
*/
906+
const HeapSnapshot* TakeHeapSnapshotV8_92(
903907
ActivityControl* control = nullptr,
904908
ObjectNameResolver* global_object_name_resolver = nullptr,
905909
bool treat_global_objects_as_roots = true,

0 commit comments

Comments
 (0)