From 4009fdb45cffeb6c824d6f7499114c1ac021ff2f Mon Sep 17 00:00:00 2001 From: Stephan Hartmann 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 type; +}; + namespace { Vector CopyInitiatorOriginTrials( @@ -254,7 +259,7 @@ struct SameSizeAsDocumentLoader bool finish_loading_when_parser_resumed; bool in_commit_data; scoped_refptr data_buffer; - Vector 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, Member archive_; private: - friend struct SameSizeAsDocumentLoader; + friend struct DecodedBodyDataVector; class BodyData; class EncodedBodyData; class DecodedBodyData; -- 2.37.3