summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-06-01 20:59:31 +0200
committerMichaël Zasso <targos@protonmail.com>2019-06-04 18:47:14 +0200
commit40a1a11542e612563d6a382f4f628c41b1b8b37e (patch)
tree4f0ba45bd4aaf65c4ec45850f28083dff79fddc2 /deps
parent92d1ca964586ebb74497792e5ab417f735dd625b (diff)
downloadandroid-node-v8-40a1a11542e612563d6a382f4f628c41b1b8b37e.tar.gz
android-node-v8-40a1a11542e612563d6a382f4f628c41b1b8b37e.tar.bz2
android-node-v8-40a1a11542e612563d6a382f4f628c41b1b8b37e.zip
deps: patch V8 to be API/ABI compatible with 7.4
Reverts https://github.com/v8/v8/commit/1b51dca30d697a448f70fdf3e11c8491b122f4ee Reverts https://github.com/v8/v8/commit/1ab717db8495b4ad40d2754dd0ba2b339c9c80a4 Partially reverts https://github.com/v8/v8/commit/b0077b3b50e551a10d8ef4fabfe18f9005494b5a PR-URL: https://github.com/nodejs/node/pull/28005 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Diffstat (limited to 'deps')
-rw-r--r--deps/v8/include/v8.h16
-rw-r--r--deps/v8/src/api.cc17
-rw-r--r--deps/v8/src/microtask-queue.cc4
-rw-r--r--deps/v8/src/microtask-queue.h2
4 files changed, 14 insertions, 25 deletions
diff --git a/deps/v8/include/v8.h b/deps/v8/include/v8.h
index 1edcf81189..b5b18a2985 100644
--- a/deps/v8/include/v8.h
+++ b/deps/v8/include/v8.h
@@ -5164,7 +5164,8 @@ class V8_EXPORT SharedArrayBuffer : public Object {
allocation_length_(0),
allocation_mode_(Allocator::AllocationMode::kNormal),
deleter_(nullptr),
- deleter_data_(nullptr) {}
+ deleter_data_(nullptr),
+ is_growable_(false) {}
void* AllocationBase() const { return allocation_base_; }
size_t AllocationLength() const { return allocation_length_; }
@@ -5176,12 +5177,13 @@ class V8_EXPORT SharedArrayBuffer : public Object {
size_t ByteLength() const { return byte_length_; }
DeleterCallback Deleter() const { return deleter_; }
void* DeleterData() const { return deleter_data_; }
+ bool IsGrowable() const { return is_growable_; }
private:
Contents(void* data, size_t byte_length, void* allocation_base,
size_t allocation_length,
Allocator::AllocationMode allocation_mode, DeleterCallback deleter,
- void* deleter_data);
+ void* deleter_data, bool is_growable);
void* data_;
size_t byte_length_;
@@ -5190,6 +5192,7 @@ class V8_EXPORT SharedArrayBuffer : public Object {
Allocator::AllocationMode allocation_mode_;
DeleterCallback deleter_;
void* deleter_data_;
+ bool is_growable_;
friend class SharedArrayBuffer;
};
@@ -6767,8 +6770,7 @@ class V8_EXPORT MicrotaskQueue {
/**
* Creates an empty MicrotaskQueue instance.
*/
- static std::unique_ptr<MicrotaskQueue> New(
- Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto);
+ static std::unique_ptr<MicrotaskQueue> New(Isolate* isolate);
virtual ~MicrotaskQueue() = default;
@@ -6816,12 +6818,6 @@ class V8_EXPORT MicrotaskQueue {
*/
virtual bool IsRunningMicrotasks() const = 0;
- /**
- * Returns the current depth of nested MicrotasksScope that has
- * kRunMicrotasks.
- */
- virtual int GetMicrotasksScopeDepth() const = 0;
-
private:
friend class internal::MicrotaskQueue;
MicrotaskQueue() = default;
diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc
index 4fe3daf9a6..d912b8c6bb 100644
--- a/deps/v8/src/api.cc
+++ b/deps/v8/src/api.cc
@@ -7741,14 +7741,15 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::Externalize() {
v8::SharedArrayBuffer::Contents::Contents(
void* data, size_t byte_length, void* allocation_base,
size_t allocation_length, Allocator::AllocationMode allocation_mode,
- DeleterCallback deleter, void* deleter_data)
+ DeleterCallback deleter, void* deleter_data, bool is_growable)
: data_(data),
byte_length_(byte_length),
allocation_base_(allocation_base),
allocation_length_(allocation_length),
allocation_mode_(allocation_mode),
deleter_(deleter),
- deleter_data_(deleter_data) {
+ deleter_data_(deleter_data),
+ is_growable_(is_growable) {
DCHECK_LE(allocation_base_, data_);
DCHECK_LE(byte_length_, allocation_length_);
}
@@ -7766,7 +7767,8 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents() {
: reinterpret_cast<Contents::DeleterCallback>(ArrayBufferDeleter),
self->is_wasm_memory()
? static_cast<void*>(self->GetIsolate()->wasm_engine())
- : static_cast<void*>(self->GetIsolate()->array_buffer_allocator()));
+ : static_cast<void*>(self->GetIsolate()->array_buffer_allocator()),
+ false);
return contents;
}
@@ -8935,13 +8937,8 @@ void v8::Isolate::LocaleConfigurationChangeNotification() {
}
// static
-std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate,
- MicrotasksPolicy policy) {
- auto microtask_queue =
- i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
- microtask_queue->set_microtasks_policy(policy);
- std::unique_ptr<MicrotaskQueue> ret(std::move(microtask_queue));
- return ret;
+std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate) {
+ return i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate));
}
MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type)
diff --git a/deps/v8/src/microtask-queue.cc b/deps/v8/src/microtask-queue.cc
index a19d9dab8e..4b8b0410c6 100644
--- a/deps/v8/src/microtask-queue.cc
+++ b/deps/v8/src/microtask-queue.cc
@@ -211,10 +211,6 @@ void MicrotaskQueue::IterateMicrotasks(RootVisitor* visitor) {
}
}
-int MicrotaskQueue::GetMicrotasksScopeDepth() const {
- return microtasks_depth_;
-}
-
void MicrotaskQueue::AddMicrotasksCompletedCallback(
MicrotasksCompletedCallbackWithData callback, void* data) {
CallbackWithData callback_with_data(callback, data);
diff --git a/deps/v8/src/microtask-queue.h b/deps/v8/src/microtask-queue.h
index 98dc56bb18..ce09088526 100644
--- a/deps/v8/src/microtask-queue.h
+++ b/deps/v8/src/microtask-queue.h
@@ -62,7 +62,7 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue {
// invocation, which happens when depth reaches zero.
void IncrementMicrotasksScopeDepth() { ++microtasks_depth_; }
void DecrementMicrotasksScopeDepth() { --microtasks_depth_; }
- int GetMicrotasksScopeDepth() const override;
+ int GetMicrotasksScopeDepth() const { return microtasks_depth_; }
// Possibly nested microtasks suppression scopes prevent microtasks
// from running.