diff options
Diffstat (limited to 'www-client/chromium/files/chromium-87-CrossThreadPersistent-template.patch')
-rw-r--r-- | www-client/chromium/files/chromium-87-CrossThreadPersistent-template.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-87-CrossThreadPersistent-template.patch b/www-client/chromium/files/chromium-87-CrossThreadPersistent-template.patch new file mode 100644 index 0000000..585c91f --- /dev/null +++ b/www-client/chromium/files/chromium-87-CrossThreadPersistent-template.patch @@ -0,0 +1,32 @@ +From 37070745728cd7744e12fa5110cde304ab6a048d Mon Sep 17 00:00:00 2001 +From: Jose Dapena Paz <jdapena@igalia.com> +Date: Tue, 15 Sep 2020 16:55:19 +0200 +Subject: [PATCH] GCC: avoid GCC getting confused with wrong using resolution in CrossThreadPersistent + +In the method to assign a CrossThreadWeakPersistent<U> to a CrossThreadPersistent<T>, +there is a call to the parent class implementation of Get. It uses Parent, that is, +in CrossThreadPersistent<T> an alias to its parent. GCC resolves it as that, but +that's wrong, and it should resolve to the parent of CrossThreadWeakPersistent<U>. + +To avoid the problem, we define in that method ParentU resolving to the right +parent, and use a static cast to it. + +Bug: 819294 +Change-Id: I0152dac92d4a28eb1f1abbc56473204b62f33797 +--- + +diff --git a/third_party/blink/renderer/platform/heap/persistent.h b/third_party/blink/renderer/platform/heap/persistent.h +index f08f42f..32cadc0 100644 +--- a/third_party/blink/renderer/platform/heap/persistent.h ++++ b/third_party/blink/renderer/platform/heap/persistent.h +@@ -784,7 +784,9 @@ + CrossThreadPersistent<T>& CrossThreadPersistent<T>::operator=( + const CrossThreadWeakPersistent<U>& other) { + MutexLocker locker(ProcessHeap::CrossThreadPersistentMutex()); +- this->AssignUnsafe(other.Parent::Get()); ++ using ParentU = PersistentBase<U, kWeakPersistentConfiguration, ++ kCrossThreadPersistentConfiguration>; ++ this->AssignUnsafe(static_cast<const ParentU&>(other).Get()); + return *this; + } + |