summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-hashtable-iterator-cat-83.patch
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2021-10-14 19:01:18 -0400
committerGravatar Chris Xiong <chirs241097@gmail.com> 2021-10-14 19:01:18 -0400
commit846cdbdbf965fc50478bcc4c6436e3dc6a489f3f (patch)
tree4a39385c982291a110f513871aba340f0a7a061e /www-client/chromium/files/chromium-hashtable-iterator-cat-83.patch
downloadppo-846cdbdbf965fc50478bcc4c6436e3dc6a489f3f.tar.xz
Initial commit.
Diffstat (limited to 'www-client/chromium/files/chromium-hashtable-iterator-cat-83.patch')
-rw-r--r--www-client/chromium/files/chromium-hashtable-iterator-cat-83.patch65
1 files changed, 65 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-hashtable-iterator-cat-83.patch b/www-client/chromium/files/chromium-hashtable-iterator-cat-83.patch
new file mode 100644
index 0000000..777934c
--- /dev/null
+++ b/www-client/chromium/files/chromium-hashtable-iterator-cat-83.patch
@@ -0,0 +1,65 @@
+diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
+index bbf10ef31..e5b627780 100644
+--- a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
++++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
+@@ -268,12 +268,14 @@ class CORE_EXPORT SerializedScriptValue
+ MessagePortChannelArray& GetStreamChannels() { return stream_channels_; }
+
+ bool IsLockedToAgentCluster() const {
+- return !wasm_modules_.IsEmpty() ||
+- !shared_array_buffers_contents_.IsEmpty() ||
+- std::any_of(attachments_.begin(), attachments_.end(),
+- [](const auto& entry) {
+- return entry.value->IsLockedToAgentCluster();
+- });
++ bool ret = !wasm_modules_.IsEmpty() ||
++ !shared_array_buffers_contents_.IsEmpty();
++ if (ret) return true;
++ for (const auto& entry : attachments_) {
++ if (entry.value->IsLockedToAgentCluster())
++ return true;
++ };
++ return false;
+ }
+
+ // Returns true after serializing script values that remote origins cannot
+diff --git a/third_party/blink/renderer/platform/wtf/hash_table.h b/third_party/blink/renderer/platform/wtf/hash_table.h
+index 1d195f121..1e65c08d8 100644
+--- a/third_party/blink/renderer/platform/wtf/hash_table.h
++++ b/third_party/blink/renderer/platform/wtf/hash_table.h
+@@ -272,7 +272,11 @@ class HashTableConstIterator final {
+ Allocator>
+ const_iterator;
+ typedef Value ValueType;
++ using iterator_category = std::bidirectional_iterator_tag;
+ using value_type = ValueType;
++ using reference = value_type&;
++ using pointer = value_type*;
++ using difference_type = ptrdiff_t;
+ typedef typename Traits::IteratorConstGetType GetType;
+ typedef const ValueType* PointerType;
+
+@@ -540,6 +544,11 @@ class HashTableIterator final {
+ std::ostream& PrintTo(std::ostream& stream) const {
+ return iterator_.PrintTo(stream);
+ }
++ using iterator_category = std::bidirectional_iterator_tag;
++ using value_type = ValueType;
++ using reference = value_type&;
++ using pointer = value_type*;
++ using difference_type = ptrdiff_t;
+
+ private:
+ const_iterator iterator_;
+@@ -2230,6 +2239,11 @@ struct HashTableConstIteratorAdapter {
+ }
+ // postfix -- intentionally omitted
+ typename HashTableType::const_iterator impl_;
++ using iterator_category = std::bidirectional_iterator_tag;
++ using value_type = GetType*;
++ using reference = value_type&;
++ using pointer = value_type*;
++ using difference_type = ptrdiff_t;
+ };
+
+ template <typename HashTable, typename Traits>