| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f08f154 commit 7b8eb83
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5101,7 +5101,8 @@ class V8_EXPORT SharedArrayBuffer : public Object { | |||
| 5101 | 5101 | allocation_length_(0), | |
| 5102 | 5102 | allocation_mode_(Allocator::AllocationMode::kNormal), | |
| 5103 | 5103 | deleter_(nullptr), | |
| 5104 | - deleter_data_(nullptr) {} | ||
| 5104 | + deleter_data_(nullptr), | ||
| 5105 | + is_growable_(false) {} | ||
| 5105 | 5106 | ||
| 5106 | 5107 | void* AllocationBase() const { return allocation_base_; } | |
| 5107 | 5108 | size_t AllocationLength() const { return allocation_length_; } | |
@@ -5113,12 +5114,13 @@ class V8_EXPORT SharedArrayBuffer : public Object { | |||
| 5113 | 5114 | size_t ByteLength() const { return byte_length_; } | |
| 5114 | 5115 | DeleterCallback Deleter() const { return deleter_; } | |
| 5115 | 5116 | void* DeleterData() const { return deleter_data_; } | |
| 5117 | + bool IsGrowable() const { return is_growable_; } | ||
| 5116 | 5118 | ||
| 5117 | 5119 | private: | |
| 5118 | 5120 | Contents(void* data, size_t byte_length, void* allocation_base, | |
| 5119 | 5121 | size_t allocation_length, | |
| 5120 | 5122 | Allocator::AllocationMode allocation_mode, DeleterCallback deleter, | |
| 5121 | - void* deleter_data); | ||
| 5123 | + void* deleter_data, bool is_growable); | ||
| 5122 | 5124 | ||
| 5123 | 5125 | void* data_; | |
| 5124 | 5126 | size_t byte_length_; | |
@@ -5127,6 +5129,7 @@ class V8_EXPORT SharedArrayBuffer : public Object { | |||
| 5127 | 5129 | Allocator::AllocationMode allocation_mode_; | |
| 5128 | 5130 | DeleterCallback deleter_; | |
| 5129 | 5131 | void* deleter_data_; | |
| 5132 | + bool is_growable_; | ||
| 5130 | 5133 | ||
| 5131 | 5134 | friend class SharedArrayBuffer; | |
| 5132 | 5135 | }; | |
@@ -6657,8 +6660,7 @@ class V8_EXPORT MicrotaskQueue { | |||
| 6657 | 6660 | /** | |
| 6658 | 6661 | * Creates an empty MicrotaskQueue instance. | |
| 6659 | 6662 | */ | |
| 6660 | - static std::unique_ptr<MicrotaskQueue> New( | ||
| 6661 | - Isolate* isolate, MicrotasksPolicy policy = MicrotasksPolicy::kAuto); | ||
| 6663 | + static std::unique_ptr<MicrotaskQueue> New(Isolate* isolate); | ||
| 6662 | 6664 | ||
| 6663 | 6665 | virtual ~MicrotaskQueue() = default; | |
| 6664 | 6666 | ||
@@ -6706,15 +6708,6 @@ class V8_EXPORT MicrotaskQueue { | |||
| 6706 | 6708 | */ | |
| 6707 | 6709 | virtual bool IsRunningMicrotasks() const = 0; | |
| 6708 | 6710 | ||
| 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 | - | ||
| 6718 | 6711 | private: | |
| 6719 | 6712 | friend class internal::MicrotaskQueue; | |
| 6720 | 6713 | MicrotaskQueue() = default; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7409,14 +7409,15 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::Externalize() { | |||
| 7409 | 7409 | v8::SharedArrayBuffer::Contents::Contents( | |
| 7410 | 7410 | void* data, size_t byte_length, void* allocation_base, | |
| 7411 | 7411 | size_t allocation_length, Allocator::AllocationMode allocation_mode, | |
| 7412 | - DeleterCallback deleter, void* deleter_data) | ||
| 7412 | + DeleterCallback deleter, void* deleter_data, bool is_growable) | ||
| 7413 | 7413 | : data_(data), | |
| 7414 | 7414 | byte_length_(byte_length), | |
| 7415 | 7415 | allocation_base_(allocation_base), | |
| 7416 | 7416 | allocation_length_(allocation_length), | |
| 7417 | 7417 | allocation_mode_(allocation_mode), | |
| 7418 | 7418 | deleter_(deleter), | |
| 7419 | - deleter_data_(deleter_data) { | ||
| 7419 | + deleter_data_(deleter_data), | ||
| 7420 | + is_growable_(is_growable) { | ||
| 7420 | 7421 | DCHECK_LE(allocation_base_, data_); | |
| 7421 | 7422 | DCHECK_LE(byte_length_, allocation_length_); | |
| 7422 | 7423 | } | |
@@ -7434,7 +7435,8 @@ v8::SharedArrayBuffer::Contents v8::SharedArrayBuffer::GetContents() { | |||
| 7434 | 7435 | : reinterpret_cast<Contents::DeleterCallback>(ArrayBufferDeleter), | |
| 7435 | 7436 | self->is_wasm_memory() | |
| 7436 | 7437 | ? 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); | ||
| 7438 | 7440 | return contents; | |
| 7439 | 7441 | } | |
| 7440 | 7442 | ||
@@ -8561,13 +8563,8 @@ void v8::Isolate::LocaleConfigurationChangeNotification() { | |||
| 8561 | 8563 | } | |
| 8562 | 8564 | ||
| 8563 | 8565 | // 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)); | ||
| 8571 | 8568 | } | |
| 8572 | 8569 | ||
| 8573 | 8570 | 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