From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1362D138350 for ; Thu, 6 Feb 2020 20:48:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 525B8E08AD; Thu, 6 Feb 2020 20:48:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 26885E08AD for ; Thu, 6 Feb 2020 20:48:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D5EDD34E80D for ; Thu, 6 Feb 2020 20:48:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8FE0AEE for ; Thu, 6 Feb 2020 20:48:34 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1581022105.e6d7418bd2939cff68b0d2f1678a9ba19fb05aba.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/, www-client/chromium/ X-VCS-Repository: repo/gentoo X-VCS-Files: www-client/chromium/Manifest www-client/chromium/chromium-81.0.4040.5.ebuild www-client/chromium/chromium-81.0.4044.9.ebuild www-client/chromium/files/chromium-81-clang.patch www-client/chromium/files/chromium-81-fix-browser-frame.patch www-client/chromium/files/chromium-81-gcc-constexpr.patch www-client/chromium/files/chromium-81-gcc-template.patch www-client/chromium/files/chromium-81-mojom.patch www-client/chromium/files/chromium-compiler-r11.patch X-VCS-Directories: www-client/chromium/files/ www-client/chromium/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: e6d7418bd2939cff68b0d2f1678a9ba19fb05aba X-VCS-Branch: master Date: Thu, 6 Feb 2020 20:48:34 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: eabb1df4-5a5e-4eb1-874a-3af67a2c7876 X-Archives-Hash: b4118210661db7902296b9c34623cfd7 commit: e6d7418bd2939cff68b0d2f1678a9ba19fb05aba Author: Stephan Hartmann googlemail com> AuthorDate: Thu Feb 6 20:36:28 2020 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Thu Feb 6 20:48:25 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6d7418b www-client/chromium: dev channel bump to 81.0.4044.9 Closes: https://bugs.gentoo.org/707988 Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Stephan Hartmann googlemail.com> Signed-off-by: Mike Gilbert gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/14585 www-client/chromium/Manifest | 2 +- ...0.4040.5.ebuild => chromium-81.0.4044.9.ebuild} | 7 +- www-client/chromium/files/chromium-81-clang.patch | 13 - .../files/chromium-81-fix-browser-frame.patch | 35 +++ .../chromium/files/chromium-81-gcc-constexpr.patch | 19 ++ .../chromium/files/chromium-81-gcc-template.patch | 32 --- www-client/chromium/files/chromium-81-mojom.patch | 303 +++++++++++++++++++++ .../chromium/files/chromium-compiler-r11.patch | 51 ++-- 8 files changed, 381 insertions(+), 81 deletions(-) diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest index 23022952130..172969051ee 100644 --- a/www-client/chromium/Manifest +++ b/www-client/chromium/Manifest @@ -1,2 +1,2 @@ DIST chromium-80.0.3987.87.tar.xz 801310184 BLAKE2B d051f77b0e6f167632e383e23983531ee1f44f1fce1629f482cf42882c294816bd98c51ad043b5258aa9652a8da14edf278f70fc63f6978c9dfececa547a1fca SHA512 69aebd760d9b8f2c5f4d15a3a144cd4292ffb11b1536af3596f907e730ac64e909d739bb6e9d322a8f56fac75e4f0b2b5c4c36c4fe4bb52147276b5b0dd03620 -DIST chromium-81.0.4040.5.tar.xz 828003840 BLAKE2B 81b3d4b15d5cdc99bcb19ab3745e49b402f00d68a557f58fa3ae0e6b584c28473dba5ca8622373721e54c64760adbf7cb9daae93c1b29336e7f9fc3a387b199f SHA512 47928d6fc022dc0d8b51562c8079baf25aad098f93c52dd4d07d70fa6d9c4b56b4920e163ff3b44d328e741184d5af327394fa56aa36c54509406f2d67e525ed +DIST chromium-81.0.4044.9.tar.xz 791346280 BLAKE2B 790a8537a7a2a9cc6c209afb570580cc05a8f85bd0f61c4d8c13765f8d776962833468390b5685caac3d3590be1d602298e79961beded8b0b4a2b5b5ab1dcbc7 SHA512 e9fb98a66cea6b65e25dda55cceb687a3697e3810b32c1f5ddfc8341e3289b9077056898984ea07b4cdbe33f2e651a197cb57fa89d484ad728672282e43ca48f diff --git a/www-client/chromium/chromium-81.0.4040.5.ebuild b/www-client/chromium/chromium-81.0.4044.9.ebuild similarity index 99% rename from www-client/chromium/chromium-81.0.4040.5.ebuild rename to www-client/chromium/chromium-81.0.4044.9.ebuild index bbe6a457c79..b16c58de36f 100644 --- a/www-client/chromium/chromium-81.0.4040.5.ebuild +++ b/www-client/chromium/chromium-81.0.4044.9.ebuild @@ -144,12 +144,12 @@ PATCHES=( "${FILESDIR}/chromium-fix-char_traits.patch" "${FILESDIR}/chromium-78-protobuf-export.patch" "${FILESDIR}/chromium-79-gcc-alignas.patch" - "${FILESDIR}/chromium-80-unbundle-libxml.patch" "${FILESDIR}/chromium-80-gcc-quiche.patch" "${FILESDIR}/chromium-80-gcc-blink.patch" - "${FILESDIR}/chromium-81-gcc-template.patch" "${FILESDIR}/chromium-81-gcc-noexcept.patch" - "${FILESDIR}/chromium-81-clang.patch" + "${FILESDIR}/chromium-81-gcc-constexpr.patch" + "${FILESDIR}/chromium-81-mojom.patch" + "${FILESDIR}/chromium-81-fix-browser-frame.patch" ) pre_build_checks() { @@ -341,7 +341,6 @@ src_prepare() { third_party/qcms third_party/rnnoise third_party/s2cellid - third_party/sfntly third_party/simplejson third_party/skia third_party/skia/include/third_party/skcms diff --git a/www-client/chromium/files/chromium-81-clang.patch b/www-client/chromium/files/chromium-81-clang.patch deleted file mode 100644 index 8f69b34a0ed..00000000000 --- a/www-client/chromium/files/chromium-81-clang.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc b/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc -index 659efac..38f6ebc 100644 ---- a/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc -+++ b/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc -@@ -46,7 +46,7 @@ constexpr int kNotificationBodies[] = { - - } // namespace - --ExtensionRequestNotification::ExtensionRequestNotification() = default; -+ExtensionRequestNotification::ExtensionRequestNotification() {} - - ExtensionRequestNotification::ExtensionRequestNotification( - Profile* profile, diff --git a/www-client/chromium/files/chromium-81-fix-browser-frame.patch b/www-client/chromium/files/chromium-81-fix-browser-frame.patch new file mode 100644 index 00000000000..6516e1faf1a --- /dev/null +++ b/www-client/chromium/files/chromium-81-fix-browser-frame.patch @@ -0,0 +1,35 @@ +From c73968d63c456d4aaf55c5cd439b42403a3bbeb1 Mon Sep 17 00:00:00 2001 +From: Tom Anderson +Date: Mon, 03 Feb 2020 19:53:50 +0000 +Subject: [PATCH] Fix browser frame view not getting a relayout after a state change + +views::NonClientView has 2 things: a views::NonClientFrameView and a +views::ClientView. We were previously only invalidating the layout on +the ClientView after a state change. This was causing the browser +frame to paint as if it were still maximized after restoring from +a maximized state on Linux. Invalidating the layout of the frame view +fixes the issue. + +BUG=1046122 +R=sky + +Change-Id: I7da525efe1f436564ffffb410afe294e901e5d89 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033759 +Reviewed-by: Scott Violet +Commit-Queue: Thomas Anderson +Cr-Commit-Position: refs/heads/master@{#737890} +--- + +diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +index 9abbce8..6c00d49 100644 +--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ++++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +@@ -717,6 +717,8 @@ + NonClientView* non_client_view = widget->non_client_view(); + // non_client_view may be NULL, especially during creation. + if (non_client_view) { ++ if (non_client_view->frame_view()) ++ non_client_view->frame_view()->InvalidateLayout(); + non_client_view->client_view()->InvalidateLayout(); + non_client_view->InvalidateLayout(); + } diff --git a/www-client/chromium/files/chromium-81-gcc-constexpr.patch b/www-client/chromium/files/chromium-81-gcc-constexpr.patch new file mode 100644 index 00000000000..a9c1507c078 --- /dev/null +++ b/www-client/chromium/files/chromium-81-gcc-constexpr.patch @@ -0,0 +1,19 @@ +diff --git a/ui/views/layout/layout_types.h b/ui/views/layout/layout_types.h +index 8f9dbf4..ba118b9 100644 +--- a/ui/views/layout/layout_types.h ++++ b/ui/views/layout/layout_types.h +@@ -45,12 +45,12 @@ class VIEWS_EXPORT SizeBounds { + ~SizeBounds() = default; + + constexpr const base::Optional& width() const { return width_; } +- constexpr void set_width(base::Optional width) { ++ inline void set_width(base::Optional width) { + width_ = std::move(width); + } + + constexpr const base::Optional& height() const { return height_; } +- constexpr void set_height(base::Optional height) { ++ inline void set_height(base::Optional height) { + height_ = std::move(height); + } + diff --git a/www-client/chromium/files/chromium-81-gcc-template.patch b/www-client/chromium/files/chromium-81-gcc-template.patch deleted file mode 100644 index 8553d5f603b..00000000000 --- a/www-client/chromium/files/chromium-81-gcc-template.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff --git a/third_party/blink/renderer/platform/wtf/list_hash_set.h b/third_party/blink/renderer/platform/wtf/list_hash_set.h -index 7856b7b..76534f6 100644 ---- a/third_party/blink/renderer/platform/wtf/list_hash_set.h -+++ b/third_party/blink/renderer/platform/wtf/list_hash_set.h -@@ -308,21 +308,16 @@ class ListHashSetNodeBasePointer { - NodeType& operator*() const { return *Get(); } - - private: -- template - void SetSafe(NodeType* node) { -- AsAtomicPtr(&node_)->store(node, std::memory_order_relaxed); -- } -- template <> -- void SetSafe(NodeType* node) { -- node_ = node; -+ if ( Allocator::kIsGarbageCollected ) -+ AsAtomicPtr(&node_)->store(node, std::memory_order_relaxed); -+ else -+ node_ = node; - } - -- template - NodeType* GetSafe() const { -- return AsAtomicPtr(&node_)->load(std::memory_order_relaxed); -- } -- template <> -- NodeType* GetSafe() const { -+ if ( Allocator::kIsGarbageCollected ) -+ return AsAtomicPtr(&node_)->load(std::memory_order_relaxed); - return node_; - } - diff --git a/www-client/chromium/files/chromium-81-mojom.patch b/www-client/chromium/files/chromium-81-mojom.patch new file mode 100644 index 00000000000..e6675931fbc --- /dev/null +++ b/www-client/chromium/files/chromium-81-mojom.patch @@ -0,0 +1,303 @@ +Add missing files in tarball. + +diff --git a/chrome/test/data/webui/mojo/OWNERS b/chrome/test/data/webui/mojo/OWNERS +new file mode 100644 +index 000000000000..08850f421205 +--- /dev/null ++++ b/chrome/test/data/webui/mojo/OWNERS +@@ -0,0 +1,2 @@ ++per-file *.mojom=set noparent ++per-file *.mojom=file://ipc/SECURITY_OWNERS +diff --git a/chrome/test/data/webui/mojo/foobar.mojom b/chrome/test/data/webui/mojo/foobar.mojom +new file mode 100644 +index 000000000000..446d365af8fb +--- /dev/null ++++ b/chrome/test/data/webui/mojo/foobar.mojom +@@ -0,0 +1,16 @@ ++// Copyright 2019 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++// Test Mojo interfaces for MojoWebUIControllerBrowserTest. ++ ++module test.mojom; ++ ++interface Foo { ++ GetFoo() => (string value); ++}; ++ ++interface Bar { ++ GetBar() => (string value); ++}; ++ +diff --git a/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc b/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc +new file mode 100644 +index 000000000000..658a54ace278 +--- /dev/null ++++ b/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc +@@ -0,0 +1,253 @@ ++// Copyright 2019 The Chromium Authors. All rights reserved. ++// Use of this source code is governed by a BSD-style license that can be ++// found in the LICENSE file. ++ ++#include "ui/webui/mojo_web_ui_controller.h" ++ ++#include "base/memory/ref_counted_memory.h" ++#include "base/path_service.h" ++#include "base/run_loop.h" ++#include "base/threading/sequenced_task_runner_handle.h" ++#include "chrome/browser/bad_message.h" ++#include "chrome/browser/chrome_browser_interface_binders.h" ++#include "chrome/browser/chrome_content_browser_client.h" ++#include "chrome/browser/ui/browser.h" ++#include "chrome/browser/ui/tabs/tab_strip_model.h" ++#include "chrome/test/base/in_process_browser_test.h" ++#include "chrome/test/data/grit/webui_test_resources.h" ++#include "chrome/test/data/webui/mojo/foobar.mojom.h" ++#include "content/public/browser/render_process_host.h" ++#include "content/public/browser/render_process_host_observer.h" ++#include "content/public/browser/web_contents.h" ++#include "content/public/browser/web_ui_controller_factory.h" ++#include "content/public/browser/web_ui_data_source.h" ++#include "content/public/common/content_client.h" ++#include "content/public/common/url_constants.h" ++#include "content/public/test/browser_test_utils.h" ++#include "content/public/test/no_renderer_crashes_assertion.h" ++#include "content/public/test/test_utils.h" ++#include "services/service_manager/public/cpp/binder_map.h" ++#include "testing/gtest/include/gtest/gtest.h" ++#include "ui/base/resource/resource_bundle.h" ++#include "url/gurl.h" ++ ++namespace { ++ ++// WebUIController that provides the Foo Mojo API. ++class FooUI : public ui::MojoWebUIController, public ::test::mojom::Foo { ++ public: ++ explicit FooUI(content::WebUI* web_ui) ++ : ui::MojoWebUIController(web_ui), foo_receiver_(this) { ++ content::WebUIDataSource* data_source = ++ content::WebUIDataSource::Create("foo"); ++ data_source->SetDefaultResource(IDR_MOJO_WEB_UI_CONTROLLER_TEST_HTML); ++ data_source->DisableContentSecurityPolicy(); ++ data_source->AddResourcePath("foobar.mojom-lite.js", ++ IDR_FOOBAR_MOJO_LITE_JS); ++ content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), ++ data_source); ++ } ++ ++ void BindInterface(mojo::PendingReceiver<::test::mojom::Foo> receiver) { ++ foo_receiver_.Bind(std::move(receiver)); ++ } ++ ++ // ::test::mojom::Foo: ++ void GetFoo(GetFooCallback callback) override { ++ std::move(callback).Run("foofoo"); ++ } ++ ++ WEB_UI_CONTROLLER_TYPE_DECL(); ++ ++ private: ++ mojo::Receiver<::test::mojom::Foo> foo_receiver_; ++ ++ DISALLOW_COPY_AND_ASSIGN(FooUI); ++}; ++ ++WEB_UI_CONTROLLER_TYPE_IMPL(FooUI) ++ ++// WebUIController that provides the Foo and Bar Mojo APIs. ++class FooBarUI : public ui::MojoWebUIController, ++ public ::test::mojom::Foo, ++ public ::test::mojom::Bar { ++ public: ++ explicit FooBarUI(content::WebUI* web_ui) ++ : ui::MojoWebUIController(web_ui), ++ foo_receiver_(this), ++ bar_receiver_(this) { ++ content::WebUIDataSource* data_source = ++ content::WebUIDataSource::Create("foobar"); ++ data_source->SetDefaultResource(IDR_MOJO_WEB_UI_CONTROLLER_TEST_HTML); ++ data_source->DisableContentSecurityPolicy(); ++ data_source->AddResourcePath("foobar.mojom-lite.js", ++ IDR_FOOBAR_MOJO_LITE_JS); ++ content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(), ++ data_source); ++ } ++ ++ void BindInterface(mojo::PendingReceiver<::test::mojom::Foo> receiver) { ++ foo_receiver_.Bind(std::move(receiver)); ++ } ++ ++ void BindInterface(mojo::PendingReceiver<::test::mojom::Bar> receiver) { ++ bar_receiver_.Bind(std::move(receiver)); ++ } ++ ++ // ::test::mojom::Foo: ++ void GetFoo(GetFooCallback callback) override { ++ std::move(callback).Run("foobarfoo"); ++ } ++ ++ // ::test::mojom::Bar: ++ void GetBar(GetBarCallback callback) override { ++ std::move(callback).Run("foobarbar"); ++ } ++ ++ WEB_UI_CONTROLLER_TYPE_DECL(); ++ ++ private: ++ mojo::Receiver<::test::mojom::Foo> foo_receiver_; ++ mojo::Receiver<::test::mojom::Bar> bar_receiver_; ++ ++ DISALLOW_COPY_AND_ASSIGN(FooBarUI); ++}; ++ ++WEB_UI_CONTROLLER_TYPE_IMPL(FooBarUI) ++ ++// WebUIControllerFactory that serves our TestWebUIController. ++class TestWebUIControllerFactory : public content::WebUIControllerFactory { ++ public: ++ TestWebUIControllerFactory() = default; ++ ++ std::unique_ptr CreateWebUIControllerForURL( ++ content::WebUI* web_ui, ++ const GURL& url) override { ++ if (url.host_piece() == "foo") ++ return std::make_unique(web_ui); ++ if (url.host_piece() == "foobar") ++ return std::make_unique(web_ui); ++ ++ return nullptr; ++ } ++ ++ content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context, ++ const GURL& url) override { ++ if (url.SchemeIs(content::kChromeUIScheme)) ++ return reinterpret_cast(1); ++ ++ return content::WebUI::kNoWebUI; ++ } ++ ++ bool UseWebUIForURL(content::BrowserContext* browser_context, ++ const GURL& url) override { ++ return url.SchemeIs(content::kChromeUIScheme); ++ } ++ bool UseWebUIBindingsForURL(content::BrowserContext* browser_context, ++ const GURL& url) override { ++ return url.SchemeIs(content::kChromeUIScheme); ++ } ++ ++ private: ++ DISALLOW_COPY_AND_ASSIGN(TestWebUIControllerFactory); ++}; ++ ++} // namespace ++ ++class MojoWebUIControllerBrowserTest : public InProcessBrowserTest { ++ public: ++ MojoWebUIControllerBrowserTest() { ++ factory_ = std::make_unique(); ++ content::WebUIControllerFactory::RegisterFactory(factory_.get()); ++ } ++ ++ void SetUpOnMainThread() override { ++ base::FilePath pak_path; ++ ASSERT_TRUE(base::PathService::Get(base::DIR_MODULE, &pak_path)); ++ pak_path = pak_path.AppendASCII("browser_tests.pak"); ++ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath( ++ pak_path, ui::SCALE_FACTOR_NONE); ++ ++ content::SetBrowserClientForTesting(&test_content_browser_client_); ++ } ++ ++ private: ++ class TestContentBrowserClient : public ChromeContentBrowserClient { ++ public: ++ TestContentBrowserClient() = default; ++ TestContentBrowserClient(const TestContentBrowserClient&) = delete; ++ TestContentBrowserClient& operator=(const TestContentBrowserClient&) = ++ delete; ++ ~TestContentBrowserClient() override = default; ++ ++ void RegisterBrowserInterfaceBindersForFrame( ++ content::RenderFrameHost* render_frame_host, ++ service_manager::BinderMapWithContext* map) ++ override { ++ ChromeContentBrowserClient::RegisterBrowserInterfaceBindersForFrame( ++ render_frame_host, map); ++ chrome::internal::RegisterWebUIControllerInterfaceBinder< ++ ::test::mojom::Bar, FooBarUI>(map); ++ chrome::internal::RegisterWebUIControllerInterfaceBinder< ++ ::test::mojom::Foo, FooUI, FooBarUI>(map); ++ } ++ }; ++ ++ std::unique_ptr factory_; ++ ++ TestContentBrowserClient test_content_browser_client_; ++}; ++ ++// Attempting to access bindings succeeds for 2 allowed interfaces. ++IN_PROC_BROWSER_TEST_F(MojoWebUIControllerBrowserTest, BindingsAccess) { ++ content::WebContents* web_contents = ++ browser()->tab_strip_model()->GetActiveWebContents(); ++ ++ ASSERT_TRUE(NavigateToURL(web_contents, content::GetWebUIURL("foobar"))); ++ ++ EXPECT_EQ("foobarfoo", ++ content::EvalJs(web_contents, ++ "(async () => {" ++ " let fooRemote = test.mojom.Foo.getRemote(true);" ++ " let resp = await fooRemote.getFoo();" ++ " return resp.value;" ++ "})()")); ++ ++ EXPECT_EQ("foobarbar", ++ content::EvalJs(web_contents, ++ "(async () => {" ++ " let barRemote = test.mojom.Bar.getRemote(true);" ++ " let resp = await barRemote.getBar();" ++ " return resp.value;" ++ "})()")); ++} ++ ++// Attempting to access bindings crashes the renderer when access not allowed. ++IN_PROC_BROWSER_TEST_F(MojoWebUIControllerBrowserTest, ++ BindingsAccessViolation) { ++ content::WebContents* web_contents = ++ browser()->tab_strip_model()->GetActiveWebContents(); ++ ++ ASSERT_TRUE(NavigateToURL(web_contents, content::GetWebUIURL("foo"))); ++ ++ EXPECT_EQ("foofoo", ++ content::EvalJs(web_contents, ++ "(async () => {" ++ " let fooRemote = test.mojom.Foo.getRemote(true);" ++ " let resp = await fooRemote.getFoo();" ++ " return resp.value;" ++ "})()")); ++ ++ content::ScopedAllowRendererCrashes allow; ++ ++ // Attempt to get a remote for a disallowed interface. ++ EXPECT_FALSE( ++ content::EvalJs(web_contents, ++ "(async () => {" ++ " let barRemote = test.mojom.Bar.getRemote(true);" ++ " let resp = await barRemote.getBar();" ++ " return resp.value;" ++ "})()") ++ .error.empty()); ++ EXPECT_TRUE(web_contents->IsCrashed()); ++} +diff --git a/chrome/test/data/webui/mojo/mojo_web_ui_controller_test.html b/chrome/test/data/webui/mojo/mojo_web_ui_controller_test.html +new file mode 100644 +index 000000000000..4638ebc261c7 +--- /dev/null ++++ b/chrome/test/data/webui/mojo/mojo_web_ui_controller_test.html +@@ -0,0 +1,6 @@ ++ ++ ++ ++ ++ ++ diff --git a/www-client/chromium/files/chromium-compiler-r11.patch b/www-client/chromium/files/chromium-compiler-r11.patch index f910d6fe2d5..f1b958a1170 100644 --- a/www-client/chromium/files/chromium-compiler-r11.patch +++ b/www-client/chromium/files/chromium-compiler-r11.patch @@ -1,17 +1,17 @@ -From b29cbcb0ff75b564f83ad93273e881e242f08caf Mon Sep 17 00:00:00 2001 +From 137de121a36f9349ad8435fee57940facef82878 Mon Sep 17 00:00:00 2001 From: Mike Gilbert -Date: Wed, 22 Jan 2020 09:05:36 +0000 +Date: Thu, 6 Feb 2020 07:46:57 +0000 Subject: [PATCH] Disable various compiler configs --- - build/config/compiler/BUILD.gn | 75 ++++++++++++---------------------- - 1 file changed, 25 insertions(+), 50 deletions(-) + build/config/compiler/BUILD.gn | 64 +++++++++++++--------------------- + 1 file changed, 25 insertions(+), 39 deletions(-) diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn -index 1455a9f..cf19679 100644 +index eef1140..b34b55b 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -270,8 +270,6 @@ config("compiler") { +@@ -260,8 +260,6 @@ config("compiler") { configs += [ # See the definitions below. @@ -20,7 +20,7 @@ index 1455a9f..cf19679 100644 ":compiler_codegen", ":compiler_deterministic", ] -@@ -496,31 +494,6 @@ config("compiler") { +@@ -486,20 +484,6 @@ config("compiler") { } } @@ -36,23 +36,12 @@ index 1455a9f..cf19679 100644 - "-Xclang", - "-instcombine-lower-dbg-declare=0", - ] -- -- if (llvm_force_head_revision) { -- # Before Clang 10, lax vector conversions were allowed by default. -- # Chromium currently relies on this behavior. -- # TODO(crbug.com/1042470): Fix the code and remove this flag. -- if (is_win) { -- cflags += [ "/clang:-flax-vector-conversions=all" ] -- } else if (cros_sdk_version == "") { -- cflags += [ "-flax-vector-conversions=all" ] -- } -- } - } - # C11/C++11 compiler flags setup. # --------------------------- if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") { -@@ -1467,6 +1440,12 @@ config("default_warnings") { +@@ -1446,6 +1430,12 @@ config("default_warnings") { cflags_cc += [ "-Wno-class-memaccess" ] } @@ -65,7 +54,7 @@ index 1455a9f..cf19679 100644 # -Wunused-local-typedefs is broken in gcc, # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872 cflags += [ "-Wno-unused-local-typedefs" ] -@@ -1592,7 +1571,7 @@ config("chromium_code") { +@@ -1560,7 +1550,7 @@ config("chromium_code") { defines = [ "_HAS_NODISCARD" ] } } else { @@ -74,7 +63,7 @@ index 1455a9f..cf19679 100644 if (treat_warnings_as_errors) { cflags += [ "-Werror" ] -@@ -1601,10 +1580,6 @@ config("chromium_code") { +@@ -1569,10 +1559,6 @@ config("chromium_code") { # well. ldflags = [ "-Werror" ] } @@ -85,7 +74,7 @@ index 1455a9f..cf19679 100644 # In Chromium code, we define __STDC_foo_MACROS in order to get the # C99 macros on Mac and Linux. -@@ -1613,15 +1588,6 @@ config("chromium_code") { +@@ -1581,15 +1567,6 @@ config("chromium_code") { "__STDC_FORMAT_MACROS", ] @@ -101,7 +90,7 @@ index 1455a9f..cf19679 100644 if (is_mac) { cflags_objc = [ "-Wobjc-missing-property-synthesis" ] cflags_objcc = [ "-Wobjc-missing-property-synthesis" ] -@@ -2025,7 +1991,8 @@ config("default_stack_frames") { +@@ -1993,7 +1970,8 @@ config("default_stack_frames") { } # Default "optimization on" config. @@ -111,7 +100,7 @@ index 1455a9f..cf19679 100644 if (is_win) { # TODO(thakis): Remove is_clang here, https://crbug.com/598772 if (is_official_build && full_wpo_on_official && !is_clang) { -@@ -2051,7 +2018,8 @@ config("optimize") { +@@ -2019,7 +1997,8 @@ config("optimize") { } # Same config as 'optimize' but without the WPO flag. @@ -121,7 +110,7 @@ index 1455a9f..cf19679 100644 if (is_win) { # Favor size over speed, /O1 must be before the common flags. The GYP # build also specifies /Os and /GF but these are implied by /O1. -@@ -2074,7 +2042,8 @@ config("optimize_no_wpo") { +@@ -2042,7 +2021,8 @@ config("optimize_no_wpo") { } # Turn off optimizations. @@ -131,7 +120,7 @@ index 1455a9f..cf19679 100644 if (is_win) { cflags = [ "/Od", # Disable optimization. -@@ -2108,7 +2077,8 @@ config("no_optimize") { +@@ -2076,7 +2056,8 @@ config("no_optimize") { # Turns up the optimization level. On Windows, this implies whole program # optimization and link-time code generation which is very expensive and should # be used sparingly. @@ -141,7 +130,7 @@ index 1455a9f..cf19679 100644 if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2147,7 +2117,8 @@ config("optimize_max") { +@@ -2115,7 +2096,8 @@ config("optimize_max") { # # TODO(crbug.com/621335) - rework how all of these configs are related # so that we don't need this disclaimer. @@ -151,7 +140,7 @@ index 1455a9f..cf19679 100644 if (is_nacl && is_nacl_irt) { # The NaCl IRT is a special case and always wants its own config. # Various components do: -@@ -2177,7 +2148,8 @@ config("optimize_speed") { +@@ -2145,7 +2127,8 @@ config("optimize_speed") { } } @@ -161,7 +150,7 @@ index 1455a9f..cf19679 100644 cflags = [ "-O1" ] + common_optimize_on_cflags ldflags = common_optimize_on_ldflags visibility = [ ":default_optimization" ] -@@ -2293,7 +2265,8 @@ config("win_pdbaltpath") { +@@ -2261,7 +2244,8 @@ config("win_pdbaltpath") { } # Full symbols. @@ -171,7 +160,7 @@ index 1455a9f..cf19679 100644 if (is_win) { if (use_goma || is_clang) { # Note that with VC++ this requires is_win_fastlink, enforced elsewhere. -@@ -2403,7 +2376,8 @@ config("symbols") { +@@ -2371,7 +2355,8 @@ config("symbols") { # Minimal symbols. # This config guarantees to hold symbol for stack trace which are shown to user # when crash happens in unittests running on buildbot. @@ -181,7 +170,7 @@ index 1455a9f..cf19679 100644 if (is_win) { # Functions, files, and line tables only. cflags = [] -@@ -2458,7 +2432,8 @@ config("minimal_symbols") { +@@ -2426,7 +2411,8 @@ config("minimal_symbols") { } # No symbols.