| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 92d1ca9 commit 40a1a11
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5164,7 +5164,8 @@ class V8_EXPORT SharedArrayBuffer : public Object { | |||
| 5164 | 5164 | allocation_length_(0), | |
| 5165 | 5165 | allocation_mode_(Allocator::AllocationMode::kNormal), | |
| 5166 | 5166 | deleter_(nullptr), | |
| 5167 | - deleter_data_(nullptr) {} | ||
| 5167 | + deleter_data_(nullptr), | ||
| 5168 | + is_growable_(false) {} | ||
| 5168 | 5169 | ||
| 5169 | 5170 | void* AllocationBase() const { return allocation_base_; } | |
| 5170 | 5171 | size_t AllocationLength() const { return allocation_length_; } | |
@@ -5176,12 +5177,13 @@ class V8_EXPORT SharedArrayBuffer : public Object { | |||
| 5176 | 5177 | size_t ByteLength() const { return byte_length_; } | |
| 5177 | 5178 | DeleterCallback Deleter() const { return deleter_; } | |
| 5178 | 5179 | void* DeleterData() const { return deleter_data_; } | |
| 5180 | + bool IsGrowable() const { return is_growable_; } | ||
| 5179 | 5181 | ||
| 5180 | 5182 | private: | |
| 5181 | 5183 | Contents(void* data, size_t byte_length, void* allocation_base, | |
| 5182 | 5184 | size_t allocation_length, | |
| 5183 | 5185 | Allocator::AllocationMode allocation_mode, DeleterCallback deleter, | |
| 5184 | - void* deleter_data); | ||
| 5186 | + void* deleter_data, bool is_growable); | ||
| 5185 | 5187 | ||
| 5186 | 5188 | void* data_; | |
| 5187 | 5189 | size_t byte_length_; | |
@@ -5190,6 +5192,7 @@ class V8_EXPORT SharedArrayBuffer : public Object { | |||
| 5190 | 5192 | Allocator::AllocationMode allocation_mode_; | |
| 5191 | 5193 | DeleterCallback deleter_; | |
| 5192 | 5194 | void* deleter_data_; | |
| 5195 | + bool is_growable_; | ||
| 5193 | 5196 | ||
| 5194 | 5197 | friend class SharedArrayBuffer; | |
| 5195 | 5198 | }; | |
@@ -6767,8 +6770,7 @@ class V8_EXPORT MicrotaskQueue { | |||
| 6767 | 6770 | /** | |
| 6768 | 6771 | * Creates an empty MicrotaskQueue instance. | |
| 6769 | 6772 | */ | |
| 6770 | - static std::unique_ptr<MicrotaskQueue> New( | ||
| 6771 | - Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto); | ||
| 6773 | + static std::unique_ptr<MicrotaskQueue> New(Isolate* isolate); | ||
| 6772 | 6774 | ||
| 6773 | 6775 | virtual ~MicrotaskQueue() = default; | |
| 6774 | 6776 | ||
@@ -6816,12 +6818,6 @@ class V8_EXPORT MicrotaskQueue { | |||
| 6816 | 6818 | */ | |
| 6817 | 6819 | virtual bool IsRunningMicrotasks() const = 0; | |
| 6818 | 6820 | ||
| 6819 | - /** | ||
| 6820 | - * Returns the current depth of nested MicrotasksScope that has | ||
| 6821 | - * kRunMicrotasks. | ||
| 6822 | - */ | ||
| 6823 | - virtual int GetMicrotasksScopeDepth() const = 0; | ||
| 6824 | - | ||
| 6825 | 6821 | private: | |
| 6826 | 6822 | friend class internal::MicrotaskQueue; | |
| 6827 | 6823 | MicrotaskQueue() = default; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7741,14 +7741,15 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::Externalize() { | |||
| 7741 | 7741 | v8::SharedArrayBuffer::Contents::Contents( | |
| 7742 | 7742 | void* data, size_t byte_length, void* allocation_base, | |
| 7743 | 7743 | size_t allocation_length, Allocator::AllocationMode allocation_mode, | |
| 7744 | - DeleterCallback deleter, void* deleter_data) | ||
| 7744 | + DeleterCallback deleter, void* deleter_data, bool is_growable) | ||
| 7745 | 7745 | : data_(data), | |
| 7746 | 7746 | byte_length_(byte_length), | |
| 7747 | 7747 | allocation_base_(allocation_base), | |
| 7748 | 7748 | allocation_length_(allocation_length), | |
| 7749 | 7749 | allocation_mode_(allocation_mode), | |
| 7750 | 7750 | deleter_(deleter), | |
| 7751 | - deleter_data_(deleter_data) { | ||
| 7751 | + deleter_data_(deleter_data), | ||
| 7752 | + is_growable_(is_growable) { | ||
| 7752 | 7753 | DCHECK_LE(allocation_base_, data_); | |
| 7753 | 7754 | DCHECK_LE(byte_length_, allocation_length_); | |
| 7754 | 7755 | } | |
@@ -7766,7 +7767,8 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents() { | |||
| 7766 | 7767 | : reinterpret_cast<Contents::DeleterCallback>(ArrayBufferDeleter), | |
| 7767 | 7768 | self->is_wasm_memory() | |
| 7768 | 7769 | ? static_cast<void*>(self->GetIsolate()->wasm_engine()) | |
| 7769 | - : static_cast<void*>(self->GetIsolate()->array_buffer_allocator())); | ||
| 7770 | + : static_cast<void*>(self->GetIsolate()->array_buffer_allocator()), | ||
| 7771 | + false); | ||
| 7770 | 7772 | return contents; | |
| 7771 | 7773 | } | |
| 7772 | 7774 | ||
@@ -8935,13 +8937,8 @@ void v8::Isolate::LocaleConfigurationChangeNotification() { | |||
| 8935 | 8937 | } | |
| 8936 | 8938 | ||
| 8937 | 8939 | // static | |
| 8938 | - std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate, | ||
| 8939 | - MicrotasksPolicy policy) { | ||
| 8940 | - auto microtask_queue = | ||
| 8941 | - i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate)); | ||
| 8942 | - microtask_queue->set_microtasks_policy(policy); | ||
| 8943 | - std::unique_ptr<MicrotaskQueue> ret(std::move(microtask_queue)); | ||
| 8944 | - return ret; | ||
| 8940 | + std::unique_ptr<MicrotaskQueue> MicrotaskQueue::New(Isolate* isolate) { | ||
| 8941 | + return i::MicrotaskQueue::New(reinterpret_cast<i::Isolate*>(isolate)); | ||
| 8945 | 8942 | } | |
| 8946 | 8943 | ||
| 8947 | 8944 | MicrotasksScope::MicrotasksScope(Isolate* isolate, MicrotasksScope::Type type) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -211,10 +211,6 @@ void MicrotaskQueue::IterateMicrotasks(RootVisitor* visitor) { | |||
| 211 | 211 | } | |
| 212 | 212 | } | |
| 213 | 213 | ||
| 214 | - int MicrotaskQueue::GetMicrotasksScopeDepth() const { | ||
| 215 | - return microtasks_depth_; | ||
| 216 | - } | ||
| 217 | - | ||
| 218 | 214 | void MicrotaskQueue::AddMicrotasksCompletedCallback( | |
| 219 | 215 | MicrotasksCompletedCallbackWithData callback, void* data) { | |
| 220 | 216 | CallbackWithData callback_with_data(callback, data); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,7 +62,7 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue { | |||
| 62 | 62 | // invocation, which happens when depth reaches zero. | |
| 63 | 63 | void IncrementMicrotasksScopeDepth() { ++microtasks_depth_; } | |
| 64 | 64 | void DecrementMicrotasksScopeDepth() { --microtasks_depth_; } | |
| 65 | - int GetMicrotasksScopeDepth() const override; | ||
| 65 | + int GetMicrotasksScopeDepth() const { return microtasks_depth_; } | ||
| 66 | 66 | ||
| 67 | 67 | // Possibly nested microtasks suppression scopes prevent microtasks | |
| 68 | 68 | // from running. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments