Skip to content

Commit e8da1f2

Browse files
targosBethGriggs
authored andcommitted
deps: make V8 9.2 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. PR-URL: #39470 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Beth Griggs <[email protected]> Reviewed-By: Jiawen Geng <[email protected]>
1 parent 5517769 commit e8da1f2

34 files changed

+1112
-693
lines changed

deps/v8/include/v8-internal.h

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const int kApiSystemPointerSize = sizeof(void*);
3333
const int kApiDoubleSize = sizeof(double);
3434
const int kApiInt32Size = sizeof(int32_t);
3535
const int kApiInt64Size = sizeof(int64_t);
36-
const int kApiSizetSize = sizeof(size_t);
3736

3837
// Tag information for HeapObject.
3938
const int kHeapObjectTag = 1;
@@ -230,12 +229,8 @@ class Internals {
230229
kIsolateFastCCallCallerFpOffset + kApiSystemPointerSize;
231230
static const int kIsolateFastApiCallTargetOffset =
232231
kIsolateFastCCallCallerPcOffset + kApiSystemPointerSize;
233-
static const int kIsolateCageBaseOffset =
234-
kIsolateFastApiCallTargetOffset + kApiSystemPointerSize;
235-
static const int kIsolateLongTaskStatsCounterOffset =
236-
kIsolateCageBaseOffset + kApiSystemPointerSize;
237232
static const int kIsolateStackGuardOffset =
238-
kIsolateLongTaskStatsCounterOffset + kApiSizetSize;
233+
kIsolateFastApiCallTargetOffset + kApiSystemPointerSize;
239234
static const int kIsolateRootsOffset =
240235
kIsolateStackGuardOffset + 7 * kApiSystemPointerSize;
241236

@@ -368,12 +363,6 @@ class Internals {
368363
return *reinterpret_cast<void* const*>(addr);
369364
}
370365

371-
V8_INLINE static void IncrementLongTasksStatsCounter(v8::Isolate* isolate) {
372-
internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
373-
kIsolateLongTaskStatsCounterOffset;
374-
++(*reinterpret_cast<size_t*>(addr));
375-
}
376-
377366
V8_INLINE static internal::Address* GetRoot(v8::Isolate* isolate, int index) {
378367
internal::Address addr = reinterpret_cast<internal::Address>(isolate) +
379368
kIsolateRootsOffset +

deps/v8/include/v8-metrics.h

Lines changed: 1 addition & 28 deletions
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 {
@@ -184,32 +183,6 @@ class V8_EXPORT Recorder {
184183
static ContextId GetContextId(Local<Context> context);
185184
};
186185

187-
/**
188-
* Experimental API intended for the LongTasks UKM (crbug.com/1173527).
189-
* The Reset() method should be called at the start of a potential
190-
* long task. The Get() method returns durations of V8 work that
191-
* happened during the task.
192-
*
193-
* This API is experimental and may be removed/changed in the future.
194-
*/
195-
struct V8_EXPORT LongTaskStats {
196-
/**
197-
* Resets durations of V8 work for the new task.
198-
*/
199-
V8_INLINE static void Reset(Isolate* isolate) {
200-
v8::internal::Internals::IncrementLongTasksStatsCounter(isolate);
201-
}
202-
203-
/**
204-
* Returns durations of V8 work that happened since the last Reset().
205-
*/
206-
static LongTaskStats Get(Isolate* isolate);
207-
208-
int64_t gc_full_atomic_wall_clock_duration_us = 0;
209-
int64_t gc_full_incremental_wall_clock_duration_us = 0;
210-
int64_t gc_young_wall_clock_duration_us = 0;
211-
};
212-
213186
} // namespace metrics
214187
} // namespace v8
215188

deps/v8/include/v8-platform.h

Lines changed: 16 additions & 2 deletions
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

Lines changed: 10 additions & 6 deletions
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)