summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-112-libstdc++.patch
blob: bef364e0b5e014ad03b727be2c8138ca5742132b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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