Skip to content

Commit 4eeb2a9

Browse files
committed
deps: patch V8 to be API/ABI compatible with 7.4 (from 7.5)
Reverts v8/v8@1b51dca Reverts v8/v8@1ab717d Partially reverts v8/v8@b0077b3 Backport-PR-URL: #29241 Backport-PR-URL: #28955 PR-URL: #28005 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
1 parent 59b4640 commit 4eeb2a9

File tree

4 files changed

+14
-28
lines changed

4 files changed

+14
-28
lines changed

deps/v8/include/v8.h

+6-13
Original file line numberDiff line numberDiff line change
@@ -5121,7 +5121,8 @@ class V8_EXPORT SharedArrayBuffer : public Object {
51215121
allocation_length_(0),
51225122
allocation_mode_(Allocator::AllocationMode::kNormal),
51235123
deleter_(nullptr),
5124-
deleter_data_(nullptr) {}
5124+
deleter_data_(nullptr),
5125+
is_growable_(false) {}
51255126

51265127
void* AllocationBase() const { return allocation_base_; }
51275128
size_t AllocationLength() const { return allocation_length_; }
@@ -5133,12 +5134,13 @@ class V8_EXPORT SharedArrayBuffer : public Object {
51335134
size_t ByteLength() const { return byte_length_; }
51345135
DeleterCallback Deleter() const { return deleter_; }
51355136
void* DeleterData() const { return deleter_data_; }
5137+
bool IsGrowable() const { return is_growable_; }
51365138

51375139
private:
51385140
Contents(void* data, size_t byte_length, void* allocation_base,
51395141
size_t allocation_length,
51405142
Allocator::AllocationMode allocation_mode, DeleterCallback deleter,
5141-
void* deleter_data);
5143+
void* deleter_data, bool is_growable);
51425144

51435145
void* data_;
51445146
size_t byte_length_;
@@ -5147,6 +5149,7 @@ class V8_EXPORT SharedArrayBuffer : public Object {
51475149
Allocator::AllocationMode allocation_mode_;
51485150
DeleterCallback deleter_;
51495151
void* deleter_data_;
5152+
bool is_growable_;
51505153

51515154
friend class SharedArrayBuffer;
51525155
};
@@ -6746,8 +6749,7 @@ class V8_EXPORT MicrotaskQueue {
67466749
/**
67476750
* Creates an empty MicrotaskQueue instance.
67486751
*/
6749-
static std::unique_ptr<MicrotaskQueue> New(
6750-
Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto);
6752+
static std::unique_ptr<MicrotaskQueue> New(Isolate* isolate);
67516753

67526754
virtual ~MicrotaskQueue() = default;
67536755

@@ -6795,15 +6797,6 @@ class V8_EXPORT MicrotaskQueue {
67956797
*/
67966798
virtual bool IsRunningMicrotasks() const = 0;
67976799

6798-
/**
6799-
* Returns the current depth of nested MicrotasksScope that has
6800-
* kRunMicrotasks.
6801-
*/
6802-
virtual int GetMicrotasksScopeDepth() const = 0;
6803-
6804-
MicrotaskQueue(const MicrotaskQueue&) = delete;
6805-
MicrotaskQueue& operator=(const MicrotaskQueue&) = delete;
6806-
68076800
private:
68086801
friend class internal::MicrotaskQueue;
68096802
MicrotaskQueue() = default;

deps/v8/src/api/api.cc

+7-10
Original file line numberDiff line numberDiff line change
@@ -7447,14 +7447,15 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::Externalize() {
74477447
v8::SharedArrayBuffer::Contents::Contents(
74487448
void* data, size_t byte_length, void* allocation_base,
74497449
size_t allocation_length, Allocator::AllocationMode allocation_mode,
7450-
DeleterCallback deleter, void* deleter_data)
7450+
DeleterCallback deleter, void* deleter_data, bool is_growable)
74517451
: data_(data),
74527452
byte_length_(byte_length),
74537453
allocation_base_(allocation_base),
74547454
allocation_length_(allocation_length),
74557455
allocation_mode_(allocation_mode),
74567456
deleter_(deleter),
7457-
deleter_data_(deleter_data) {
7457+
deleter_data_(deleter_data),
7458+
is_growable_(is_growable) {
74587459
DCHECK_LE(allocation_base_, data_);
74597460
DCHECK_LE(byte_length_, allocation_length_);
74607461
}
@@ -7472,7 +7473,8 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents() {
74727473
: reinterpret_cast<Contents::DeleterCallback>(ArrayBufferDeleter),
74737474
self->is_wasm_memory()
74747475
? static_cast<void*>(self->GetIsolate()->wasm_engine())
7475-
: static_cast<void*>(self->GetIsolate()->array_buffer_allocator()));
7476+
: static_cast<void*>(self->GetIsolate()->array_buffer_allocator()),
7477+
false);
74767478
return contents;
74777479
}
74787480

@@ -8612,13 +8614,8 @@ void v8::Isolate::LocaleConfigurationChangeNotification() {
86128614
}
86138615

86148616
// static
8615-
std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate,
8616-
MicrotasksPolicy policy) {
8617-
auto microtask_queue =
8618-
i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
8619-
microtask_queue->set_microtasks_policy(policy);
8620-
std::unique_ptr<MicrotaskQueue> ret(std::move(microtask_queue));
8621-
return ret;
8617+
std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate) {
8618+
return i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
86228619
}
86238620

86248621
MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type)

deps/v8/src/execution/microtask-queue.cc

-4
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,6 @@ void MicrotaskQueue::IterateMicrotasks(RootVisitor* visitor) {
211211
}
212212
}
213213

214-
int MicrotaskQueue::GetMicrotasksScopeDepth() const {
215-
return microtasks_depth_;
216-
}
217-
218214
void MicrotaskQueue::AddMicrotasksCompletedCallback(
219215
MicrotasksCompletedCallbackWithData callback, void* data) {
220216
CallbackWithData callback_with_data(callback, data);

deps/v8/src/execution/microtask-queue.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue {
6262
// invocation, which happens when depth reaches zero.
6363
void IncrementMicrotasksScopeDepth() { ++microtasks_depth_; }
6464
void DecrementMicrotasksScopeDepth() { --microtasks_depth_; }
65-
int GetMicrotasksScopeDepth() const override;
65+
int GetMicrotasksScopeDepth() const { return microtasks_depth_; }
6666

6767
// Possibly nested microtasks suppression scopes prevent microtasks
6868
// from running.

0 commit comments

Comments
 (0)