Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-client/chromium/files/, www-client/chromium/
Date: Thu, 06 Feb 2020 20:48:39
Message-Id: 1581022105.e6d7418bd2939cff68b0d2f1678a9ba19fb05aba.floppym@gentoo
1 commit: e6d7418bd2939cff68b0d2f1678a9ba19fb05aba
2 Author: Stephan Hartmann <stha09 <AT> googlemail <DOT> com>
3 AuthorDate: Thu Feb 6 20:36:28 2020 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 6 20:48:25 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6d7418b
7
8 www-client/chromium: dev channel bump to 81.0.4044.9
9
10 Closes: https://bugs.gentoo.org/707988
11 Package-Manager: Portage-2.3.76, Repoman-2.3.16
12 Signed-off-by: Stephan Hartmann <stha09 <AT> googlemail.com>
13 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
14 Closes: https://github.com/gentoo/gentoo/pull/14585
15
16 www-client/chromium/Manifest | 2 +-
17 ...0.4040.5.ebuild => chromium-81.0.4044.9.ebuild} | 7 +-
18 www-client/chromium/files/chromium-81-clang.patch | 13 -
19 .../files/chromium-81-fix-browser-frame.patch | 35 +++
20 .../chromium/files/chromium-81-gcc-constexpr.patch | 19 ++
21 .../chromium/files/chromium-81-gcc-template.patch | 32 ---
22 www-client/chromium/files/chromium-81-mojom.patch | 303 +++++++++++++++++++++
23 .../chromium/files/chromium-compiler-r11.patch | 51 ++--
24 8 files changed, 381 insertions(+), 81 deletions(-)
25
26 diff --git a/www-client/chromium/Manifest b/www-client/chromium/Manifest
27 index 23022952130..172969051ee 100644
28 --- a/www-client/chromium/Manifest
29 +++ b/www-client/chromium/Manifest
30 @@ -1,2 +1,2 @@
31 DIST chromium-80.0.3987.87.tar.xz 801310184 BLAKE2B d051f77b0e6f167632e383e23983531ee1f44f1fce1629f482cf42882c294816bd98c51ad043b5258aa9652a8da14edf278f70fc63f6978c9dfececa547a1fca SHA512 69aebd760d9b8f2c5f4d15a3a144cd4292ffb11b1536af3596f907e730ac64e909d739bb6e9d322a8f56fac75e4f0b2b5c4c36c4fe4bb52147276b5b0dd03620
32 -DIST chromium-81.0.4040.5.tar.xz 828003840 BLAKE2B 81b3d4b15d5cdc99bcb19ab3745e49b402f00d68a557f58fa3ae0e6b584c28473dba5ca8622373721e54c64760adbf7cb9daae93c1b29336e7f9fc3a387b199f SHA512 47928d6fc022dc0d8b51562c8079baf25aad098f93c52dd4d07d70fa6d9c4b56b4920e163ff3b44d328e741184d5af327394fa56aa36c54509406f2d67e525ed
33 +DIST chromium-81.0.4044.9.tar.xz 791346280 BLAKE2B 790a8537a7a2a9cc6c209afb570580cc05a8f85bd0f61c4d8c13765f8d776962833468390b5685caac3d3590be1d602298e79961beded8b0b4a2b5b5ab1dcbc7 SHA512 e9fb98a66cea6b65e25dda55cceb687a3697e3810b32c1f5ddfc8341e3289b9077056898984ea07b4cdbe33f2e651a197cb57fa89d484ad728672282e43ca48f
34
35 diff --git a/www-client/chromium/chromium-81.0.4040.5.ebuild b/www-client/chromium/chromium-81.0.4044.9.ebuild
36 similarity index 99%
37 rename from www-client/chromium/chromium-81.0.4040.5.ebuild
38 rename to www-client/chromium/chromium-81.0.4044.9.ebuild
39 index bbe6a457c79..b16c58de36f 100644
40 --- a/www-client/chromium/chromium-81.0.4040.5.ebuild
41 +++ b/www-client/chromium/chromium-81.0.4044.9.ebuild
42 @@ -144,12 +144,12 @@ PATCHES=(
43 "${FILESDIR}/chromium-fix-char_traits.patch"
44 "${FILESDIR}/chromium-78-protobuf-export.patch"
45 "${FILESDIR}/chromium-79-gcc-alignas.patch"
46 - "${FILESDIR}/chromium-80-unbundle-libxml.patch"
47 "${FILESDIR}/chromium-80-gcc-quiche.patch"
48 "${FILESDIR}/chromium-80-gcc-blink.patch"
49 - "${FILESDIR}/chromium-81-gcc-template.patch"
50 "${FILESDIR}/chromium-81-gcc-noexcept.patch"
51 - "${FILESDIR}/chromium-81-clang.patch"
52 + "${FILESDIR}/chromium-81-gcc-constexpr.patch"
53 + "${FILESDIR}/chromium-81-mojom.patch"
54 + "${FILESDIR}/chromium-81-fix-browser-frame.patch"
55 )
56
57 pre_build_checks() {
58 @@ -341,7 +341,6 @@ src_prepare() {
59 third_party/qcms
60 third_party/rnnoise
61 third_party/s2cellid
62 - third_party/sfntly
63 third_party/simplejson
64 third_party/skia
65 third_party/skia/include/third_party/skcms
66
67 diff --git a/www-client/chromium/files/chromium-81-clang.patch b/www-client/chromium/files/chromium-81-clang.patch
68 deleted file mode 100644
69 index 8f69b34a0ed..00000000000
70 --- a/www-client/chromium/files/chromium-81-clang.patch
71 +++ /dev/null
72 @@ -1,13 +0,0 @@
73 -diff --git a/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc b/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc
74 -index 659efac..38f6ebc 100644
75 ---- a/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc
76 -+++ b/chrome/browser/enterprise_reporting/notification/extension_request_notification.cc
77 -@@ -46,7 +46,7 @@ constexpr int kNotificationBodies[] = {
78 -
79 - } // namespace
80 -
81 --ExtensionRequestNotification::ExtensionRequestNotification() = default;
82 -+ExtensionRequestNotification::ExtensionRequestNotification() {}
83 -
84 - ExtensionRequestNotification::ExtensionRequestNotification(
85 - Profile* profile,
86
87 diff --git a/www-client/chromium/files/chromium-81-fix-browser-frame.patch b/www-client/chromium/files/chromium-81-fix-browser-frame.patch
88 new file mode 100644
89 index 00000000000..6516e1faf1a
90 --- /dev/null
91 +++ b/www-client/chromium/files/chromium-81-fix-browser-frame.patch
92 @@ -0,0 +1,35 @@
93 +From c73968d63c456d4aaf55c5cd439b42403a3bbeb1 Mon Sep 17 00:00:00 2001
94 +From: Tom Anderson <thomasanderson@××××××××.org>
95 +Date: Mon, 03 Feb 2020 19:53:50 +0000
96 +Subject: [PATCH] Fix browser frame view not getting a relayout after a state change
97 +
98 +views::NonClientView has 2 things: a views::NonClientFrameView and a
99 +views::ClientView. We were previously only invalidating the layout on
100 +the ClientView after a state change. This was causing the browser
101 +frame to paint as if it were still maximized after restoring from
102 +a maximized state on Linux. Invalidating the layout of the frame view
103 +fixes the issue.
104 +
105 +BUG=1046122
106 +R=sky
107 +
108 +Change-Id: I7da525efe1f436564ffffb410afe294e901e5d89
109 +Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2033759
110 +Reviewed-by: Scott Violet <sky@××××××××.org>
111 +Commit-Queue: Thomas Anderson <thomasanderson@××××××××.org>
112 +Cr-Commit-Position: refs/heads/master@{#737890}
113 +---
114 +
115 +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
116 +index 9abbce8..6c00d49 100644
117 +--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
118 ++++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
119 +@@ -717,6 +717,8 @@
120 + NonClientView* non_client_view = widget->non_client_view();
121 + // non_client_view may be NULL, especially during creation.
122 + if (non_client_view) {
123 ++ if (non_client_view->frame_view())
124 ++ non_client_view->frame_view()->InvalidateLayout();
125 + non_client_view->client_view()->InvalidateLayout();
126 + non_client_view->InvalidateLayout();
127 + }
128
129 diff --git a/www-client/chromium/files/chromium-81-gcc-constexpr.patch b/www-client/chromium/files/chromium-81-gcc-constexpr.patch
130 new file mode 100644
131 index 00000000000..a9c1507c078
132 --- /dev/null
133 +++ b/www-client/chromium/files/chromium-81-gcc-constexpr.patch
134 @@ -0,0 +1,19 @@
135 +diff --git a/ui/views/layout/layout_types.h b/ui/views/layout/layout_types.h
136 +index 8f9dbf4..ba118b9 100644
137 +--- a/ui/views/layout/layout_types.h
138 ++++ b/ui/views/layout/layout_types.h
139 +@@ -45,12 +45,12 @@ class VIEWS_EXPORT SizeBounds {
140 + ~SizeBounds() = default;
141 +
142 + constexpr const base::Optional<int>& width() const { return width_; }
143 +- constexpr void set_width(base::Optional<int> width) {
144 ++ inline void set_width(base::Optional<int> width) {
145 + width_ = std::move(width);
146 + }
147 +
148 + constexpr const base::Optional<int>& height() const { return height_; }
149 +- constexpr void set_height(base::Optional<int> height) {
150 ++ inline void set_height(base::Optional<int> height) {
151 + height_ = std::move(height);
152 + }
153 +
154
155 diff --git a/www-client/chromium/files/chromium-81-gcc-template.patch b/www-client/chromium/files/chromium-81-gcc-template.patch
156 deleted file mode 100644
157 index 8553d5f603b..00000000000
158 --- a/www-client/chromium/files/chromium-81-gcc-template.patch
159 +++ /dev/null
160 @@ -1,32 +0,0 @@
161 -diff --git a/third_party/blink/renderer/platform/wtf/list_hash_set.h b/third_party/blink/renderer/platform/wtf/list_hash_set.h
162 -index 7856b7b..76534f6 100644
163 ---- a/third_party/blink/renderer/platform/wtf/list_hash_set.h
164 -+++ b/third_party/blink/renderer/platform/wtf/list_hash_set.h
165 -@@ -308,21 +308,16 @@ class ListHashSetNodeBasePointer {
166 - NodeType& operator*() const { return *Get(); }
167 -
168 - private:
169 -- template <bool = Allocator::kIsGarbageCollected>
170 - void SetSafe(NodeType* node) {
171 -- AsAtomicPtr(&node_)->store(node, std::memory_order_relaxed);
172 -- }
173 -- template <>
174 -- void SetSafe<false>(NodeType* node) {
175 -- node_ = node;
176 -+ if ( Allocator::kIsGarbageCollected )
177 -+ AsAtomicPtr(&node_)->store(node, std::memory_order_relaxed);
178 -+ else
179 -+ node_ = node;
180 - }
181 -
182 -- template <bool = Allocator::kIsGarbageCollected>
183 - NodeType* GetSafe() const {
184 -- return AsAtomicPtr(&node_)->load(std::memory_order_relaxed);
185 -- }
186 -- template <>
187 -- NodeType* GetSafe<false>() const {
188 -+ if ( Allocator::kIsGarbageCollected )
189 -+ return AsAtomicPtr(&node_)->load(std::memory_order_relaxed);
190 - return node_;
191 - }
192 -
193
194 diff --git a/www-client/chromium/files/chromium-81-mojom.patch b/www-client/chromium/files/chromium-81-mojom.patch
195 new file mode 100644
196 index 00000000000..e6675931fbc
197 --- /dev/null
198 +++ b/www-client/chromium/files/chromium-81-mojom.patch
199 @@ -0,0 +1,303 @@
200 +Add missing files in tarball.
201 +
202 +diff --git a/chrome/test/data/webui/mojo/OWNERS b/chrome/test/data/webui/mojo/OWNERS
203 +new file mode 100644
204 +index 000000000000..08850f421205
205 +--- /dev/null
206 ++++ b/chrome/test/data/webui/mojo/OWNERS
207 +@@ -0,0 +1,2 @@
208 ++per-file *.mojom=set noparent
209 ++per-file *.mojom=file://ipc/SECURITY_OWNERS
210 +diff --git a/chrome/test/data/webui/mojo/foobar.mojom b/chrome/test/data/webui/mojo/foobar.mojom
211 +new file mode 100644
212 +index 000000000000..446d365af8fb
213 +--- /dev/null
214 ++++ b/chrome/test/data/webui/mojo/foobar.mojom
215 +@@ -0,0 +1,16 @@
216 ++// Copyright 2019 The Chromium Authors. All rights reserved.
217 ++// Use of this source code is governed by a BSD-style license that can be
218 ++// found in the LICENSE file.
219 ++
220 ++// Test Mojo interfaces for MojoWebUIControllerBrowserTest.
221 ++
222 ++module test.mojom;
223 ++
224 ++interface Foo {
225 ++ GetFoo() => (string value);
226 ++};
227 ++
228 ++interface Bar {
229 ++ GetBar() => (string value);
230 ++};
231 ++
232 +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
233 +new file mode 100644
234 +index 000000000000..658a54ace278
235 +--- /dev/null
236 ++++ b/chrome/test/data/webui/mojo/mojo_web_ui_controller_browsertest.cc
237 +@@ -0,0 +1,253 @@
238 ++// Copyright 2019 The Chromium Authors. All rights reserved.
239 ++// Use of this source code is governed by a BSD-style license that can be
240 ++// found in the LICENSE file.
241 ++
242 ++#include "ui/webui/mojo_web_ui_controller.h"
243 ++
244 ++#include "base/memory/ref_counted_memory.h"
245 ++#include "base/path_service.h"
246 ++#include "base/run_loop.h"
247 ++#include "base/threading/sequenced_task_runner_handle.h"
248 ++#include "chrome/browser/bad_message.h"
249 ++#include "chrome/browser/chrome_browser_interface_binders.h"
250 ++#include "chrome/browser/chrome_content_browser_client.h"
251 ++#include "chrome/browser/ui/browser.h"
252 ++#include "chrome/browser/ui/tabs/tab_strip_model.h"
253 ++#include "chrome/test/base/in_process_browser_test.h"
254 ++#include "chrome/test/data/grit/webui_test_resources.h"
255 ++#include "chrome/test/data/webui/mojo/foobar.mojom.h"
256 ++#include "content/public/browser/render_process_host.h"
257 ++#include "content/public/browser/render_process_host_observer.h"
258 ++#include "content/public/browser/web_contents.h"
259 ++#include "content/public/browser/web_ui_controller_factory.h"
260 ++#include "content/public/browser/web_ui_data_source.h"
261 ++#include "content/public/common/content_client.h"
262 ++#include "content/public/common/url_constants.h"
263 ++#include "content/public/test/browser_test_utils.h"
264 ++#include "content/public/test/no_renderer_crashes_assertion.h"
265 ++#include "content/public/test/test_utils.h"
266 ++#include "services/service_manager/public/cpp/binder_map.h"
267 ++#include "testing/gtest/include/gtest/gtest.h"
268 ++#include "ui/base/resource/resource_bundle.h"
269 ++#include "url/gurl.h"
270 ++
271 ++namespace {
272 ++
273 ++// WebUIController that provides the Foo Mojo API.
274 ++class FooUI : public ui::MojoWebUIController, public ::test::mojom::Foo {
275 ++ public:
276 ++ explicit FooUI(content::WebUI* web_ui)
277 ++ : ui::MojoWebUIController(web_ui), foo_receiver_(this) {
278 ++ content::WebUIDataSource* data_source =
279 ++ content::WebUIDataSource::Create("foo");
280 ++ data_source->SetDefaultResource(IDR_MOJO_WEB_UI_CONTROLLER_TEST_HTML);
281 ++ data_source->DisableContentSecurityPolicy();
282 ++ data_source->AddResourcePath("foobar.mojom-lite.js",
283 ++ IDR_FOOBAR_MOJO_LITE_JS);
284 ++ content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
285 ++ data_source);
286 ++ }
287 ++
288 ++ void BindInterface(mojo::PendingReceiver<::test::mojom::Foo> receiver) {
289 ++ foo_receiver_.Bind(std::move(receiver));
290 ++ }
291 ++
292 ++ // ::test::mojom::Foo:
293 ++ void GetFoo(GetFooCallback callback) override {
294 ++ std::move(callback).Run("foofoo");
295 ++ }
296 ++
297 ++ WEB_UI_CONTROLLER_TYPE_DECL();
298 ++
299 ++ private:
300 ++ mojo::Receiver<::test::mojom::Foo> foo_receiver_;
301 ++
302 ++ DISALLOW_COPY_AND_ASSIGN(FooUI);
303 ++};
304 ++
305 ++WEB_UI_CONTROLLER_TYPE_IMPL(FooUI)
306 ++
307 ++// WebUIController that provides the Foo and Bar Mojo APIs.
308 ++class FooBarUI : public ui::MojoWebUIController,
309 ++ public ::test::mojom::Foo,
310 ++ public ::test::mojom::Bar {
311 ++ public:
312 ++ explicit FooBarUI(content::WebUI* web_ui)
313 ++ : ui::MojoWebUIController(web_ui),
314 ++ foo_receiver_(this),
315 ++ bar_receiver_(this) {
316 ++ content::WebUIDataSource* data_source =
317 ++ content::WebUIDataSource::Create("foobar");
318 ++ data_source->SetDefaultResource(IDR_MOJO_WEB_UI_CONTROLLER_TEST_HTML);
319 ++ data_source->DisableContentSecurityPolicy();
320 ++ data_source->AddResourcePath("foobar.mojom-lite.js",
321 ++ IDR_FOOBAR_MOJO_LITE_JS);
322 ++ content::WebUIDataSource::Add(web_ui->GetWebContents()->GetBrowserContext(),
323 ++ data_source);
324 ++ }
325 ++
326 ++ void BindInterface(mojo::PendingReceiver<::test::mojom::Foo> receiver) {
327 ++ foo_receiver_.Bind(std::move(receiver));
328 ++ }
329 ++
330 ++ void BindInterface(mojo::PendingReceiver<::test::mojom::Bar> receiver) {
331 ++ bar_receiver_.Bind(std::move(receiver));
332 ++ }
333 ++
334 ++ // ::test::mojom::Foo:
335 ++ void GetFoo(GetFooCallback callback) override {
336 ++ std::move(callback).Run("foobarfoo");
337 ++ }
338 ++
339 ++ // ::test::mojom::Bar:
340 ++ void GetBar(GetBarCallback callback) override {
341 ++ std::move(callback).Run("foobarbar");
342 ++ }
343 ++
344 ++ WEB_UI_CONTROLLER_TYPE_DECL();
345 ++
346 ++ private:
347 ++ mojo::Receiver<::test::mojom::Foo> foo_receiver_;
348 ++ mojo::Receiver<::test::mojom::Bar> bar_receiver_;
349 ++
350 ++ DISALLOW_COPY_AND_ASSIGN(FooBarUI);
351 ++};
352 ++
353 ++WEB_UI_CONTROLLER_TYPE_IMPL(FooBarUI)
354 ++
355 ++// WebUIControllerFactory that serves our TestWebUIController.
356 ++class TestWebUIControllerFactory : public content::WebUIControllerFactory {
357 ++ public:
358 ++ TestWebUIControllerFactory() = default;
359 ++
360 ++ std::unique_ptr<content::WebUIController> CreateWebUIControllerForURL(
361 ++ content::WebUI* web_ui,
362 ++ const GURL& url) override {
363 ++ if (url.host_piece() == "foo")
364 ++ return std::make_unique<FooUI>(web_ui);
365 ++ if (url.host_piece() == "foobar")
366 ++ return std::make_unique<FooBarUI>(web_ui);
367 ++
368 ++ return nullptr;
369 ++ }
370 ++
371 ++ content::WebUI::TypeID GetWebUIType(content::BrowserContext* browser_context,
372 ++ const GURL& url) override {
373 ++ if (url.SchemeIs(content::kChromeUIScheme))
374 ++ return reinterpret_cast<content::WebUI::TypeID>(1);
375 ++
376 ++ return content::WebUI::kNoWebUI;
377 ++ }
378 ++
379 ++ bool UseWebUIForURL(content::BrowserContext* browser_context,
380 ++ const GURL& url) override {
381 ++ return url.SchemeIs(content::kChromeUIScheme);
382 ++ }
383 ++ bool UseWebUIBindingsForURL(content::BrowserContext* browser_context,
384 ++ const GURL& url) override {
385 ++ return url.SchemeIs(content::kChromeUIScheme);
386 ++ }
387 ++
388 ++ private:
389 ++ DISALLOW_COPY_AND_ASSIGN(TestWebUIControllerFactory);
390 ++};
391 ++
392 ++} // namespace
393 ++
394 ++class MojoWebUIControllerBrowserTest : public InProcessBrowserTest {
395 ++ public:
396 ++ MojoWebUIControllerBrowserTest() {
397 ++ factory_ = std::make_unique<TestWebUIControllerFactory>();
398 ++ content::WebUIControllerFactory::RegisterFactory(factory_.get());
399 ++ }
400 ++
401 ++ void SetUpOnMainThread() override {
402 ++ base::FilePath pak_path;
403 ++ ASSERT_TRUE(base::PathService::Get(base::DIR_MODULE, &pak_path));
404 ++ pak_path = pak_path.AppendASCII("browser_tests.pak");
405 ++ ui::ResourceBundle::GetSharedInstance().AddDataPackFromPath(
406 ++ pak_path, ui::SCALE_FACTOR_NONE);
407 ++
408 ++ content::SetBrowserClientForTesting(&test_content_browser_client_);
409 ++ }
410 ++
411 ++ private:
412 ++ class TestContentBrowserClient : public ChromeContentBrowserClient {
413 ++ public:
414 ++ TestContentBrowserClient() = default;
415 ++ TestContentBrowserClient(const TestContentBrowserClient&) = delete;
416 ++ TestContentBrowserClient& operator=(const TestContentBrowserClient&) =
417 ++ delete;
418 ++ ~TestContentBrowserClient() override = default;
419 ++
420 ++ void RegisterBrowserInterfaceBindersForFrame(
421 ++ content::RenderFrameHost* render_frame_host,
422 ++ service_manager::BinderMapWithContext<content::RenderFrameHost*>* map)
423 ++ override {
424 ++ ChromeContentBrowserClient::RegisterBrowserInterfaceBindersForFrame(
425 ++ render_frame_host, map);
426 ++ chrome::internal::RegisterWebUIControllerInterfaceBinder<
427 ++ ::test::mojom::Bar, FooBarUI>(map);
428 ++ chrome::internal::RegisterWebUIControllerInterfaceBinder<
429 ++ ::test::mojom::Foo, FooUI, FooBarUI>(map);
430 ++ }
431 ++ };
432 ++
433 ++ std::unique_ptr<TestWebUIControllerFactory> factory_;
434 ++
435 ++ TestContentBrowserClient test_content_browser_client_;
436 ++};
437 ++
438 ++// Attempting to access bindings succeeds for 2 allowed interfaces.
439 ++IN_PROC_BROWSER_TEST_F(MojoWebUIControllerBrowserTest, BindingsAccess) {
440 ++ content::WebContents* web_contents =
441 ++ browser()->tab_strip_model()->GetActiveWebContents();
442 ++
443 ++ ASSERT_TRUE(NavigateToURL(web_contents, content::GetWebUIURL("foobar")));
444 ++
445 ++ EXPECT_EQ("foobarfoo",
446 ++ content::EvalJs(web_contents,
447 ++ "(async () => {"
448 ++ " let fooRemote = test.mojom.Foo.getRemote(true);"
449 ++ " let resp = await fooRemote.getFoo();"
450 ++ " return resp.value;"
451 ++ "})()"));
452 ++
453 ++ EXPECT_EQ("foobarbar",
454 ++ content::EvalJs(web_contents,
455 ++ "(async () => {"
456 ++ " let barRemote = test.mojom.Bar.getRemote(true);"
457 ++ " let resp = await barRemote.getBar();"
458 ++ " return resp.value;"
459 ++ "})()"));
460 ++}
461 ++
462 ++// Attempting to access bindings crashes the renderer when access not allowed.
463 ++IN_PROC_BROWSER_TEST_F(MojoWebUIControllerBrowserTest,
464 ++ BindingsAccessViolation) {
465 ++ content::WebContents* web_contents =
466 ++ browser()->tab_strip_model()->GetActiveWebContents();
467 ++
468 ++ ASSERT_TRUE(NavigateToURL(web_contents, content::GetWebUIURL("foo")));
469 ++
470 ++ EXPECT_EQ("foofoo",
471 ++ content::EvalJs(web_contents,
472 ++ "(async () => {"
473 ++ " let fooRemote = test.mojom.Foo.getRemote(true);"
474 ++ " let resp = await fooRemote.getFoo();"
475 ++ " return resp.value;"
476 ++ "})()"));
477 ++
478 ++ content::ScopedAllowRendererCrashes allow;
479 ++
480 ++ // Attempt to get a remote for a disallowed interface.
481 ++ EXPECT_FALSE(
482 ++ content::EvalJs(web_contents,
483 ++ "(async () => {"
484 ++ " let barRemote = test.mojom.Bar.getRemote(true);"
485 ++ " let resp = await barRemote.getBar();"
486 ++ " return resp.value;"
487 ++ "})()")
488 ++ .error.empty());
489 ++ EXPECT_TRUE(web_contents->IsCrashed());
490 ++}
491 +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
492 +new file mode 100644
493 +index 000000000000..4638ebc261c7
494 +--- /dev/null
495 ++++ b/chrome/test/data/webui/mojo/mojo_web_ui_controller_test.html
496 +@@ -0,0 +1,6 @@
497 ++<html>
498 ++<head>
499 ++<script src="chrome://resources/mojo/mojo/public/js/mojo_bindings_lite.js"></script>
500 ++<script src="/foobar.mojom-lite.js"></script>
501 ++</head>
502 ++</html>
503
504 diff --git a/www-client/chromium/files/chromium-compiler-r11.patch b/www-client/chromium/files/chromium-compiler-r11.patch
505 index f910d6fe2d5..f1b958a1170 100644
506 --- a/www-client/chromium/files/chromium-compiler-r11.patch
507 +++ b/www-client/chromium/files/chromium-compiler-r11.patch
508 @@ -1,17 +1,17 @@
509 -From b29cbcb0ff75b564f83ad93273e881e242f08caf Mon Sep 17 00:00:00 2001
510 +From 137de121a36f9349ad8435fee57940facef82878 Mon Sep 17 00:00:00 2001
511 From: Mike Gilbert <floppym@g.o>
512 -Date: Wed, 22 Jan 2020 09:05:36 +0000
513 +Date: Thu, 6 Feb 2020 07:46:57 +0000
514 Subject: [PATCH] Disable various compiler configs
515
516 ---
517 - build/config/compiler/BUILD.gn | 75 ++++++++++++----------------------
518 - 1 file changed, 25 insertions(+), 50 deletions(-)
519 + build/config/compiler/BUILD.gn | 64 +++++++++++++---------------------
520 + 1 file changed, 25 insertions(+), 39 deletions(-)
521
522 diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
523 -index 1455a9f..cf19679 100644
524 +index eef1140..b34b55b 100644
525 --- a/build/config/compiler/BUILD.gn
526 +++ b/build/config/compiler/BUILD.gn
527 -@@ -270,8 +270,6 @@ config("compiler") {
528 +@@ -260,8 +260,6 @@ config("compiler") {
529
530 configs += [
531 # See the definitions below.
532 @@ -20,7 +20,7 @@ index 1455a9f..cf19679 100644
533 ":compiler_codegen",
534 ":compiler_deterministic",
535 ]
536 -@@ -496,31 +494,6 @@ config("compiler") {
537 +@@ -486,20 +484,6 @@ config("compiler") {
538 }
539 }
540
541 @@ -36,23 +36,12 @@ index 1455a9f..cf19679 100644
542 - "-Xclang",
543 - "-instcombine-lower-dbg-declare=0",
544 - ]
545 --
546 -- if (llvm_force_head_revision) {
547 -- # Before Clang 10, lax vector conversions were allowed by default.
548 -- # Chromium currently relies on this behavior.
549 -- # TODO(crbug.com/1042470): Fix the code and remove this flag.
550 -- if (is_win) {
551 -- cflags += [ "/clang:-flax-vector-conversions=all" ]
552 -- } else if (cros_sdk_version == "") {
553 -- cflags += [ "-flax-vector-conversions=all" ]
554 -- }
555 -- }
556 - }
557 -
558 # C11/C++11 compiler flags setup.
559 # ---------------------------
560 if (is_linux || is_android || (is_nacl && is_clang) || current_os == "aix") {
561 -@@ -1467,6 +1440,12 @@ config("default_warnings") {
562 +@@ -1446,6 +1430,12 @@ config("default_warnings") {
563 cflags_cc += [ "-Wno-class-memaccess" ]
564 }
565
566 @@ -65,7 +54,7 @@ index 1455a9f..cf19679 100644
567 # -Wunused-local-typedefs is broken in gcc,
568 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
569 cflags += [ "-Wno-unused-local-typedefs" ]
570 -@@ -1592,7 +1571,7 @@ config("chromium_code") {
571 +@@ -1560,7 +1550,7 @@ config("chromium_code") {
572 defines = [ "_HAS_NODISCARD" ]
573 }
574 } else {
575 @@ -74,7 +63,7 @@ index 1455a9f..cf19679 100644
576 if (treat_warnings_as_errors) {
577 cflags += [ "-Werror" ]
578
579 -@@ -1601,10 +1580,6 @@ config("chromium_code") {
580 +@@ -1569,10 +1559,6 @@ config("chromium_code") {
581 # well.
582 ldflags = [ "-Werror" ]
583 }
584 @@ -85,7 +74,7 @@ index 1455a9f..cf19679 100644
585
586 # In Chromium code, we define __STDC_foo_MACROS in order to get the
587 # C99 macros on Mac and Linux.
588 -@@ -1613,15 +1588,6 @@ config("chromium_code") {
589 +@@ -1581,15 +1567,6 @@ config("chromium_code") {
590 "__STDC_FORMAT_MACROS",
591 ]
592
593 @@ -101,7 +90,7 @@ index 1455a9f..cf19679 100644
594 if (is_mac) {
595 cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
596 cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
597 -@@ -2025,7 +1991,8 @@ config("default_stack_frames") {
598 +@@ -1993,7 +1970,8 @@ config("default_stack_frames") {
599 }
600
601 # Default "optimization on" config.
602 @@ -111,7 +100,7 @@ index 1455a9f..cf19679 100644
603 if (is_win) {
604 # TODO(thakis): Remove is_clang here, https://crbug.com/598772
605 if (is_official_build && full_wpo_on_official && !is_clang) {
606 -@@ -2051,7 +2018,8 @@ config("optimize") {
607 +@@ -2019,7 +1997,8 @@ config("optimize") {
608 }
609
610 # Same config as 'optimize' but without the WPO flag.
611 @@ -121,7 +110,7 @@ index 1455a9f..cf19679 100644
612 if (is_win) {
613 # Favor size over speed, /O1 must be before the common flags. The GYP
614 # build also specifies /Os and /GF but these are implied by /O1.
615 -@@ -2074,7 +2042,8 @@ config("optimize_no_wpo") {
616 +@@ -2042,7 +2021,8 @@ config("optimize_no_wpo") {
617 }
618
619 # Turn off optimizations.
620 @@ -131,7 +120,7 @@ index 1455a9f..cf19679 100644
621 if (is_win) {
622 cflags = [
623 "/Od", # Disable optimization.
624 -@@ -2108,7 +2077,8 @@ config("no_optimize") {
625 +@@ -2076,7 +2056,8 @@ config("no_optimize") {
626 # Turns up the optimization level. On Windows, this implies whole program
627 # optimization and link-time code generation which is very expensive and should
628 # be used sparingly.
629 @@ -141,7 +130,7 @@ index 1455a9f..cf19679 100644
630 if (is_nacl && is_nacl_irt) {
631 # The NaCl IRT is a special case and always wants its own config.
632 # Various components do:
633 -@@ -2147,7 +2117,8 @@ config("optimize_max") {
634 +@@ -2115,7 +2096,8 @@ config("optimize_max") {
635 #
636 # TODO(crbug.com/621335) - rework how all of these configs are related
637 # so that we don't need this disclaimer.
638 @@ -151,7 +140,7 @@ index 1455a9f..cf19679 100644
639 if (is_nacl && is_nacl_irt) {
640 # The NaCl IRT is a special case and always wants its own config.
641 # Various components do:
642 -@@ -2177,7 +2148,8 @@ config("optimize_speed") {
643 +@@ -2145,7 +2127,8 @@ config("optimize_speed") {
644 }
645 }
646
647 @@ -161,7 +150,7 @@ index 1455a9f..cf19679 100644
648 cflags = [ "-O1" ] + common_optimize_on_cflags
649 ldflags = common_optimize_on_ldflags
650 visibility = [ ":default_optimization" ]
651 -@@ -2293,7 +2265,8 @@ config("win_pdbaltpath") {
652 +@@ -2261,7 +2244,8 @@ config("win_pdbaltpath") {
653 }
654
655 # Full symbols.
656 @@ -171,7 +160,7 @@ index 1455a9f..cf19679 100644
657 if (is_win) {
658 if (use_goma || is_clang) {
659 # Note that with VC++ this requires is_win_fastlink, enforced elsewhere.
660 -@@ -2403,7 +2376,8 @@ config("symbols") {
661 +@@ -2371,7 +2355,8 @@ config("symbols") {
662 # Minimal symbols.
663 # This config guarantees to hold symbol for stack trace which are shown to user
664 # when crash happens in unittests running on buildbot.
665 @@ -181,7 +170,7 @@ index 1455a9f..cf19679 100644
666 if (is_win) {
667 # Functions, files, and line tables only.
668 cflags = []
669 -@@ -2458,7 +2432,8 @@ config("minimal_symbols") {
670 +@@ -2426,7 +2411,8 @@ config("minimal_symbols") {
671 }
672
673 # No symbols.