summaryrefslogtreecommitdiff
path: root/www-client/chromium/files/chromium-108-DocumentLoader-private.patch
blob: 3e005e43ec0a4f1a1033afe410999a1274817e5c (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
From 4009fdb45cffeb6c824d6f7499114c1ac021ff2f Mon Sep 17 00:00:00 2001
From: Stephan Hartmann <stha09@googlemail.com>
Date: Wed, 12 Oct 2022 13:52:31 +0000
Subject: [PATCH] GCC: fix access to private class in blink::DocumentLoader

Friend does not work with anonymous namespaces. Therefore,
DocumentLoader::DecodedBodyData is private for struct
SameSizeAsDocumentLoader. Add a wrapper in blink namespace
to make the class visible in anonymous namespace.
---
 third_party/blink/renderer/core/loader/document_loader.cc | 7 ++++++-
 third_party/blink/renderer/core/loader/document_loader.h  | 2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index 8774812..17c7c9a 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -150,6 +150,11 @@
 #include "third_party/blink/renderer/platform/wtf/vector.h"
 
 namespace blink {
+
+struct DecodedBodyDataVector {
+  Vector<DocumentLoader::DecodedBodyData> type;
+};
+
 namespace {
 
 Vector<OriginTrialFeature> CopyInitiatorOriginTrials(
@@ -254,7 +259,7 @@ struct SameSizeAsDocumentLoader
   bool finish_loading_when_parser_resumed;
   bool in_commit_data;
   scoped_refptr<SharedBuffer> data_buffer;
-  Vector<DocumentLoader::DecodedBodyData> decoded_data_buffer_;
+  DecodedBodyDataVector decoded_data_buffer_;
   base::UnguessableToken devtools_navigation_token;
   LoaderFreezeMode defers_loading;
   bool last_navigation_had_transient_user_activation;
diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
index 7c6ba6b..c034ea9 100644
--- a/third_party/blink/renderer/core/loader/document_loader.h
+++ b/third_party/blink/renderer/core/loader/document_loader.h
@@ -442,7 +442,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,
   Member<MHTMLArchive> archive_;
 
  private:
-  friend struct SameSizeAsDocumentLoader;
+  friend struct DecodedBodyDataVector;
   class BodyData;
   class EncodedBodyData;
   class DecodedBodyData;
-- 
2.37.3