Skip to content

Commit bb616bb

Browse files
targosBethGriggs
authored andcommitted
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: #30109 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 18c713d commit bb616bb

File tree

5 files changed

+15
-29
lines changed

5 files changed

+15
-29
lines changed

‎common.gypi‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# Reset this number to 0 on major V8 upgrades.
4040
# Increment by one for each non-official patch applied to deps/v8.
41-
'v8_embedder_string': '-node.17',
41+
'v8_embedder_string': '-node.18',
4242

4343
##### V8 defaults for Node.js #####
4444

‎deps/v8/include/v8.h‎

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5218,7 +5218,8 @@ class V8_EXPORT SharedArrayBuffer : public Object{
52185218
allocation_length_(0),
52195219
allocation_mode_(Allocator::AllocationMode::kNormal),
52205220
deleter_(nullptr),
5221-
deleter_data_(nullptr){}
5221+
deleter_data_(nullptr),
5222+
is_growable_(false){}
52225223

52235224
void* AllocationBase() const{return allocation_base_}
52245225
size_tAllocationLength() const{return allocation_length_}
@@ -5230,12 +5231,13 @@ class V8_EXPORT SharedArrayBuffer : public Object{
52305231
size_tByteLength() const{return byte_length_}
52315232
DeleterCallback Deleter() const{return deleter_}
52325233
void* DeleterData() const{return deleter_data_}
5234+
boolIsGrowable() const{return is_growable_}
52335235

52345236
private:
52355237
Contents(void* data, size_t byte_length, void* allocation_base,
52365238
size_t allocation_length,
52375239
Allocator::AllocationMode allocation_mode, DeleterCallback deleter,
5238-
void* deleter_data);
5240+
void* deleter_data, bool is_growable);
52395241

52405242
void* data_;
52415243
size_t byte_length_;
@@ -5244,6 +5246,7 @@ class V8_EXPORT SharedArrayBuffer : public Object{
52445246
Allocator::AllocationMode allocation_mode_;
52455247
DeleterCallback deleter_;
52465248
void* deleter_data_;
5249+
bool is_growable_;
52475250

52485251
friendclassSharedArrayBuffer;
52495252
};
@@ -6900,8 +6903,7 @@ class V8_EXPORT MicrotaskQueue{
69006903
/**
69016904
* Creates an empty MicrotaskQueue instance.
69026905
*/
6903-
static std::unique_ptr<MicrotaskQueue> New(
6904-
Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto);
6906+
static std::unique_ptr<MicrotaskQueue> New(Isolate* isolate);
69056907

69066908
virtual~MicrotaskQueue() = default;
69076909

@@ -6949,15 +6951,6 @@ class V8_EXPORT MicrotaskQueue{
69496951
*/
69506952
virtualboolIsRunningMicrotasks() const = 0;
69516953

6952-
/**
6953-
* Returns the current depth of nested MicrotasksScope that has
6954-
* kRunMicrotasks.
6955-
*/
6956-
virtualintGetMicrotasksScopeDepth() const = 0;
6957-
6958-
MicrotaskQueue(const MicrotaskQueue&) = delete;
6959-
MicrotaskQueue& operator=(const MicrotaskQueue&) = delete;
6960-
69616954
private:
69626955
friendclassinternal::MicrotaskQueue;
69636956
MicrotaskQueue() = default;

‎deps/v8/src/api/api.cc‎

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7471,14 +7471,15 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::Externalize(){
74717471
v8::SharedArrayBuffer::Contents::Contents(
74727472
void* data, size_t byte_length, void* allocation_base,
74737473
size_t allocation_length, Allocator::AllocationMode allocation_mode,
7474-
DeleterCallback deleter, void* deleter_data)
7474+
DeleterCallback deleter, void* deleter_data, bool is_growable)
74757475
: data_(data),
74767476
byte_length_(byte_length),
74777477
allocation_base_(allocation_base),
74787478
allocation_length_(allocation_length),
74797479
allocation_mode_(allocation_mode),
74807480
deleter_(deleter),
7481-
deleter_data_(deleter_data){
7481+
deleter_data_(deleter_data),
7482+
is_growable_(is_growable){
74827483
DCHECK_LE(allocation_base_, data_);
74837484
DCHECK_LE(byte_length_, allocation_length_);
74847485
}
@@ -7496,7 +7497,8 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents(){
74967497
: reinterpret_cast<Contents::DeleterCallback>(ArrayBufferDeleter),
74977498
self->is_wasm_memory()
74987499
? static_cast<void*>(self->GetIsolate()->wasm_engine())
7499-
: static_cast<void*>(self->GetIsolate()->array_buffer_allocator()));
7500+
: static_cast<void*>(self->GetIsolate()->array_buffer_allocator()),
7501+
false);
75007502
return contents;
75017503
}
75027504

@@ -8673,13 +8675,8 @@ void v8::Isolate::LocaleConfigurationChangeNotification(){
86738675
}
86748676

86758677
// static
8676-
std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate,
8677-
MicrotasksPolicy policy){
8678-
auto microtask_queue =
8679-
i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
8680-
microtask_queue->set_microtasks_policy(policy);
8681-
std::unique_ptr<MicrotaskQueue> ret(std::move(microtask_queue));
8682-
return ret;
8678+
std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate){
8679+
returni::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
86838680
}
86848681

86858682
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
@@ -214,10 +214,6 @@ void MicrotaskQueue::IterateMicrotasks(RootVisitor* visitor){
214214
}
215215
}
216216

217-
intMicrotaskQueue::GetMicrotasksScopeDepth() const{
218-
return microtasks_depth_;
219-
}
220-
221217
voidMicrotaskQueue::AddMicrotasksCompletedCallback(
222218
MicrotasksCompletedCallbackWithData callback, void* data){
223219
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
voidIncrementMicrotasksScopeDepth(){++microtasks_depth_}
6464
voidDecrementMicrotasksScopeDepth(){--microtasks_depth_}
65-
intGetMicrotasksScopeDepth() constoverride;
65+
intGetMicrotasksScopeDepth() const{return microtasks_depth_}
6666

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

0 commit comments

Comments
(0)