summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-112-libstdc++.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www-client/chromium/files/chromium-112-libstdc++.patch')
-rw-r--r--www-client/chromium/files/chromium-112-libstdc++.patch63
1 files changed, 63 insertions, 0 deletions
diff --git a/www-client/chromium/files/chromium-112-libstdc++.patch b/www-client/chromium/files/chromium-112-libstdc++.patch
new file mode 100644
index 000000000000..bef364e0b5e0
--- /dev/null
+++ b/www-client/chromium/files/chromium-112-libstdc++.patch
@@ -0,0 +1,63 @@
+From f2ea90d9cf667612b2913a6f30636a4773bad026 Mon Sep 17 00:00:00 2001
+From: Jose Dapena Paz <jdapena@igalia.com>
+Date: Tue, 28 Feb 2023 18:38:25 +0000
+Subject: [PATCH] IWYU: include blink::URLLoader for unique_ptr usage in WebLocalFrameClient
+
+Recent refactor broke again libstdc++ build by not including URLLoader
+header. But the reason for that change was removing in public code
+includes of non public code, as URLLoader.
+
+To fix the problem, move the implementation exposing the problem
+to the .cc file.
+
+Fixes build error with libstdc++:
+ /usr/include/c++/12/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = blink::URLLoader]’:
+ /usr/include/c++/12/bits/unique_ptr.h:396:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = blink::URLLoader; _Dp = std::default_delete<blink::URLLoader>]’
+ ../../third_party/blink/public/web/web_local_frame_client.h:678:12: required from here
+ /usr/include/c++/12/bits/unique_ptr.h:93:23: error: invalid application of ‘sizeof’ to incomplete type ‘blink::URLLoader’
+
+Bug: 957519
+Change-Id: I0db2f86603fba4fe8f10d6c4370ad1ff4c9ca70b
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4276241
+Reviewed-by: Daniel Cheng <dcheng@chromium.org>
+Commit-Queue: José Dapena Paz <jdapena@igalia.com>
+Cr-Commit-Position: refs/heads/main@{#1111077}
+---
+
+diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
+index d6bb896..246d2ff 100644
+--- a/third_party/blink/public/web/web_local_frame_client.h
++++ b/third_party/blink/public/web/web_local_frame_client.h
+@@ -674,9 +674,7 @@
+ return nullptr;
+ }
+
+- virtual std::unique_ptr<URLLoader> CreateURLLoaderForTesting() {
+- return nullptr;
+- }
++ virtual std::unique_ptr<URLLoader> CreateURLLoaderForTesting();
+
+ virtual void OnStopLoading() {}
+
+diff --git a/third_party/blink/renderer/core/frame/web_local_frame_client.cc b/third_party/blink/renderer/core/frame/web_local_frame_client.cc
+index a3617af..3adcd7c 100644
+--- a/third_party/blink/renderer/core/frame/web_local_frame_client.cc
++++ b/third_party/blink/renderer/core/frame/web_local_frame_client.cc
+@@ -7,6 +7,7 @@
+ #include "mojo/public/cpp/bindings/pending_remote.h"
+ #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
+ #include "third_party/blink/public/common/browser_interface_broker_proxy.h"
++#include "third_party/blink/renderer/platform/loader/fetch/url_loader/url_loader.h"
+
+ namespace blink {
+
+@@ -25,4 +26,9 @@
+ // have this implementation in the base class.
+ return AssociatedInterfaceProvider::GetEmptyAssociatedInterfaceProvider();
+ }
++
++std::unique_ptr<URLLoader> WebLocalFrameClient::CreateURLLoaderForTesting() {
++ return nullptr;
++}
++
+ } // namespace blink