Skip to content

Commit 7b8eb83

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: #28955 PR-URL: #28005 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ujjwal Sharma <[email protected]>
1 parent f08f154 commit 7b8eb83

File tree

4 files changed

+14
-28
lines changed

4 files changed

+14
-28
lines changed

deps/v8/include/v8.h

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5101,7 +5101,8 @@ class V8_EXPORT SharedArrayBuffer : public Object {
51015101
allocation_length_(0),
51025102
allocation_mode_(Allocator::AllocationMode::kNormal),
51035103
deleter_(nullptr),
5104-
deleter_data_(nullptr) {}
5104+
deleter_data_(nullptr),
5105+
is_growable_(false) {}
51055106

51065107
void* AllocationBase() const { return allocation_base_; }
51075108
size_t AllocationLength() const { return allocation_length_; }
@@ -5113,12 +5114,13 @@ class V8_EXPORT SharedArrayBuffer : public Object {
51135114
size_t ByteLength() const { return byte_length_; }
51145115
DeleterCallback Deleter() const { return deleter_; }
51155116
void* DeleterData() const { return deleter_data_; }
5117+
bool IsGrowable() const { return is_growable_; }
51165118

51175119
private:
51185120
Contents(void* data, size_t byte_length, void* allocation_base,
51195121
size_t allocation_length,
51205122
Allocator::AllocationMode allocation_mode, DeleterCallback deleter,
5121-
void* deleter_data);
5123+
void* deleter_data, bool is_growable);
51225124

51235125
void* data_;
51245126
size_t byte_length_;
@@ -5127,6 +5129,7 @@ class V8_EXPORT SharedArrayBuffer : public Object {
51275129
Allocator::AllocationMode allocation_mode_;
51285130
DeleterCallback deleter_;
51295131
void* deleter_data_;
5132+
bool is_growable_;
51305133

51315134
friend class SharedArrayBuffer;
51325135
};
@@ -6657,8 +6660,7 @@ class V8_EXPORT MicrotaskQueue {
66576660
/**
66586661
* Creates an empty MicrotaskQueue instance.
66596662
*/
6660-
static std::unique_ptr<MicrotaskQueue> New(
6661-
Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto);
6663+
static std::unique_ptr<MicrotaskQueue> New(Isolate* isolate);
66626664

66636665
virtual ~MicrotaskQueue() = default;
66646666

@@ -6706,15 +6708,6 @@ class V8_EXPORT MicrotaskQueue {
67066708
*/
67076709
virtual bool IsRunningMicrotasks() const = 0;
67086710

6709-
/**
6710-
* Returns the current depth of nested MicrotasksScope that has
6711-
* kRunMicrotasks.
6712-
*/
6713-
virtual int GetMicrotasksScopeDepth() const = 0;
6714-
6715-
MicrotaskQueue(const MicrotaskQueue&) = delete;
6716-
MicrotaskQueue& operator=(const MicrotaskQueue&) = delete;
6717-
67186711
private:
67196712
friend class internal::MicrotaskQueue;
67206713
MicrotaskQueue() = default;

deps/v8/src/api/api.cc

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7409,14 +7409,15 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::Externalize() {
74097409
v8::SharedArrayBuffer::Contents::Contents(
74107410
void* data, size_t byte_length, void* allocation_base,
74117411
size_t allocation_length, Allocator::AllocationMode allocation_mode,
7412-
DeleterCallback deleter, void* deleter_data)
7412+
DeleterCallback deleter, void* deleter_data, bool is_growable)
74137413
: data_(data),
74147414
byte_length_(byte_length),
74157415
allocation_base_(allocation_base),
74167416
allocation_length_(allocation_length),
74177417
allocation_mode_(allocation_mode),
74187418
deleter_(deleter),
7419-
deleter_data_(deleter_data) {
7419+
deleter_data_(deleter_data),
7420+
is_growable_(is_growable) {
74207421
DCHECK_LE(allocation_base_, data_);
74217422
DCHECK_LE(byte_length_, allocation_length_);
74227423
}
@@ -7434,7 +7435,8 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents() {
74347435
: reinterpret_cast<Contents::DeleterCallback>(ArrayBufferDeleter),
74357436
self->is_wasm_memory()
74367437
? static_cast<void*>(self->GetIsolate()->wasm_engine())
7437-
: static_cast<void*>(self->GetIsolate()->array_buffer_allocator()));
7438+
: static_cast<void*>(self->GetIsolate()->array_buffer_allocator()),
7439+
false);
74387440
return contents;
74397441
}
74407442

@@ -8561,13 +8563,8 @@ void v8::Isolate::LocaleConfigurationChangeNotification() {
85618563
}
85628564

85638565
// static
8564-
std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate,
8565-
MicrotasksPolicy policy) {
8566-
auto microtask_queue =
8567-
i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
8568-
microtask_queue->set_microtasks_policy(policy);
8569-
std::unique_ptr<MicrotaskQueue> ret(std::move(microtask_queue));
8570-
return ret;
8566+
std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate) {
8567+
return i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
85718568
}
85728569

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

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

Lines changed: 0 additions & 4 deletions
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

Lines changed: 1 addition & 1 deletion
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)