From 2752ae4ae816e9b16af4abe2a8798aed37ac6fa8 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 16 Jan 2019 23:37:12 +0530 Subject: [PATCH 01/52] chore: roll 73.0.3673.0 --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f76cd20cdd..ffb6ea3b11 100644 --- a/DEPS +++ b/DEPS @@ -10,7 +10,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '72.0.3626.110', + '73.0.3673.0', 'node_version': 'ad2c89ec3be0f5db3ea02b0f591d36a5d84c51ad', From 3f75724a31cfb4771e517474b8399b5f4b23cdfb Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 16 Jan 2019 23:37:52 +0530 Subject: [PATCH 02/52] chore: update patches/common/chromium --- patches/common/chromium/add_realloc.patch | 2 +- .../chromium/allow_webview_file_url.patch | 4 +- ...ink-worker-enable-csp-in-file-scheme.patch | 12 +-- .../chromium/blink_initialization_order.patch | 4 +- .../common/chromium/blink_local_frame.patch | 6 +- .../common/chromium/blink_world_context.patch | 12 +-- .../chromium/browser_compositor_mac.patch | 6 +- patches/common/chromium/build_gn.patch | 4 +- .../common/chromium/can_create_window.patch | 48 ++++++------ patches/common/chromium/color_chooser.patch | 76 ++----------------- .../common/chromium/command-ismediakey.patch | 35 ++++----- .../common/chromium/compositor_delegate.patch | 12 +-- ...r_to_prevent_locking_scheme_registry.patch | 4 +- .../chromium/content_browser_main_loop.patch | 4 +- ...cross_site_document_resource_handler.patch | 10 +-- patches/common/chromium/dcheck.patch | 6 +- .../common/chromium/desktop_media_list.patch | 2 +- .../common/chromium/disable-redraw-lock.patch | 8 +- .../disable_color_correct_rendering.patch | 58 +++++++------- .../disable_detach_webview_frame.patch | 4 +- patches/common/chromium/disable_hidden.patch | 6 +- ...requirement_for_beforeunload_dialogs.patch | 4 +- patches/common/chromium/dump_syms.patch | 4 +- patches/common/chromium/enable_widevine.patch | 15 ++-- .../exclude-a-few-test-files-from-build.patch | 4 +- .../common/chromium/frame_host_manager.patch | 14 ++-- .../gin_enable_disable_v8_platform.patch | 36 ++++----- .../chromium/gritsettings_resource_ids.patch | 4 +- patches/common/chromium/isolate_holder.patch | 6 +- patches/common/chromium/mas-cfisobjc.patch | 8 +- .../mas-cgdisplayusesforcetogray.patch | 2 +- ...launchservicesserverconnectionstatus.patch | 4 +- .../chromium/mas_blink_no_private_api.patch | 6 +- .../common/chromium/mas_no_private_api.patch | 60 +++++++-------- .../common/chromium/net_url_request_job.patch | 4 +- .../chromium/no_cache_storage_check.patch | 4 +- .../chromium/notification_provenance.patch | 4 +- .../chromium/out_of_process_instance.patch | 4 +- patches/common/chromium/pepper_flash.patch | 12 +-- patches/common/chromium/printing.patch | 30 ++++---- .../chromium/proxy_config_monitor.patch | 18 ++--- .../render_widget_host_view_base.patch | 8 +- .../render_widget_host_view_mac.patch | 14 ++-- .../chromium/resource_file_conflict.patch | 6 +- .../common/chromium/scroll_bounce_flag.patch | 4 +- .../ssl_security_state_tab_helper.patch | 34 +++------ .../support_mixed_sandbox_with_zygote.patch | 10 +-- .../common/chromium/thread_capabilities.patch | 2 +- patches/common/chromium/tts.patch | 19 ++--- .../verbose_generate_breakpad_symbols.patch | 20 ++--- patches/common/chromium/web_contents.patch | 8 +- .../chromium/webgl_context_attributes.patch | 30 ++++---- .../common/chromium/webview_cross_drag.patch | 8 +- .../worker_context_will_destroy.patch | 18 ++--- 54 files changed, 328 insertions(+), 419 deletions(-) diff --git a/patches/common/chromium/add_realloc.patch b/patches/common/chromium/add_realloc.patch index 753f7fb587..c9e6b49df2 100644 --- a/patches/common/chromium/add_realloc.patch +++ b/patches/common/chromium/add_realloc.patch @@ -39,7 +39,7 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f GIN_EXPORT static ArrayBufferAllocator* SharedInstance(); diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index 0050eb07bf1f1e8515663dfd14f2a3a1292edd96..96e8702f7e9f2a04a4edbc794d5c45e3e04bf8fb 100644 +index 544e1f638f5e23613dff785f5b74803f2831b960..07098f60eeea370e7a46df39a3877847e29f3a1a 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc @@ -662,6 +662,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { diff --git a/patches/common/chromium/allow_webview_file_url.patch b/patches/common/chromium/allow_webview_file_url.patch index 0ae90e4efb..3e2bdfe166 100644 --- a/patches/common/chromium/allow_webview_file_url.patch +++ b/patches/common/chromium/allow_webview_file_url.patch @@ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch Allow webview to load non-web URLs. diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc -index 83b81f3e28f5f4f3a9fe3c2146c50a966f7e2ec2..d0f2bde4f6f7bb1a8b6cfc5dc990cb30d4432504 100644 +index 14bfd604d8e4fb3935f22fcc2d60257cd680f3c7..99becfe8a77498bd7d557c1275773ff82f2df691 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc -@@ -1462,6 +1462,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( +@@ -1458,6 +1458,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( !policy->IsWebSafeScheme(info.common_params.url.scheme()) && !is_external_protocol; diff --git a/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch b/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch index 17a3afb9bf..717f0d1a32 100644 --- a/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch +++ b/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch @@ -5,14 +5,14 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -index c0cec745454d8e7ec0730852bb324bcae72ed42e..4550698d31ae2c1a511820ae88ce1d914fe10f7f 100644 +index 03b5004edc9dd9bba39db188c71f52625bcce80e..ad37ea96307be715070a21b859b8756e6d837132 100644 --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -@@ -285,7 +285,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( +@@ -307,7 +307,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( // document (which is implemented in WorkerMessagingProxy, and // m_contentSecurityPolicy should be left as nullptr to inherit the policy). - if (!response.Url().ProtocolIs("blob") && -- !response.Url().ProtocolIs("file") && - !response.Url().ProtocolIs("filesystem")) { + if (!response.CurrentRequestUrl().ProtocolIs("blob") && +- !response.CurrentRequestUrl().ProtocolIs("file") && + !response.CurrentRequestUrl().ProtocolIs("filesystem")) { content_security_policy_ = ContentSecurityPolicy::Create(); - content_security_policy_->SetOverrideURLForSelf(response.Url()); + content_security_policy_->SetOverrideURLForSelf( diff --git a/patches/common/chromium/blink_initialization_order.patch b/patches/common/chromium/blink_initialization_order.patch index c143e34cfe..dbd30d2901 100644 --- a/patches/common/chromium/blink_initialization_order.patch +++ b/patches/common/chromium/blink_initialization_order.patch @@ -10,10 +10,10 @@ to fix electron/electron#13787. The backport landed in Chromium 67 but the DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -index b43ca24b2595bbd20fb5cfa68a22ebec87acda33..496e5d16d49977cb2107a7101064093be19b1515 100644 +index 9c3e848f01aef165c21a6d6043b6f9038d31cb66..7c16e8da1052b50f36da8102fdd8b9206dd7883d 100644 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc -@@ -177,11 +177,10 @@ void LocalWindowProxy::Initialize() { +@@ -190,11 +190,10 @@ void LocalWindowProxy::Initialize() { GetFrame()->IsMainFrame()); MainThreadDebugger::Instance()->ContextCreated(script_state_, GetFrame(), origin); diff --git a/patches/common/chromium/blink_local_frame.patch b/patches/common/chromium/blink_local_frame.patch index 8e7a33a991..1383b7c015 100644 --- a/patches/common/chromium/blink_local_frame.patch +++ b/patches/common/chromium/blink_local_frame.patch @@ -14,10 +14,10 @@ when there is code doing that. This patch reverts the change to fix the crash in Electron. diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 72df3508f9ea9219d3ca3aa716afcad01b378f7e..a7b8051311ef259c3297925c2f5050372ec3ac5b 100644 +index 7a728dc2c0d71579f4b7ed2c97cfedbd8e0590e6..af7e96da33bc4e77b2870b108896018ae92078b8 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc -@@ -399,10 +399,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -403,10 +403,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { } CHECK(!view_ || !view_->IsAttached()); @@ -28,7 +28,7 @@ index 72df3508f9ea9219d3ca3aa716afcad01b378f7e..a7b8051311ef259c3297925c2f505037 if (!Client()) return; -@@ -420,6 +416,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { +@@ -424,6 +420,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) { // Notify ScriptController that the frame is closing, since its cleanup ends // up calling back to LocalFrameClient via WindowProxy. GetScriptController().ClearForClose(); diff --git a/patches/common/chromium/blink_world_context.patch b/patches/common/chromium/blink_world_context.patch index 51be49551a..1b369ad363 100644 --- a/patches/common/chromium/blink_world_context.patch +++ b/patches/common/chromium/blink_world_context.patch @@ -5,10 +5,10 @@ Subject: blink_world_context.patch diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h -index 4b680e1b99ee3dbbb8ed74d281ed1768b7b9a87a..4135cd54ddfd2295534515ca5c99eb58471d56ff 100644 +index 0c72c57ac767b84626476e929308148714098c4e..1fb098418471a6c9919ec40792bbb8676d3a8932 100644 --- a/third_party/blink/public/web/web_local_frame.h +++ b/third_party/blink/public/web/web_local_frame.h -@@ -353,6 +353,9 @@ class WebLocalFrame : public WebFrame { +@@ -341,6 +341,9 @@ class WebLocalFrame : public WebFrame { // be calling this API. virtual v8::Local MainWorldScriptContext() const = 0; @@ -19,10 +19,10 @@ index 4b680e1b99ee3dbbb8ed74d281ed1768b7b9a87a..4135cd54ddfd2295534515ca5c99eb58 // that the script evaluated to with callback. Script execution can be // suspend. diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 6f286a3e4007b60479f0279ef24afa3397112962..31ffedb206ae8315a7c19c4e0b091aa119bfe58b 100644 +index 96799bc7f05fd5dc9bf13153ad2abf03c4056be4..a3ceb250ba8648cbf59ad71194195e4f03f9bec2 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -@@ -895,6 +895,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { +@@ -888,6 +888,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { return MainWorldScriptContext()->Global(); } @@ -37,10 +37,10 @@ index 6f286a3e4007b60479f0279ef24afa3397112962..31ffedb206ae8315a7c19c4e0b091aa1 return BindingSecurity::ShouldAllowAccessToFrame( CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()), diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -index 3f046d8c62324b70a89e37e23c4b15bb0b8e6e7a..18c14a90c18cb349fca4c64692bb899b2c1a7622 100644 +index d5e92aad674932782b25767ec084cb05bd39eaef..1cdb948af95c7716ad9b53ee33ea11c746f68443 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h -@@ -149,6 +149,8 @@ class CORE_EXPORT WebLocalFrameImpl final +@@ -145,6 +145,8 @@ class CORE_EXPORT WebLocalFrameImpl final int argc, v8::Local argv[]) override; v8::Local MainWorldScriptContext() const override; diff --git a/patches/common/chromium/browser_compositor_mac.patch b/patches/common/chromium/browser_compositor_mac.patch index 6c822987b0..a8af0c2dc7 100644 --- a/patches/common/chromium/browser_compositor_mac.patch +++ b/patches/common/chromium/browser_compositor_mac.patch @@ -5,7 +5,7 @@ Subject: browser_compositor_mac.patch diff --git a/content/browser/renderer_host/browser_compositor_view_mac.h b/content/browser/renderer_host/browser_compositor_view_mac.h -index da7e3391774e14550f7adf5956ca44b8b880662e..8b399558ad2469f6452e1793e8834d5c4f93adeb 100644 +index 454c4cfd5a73bda737ec4570101517718518e1d8..9fa3b7ca2eb07f470ba5595f5da6013956b14491 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.h +++ b/content/browser/renderer_host/browser_compositor_view_mac.h @@ -60,6 +60,8 @@ class CONTENT_EXPORT BrowserCompositorMac : public DelegatedFrameHostClient, @@ -26,10 +26,10 @@ index da7e3391774e14550f7adf5956ca44b8b880662e..8b399558ad2469f6452e1793e8834d5c viz::mojom::CompositorFrameSinkClient* renderer_compositor_frame_sink); void OnDidNotProduceFrame(const viz::BeginFrameAck& ack); diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm -index 21d3b34cc13f3471dcef456ec92ad7c1c4a012f4..cffbf04e781cff2d10283c7ef2093959f25e432b 100644 +index 0817b4eca4f4e6f7f5d250589c1e4dbcc068237c..dcc2340e59771e8d73de7e97fa2371d8bec7b149 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm -@@ -79,6 +79,12 @@ BrowserCompositorMac::~BrowserCompositorMac() { +@@ -79,6 +79,12 @@ DCHECK_EQ(1u, num_erased); } diff --git a/patches/common/chromium/build_gn.patch b/patches/common/chromium/build_gn.patch index d161a49c72..6a4dfee83f 100644 --- a/patches/common/chromium/build_gn.patch +++ b/patches/common/chromium/build_gn.patch @@ -5,7 +5,7 @@ Subject: build_gn.patch diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn -index f33cba178d7710b1ad624fcd1b649b370bb401a4..15ac71c3fddc63121f6959e69eb1ac8e9c15310d 100644 +index 9e843f3c30d28a529c22e21b7fe4ba7439978156..1bace3eb626b86c7a47c3dccaf5442c86a14a6b8 100644 --- a/build/config/BUILDCONFIG.gn +++ b/build/config/BUILDCONFIG.gn @@ -123,6 +123,9 @@ if (current_os == "") { @@ -18,7 +18,7 @@ index f33cba178d7710b1ad624fcd1b649b370bb401a4..15ac71c3fddc63121f6959e69eb1ac8e # Set to enable the official build level of optimization. This has nothing # to do with branding, but enables an additional level of optimization above # release (!is_debug). This might be better expressed as a tri-state -@@ -537,6 +540,7 @@ default_compiler_configs = [ +@@ -441,6 +444,7 @@ default_compiler_configs = [ "//build/config/compiler:thin_archive", "//build/config/coverage:default_coverage", "//build/config/sanitizers:default_sanitizer_flags", diff --git a/patches/common/chromium/can_create_window.patch b/patches/common/chromium/can_create_window.patch index bc44ff950b..3631a59d88 100644 --- a/patches/common/chromium/can_create_window.patch +++ b/patches/common/chromium/can_create_window.patch @@ -5,10 +5,10 @@ Subject: can_create_window.patch diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index e738789b56a39c8d1247c3916336c5fd2ff59446..a75b38add55b5c35c6480606b2ed856190d44413 100644 +index a76dcf7c0197a146ac060cabcdf8f0d77b7d80f1..b9871c1fb327352dd9c83a751efea0052cc1e997 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -3517,6 +3517,38 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -3664,6 +3664,38 @@ void RenderFrameHostImpl::CreateNewWindow( "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url", params->target_url.possibly_invalid_spec()); @@ -47,8 +47,8 @@ index e738789b56a39c8d1247c3916336c5fd2ff59446..a75b38add55b5c35c6480606b2ed8561 bool no_javascript_access = false; // Filter out URLs to which navigation is disallowed from this context. -@@ -3545,6 +3577,7 @@ void RenderFrameHostImpl::CreateNewWindow( - last_committed_origin_.GetURL(), params->window_container_type, +@@ -3692,6 +3724,7 @@ void RenderFrameHostImpl::CreateNewWindow( + last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, + params->additional_features, body, @@ -56,7 +56,7 @@ index e738789b56a39c8d1247c3916336c5fd2ff59446..a75b38add55b5c35c6480606b2ed8561 &no_javascript_access); diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc -index b72385bcebf35f16ad913e1f2a824653503bc483..6bfa8c215fd221031902ab63a38eef7234502352 100644 +index 0da371ff7af08265ff5a06c5fe8c3bea59b5f1ea..2f00c1e7fd7dd138c53c3eff3e0010f17db68ca3 100644 --- a/content/browser/security_exploit_browsertest.cc +++ b/content/browser/security_exploit_browsertest.cc @@ -387,6 +387,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, @@ -68,7 +68,7 @@ index b72385bcebf35f16ad913e1f2a824653503bc483..6bfa8c215fd221031902ab63a38eef72 std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus, mojom::CreateNewWindowReplyPtr) {})); diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index a9cd1241fdcfbd40bb2944193328b15929bd5f14..5207347bc8292b04a4452df5fe66984fb8d4cd7f 100644 +index e566a15b798e2586fa4fae3c4db97ce5f4f2f09f..8a08c7a79eba24bce7f11cf8c499432549c4f25b 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom @@ -12,6 +12,8 @@ import "content/public/common/resource_type.mojom"; @@ -80,7 +80,7 @@ index a9cd1241fdcfbd40bb2944193328b15929bd5f14..5207347bc8292b04a4452df5fe66984f import "mojo/public/mojom/base/string16.mojom"; import "mojo/public/mojom/base/unguessable_token.mojom"; import "services/network/public/mojom/url_loader.mojom"; -@@ -178,6 +180,24 @@ interface FrameFactory { +@@ -187,6 +189,24 @@ interface FrameFactory { CreateFrame(int32 frame_routing_id, Frame& frame); }; @@ -105,7 +105,7 @@ index a9cd1241fdcfbd40bb2944193328b15929bd5f14..5207347bc8292b04a4452df5fe66984f struct CreateNewWindowParams { // True if this open request came in the context of a user gesture. // -@@ -217,6 +237,10 @@ struct CreateNewWindowParams { +@@ -226,6 +246,10 @@ struct CreateNewWindowParams { // The window features to use for the new window. blink.mojom.WindowFeatures features; @@ -117,7 +117,7 @@ index a9cd1241fdcfbd40bb2944193328b15929bd5f14..5207347bc8292b04a4452df5fe66984f // Operation result when the renderer asks the browser to create a new window. diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index 9029d6576bc13a49ac2b6781d12e7641b7d4178b..543e9d90098e65286482b82a98a116d3224925a9 100644 +index dc653fc3af345d20fbff9fc4c399bc1452c4850b..499c853a9a3d4c294ae0e6bfdb857ac67c31a144 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -494,6 +494,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -130,10 +130,10 @@ index 9029d6576bc13a49ac2b6781d12e7641b7d4178b..543e9d90098e65286482b82a98a116d3 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index ff83421f2bb8268ccc32d95ed9d2b4e7715c8d7b..6962a00811a20a8dd78ee3688fac31a87500b4dc 100644 +index 2e5e199c4bc6ff6b1559f8c6f1e03e344fcb110b..384b51c1faa7045f2319854db59be27af779569d 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -170,6 +170,7 @@ class RenderFrameHost; +@@ -171,6 +171,7 @@ class RenderFrameHost; class RenderProcessHost; class RenderViewHost; class ResourceContext; @@ -141,7 +141,7 @@ index ff83421f2bb8268ccc32d95ed9d2b4e7715c8d7b..6962a00811a20a8dd78ee3688fac31a8 class ServiceManagerConnection; class SiteInstance; class SpeechRecognitionManagerDelegate; -@@ -781,6 +782,8 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -788,6 +789,8 @@ class CONTENT_EXPORT ContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -151,10 +151,10 @@ index ff83421f2bb8268ccc32d95ed9d2b4e7715c8d7b..6962a00811a20a8dd78ee3688fac31a8 bool opener_suppressed, bool* no_javascript_access); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 7bf71ed5baaf391b96d8cfff2a5a3e4929cd3a07..92469c3007c2108756e685e7897b7c8c4a49c00f 100644 +index ceb8568c9da3109dbc2f9a04cc8fc93e394d5294..bba68744d600f5f4482cf9cb3941f38a79478966 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc -@@ -77,6 +77,7 @@ +@@ -76,6 +76,7 @@ #include "content/renderer/ime_event_guard.h" #include "content/renderer/internal_document_state_data.h" #include "content/renderer/loader/request_extra_data.h" @@ -209,11 +209,11 @@ index 7bf71ed5baaf391b96d8cfff2a5a3e4929cd3a07..92469c3007c2108756e685e7897b7c8c // We preserve this information before sending the message since |params| is // moved on send. bool is_background_tab = -diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.cc b/content/shell/browser/layout_test/layout_test_content_browser_client.cc -index 393a34c290fc9ec5a56b685f5ba704132c8610f1..95498ec705ae3ea96efd387559f20585d1cae9f2 100644 ---- a/content/shell/browser/layout_test/layout_test_content_browser_client.cc -+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.cc -@@ -299,6 +299,8 @@ bool LayoutTestContentBrowserClient::CanCreateWindow( +diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc +index 5352c9ccd0cf0cc13fd06397bef1a91dc987b46c..486ce0eb0400f5dd0bac5eda9f7def226e7efbba 100644 +--- a/content/shell/browser/web_test/web_test_content_browser_client.cc ++++ b/content/shell/browser/web_test/web_test_content_browser_client.cc +@@ -298,6 +298,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, @@ -222,11 +222,11 @@ index 393a34c290fc9ec5a56b685f5ba704132c8610f1..95498ec705ae3ea96efd387559f20585 bool user_gesture, bool opener_suppressed, bool* no_javascript_access) { -diff --git a/content/shell/browser/layout_test/layout_test_content_browser_client.h b/content/shell/browser/layout_test/layout_test_content_browser_client.h -index b416ba6d27d3ad118440bc92ffe95ddd362f6ccf..81271680f73fa3606f672b9e6069c9f74ffbef44 100644 ---- a/content/shell/browser/layout_test/layout_test_content_browser_client.h -+++ b/content/shell/browser/layout_test/layout_test_content_browser_client.h -@@ -67,6 +67,8 @@ class LayoutTestContentBrowserClient : public ShellContentBrowserClient { +diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h +index ad388b224dc8dec395a9ea82c67ad4031851a2cc..d5cfe02d61dd28c49f4a5e2714f03cd4ebe9e119 100644 +--- a/content/shell/browser/web_test/web_test_content_browser_client.h ++++ b/content/shell/browser/web_test/web_test_content_browser_client.h +@@ -67,6 +67,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient { const std::string& frame_name, WindowOpenDisposition disposition, const blink::mojom::WindowFeatures& features, diff --git a/patches/common/chromium/color_chooser.patch b/patches/common/chromium/color_chooser.patch index 9da0db708d..aff91e9fd1 100644 --- a/patches/common/chromium/color_chooser.patch +++ b/patches/common/chromium/color_chooser.patch @@ -3,79 +3,13 @@ From: Heilig Benedek Date: Thu, 18 Oct 2018 17:08:13 -0700 Subject: color_chooser.patch -Removes a couple of stuff from the chromium implementation of ColorChooser -to decouple it from dependencies. +Disables a DCHECK that crashes the ColorChooser on Windows, +that DCHECK most likely is an artifact that remained in chromium from a +long time ago (last update of that part of the code was around 2012-2013, +and this is purely UI, I don't think they have automated tests for it). -Most of the stuff removed is actually related to other dialog types that -we don't currently support, but chrome/browser/ui/browser_dialogs.h has -a function for them to create them. Also disables a DCHECK that crashes -the ColorChooser on Windows, that DCHECK most likely is an artifact that -remained in chromium from a long time ago (last update of that part of the -code was around 2012-2013, and this is purely UI, I don't think they have -automated tests for it). - -diff --git a/chrome/browser/ui/browser_dialogs.h b/chrome/browser/ui/browser_dialogs.h -index 415ca1dcaf946fc576ddad660ea507981fd81458..2a5352b358a8f337e61af1143fe0a84628985eab 100644 ---- a/chrome/browser/ui/browser_dialogs.h -+++ b/chrome/browser/ui/browser_dialogs.h -@@ -4,7 +4,7 @@ - - #ifndef CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ - #define CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ -- -+#if 0 - #include - #include - #include -@@ -17,6 +17,7 @@ - #include "chrome/browser/ui/bookmarks/bookmark_editor.h" - #include "content/public/browser/content_browser_client.h" - #include "content/public/browser/resource_request_info.h" -+#endif - #include "third_party/skia/include/core/SkColor.h" - #include "ui/gfx/native_widget_types.h" - -@@ -66,7 +67,7 @@ struct SelectedFileInfo; - } - - namespace chrome { -- -+#if 0 - // Shows or hides the Task Manager. |browser| can be NULL when called from Ash. - // Returns a pointer to the underlying TableModel, which can be ignored, or used - // for testing. -@@ -138,10 +139,11 @@ void ShowPWAInstallDialog(content::WebContents* web_contents, - // user interaction. - void SetAutoAcceptPWAInstallDialogForTesting(bool auto_accept); - -+#endif - // Shows a color chooser that reports to the given WebContents. - content::ColorChooser* ShowColorChooser(content::WebContents* web_contents, - SkColor initial_color); -- -+#if 0 - #if defined(OS_MACOSX) - - // Bridging methods that show/hide the toolkit-views based Task Manager on Mac. -@@ -313,13 +315,13 @@ void ShowChromeCleanerRebootPrompt( - safe_browsing::ChromeCleanerRebootDialogController* dialog_controller); - - #endif // OS_WIN -- -+#endif - } // namespace chrome -- -+#if 0 - void ShowFolderUploadConfirmationDialog( - const base::FilePath& path, - base::OnceCallback&)> callback, - std::vector selected_files, - content::WebContents* web_contents); -- -+#endif - #endif // CHROME_BROWSER_UI_BROWSER_DIALOGS_H_ diff --git a/chrome/browser/ui/views/color_chooser_win.cc b/chrome/browser/ui/views/color_chooser_win.cc -index 06381ef0e5ca34d141363213a846e5a9baa5fd8a..acb3a6e9e6476d9d2e3f445237246e6ae32e1764 100644 +index 434842ba0f81206a43fb26874930bf7309782890..93b4152003eaea05f0e16cd049687fbcbc672fb0 100644 --- a/chrome/browser/ui/views/color_chooser_win.cc +++ b/chrome/browser/ui/views/color_chooser_win.cc @@ -91,7 +91,7 @@ void ColorChooserWin::OnColorChooserDialogClosed() { diff --git a/patches/common/chromium/command-ismediakey.patch b/patches/common/chromium/command-ismediakey.patch index b96b33e0e3..dae5cfef69 100644 --- a/patches/common/chromium/command-ismediakey.patch +++ b/patches/common/chromium/command-ismediakey.patch @@ -15,10 +15,10 @@ and electron/electron@d2368d2d3b3de9eec4cc32b6aaf035cc89921bf1 as patches. diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/browser/extensions/global_shortcut_listener_mac.mm -index f612ba2fb7952654663cbce596c43b0b65d5ea29..77c2c68e6f9bfec3fc887e2119243cee1321cd17 100644 +index 5ab71f9a7632f0211f2efd7be2298203f32fa83d..e99f55c82e1d59e919fbab65b9cbe833dfa79771 100644 --- a/chrome/browser/extensions/global_shortcut_listener_mac.mm +++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm -@@ -20,6 +20,26 @@ using extensions::GlobalShortcutListenerMac; +@@ -20,6 +20,26 @@ namespace extensions { @@ -46,10 +46,10 @@ index f612ba2fb7952654663cbce596c43b0b65d5ea29..77c2c68e6f9bfec3fc887e2119243cee GlobalShortcutListener* GlobalShortcutListener::GetInstance() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc -index 65b244d55441b07f55e61c7b634d6cec57f2b1e7..a217f0a1ad965331502dc01fde9ff0a2d0399326 100644 +index e5cfd70cc2effcbfd75e60357a44ce467e35fbc9..41d3ebd0628b4a8b5966b2b573d5feac4a19dc82 100644 --- a/chrome/browser/extensions/global_shortcut_listener_win.cc +++ b/chrome/browser/extensions/global_shortcut_listener_win.cc -@@ -63,6 +63,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, +@@ -60,6 +60,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, modifiers |= (LOWORD(lparam) & MOD_SHIFT) ? ui::EF_SHIFT_DOWN : 0; modifiers |= (LOWORD(lparam) & MOD_ALT) ? ui::EF_ALT_DOWN : 0; modifiers |= (LOWORD(lparam) & MOD_CONTROL) ? ui::EF_CONTROL_DOWN : 0; @@ -58,17 +58,8 @@ index 65b244d55441b07f55e61c7b634d6cec57f2b1e7..a217f0a1ad965331502dc01fde9ff0a2 ui::Accelerator accelerator( ui::KeyboardCodeForWindowsKeyCode(key_code), modifiers); -@@ -77,6 +79,8 @@ bool GlobalShortcutListenerWin::RegisterAcceleratorImpl( - modifiers |= accelerator.IsShiftDown() ? MOD_SHIFT : 0; - modifiers |= accelerator.IsCtrlDown() ? MOD_CONTROL : 0; - modifiers |= accelerator.IsAltDown() ? MOD_ALT : 0; -+ modifiers |= accelerator.IsCmdDown() ? MOD_WIN : 0; -+ - static int hotkey_id = 0; - bool success = !!RegisterHotKey( - gfx::SingletonHwnd::GetInstance()->hwnd(), diff --git a/chrome/browser/extensions/global_shortcut_listener_x11.cc b/chrome/browser/extensions/global_shortcut_listener_x11.cc -index 362811063a426c27993563f236b0aa8b7034aa3f..fc407da7047b6d1b57db44eca65da6e1d743431f 100644 +index 392cf3d58c64c088596e8d321a2ce37b0ec60b6e..43e30f47240dc10a3a9b950255d4e48792cc4159 100644 --- a/chrome/browser/extensions/global_shortcut_listener_x11.cc +++ b/chrome/browser/extensions/global_shortcut_listener_x11.cc @@ -38,6 +38,7 @@ int GetNativeModifiers(const ui::Accelerator& accelerator) { @@ -89,23 +80,23 @@ index 362811063a426c27993563f236b0aa8b7034aa3f..fc407da7047b6d1b57db44eca65da6e1 ui::Accelerator accelerator( ui::KeyboardCodeFromXKeyEvent(x_event), modifiers); diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm -index cd595b0c017d6e36a5d94f7c99fe0a098a52b067..941c1a76a1c3ebe542aebcc9dc301d19bab47057 100644 +index 2320015f9d38f3313bee1de6872910e27cd259d1..33f2ac9c021b69fe17c1857b6dfaa9808e90136b 100644 --- a/ui/base/accelerators/media_keys_listener_mac.mm +++ b/ui/base/accelerators/media_keys_listener_mac.mm -@@ -30,6 +30,12 @@ ui::KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) { +@@ -31,6 +31,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) { case NX_KEYTYPE_NEXT: case NX_KEYTYPE_FAST: - return ui::VKEY_MEDIA_NEXT_TRACK; + return VKEY_MEDIA_NEXT_TRACK; + case NX_KEYTYPE_SOUND_UP: -+ return ui::VKEY_VOLUME_UP; ++ return VKEY_VOLUME_UP; + case NX_KEYTYPE_SOUND_DOWN: -+ return ui::VKEY_VOLUME_DOWN; ++ return VKEY_VOLUME_DOWN; + case NX_KEYTYPE_MUTE: -+ return ui::VKEY_VOLUME_MUTE; ++ return VKEY_VOLUME_MUTE; } - return ui::VKEY_UNKNOWN; + return VKEY_UNKNOWN; } -@@ -180,7 +186,10 @@ CGEventRef MediaKeysListenerImpl::EventTapCallback(CGEventTapProxy proxy, +@@ -189,7 +195,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy, int key_code = (data1 & 0xFFFF0000) >> 16; if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT && key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST && diff --git a/patches/common/chromium/compositor_delegate.patch b/patches/common/chromium/compositor_delegate.patch index 79ebf48d3f..ec50f97280 100644 --- a/patches/common/chromium/compositor_delegate.patch +++ b/patches/common/chromium/compositor_delegate.patch @@ -5,7 +5,7 @@ Subject: compositor_delegate.patch diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc -index 97d3236bed1726170966683f5b7dec7540b0603e..bc20368abe66b954dc292e8e2521de42349d6a57 100644 +index 9d960547e17cc5459a2034f15de3c0f9e4ae92c7..fb9fb933ff19bf23224fb219e70039d99e42c0f8 100644 --- a/content/browser/compositor/gpu_process_transport_factory.cc +++ b/content/browser/compositor/gpu_process_transport_factory.cc @@ -482,10 +482,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( @@ -32,10 +32,10 @@ index 97d3236bed1726170966683f5b7dec7540b0603e..bc20368abe66b954dc292e8e2521de42 } else { DCHECK(context_provider); diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index 6f46fd5b4b57139da6855af99c2788a926c5ef25..4237c75c37ca4476e9fad25765629f7a14df042b 100644 +index a445b569ede1cd9331003e21b0427971d98ef924..087802fc0d47276c1449b4d9153756f6beb39bad 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h -@@ -26,6 +26,7 @@ +@@ -25,6 +25,7 @@ #include "components/viz/common/surfaces/frame_sink_id.h" #include "components/viz/common/surfaces/local_surface_id.h" #include "components/viz/host/host_frame_sink_client.h" @@ -43,7 +43,7 @@ index 6f46fd5b4b57139da6855af99c2788a926c5ef25..4237c75c37ca4476e9fad25765629f7a #include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkMatrix44.h" #include "ui/compositor/compositor_animation_observer.h" -@@ -194,6 +195,15 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -193,6 +194,15 @@ class COMPOSITOR_EXPORT ContextFactory { virtual bool SyncTokensRequiredForDisplayCompositor() = 0; }; @@ -59,7 +59,7 @@ index 6f46fd5b4b57139da6855af99c2788a926c5ef25..4237c75c37ca4476e9fad25765629f7a // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -235,6 +245,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -232,6 +242,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -69,7 +69,7 @@ index 6f46fd5b4b57139da6855af99c2788a926c5ef25..4237c75c37ca4476e9fad25765629f7a // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -448,6 +461,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -440,6 +453,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ui::ContextFactory* context_factory_; ui::ContextFactoryPrivate* context_factory_private_; diff --git a/patches/common/chromium/content_allow_embedder_to_prevent_locking_scheme_registry.patch b/patches/common/chromium/content_allow_embedder_to_prevent_locking_scheme_registry.patch index 7563211283..e33d9cc6f2 100644 --- a/patches/common/chromium/content_allow_embedder_to_prevent_locking_scheme_registry.patch +++ b/patches/common/chromium/content_allow_embedder_to_prevent_locking_scheme_registry.patch @@ -12,10 +12,10 @@ Without this patch, calling `registerStandardSchemes` during initialization when in debug mode will cause a DCHECK to fire. diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc -index 88565a9019f378021c2b6251a4fada275d6062b1..8bedc05fe860f40e5f531f83fc5cc5c7812b9532 100644 +index a62f2ecf52bb95261750c9236bd2ba1f53d737f4..38b25c5befd88659b2769d69ef1323de60b34ec7 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc -@@ -747,7 +747,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { +@@ -749,7 +749,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) { #endif RegisterPathProvider(); diff --git a/patches/common/chromium/content_browser_main_loop.patch b/patches/common/chromium/content_browser_main_loop.patch index f95b5da3a3..442ace6273 100644 --- a/patches/common/chromium/content_browser_main_loop.patch +++ b/patches/common/chromium/content_browser_main_loop.patch @@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously in atom::CommonWebContentsDelegate::ResetManageWebContents. diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc -index bce899c644484962d22b129f56f8fc3cbcb9f3b3..68867c51bed182fae0510e0b92d4cb715956135b 100644 +index a69d86afff84745e1b0cd85ae6eec48f10127ab5..0782f0e890ee86c4f051e3102e3d20bee8276479 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc -@@ -1526,7 +1526,7 @@ void BrowserMainLoop::MainMessageLoopRun() { +@@ -1543,7 +1543,7 @@ void BrowserMainLoop::MainMessageLoopRun() { } base::RunLoop run_loop; diff --git a/patches/common/chromium/cross_site_document_resource_handler.patch b/patches/common/chromium/cross_site_document_resource_handler.patch index 646671e4dc..d26d9c1e57 100644 --- a/patches/common/chromium/cross_site_document_resource_handler.patch +++ b/patches/common/chromium/cross_site_document_resource_handler.patch @@ -8,10 +8,10 @@ this patch can be removed once we switch to network service, where the embedders have a chance to design their URLLoaders. diff --git a/content/browser/loader/cross_site_document_resource_handler.cc b/content/browser/loader/cross_site_document_resource_handler.cc -index be1724e19eeb0186dc20dad48e0d604ff87918e5..3dea6a89eb12dc6be157c39787358cd86810da16 100644 +index 7d5a3367774f558583ea69e60c46ab8636a19a81..190565b067ef869a332b77322dc62403c36c1a00 100644 --- a/content/browser/loader/cross_site_document_resource_handler.cc +++ b/content/browser/loader/cross_site_document_resource_handler.cc -@@ -619,6 +619,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders( +@@ -631,6 +631,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders( return false; } @@ -22,7 +22,7 @@ index be1724e19eeb0186dc20dad48e0d604ff87918e5..3dea6a89eb12dc6be157c39787358cd8 } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index f564df8841d1eaea29d4f09c679263ec97552e3b..809e140c4f6004aa95997df6fb6b76e2f8e23f95 100644 +index cbd25b0f44a74671c924fd7a35f6fd84632c5f8c..aebf393cf0598335bc395c5584d4e7bcce6bf737 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -58,6 +58,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should @@ -37,10 +37,10 @@ index f564df8841d1eaea29d4f09c679263ec97552e3b..809e140c4f6004aa95997df6fb6b76e2 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index af64896d0567870672bf4e2f45f7d76e1df68844..4ce6d14bd654e967e8cd5de43157167b98c162fc 100644 +index d2aa50c1e0ff84ef2313fa058b9ecc677cd20d5c..59d53c27e66e532e7531bf0e8ccee97800a759a5 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -235,6 +235,9 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -237,6 +237,9 @@ class CONTENT_EXPORT ContentBrowserClient { content::RenderFrameHost* rfh, content::SiteInstance* pending_site_instance){}; diff --git a/patches/common/chromium/dcheck.patch b/patches/common/chromium/dcheck.patch index 47bc77e3b2..c854b6278d 100644 --- a/patches/common/chromium/dcheck.patch +++ b/patches/common/chromium/dcheck.patch @@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc -index 6dfe29cb33f494228c254ca4a1890626af68e2d7..30fa308bca29c77e4708b108d17a7e5e94092181 100644 +index 63f520bae169ecdcc311bf038b962b1ff3e30126..734e51af5ecbf5faa210255a1fae3efda5293ac8 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc -@@ -1101,8 +1101,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( +@@ -1153,8 +1153,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( return NAVIGATION_TYPE_NEW_SUBFRAME; } @@ -33,7 +33,7 @@ index 6dfe29cb33f494228c254ca4a1890626af68e2d7..30fa308bca29c77e4708b108d17a7e5e if (rfh->GetParent()) { // All manual subframes would be did_create_new_entry and handled above, so -@@ -1339,7 +1341,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( +@@ -1395,7 +1397,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon(); } diff --git a/patches/common/chromium/desktop_media_list.patch b/patches/common/chromium/desktop_media_list.patch index 5330b489ee..546a66d8a2 100644 --- a/patches/common/chromium/desktop_media_list.patch +++ b/patches/common/chromium/desktop_media_list.patch @@ -133,7 +133,7 @@ index 47401abc984e6fe26c7f4c5399aa565c687060b0..ca6a527ffac877c27aac94337ec5a7b5 protected: virtual ~DesktopMediaListObserver() {} diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc -index 867c10fb396c3c41cb68c4362c7a5175603489b9..13862dbeb06d933f1244d13148d040094d544086 100644 +index 7288cface09dee8b42eeb20e03c96cb825740e1b..440377eda5bb5bafea5cddaa40203fd8834f410a 100644 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc @@ -6,14 +6,15 @@ diff --git a/patches/common/chromium/disable-redraw-lock.patch b/patches/common/chromium/disable-redraw-lock.patch index ec34c6a07c..b543aef2c7 100644 --- a/patches/common/chromium/disable-redraw-lock.patch +++ b/patches/common/chromium/disable-redraw-lock.patch @@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 322315fb109b6260fcc9a243c910e789ee0a666c..27b9b8a1ea25559eb2fa45023085ddde6da3b719 100644 +index 66ddf5c2737785943c01adeb040b7da7d24ea624..a963ee677e4b3777ba6a8c6fcfd1bf0d8c7e07c8 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -288,6 +288,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500; @@ -49,7 +49,7 @@ index 322315fb109b6260fcc9a243c910e789ee0a666c..27b9b8a1ea25559eb2fa45023085ddde // HWNDMessageHandler, gfx::WindowImpl overrides: diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h -index c0f8d689ffdfaa52ef28de0b5344739f27f57eb1..5a376f06e2bcca0875f30ea37cc9a1feaf521ad5 100644 +index 10c2fcd1742974d373f68d3fa13f2a0bb8ce2c76..533f80fd1a8f97e6153c610d6fab2f594590ffe3 100644 --- a/ui/views/win/hwnd_message_handler.h +++ b/ui/views/win/hwnd_message_handler.h @@ -182,6 +182,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl, @@ -62,10 +62,10 @@ index c0f8d689ffdfaa52ef28de0b5344739f27f57eb1..5a376f06e2bcca0875f30ea37cc9a1fe HICON GetDefaultWindowIcon() const override; HICON GetSmallWindowIcon() const override; diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h -index 690bc7aedd2893a017c13decc847b7ab9a203ccf..529f08d6321bbc91767a60b6be2fae6efdd585c2 100644 +index a3c4e34bd26891e1bb98bc47038700da7e5a6b94..a919147ef1d46fe562ac74cdf515ae2d3ff8e2c4 100644 --- a/ui/views/win/hwnd_message_handler_delegate.h +++ b/ui/views/win/hwnd_message_handler_delegate.h -@@ -45,6 +45,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { +@@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate { // True if the widget associated with this window has a non-client view. virtual bool HasNonClientView() const = 0; diff --git a/patches/common/chromium/disable_color_correct_rendering.patch b/patches/common/chromium/disable_color_correct_rendering.patch index 9fe3a58b6a..a6f7c6c6ae 100644 --- a/patches/common/chromium/disable_color_correct_rendering.patch +++ b/patches/common/chromium/disable_color_correct_rendering.patch @@ -19,10 +19,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index dcfc217ced6adb75d6029b228f10bc8572d0018f..7882c60a5105ef28b9af776a9e406d37be70996d 100644 +index 5413674c05060cfca539037fbe4a26316fbab504..970a259c5d04d5af7191958505e7806ffa2ece65 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1607,6 +1607,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1570,6 +1570,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( } RasterColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { @@ -34,7 +34,7 @@ index dcfc217ced6adb75d6029b228f10bc8572d0018f..7882c60a5105ef28b9af776a9e406d37 // The pending tree will have the most recently updated color space, so // prefer that. diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h -index 7f074dd977e51270fa148df683efeffbce435a4b..fb982f81d082552225d9411dc764c7756cf50e02 100644 +index 9de6c5f5f45d7cb3e9141ffb480f6052090cc696..30f491ec4a2663d18bf22c27eff8dbbd7440e195 100644 --- a/cc/trees/layer_tree_settings.h +++ b/cc/trees/layer_tree_settings.h @@ -98,6 +98,8 @@ class CC_EXPORT LayerTreeSettings { @@ -47,7 +47,7 @@ index 7f074dd977e51270fa148df683efeffbce435a4b..fb982f81d082552225d9411dc764c775 // Image Decode Service and raster tiles without images until the decode is // ready. diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h -index 9539d2b5ad1af0450475d411cd43bfb1d37c11a6..aa3412a257851f235eae546a5d4e753a4e41d345 100644 +index f9df82b198680b7069516ae2a4d65fe5f529fd35..1032b3646c9479d74ebd823739778ba884d70f30 100644 --- a/components/viz/common/display/renderer_settings.h +++ b/components/viz/common/display/renderer_settings.h @@ -19,6 +19,7 @@ class VIZ_COMMON_EXPORT RendererSettings { @@ -59,7 +59,7 @@ index 9539d2b5ad1af0450475d411cd43bfb1d37c11a6..aa3412a257851f235eae546a5d4e753a bool force_antialiasing = false; bool force_blending_with_shaders = false; diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc -index 5c3ae3641af9648462b10bbe144df69196922934..5fb234b7c833f97e1d61fab76f2f6d7d7c9f0c9f 100644 +index e63d201943faf1b537df711299168d0378823bd0..fb5ca48f16b78a4d0a45cb57988d1d94cb4159bb 100644 --- a/components/viz/host/renderer_settings_creation.cc +++ b/components/viz/host/renderer_settings_creation.cc @@ -11,6 +11,7 @@ @@ -80,7 +80,7 @@ index 5c3ae3641af9648462b10bbe144df69196922934..5fb234b7c833f97e1d61fab76f2f6d7d !command_line->HasSwitch(switches::kUIDisablePartialSwap); #if defined(OS_WIN) diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb3846733dba8e7 100644 +index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7d88fc7d0 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc @@ -77,6 +77,9 @@ @@ -93,7 +93,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 namespace viz { namespace { -@@ -519,8 +522,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, +@@ -521,8 +524,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { SetBlendEnabled(quad->ShouldDrawWithBlending()); @@ -105,7 +105,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 // Use the full quad_rect for debug quads to not move the edges based on // partial swaps. -@@ -1262,7 +1266,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, +@@ -1321,7 +1325,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, tex_coord_precision, sampler_type, shader_blend_mode, params->use_aa ? USE_AA : NO_AA, mask_mode, mask_for_background, params->use_color_matrix, tint_gl_composited_content_), @@ -115,7 +115,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 } void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -1725,8 +1730,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -1784,8 +1789,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, gfx::ColorSpace quad_color_space = gfx::ColorSpace::CreateSRGB(); SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, tint_gl_composited_content_), @@ -126,7 +126,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 SetShaderColor(color, opacity); if (current_program_->tint_color_matrix_location() != -1) { -@@ -1876,8 +1881,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, +@@ -1935,8 +1940,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, quad->is_premultiplied ? PREMULTIPLIED_ALPHA : NON_PREMULTIPLIED_ALPHA, false, false, tint_gl_composited_content_), @@ -137,7 +137,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -1965,8 +1970,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, +@@ -2024,8 +2029,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, : NON_PREMULTIPLIED_ALPHA, !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, tint_gl_composited_content_), @@ -148,7 +148,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2061,7 +2066,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, +@@ -2120,7 +2125,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); gfx::ColorSpace dst_color_space = @@ -157,7 +157,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 // Force sRGB output on Windows for overlay candidate video quads to match // DirectComposition behavior in case these switch between overlays and // compositing. See https://crbug.com/811118 for details. -@@ -2209,8 +2214,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, +@@ -2268,8 +2273,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, quad->resource_id()); SetUseProgram(ProgramKey::VideoStream(tex_coord_precision), @@ -168,7 +168,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2262,8 +2267,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { +@@ -2321,8 +2326,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); // Bind the program to the GL state. @@ -179,7 +179,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(locked_quad.target(), locked_quad.texture_id()); -@@ -2911,7 +2916,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) { +@@ -2977,7 +2982,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) { void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& src_color_space, const gfx::ColorSpace& dst_color_space) { @@ -190,7 +190,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 ProgramKey program_key = program_key_no_color; const gfx::ColorTransform* color_transform = -@@ -3281,7 +3288,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -3331,7 +3338,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( *overlay_texture = FindOrCreateOverlayTexture( params.quad->render_pass_id, iosurface_width, iosurface_height, @@ -199,7 +199,7 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -3485,8 +3492,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -3535,8 +3542,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -211,14 +211,14 @@ index 42b51fe23966118c85a69d76b44ae1b533de8fe0..e1e9290629e94bfb3c00269a7bb38467 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -3645,3 +3653,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize( +@@ -3696,3 +3704,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize( } } // namespace viz + +#undef PATCH_CS diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc -index d911ebaf778124a515486cedd5aa02aab09c3b0d..1a78ddc3adcbc656f34f015a1d39646763bdac4a 100644 +index cf3b497ef8415e351adf4821f3e6fc5714249178..3dbda6a3ca1ed4726e136fdb2ae83453d65284a3 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc @@ -709,9 +709,11 @@ void SkiaRenderer::DrawPictureQuad(const PictureDrawQuad* quad, @@ -237,10 +237,10 @@ index d911ebaf778124a515486cedd5aa02aab09c3b0d..1a78ddc3adcbc656f34f015a1d396467 base::Optional opacity_canvas; if (needs_transparency || disable_image_filtering) { diff --git a/components/viz/service/display/software_renderer.cc b/components/viz/service/display/software_renderer.cc -index 1b2c335bfe960db99fefd570b88f57d1596aee94..e0fcc5205ad07eb4c8b74a925d569a14dabf424e 100644 +index 0aba701c131f11f5e8be6ce9c1bebe6ccb44edf8..aac9c128ed3d212758d8d4a3ec774b651491d92f 100644 --- a/components/viz/service/display/software_renderer.cc +++ b/components/viz/service/display/software_renderer.cc -@@ -334,9 +334,11 @@ void SoftwareRenderer::DrawPictureQuad(const PictureDrawQuad* quad) { +@@ -332,9 +332,11 @@ void SoftwareRenderer::DrawPictureQuad(const PictureDrawQuad* quad) { std::unique_ptr color_transform_canvas; // TODO(enne): color transform needs to be replicated in gles2_cmd_decoder @@ -256,7 +256,7 @@ index 1b2c335bfe960db99fefd570b88f57d1596aee94..e0fcc5205ad07eb4c8b74a925d569a14 base::Optional opacity_canvas; if (needs_transparency || disable_image_filtering) { diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 2235eef2fc6ab449c16b3b4fd526adad910f0261..b2cca7287b3a0726c51e64cbc7e17136d31733a0 100644 +index 4aa391a6bfe2408b84da4ffe5b3dc27a0544d0ca..649efb7ed16e6f4850010c8b9df5d0b79c03bb3e 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -193,6 +193,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( @@ -268,10 +268,10 @@ index 2235eef2fc6ab449c16b3b4fd526adad910f0261..b2cca7287b3a0726c51e64cbc7e17136 service_manager::switches::kGpuSandboxAllowSysVShm, service_manager::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index fe73adb24cf444a942c7cdd1c1f6d25d869d5277..e26057ffdc5fffc96ceb944120473d3061d83132 100644 +index f341e362a338595d617e28d9273cb4d47940dd7b..4c5d49d24962ca36cb31cee00f91d36d2433d19d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -222,6 +222,7 @@ +@@ -221,6 +221,7 @@ #include "ui/base/ui_base_switches.h" #include "ui/base/ui_base_switches_util.h" #include "ui/display/display_switches.h" @@ -279,19 +279,19 @@ index fe73adb24cf444a942c7cdd1c1f6d25d869d5277..e26057ffdc5fffc96ceb944120473d30 #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" -@@ -2966,6 +2967,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3012,6 +3013,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { + switches::kDisableColorCorrectRendering, network::switches::kNoReferrers, + network::switches::kExplicitlyAllowedPorts, service_manager::switches::kDisableInProcessStackTraces, - service_manager::switches::kDisableSeccompFilterSandbox, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc -index 121519c661b4e5f42316b03c6db25ab451d00539..479cf5a7ad17f8a3b8ca6acf9ddf4307a14f9f8c 100644 +index a03ed6d9462933bf0749e2cf5964f3abb40ec657..95d2701f64c231619e559ada41a3212122899dab 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc -@@ -2619,6 +2619,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( +@@ -2601,6 +2601,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); @@ -302,7 +302,7 @@ index 121519c661b4e5f42316b03c6db25ab451d00539..479cf5a7ad17f8a3b8ca6acf9ddf4307 // is what the renderer uses if its not threaded. settings.enable_checker_imaging = diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc -index 8d9f38b1f3dfd5c2281459ec7620a9eef6861f21..a0ff3ccf56b1f925233875b6088a878423191c8f 100644 +index d12f8a42cb6af501dad92483b957dcf33d76a6c9..fbc0ab37aef36b46a54c7afc54945161ce973834 100644 --- a/ui/gfx/mac/io_surface.cc +++ b/ui/gfx/mac/io_surface.cc @@ -16,6 +16,7 @@ diff --git a/patches/common/chromium/disable_detach_webview_frame.patch b/patches/common/chromium/disable_detach_webview_frame.patch index 998f864bea..9178ee7f98 100644 --- a/patches/common/chromium/disable_detach_webview_frame.patch +++ b/patches/common/chromium/disable_detach_webview_frame.patch @@ -12,10 +12,10 @@ this patch was introduced in Chrome 66. Update(zcbenz): The bug is still in Chrome 72. diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc -index cfa3fd15714c3743cb9d2900b35570c94545fa87..80785902890c57ffae2fa841831d3bd60a8fa11a 100644 +index 656498fdbad93c8fcc758e08653f5417e7406345..476db3bdc90a6bf014e0a2ab4f2b47651ef8e1cc 100644 --- a/content/browser/frame_host/render_frame_proxy_host.cc +++ b/content/browser/frame_host/render_frame_proxy_host.cc -@@ -259,6 +259,12 @@ void RenderFrameProxyHost::SetDestructionCallback( +@@ -263,6 +263,12 @@ void RenderFrameProxyHost::SetDestructionCallback( void RenderFrameProxyHost::OnDetach() { if (frame_tree_node_->render_manager()->ForInnerDelegate()) { diff --git a/patches/common/chromium/disable_hidden.patch b/patches/common/chromium/disable_hidden.patch index 27d5a84eb5..4a5e5e9ee1 100644 --- a/patches/common/chromium/disable_hidden.patch +++ b/patches/common/chromium/disable_hidden.patch @@ -5,10 +5,10 @@ Subject: disable_hidden.patch diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 9832053c72a8dfc827d96794ba0de7355e8d2f40..e94935246fb0a82bf91a12bce57ba8f5912c7b6b 100644 +index 17a49b9497b6c4f64bd384e932b8786f536e4982..92becaca36b8e536b9a856aa9f48f6dad0442fa6 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -755,6 +755,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -760,6 +760,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -19,7 +19,7 @@ index 9832053c72a8dfc827d96794ba0de7355e8d2f40..e94935246fb0a82bf91a12bce57ba8f5 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden"); diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index 130e988cbd7459f7ddf67bc81f4f1989e08b0513..d4fa0c1a2fc1df713f06415a4970298306a52699 100644 +index 3c8816a1e740a113317b7924dbb07e75d8b3f18a..6ec259f3508dd63e601b5fc5e8c7d6dec5acf66a 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -153,6 +153,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl diff --git a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch index 19aafe9de5..067fd5c6dd 100644 --- a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch +++ b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch @@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch See https://github.com/electron/electron/issues/10754 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc -index ca5e41dc1beda6a59e41c28302cd4201e08fa216..a608916ddeee16aa3556fb5da3267de08febada3 100644 +index 848a439d6e7d4f54521621a00899354b2c63dd0c..142f24f566b963d5e1c7f89099e91136b5fb3f77 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -3658,7 +3658,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient& chrome_client, +@@ -3665,7 +3665,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, "frame that never had a user gesture since its load. " "https://www.chromestatus.com/feature/5082396709879808"; Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message); diff --git a/patches/common/chromium/dump_syms.patch b/patches/common/chromium/dump_syms.patch index db6da333c6..ac21c11b5b 100644 --- a/patches/common/chromium/dump_syms.patch +++ b/patches/common/chromium/dump_syms.patch @@ -8,10 +8,10 @@ this but it is not a blocker for releasing Electron. This patch removes the hard fail on dylib resolve failure from dump_syms diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py -index 2032f1991ada8669a393838c57b2fd054a81a3e1..58646a10591a1d3e7c2dd1782c3642b9cbe06738 100755 +index c926de336a8bedb2b3b8870a5ad6ab374a9011c3..58558b6cd1e3af826a7066c035e1ad589eff4cb5 100755 --- a/components/crash/content/tools/generate_breakpad_symbols.py +++ b/components/crash/content/tools/generate_breakpad_symbols.py -@@ -159,7 +159,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path): +@@ -160,7 +160,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path): 'ERROR: failed to resolve %s, exe_path %s, loader_path %s, ' 'rpaths %s' % (m.group(1), exe_path, loader_path, ', '.join(rpaths))) diff --git a/patches/common/chromium/enable_widevine.patch b/patches/common/chromium/enable_widevine.patch index 6e4e3e4ad9..7913cb9789 100644 --- a/patches/common/chromium/enable_widevine.patch +++ b/patches/common/chromium/enable_widevine.patch @@ -8,18 +8,15 @@ Electron needs that flag to be enabled on those paltforms, but there's no way to conditionally set it during a `gn gen` call. diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni -index e10d9b9b8d2975a731adfee2eb0086afd7975f97..844320dc66cd5781e218d5ca8084f5185a5e331d 100644 +index 1fe47e92ffb1442159ead7b696884bc8cc4bda83..72b39b83789cd1f67e10c743a3e729420c9b72ed 100644 --- a/third_party/widevine/cdm/widevine.gni +++ b/third_party/widevine/cdm/widevine.gni -@@ -6,9 +6,8 @@ import("//build/config/chrome_build.gni") - import("//media/media_options.gni") - - declare_args() { -- # Enables Widevine key system support. Enabled by default in Google Chrome or -- # on Android. Can be optionally enabled in Chromium. +@@ -10,7 +10,7 @@ declare_args() { + # on Android. + # Can be optionally enabled in Chromium on non-Android platforms. Please see + # //src/third_party/widevine/LICENSE file for details. - enable_widevine = is_chrome_branded || is_android -+ # Allow Widevine key system support in Chromium. -+ enable_widevine = is_mac || is_win ++ enable_widevine = is_chrome_branded || is_android || is_mac || is_win } # Widevine CDM is available as a library CDM on the following platforms and diff --git a/patches/common/chromium/exclude-a-few-test-files-from-build.patch b/patches/common/chromium/exclude-a-few-test-files-from-build.patch index ec2c663056..a24e6d2286 100644 --- a/patches/common/chromium/exclude-a-few-test-files-from-build.patch +++ b/patches/common/chromium/exclude-a-few-test-files-from-build.patch @@ -7,10 +7,10 @@ Compilation of those files fails with the Chromium 68. Remove the patch during the Chromium 69 upgrade. diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index ba938f7d75072c6d15de08528d6b1cac94ecdbb1..5878cbf7767adad6365d02e389b8b4a1774a3539 100644 +index 0e2af5b005b740eb20ffdde67b050d049951615b..7aee0638efc5a050cf7b6825ebda953e556e1782 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1737,7 +1737,7 @@ jumbo_source_set("blink_platform_unittests_sources") { +@@ -1739,7 +1739,7 @@ jumbo_source_set("blink_platform_unittests_sources") { "graphics/paint/drawing_display_item_test.cc", "graphics/paint/drawing_recorder_test.cc", "graphics/paint/float_clip_rect_test.cc", diff --git a/patches/common/chromium/frame_host_manager.patch b/patches/common/chromium/frame_host_manager.patch index f795072e96..380510f331 100644 --- a/patches/common/chromium/frame_host_manager.patch +++ b/patches/common/chromium/frame_host_manager.patch @@ -7,10 +7,10 @@ Allows embedder to intercept site instances chosen by chromium and respond with custom instance. diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc -index fd7d05e26fa5ecdab370c8edf984f92dfaacfc28..4ad4fc9e7881ff6b432e5f61fa72fbabef752015 100644 +index 75804f991fb2e75115de6408e50fe7328dc58ef9..0cbd955d3e4ff9196e6666fe0ab0b66ffe8c5261 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc -@@ -1932,6 +1932,16 @@ bool RenderFrameHostManager::InitRenderView( +@@ -1970,6 +1970,16 @@ bool RenderFrameHostManager::InitRenderView( scoped_refptr RenderFrameHostManager::GetSiteInstanceForNavigationRequest( const NavigationRequest& request) { @@ -27,7 +27,7 @@ index fd7d05e26fa5ecdab370c8edf984f92dfaacfc28..4ad4fc9e7881ff6b432e5f61fa72fbab // First, check if the navigation can switch SiteInstances. If not, the // navigation should use the current SiteInstance. SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance(); -@@ -1964,6 +1974,51 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2002,6 +2012,51 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request.common_params().url); no_renderer_swap_allowed |= request.from_begin_navigation() && !can_renderer_initiate_transfer; @@ -79,7 +79,7 @@ index fd7d05e26fa5ecdab370c8edf984f92dfaacfc28..4ad4fc9e7881ff6b432e5f61fa72fbab } else { // Subframe navigations will use the current renderer, unless specifically // allowed to swap processes. -@@ -1975,23 +2030,17 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2013,23 +2068,17 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( if (no_renderer_swap_allowed && !should_swap_for_error_isolation) return scoped_refptr(current_site_instance); @@ -108,7 +108,7 @@ index fd7d05e26fa5ecdab370c8edf984f92dfaacfc28..4ad4fc9e7881ff6b432e5f61fa72fbab } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index 543e9d90098e65286482b82a98a116d3224925a9..f564df8841d1eaea29d4f09c679263ec97552e3b 100644 +index 499c853a9a3d4c294ae0e6bfdb857ac67c31a144..cbd25b0f44a74671c924fd7a35f6fd84632c5f8c 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -48,6 +48,16 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info, @@ -129,10 +129,10 @@ index 543e9d90098e65286482b82a98a116d3224925a9..f564df8841d1eaea29d4f09c679263ec const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 6962a00811a20a8dd78ee3688fac31a87500b4dc..af64896d0567870672bf4e2f45f7d76e1df68844 100644 +index 384b51c1faa7045f2319854db59be27af779569d..d2aa50c1e0ff84ef2313fa058b9ecc677cd20d5c 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h -@@ -204,8 +204,37 @@ CONTENT_EXPORT void OverrideOnBindInterface( +@@ -206,8 +206,37 @@ CONTENT_EXPORT void OverrideOnBindInterface( // the observer interfaces.) class CONTENT_EXPORT ContentBrowserClient { public: diff --git a/patches/common/chromium/gin_enable_disable_v8_platform.patch b/patches/common/chromium/gin_enable_disable_v8_platform.patch index 7bef855097..dfb59520ca 100644 --- a/patches/common/chromium/gin_enable_disable_v8_platform.patch +++ b/patches/common/chromium/gin_enable_disable_v8_platform.patch @@ -5,29 +5,29 @@ Subject: gin_enable_disable_v8_platform.patch diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 5670a2e55ef827068c547f4a76de18a12936d115..3332f4936c633f834576ae2eb0a4c59de482881e 100644 +index 5577bbbb4eb0a97fadf156a9233dc153d427e55e..c8d5b58d711012bf9761ce073af00f30f803081b 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc -@@ -121,9 +121,10 @@ IsolateHolder::~IsolateHolder() { +@@ -120,9 +120,10 @@ IsolateHolder::~IsolateHolder() { + // static void IsolateHolder::Initialize(ScriptMode mode, - V8ExtrasMode v8_extras_mode, v8::ArrayBuffer::Allocator* allocator, - const intptr_t* reference_table) { + const intptr_t* reference_table, + bool create_v8_platform) { CHECK(allocator); -- V8Initializer::Initialize(mode, v8_extras_mode); -+ V8Initializer::Initialize(mode, v8_extras_mode, create_v8_platform); +- V8Initializer::Initialize(mode); ++ V8Initializer::Initialize(mode, create_v8_platform); g_array_buffer_allocator = allocator; g_reference_table = reference_table; } diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 8cb2646bdd7dc3f5013d197f4b76e8707afb6817..95844885e478e460b1f03a7d98942bffe263e3d0 100644 +index 413e6c5bcc74cd01730c5d4dc66eb92aaf7df8de..6c5d101fef97e880bee20d2f76e4b339a624eb6f 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -98,7 +98,8 @@ class GIN_EXPORT IsolateHolder { +@@ -91,7 +91,8 @@ class GIN_EXPORT IsolateHolder { + // reference pointers. Otherwise, it can be nullptr. static void Initialize(ScriptMode mode, - V8ExtrasMode v8_extras_mode, v8::ArrayBuffer::Allocator* allocator, - const intptr_t* reference_table = nullptr); + const intptr_t* reference_table = nullptr, @@ -36,15 +36,15 @@ index 8cb2646bdd7dc3f5013d197f4b76e8707afb6817..95844885e478e460b1f03a7d98942bff v8::Isolate* isolate() { return isolate_; } diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc -index 4b3ef5cfa0684b31cf2e35acb27a1adee9dddfbb..ce0be2126d62754662c706698fc75e91e64af7f7 100644 +index 006f6f4a768597f227dacbf46e974e33f4e63763..09dd4718f7ba00dfa909859a088639016675245a 100644 --- a/gin/v8_initializer.cc +++ b/gin/v8_initializer.cc -@@ -205,12 +205,14 @@ enum LoadV8FileResult { +@@ -204,12 +204,14 @@ enum LoadV8FileResult { + } // namespace // static - void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, -- IsolateHolder::V8ExtrasMode v8_extras_mode) { -+ IsolateHolder::V8ExtrasMode v8_extras_mode, +-void V8Initializer::Initialize(IsolateHolder::ScriptMode mode) { ++void V8Initializer::Initialize(IsolateHolder::ScriptMode mode, + bool create_v8_platform) { static bool v8_is_initialized = false; if (v8_is_initialized) @@ -57,15 +57,15 @@ index 4b3ef5cfa0684b31cf2e35acb27a1adee9dddfbb..ce0be2126d62754662c706698fc75e91 if (!base::FeatureList::IsEnabled(features::kV8OptimizeJavascript)) { // We avoid explicitly passing --opt if kV8OptimizeJavascript is enabled diff --git a/gin/v8_initializer.h b/gin/v8_initializer.h -index a749ccbecfc8b82217d4ed48dcf8a5d9ceba052c..00b21585e65b2fcb2401d28d425f7db2e5dec389 100644 +index aa3863abe0ea71fc26222564425f54ff80077719..fbf84c00174cc081d71aff8a16d51d2211614ec7 100644 --- a/gin/v8_initializer.h +++ b/gin/v8_initializer.h -@@ -21,7 +21,8 @@ class GIN_EXPORT V8Initializer { +@@ -20,7 +20,8 @@ namespace gin { + class GIN_EXPORT V8Initializer { public: // This should be called by IsolateHolder::Initialize(). - static void Initialize(IsolateHolder::ScriptMode mode, -- IsolateHolder::V8ExtrasMode v8_extras_mode); -+ IsolateHolder::V8ExtrasMode v8_extras_mode, +- static void Initialize(IsolateHolder::ScriptMode mode); ++ static void Initialize(IsolateHolder::ScriptMode mode, + bool create_v8_platform = true); // Get address and size information for currently loaded snapshot. diff --git a/patches/common/chromium/gritsettings_resource_ids.patch b/patches/common/chromium/gritsettings_resource_ids.patch index bfb84bcb15..9c3a84864c 100644 --- a/patches/common/chromium/gritsettings_resource_ids.patch +++ b/patches/common/chromium/gritsettings_resource_ids.patch @@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch Add electron resources file to the list of resource ids generation. diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids -index 95e9bf70c41e68fc43326f4545cfc7f65b265083..44b0131431983cee35dbd6af1b979fc53c0507b9 100644 +index bc56e877d3a8cc3fc3bd11e23b50f9abbb958362..36110a4c960cd572789ff14d69aad29fa5f838a8 100644 --- a/tools/gritsettings/resource_ids +++ b/tools/gritsettings/resource_ids -@@ -422,6 +422,11 @@ +@@ -427,6 +427,11 @@ "includes": [28850], }, diff --git a/patches/common/chromium/isolate_holder.patch b/patches/common/chromium/isolate_holder.patch index a9a5f26376..0f56fb1177 100644 --- a/patches/common/chromium/isolate_holder.patch +++ b/patches/common/chromium/isolate_holder.patch @@ -8,7 +8,7 @@ needs to register on an isolate so that it can be used later down in the initialization process of an isolate. diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc -index 3332f4936c633f834576ae2eb0a4c59de482881e..801383dffd6d49b174b6b5a4b89e6a1a498da499 100644 +index c8d5b58d711012bf9761ce073af00f30f803081b..ec61b873d4e2dcdca833c8503beabb88d0798f2d 100644 --- a/gin/isolate_holder.cc +++ b/gin/isolate_holder.cc @@ -52,7 +52,8 @@ IsolateHolder::IsolateHolder( @@ -35,10 +35,10 @@ index 3332f4936c633f834576ae2eb0a4c59de482881e..801383dffd6d49b174b6b5a4b89e6a1a new PerIsolateData(isolate_, allocator, access_mode_, task_runner)); if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) { diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h -index 95844885e478e460b1f03a7d98942bffe263e3d0..fd739ab416b8df71cf192ac178ebf217a5d7816c 100644 +index 6c5d101fef97e880bee20d2f76e4b339a624eb6f..576086de0de0a6fea9e2f2077af3aff18fd3138a 100644 --- a/gin/public/isolate_holder.h +++ b/gin/public/isolate_holder.h -@@ -81,7 +81,8 @@ class GIN_EXPORT IsolateHolder { +@@ -75,7 +75,8 @@ class GIN_EXPORT IsolateHolder { AccessMode access_mode, AllowAtomicsWaitMode atomics_wait_mode, IsolateType isolate_type, diff --git a/patches/common/chromium/mas-cfisobjc.patch b/patches/common/chromium/mas-cfisobjc.patch index c1dc41702a..7757b2f9b6 100644 --- a/patches/common/chromium/mas-cfisobjc.patch +++ b/patches/common/chromium/mas-cfisobjc.patch @@ -6,10 +6,10 @@ Subject: mas-cfisobjc.patch Removes usage of the _CFIsObjC private API. diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index 15fc15ba307e18f438852f00f41b2f5ecf7ff85f..7ca4e0ec5ca87f34e0baa22ba0b704e25fe7ca21 100644 +index 38954c89527012ec72503240b0197bc24110d3ad..aebb6ec5815220f47a79dac59443e3b4bf3f0416 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm -@@ -26,7 +26,6 @@ CFTypeID SecKeyGetTypeID(); +@@ -26,7 +26,6 @@ #if !defined(OS_IOS) CFTypeID SecACLGetTypeID(); CFTypeID SecTrustedApplicationGetTypeID(); @@ -17,7 +17,7 @@ index 15fc15ba307e18f438852f00f41b2f5ecf7ff85f..7ca4e0ec5ca87f34e0baa22ba0b704e2 #endif } // extern "C" -@@ -325,8 +324,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) { +@@ -325,8 +324,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { const_cast(reinterpret_cast(cf_val)); DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) || @@ -27,7 +27,7 @@ index 15fc15ba307e18f438852f00f41b2f5ecf7ff85f..7ca4e0ec5ca87f34e0baa22ba0b704e2 return ns_val; } -@@ -394,9 +392,6 @@ CFCast(const CFTypeRef& cf_val) { +@@ -394,9 +392,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { return (CTFontRef)(cf_val); } diff --git a/patches/common/chromium/mas-cgdisplayusesforcetogray.patch b/patches/common/chromium/mas-cgdisplayusesforcetogray.patch index 883f1f3294..071c0f56c0 100644 --- a/patches/common/chromium/mas-cgdisplayusesforcetogray.patch +++ b/patches/common/chromium/mas-cgdisplayusesforcetogray.patch @@ -6,7 +6,7 @@ Subject: mas-cgdisplayusesforcetogray.patch Removes usage of the CGDisplayUsesForceToGray private API. diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm -index ff92b9fad59beedb8510c112f6e87e61090d2eb9..ea1804fc13660ee097ef2fa298098155d6677ceb 100644 +index 96f17137071a157737fe09e69a6db393040c69ea..dd1c41ed4a80dbdaa37a5d68ffb7c0b11ea0afc3 100644 --- a/ui/display/mac/screen_mac.mm +++ b/ui/display/mac/screen_mac.mm @@ -106,7 +106,17 @@ Display BuildDisplayForScreen(NSScreen* screen) { diff --git a/patches/common/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch b/patches/common/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch index 0e8e5beb43..7df04b7b8c 100644 --- a/patches/common/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch +++ b/patches/common/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch @@ -7,10 +7,10 @@ Removes usage of the _LSSetApplicationLaunchServicesServerConnectionStatus private API. diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc -index c2061485c91dec043c6047d4640f5765a20a4248..d39465b0b2dd8bf4ac26335c44b78b1051659113 100644 +index 0b9d501e7b0da03c2bc668944d6b4172c71dae72..0ad797171bd359037bcf8d3e7c9e68d3408cd49c 100644 --- a/content/gpu/gpu_main.cc +++ b/content/gpu/gpu_main.cc -@@ -274,8 +274,10 @@ int GpuMain(const MainFunctionParams& parameters) { +@@ -280,8 +280,10 @@ int GpuMain(const MainFunctionParams& parameters) { std::unique_ptr pump(new base::MessagePumpNSRunLoop()); main_message_loop.reset(new base::MessageLoop(std::move(pump))); diff --git a/patches/common/chromium/mas_blink_no_private_api.patch b/patches/common/chromium/mas_blink_no_private_api.patch index d687746c3e..3870d2481d 100644 --- a/patches/common/chromium/mas_blink_no_private_api.patch +++ b/patches/common/chromium/mas_blink_no_private_api.patch @@ -18,7 +18,7 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d extern "C" { // Kill ring calls. Would be better to use NSKillRing.h, but that's not -@@ -39,38 +40,53 @@ NSString* _NSYankFromKillRing(); +@@ -39,38 +40,53 @@ void _NSNewKillRingSequence(); void _NSSetKillRingToYankedState(); } @@ -92,7 +92,7 @@ index 7a1260db0a139f9f3f8a823af2c220f36162812a..bf9cf7046e2fc9cdfee5b92f2a348185 namespace blink { -@@ -73,10 +75,12 @@ bool ThemePainterMac::PaintTextField(const Node* node, +@@ -73,10 +75,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame, // behavior change while remaining a fragile solution. // https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3 if (!use_ns_text_field_cell) { @@ -105,7 +105,7 @@ index 7a1260db0a139f9f3f8a823af2c220f36162812a..bf9cf7046e2fc9cdfee5b92f2a348185 return false; } -@@ -162,10 +166,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node, +@@ -162,10 +166,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame, const PaintInfo& paint_info, const IntRect& r) { LocalCurrentGraphicsContext local_context(paint_info.context, r); diff --git a/patches/common/chromium/mas_no_private_api.patch b/patches/common/chromium/mas_no_private_api.patch index 687482bfa9..7f92e0c4bd 100644 --- a/patches/common/chromium/mas_no_private_api.patch +++ b/patches/common/chromium/mas_no_private_api.patch @@ -38,10 +38,10 @@ index d38fa48b8b890d90f2911995a2a51c249005c827..5fe68c71fe101a307ef565013a91b109 // is concerned. @property(nonatomic, readonly) NSString* subrole; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm -index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38fe2ee0e38 100644 +index 9e5070bd034c16905ec29c7aba6471b41b5f16f4..9bf52f660b61c1a42c051d610318f6f2443ae91f 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm -@@ -136,6 +136,7 @@ NSDictionary* attributeToMethodNameMap = nil; +@@ -135,6 +135,7 @@ // VoiceOver uses -1 to mean "no limit" for AXResultsLimit. const int kAXResultsLimitNoLimit = -1; @@ -49,7 +49,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f extern "C" { // The following are private accessibility APIs required for cursor navigation -@@ -342,6 +343,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange( +@@ -341,6 +342,7 @@ void AddMisspelledTextAttributes( AddMisspelledTextAttributes(text_only_objects, attributed_text); return [attributed_text attributedSubstringFromRange:range]; } @@ -57,7 +57,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f // Returns an autoreleased copy of the AXNodeData's attribute. NSString* NSStringForStringAttribute( -@@ -596,7 +598,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -595,7 +597,9 @@ + (void)initialize { {NSAccessibilityDOMIdentifierAttribute, @"domIdentifier"}, {NSAccessibilityEditableAncestorAttribute, @"editableAncestor"}, {NSAccessibilityEnabledAttribute, @"enabled"}, @@ -67,7 +67,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f {NSAccessibilityExpandedAttribute, @"expanded"}, {NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"}, {NSAccessibilityFocusedAttribute, @"focused"}, -@@ -631,13 +635,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -630,13 +634,17 @@ + (void)initialize { {NSAccessibilityRowsAttribute, @"rows"}, // TODO(aboxhall): expose // NSAccessibilityServesAsTitleForUIElementsAttribute @@ -85,7 +85,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f {NSAccessibilitySizeAttribute, @"size"}, {NSAccessibilitySortDirectionAttribute, @"sortDirection"}, {NSAccessibilitySubroleAttribute, @"subrole"}, -@@ -1071,6 +1079,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1052,6 +1060,7 @@ - (NSNumber*)enabled { ax::mojom::Restriction::kDisabled]; } @@ -93,7 +93,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f // Returns a text marker that points to the last character in the document that // can be selected with VoiceOver. - (id)endTextMarker { -@@ -1081,6 +1090,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1062,6 +1071,7 @@ - (id)endTextMarker { BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtEndOfAnchor()); } @@ -101,7 +101,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f - (NSNumber*)expanded { if (![self instanceActive]) -@@ -1943,6 +1953,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1922,6 +1932,7 @@ - (NSValue*)selectedTextRange { return [NSValue valueWithRange:NSMakeRange(selStart, selLength)]; } @@ -109,7 +109,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f - (id)selectedTextMarkerRange { if (![self instanceActive]) return nil; -@@ -1975,6 +1986,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1954,6 +1965,7 @@ - (id)selectedTextMarkerRange { anchorAffinity, *focusObject, focusOffset, focusAffinity)); } @@ -117,7 +117,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f - (NSValue*)size { if (![self instanceActive]) -@@ -2007,6 +2019,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1986,6 +1998,7 @@ - (NSString*)sortDirection { return nil; } @@ -125,7 +125,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f // Returns a text marker that points to the first character in the document that // can be selected with VoiceOver. - (id)startTextMarker { -@@ -2017,6 +2030,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -1996,6 +2009,7 @@ - (id)startTextMarker { BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0); return CreateTextMarker(position->CreatePositionAtStartOfAnchor()); } @@ -133,7 +133,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f // Returns a subrole based upon the role. - (NSString*) subrole { -@@ -2338,12 +2352,14 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2301,12 +2315,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range { NSMutableAttributedString* attributedValue = [[[NSMutableAttributedString alloc] initWithString:value] autorelease]; @@ -148,7 +148,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f return [attributedValue attributedSubstringFromRange:range]; } -@@ -2429,6 +2445,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2392,6 +2408,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return ToBrowserAccessibilityCocoa(cell); } @@ -156,7 +156,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) { BrowserAccessibilityPositionInstance position = CreatePositionFromTextMarker(parameter); -@@ -2606,6 +2623,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2569,6 +2586,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute NSString* text = GetTextForTextMarkerRange(parameter); return [NSNumber numberWithInt:[text length]]; } @@ -164,7 +164,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f if ([attribute isEqualToString: NSAccessibilityBoundsForRangeParameterizedAttribute]) { -@@ -2639,6 +2657,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2602,6 +2620,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute return nil; } @@ -172,7 +172,7 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f if ([attribute isEqualToString: NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) { BrowserAccessibilityPositionInstance position = -@@ -2714,6 +2733,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired"; +@@ -2677,6 +2696,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition( return @(child->GetIndexInParent()); } @@ -181,10 +181,10 @@ index eba85655c0bae04c75a9f2fd1941c86f229a1195..b092982305132fc54d26008934eed38f return nil; } diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm -index e61ed97ed0c5652f5b8bd5763a401a32a3b8118d..6e51684b8641ec452bf430850a52556af5d73066 100644 +index 242a86ddd00517adc5e09310a25739ee34b3d23c..aa95e8ba159e5e185f0814d13d8743f3e5be9b67 100644 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm -@@ -462,6 +462,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: +@@ -463,6 +463,7 @@ void PostAnnouncementNotification(NSString* announcement) { [user_info setObject:native_focus_object forKey:NSAccessibilityTextChangeElement]; @@ -192,7 +192,7 @@ index e61ed97ed0c5652f5b8bd5763a401a32a3b8118d..6e51684b8641ec452bf430850a52556a id selected_text = [native_focus_object selectedTextMarkerRange]; if (selected_text) { NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute = -@@ -469,6 +470,7 @@ NSDictionary* BrowserAccessibilityManagerMac:: +@@ -470,6 +471,7 @@ void PostAnnouncementNotification(NSString* announcement) { [user_info setObject:selected_text forKey:NSAccessibilitySelectedTextMarkerRangeAttribute]; } @@ -216,7 +216,7 @@ index b7142c2871faf4a0ba8be79266e9515d81585bdd..3d80c332e9af280a166612f6be54b6f7 namespace content { -@@ -35,6 +37,7 @@ namespace { +@@ -35,6 +37,7 @@ // verifies there are no existing open connections), and then indicates that // Chrome should continue execution without access to launchservicesd. void DisableSystemServices() { @@ -233,10 +233,10 @@ index b7142c2871faf4a0ba8be79266e9515d81585bdd..3d80c332e9af280a166612f6be54b6f7 // You are about to read a pretty disgusting hack. In a static initializer, diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm -index fafb98764b562c335733eac9998d9edfda69e38d..43666a8e70808297ecbd2b65d6f2c73029e40677 100644 +index 6299846975301964c4066dff1a7eec40778e8d7f..c9c64e9ea8af9c02099695db38c27871e4e19852 100644 --- a/device/bluetooth/bluetooth_adapter_mac.mm +++ b/device/bluetooth/bluetooth_adapter_mac.mm -@@ -37,6 +37,7 @@ +@@ -36,6 +36,7 @@ #include "device/bluetooth/bluetooth_low_energy_peripheral_manager_delegate.h" #include "device/bluetooth/bluetooth_socket_mac.h" @@ -244,7 +244,7 @@ index fafb98764b562c335733eac9998d9edfda69e38d..43666a8e70808297ecbd2b65d6f2c730 extern "C" { // Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and // `Karabiner` [3] to programmatically control the Bluetooth state. Calling the -@@ -50,6 +51,7 @@ extern "C" { +@@ -49,6 +50,7 @@ // [4] https://support.apple.com/kb/PH25091 void IOBluetoothPreferenceSetControllerPowerState(int state); } @@ -252,7 +252,7 @@ index fafb98764b562c335733eac9998d9edfda69e38d..43666a8e70808297ecbd2b65d6f2c730 namespace { -@@ -129,8 +131,10 @@ BluetoothAdapterMac::BluetoothAdapterMac() +@@ -128,8 +130,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) { controller_state_function_( base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState, base::Unretained(this))), @@ -263,7 +263,7 @@ index fafb98764b562c335733eac9998d9edfda69e38d..43666a8e70808297ecbd2b65d6f2c730 should_update_name_(true), classic_discovery_manager_( BluetoothDiscoveryManagerMac::CreateClassic(this)), -@@ -328,8 +332,12 @@ bool BluetoothAdapterMac::IsLowEnergyAvailable() { +@@ -327,8 +331,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) { } bool BluetoothAdapterMac::SetPoweredImpl(bool powered) { @@ -277,10 +277,10 @@ index fafb98764b562c335733eac9998d9edfda69e38d..43666a8e70808297ecbd2b65d6f2c730 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 69dd2acc69142a5098b8583e7550044210375cc7..02c092c3f32707c0c889d02f086d45eede86e292 100644 +index 9dc0255ab94c11f5cbfeb9a335460294a136e125..91ac682d1abc1e82641e73e3186ae0b47f5902c2 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn -@@ -206,6 +206,12 @@ source_set("audio") { +@@ -186,6 +186,12 @@ source_set("audio") { "mac/scoped_audio_unit.cc", "mac/scoped_audio_unit.h", ] @@ -307,10 +307,10 @@ index a1091960873dad8bb1b0129d20a552bf8a51739f..50bb186d1474fd4c90723ac97ac93b1d } diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc -index c51a6320b0a19f220ac3a210909df1f89ce979b1..c3ef7e7633cf0dc8af8cd3b1e828df549c7e48cb 100644 +index 31c564faeee2c082d23e2a99753f9fee592b6212..4d032d65820ebf4f3ce4d8acb84d2354b4ab8789 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc -@@ -243,6 +243,7 @@ class DnsConfigServicePosix::Watcher { +@@ -244,6 +244,7 @@ class DnsConfigServicePosix::Watcher { bool Watch() { bool success = true; @@ -318,7 +318,7 @@ index c51a6320b0a19f220ac3a210909df1f89ce979b1..c3ef7e7633cf0dc8af8cd3b1e828df54 if (!config_watcher_.Watch(base::Bind(&Watcher::OnConfigChanged, base::Unretained(this)))) { LOG(ERROR) << "DNS config watch failed to start."; -@@ -264,6 +265,7 @@ class DnsConfigServicePosix::Watcher { +@@ -265,6 +266,7 @@ class DnsConfigServicePosix::Watcher { DNS_CONFIG_WATCH_MAX); } #endif // !defined(OS_ANDROID) && !defined(OS_IOS) diff --git a/patches/common/chromium/net_url_request_job.patch b/patches/common/chromium/net_url_request_job.patch index 2681cbb94e..3529d52f7e 100644 --- a/patches/common/chromium/net_url_request_job.patch +++ b/patches/common/chromium/net_url_request_job.patch @@ -5,10 +5,10 @@ Subject: net_url_request_job.patch diff --git a/net/url_request/url_request_job.h b/net/url_request/url_request_job.h -index c75471c5dce778b2338290ae1fdfff5ebbc16f7b..df79df6d765d4957e2489e8ee6ddc1e77f07efc7 100644 +index f08e6e890ebc6b7f745b3dfab6415cc9bdce050f..c05a3b2ec3020dff845dbb79737a95bd17a2766f 100644 --- a/net/url_request/url_request_job.h +++ b/net/url_request/url_request_job.h -@@ -293,6 +293,7 @@ class NET_EXPORT URLRequestJob : public base::PowerObserver { +@@ -294,6 +294,7 @@ class NET_EXPORT URLRequestJob : public base::PowerObserver { void OnCallToDelegate(NetLogEventType type); void OnCallToDelegateComplete(); diff --git a/patches/common/chromium/no_cache_storage_check.patch b/patches/common/chromium/no_cache_storage_check.patch index 65cdef11b1..9ec86a6ac5 100644 --- a/patches/common/chromium/no_cache_storage_check.patch +++ b/patches/common/chromium/no_cache_storage_check.patch @@ -7,10 +7,10 @@ Do not check for unique origin in CacheStorage, in Electron we may have scripts running without an origin. diff --git a/content/browser/cache_storage/cache_storage.cc b/content/browser/cache_storage/cache_storage.cc -index 334699f5f3832cbb90f595e31de0f443c6e62d26..4c5c7ec26b67afcf804649e3441cbb53c96e5956 100644 +index 1c638d8f4b3b3be83d64febf297699161c4a3cf3..56f88da0a43d3114918cbca1f1982fff2fdc0bb3 100644 --- a/content/browser/cache_storage/cache_storage.cc +++ b/content/browser/cache_storage/cache_storage.cc -@@ -130,7 +130,7 @@ class CacheStorage::CacheLoader { +@@ -131,7 +131,7 @@ class CacheStorage::CacheLoader { cache_storage_(cache_storage), origin_(origin), owner_(owner) { diff --git a/patches/common/chromium/notification_provenance.patch b/patches/common/chromium/notification_provenance.patch index 947f5d95aa..b55fff4519 100644 --- a/patches/common/chromium/notification_provenance.patch +++ b/patches/common/chromium/notification_provenance.patch @@ -106,10 +106,10 @@ index 653f487b0b0e01de7cdda8483f081550a9077e98..da9e5f53d07eaaf11525efd996be9420 // Removes |service| from the list of owned services, for example because the diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc -index 5a6e7ed16110e5d34d5e4f6e37f59ff84094a994..63af4bd1d17aca55229960422082643f2926d705 100644 +index 87ecafbac4bd9cdba9036238d3bd2bd4ae661e8a..75ed7fc917083e70194cee68ba19f8f8c4d20a28 100644 --- a/content/browser/renderer_interface_binders.cc +++ b/content/browser/renderer_interface_binders.cc -@@ -176,7 +176,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -182,7 +182,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { RenderProcessHost* host, const url::Origin& origin) { static_cast(host->GetStoragePartition()) ->GetPlatformNotificationContext() diff --git a/patches/common/chromium/out_of_process_instance.patch b/patches/common/chromium/out_of_process_instance.patch index c47a51abb8..ebb6d09e53 100644 --- a/patches/common/chromium/out_of_process_instance.patch +++ b/patches/common/chromium/out_of_process_instance.patch @@ -5,10 +5,10 @@ Subject: out_of_process_instance.patch diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc -index ef12260b6a7fd996ac5601f0c3a2db6bca38a46b..12e25f4332eb421cac8797f2d1403592771547f0 100644 +index aa9db1908a00e89a88d2ea27b0e05184ac3e5aeb..86c299624bcd83847a4b651c1f0d53f7f6df1cd5 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc -@@ -462,7 +462,9 @@ bool OutOfProcessInstance::Init(uint32_t argc, +@@ -461,7 +461,9 @@ bool OutOfProcessInstance::Init(uint32_t argc, std::string document_url = document_url_var.AsString(); base::StringPiece document_url_piece(document_url); is_print_preview_ = IsPrintPreviewUrl(document_url_piece); diff --git a/patches/common/chromium/pepper_flash.patch b/patches/common/chromium/pepper_flash.patch index 6d0251edb7..2e41519bad 100644 --- a/patches/common/chromium/pepper_flash.patch +++ b/patches/common/chromium/pepper_flash.patch @@ -258,12 +258,12 @@ index aa4433cccff4bc637ce5e71039de3c4352e7cd6b..d9630fdf6b87e11fb9657814895dff36 base::WeakPtrFactory weak_factory_; diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc -index d266f41233ff676539438d7cdd3799d83129e242..1cd381fd576fedd4ee382b33282ecd991d1f9ea7 100644 +index 5e468b261f400379d20bb5e8f6fed683229a6837..583474b7e5e2010bd1323be94f08845cc396fc3e 100644 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc +++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc @@ -8,17 +8,21 @@ - #include "base/macros.h" + #include "base/stl_util.h" #include "base/task/post_task.h" +#if 0 #include "chrome/browser/browser_process.h" @@ -310,7 +310,7 @@ index d266f41233ff676539438d7cdd3799d83129e242..1cd381fd576fedd4ee382b33282ecd99 document_url_(document_url), ppapi_host_(ppapi_host) { +#if 0 - for (size_t i = 0; i < arraysize(kPredefinedAllowedCrxFsOrigins); ++i) + for (size_t i = 0; i < base::size(kPredefinedAllowedCrxFsOrigins); ++i) allowed_crxfs_origins_.insert(kPredefinedAllowedCrxFsOrigins[i]); +#endif } @@ -435,12 +435,12 @@ index d63e90b6c5079ab3237c4bad3d5e63ce2f99c657..c98a7bd07ddd9527fc67b05b24463ed4 return nullptr; } diff --git a/chrome/renderer/pepper/pepper_flash_renderer_host.cc b/chrome/renderer/pepper/pepper_flash_renderer_host.cc -index 42248eae343754988e2461ef0fb080b6d0edafdf..bb768481e0721d742c105bf18405ddcd357f794d 100644 +index 05aadc1737ec3b90448eb37dc0c3b98a2b93c2e4..6e688ded28cc802997f7cbd100a32966751f522e 100644 --- a/chrome/renderer/pepper/pepper_flash_renderer_host.cc +++ b/chrome/renderer/pepper/pepper_flash_renderer_host.cc @@ -13,7 +13,9 @@ - #include "base/metrics/histogram_macros.h" #include "base/no_destructor.h" + #include "base/stl_util.h" #include "base/strings/string_util.h" +#if 0 #include "components/pdf/renderer/pepper_pdf_host.h" @@ -448,7 +448,7 @@ index 42248eae343754988e2461ef0fb080b6d0edafdf..bb768481e0721d742c105bf18405ddcd #include "content/public/renderer/pepper_plugin_instance.h" #include "content/public/renderer/render_thread.h" #include "content/public/renderer/renderer_ppapi_host.h" -@@ -132,9 +134,11 @@ bool IsSimpleHeader(const std::string& lower_case_header_name, +@@ -133,9 +135,11 @@ bool IsSimpleHeader(const std::string& lower_case_header_name, } void RecordFlashNavigateUsage(FlashNavigateUsage usage) { diff --git a/patches/common/chromium/printing.patch b/patches/common/chromium/printing.patch index 9a642802d8..f48b38fbca 100644 --- a/patches/common/chromium/printing.patch +++ b/patches/common/chromium/printing.patch @@ -283,10 +283,10 @@ index 7dd892feb181293d3c52fb6a3fd9600c899ee2d3..1ca51744e1046e5dfbedf5af8c6f7535 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd89404fd4 100644 +index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72cb76fa8e 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -1132,7 +1132,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1114,7 +1114,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { web_frame->DispatchBeforePrintEvent(); if (!weak_this) return; @@ -297,7 +297,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd if (weak_this) web_frame->DispatchAfterPrintEvent(); } -@@ -1180,7 +1182,10 @@ void PrintRenderFrameHelper::OnDestruct() { +@@ -1162,7 +1164,10 @@ void PrintRenderFrameHelper::OnDestruct() { delete this; } @@ -309,7 +309,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd if (ipc_nesting_level_ > 1) return; -@@ -1193,7 +1198,8 @@ void PrintRenderFrameHelper::OnPrintPages() { +@@ -1175,7 +1180,8 @@ void PrintRenderFrameHelper::OnPrintPages() { // If we are printing a PDF extension frame, find the plugin node and print // that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -319,7 +319,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd if (weak_this) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1210,7 +1216,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() { +@@ -1192,7 +1198,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() { } auto weak_this = weak_ptr_factory_.GetWeakPtr(); Print(frame, print_preview_context_.source_node(), @@ -328,7 +328,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd if (weak_this) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1246,6 +1252,8 @@ void PrintRenderFrameHelper::OnPrintPreview( +@@ -1228,6 +1234,8 @@ void PrintRenderFrameHelper::OnPrintPreview( if (ipc_nesting_level_ > 1) return; @@ -337,7 +337,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd print_preview_context_.OnPrintPreview(); UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent", -@@ -1631,7 +1639,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1622,7 +1630,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { auto self = weak_ptr_factory_.GetWeakPtr(); Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -349,7 +349,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd // Check if |this| is still valid. if (!self) return; -@@ -1642,7 +1653,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1633,7 +1644,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -361,8 +361,8 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1650,7 +1664,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, - FrameReference frame_ref(frame); +@@ -1646,7 +1660,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, + } int expected_page_count = 0; - if (!CalculateNumberOfPages(frame, node, &expected_page_count)) { @@ -370,7 +370,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1670,8 +1684,9 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1666,8 +1680,9 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, PrintMsg_PrintPages_Params print_settings; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -382,7 +382,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd // Check if |this| is still valid. if (!self) return; -@@ -1681,6 +1696,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1677,6 +1692,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, ? blink::kWebPrintScalingOptionSourceSize : scaling_option; SetPrintPagesParams(print_settings); @@ -390,7 +390,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd if (print_settings.params.dpi.IsEmpty() || !print_settings.params.document_cookie) { DidFinishPrinting(OK); // Release resources and fail silently on failure. -@@ -1871,10 +1887,24 @@ std::vector PrintRenderFrameHelper::GetPrintedPages( +@@ -1867,10 +1883,24 @@ std::vector PrintRenderFrameHelper::GetPrintedPages( return printed_pages; } @@ -418,7 +418,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd // Check if the printer returned any settings, if the settings is empty, we // can safely assume there are no printer drivers configured. So we safely // terminate. -@@ -1894,12 +1924,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -1890,12 +1920,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } @@ -431,7 +431,7 @@ index 9fb226cdf1db9a6651ca28f1bcfa7ec128bb6291..7f8907349e00b04dbdebb538ba4eb6cd + int* number_of_pages, + const base::DictionaryValue& settings) { DCHECK(frame); - bool fit_to_paper_size = !PrintingNodeOrPdfFrame(frame, node); + bool fit_to_paper_size = !IsPrintingNodeOrPdfFrame(frame, node); - if (!InitPrintSettings(fit_to_paper_size)) { + if (!InitPrintSettings(fit_to_paper_size, settings)) { notify_browser_of_print_failure_ = false; diff --git a/patches/common/chromium/proxy_config_monitor.patch b/patches/common/chromium/proxy_config_monitor.patch index 095d4bfec9..d4c8159937 100644 --- a/patches/common/chromium/proxy_config_monitor.patch +++ b/patches/common/chromium/proxy_config_monitor.patch @@ -6,10 +6,10 @@ Subject: proxy_config_monitor.patch Allow monitoring proxy config changes for a pref service. diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc -index 2d08d23e04008415f04b4d45d46c0aa6ed4dfee8..6207b646b0041628653532b014500e9990cc5e78 100644 +index f1e287553244cfd1054c4949ffbb1acdaccbe1e2..94cbca68cedc314d55993375bc48159c9a9bfb3d 100644 --- a/chrome/browser/net/proxy_config_monitor.cc +++ b/chrome/browser/net/proxy_config_monitor.cc -@@ -8,7 +8,9 @@ +@@ -10,7 +10,9 @@ #include "build/build_config.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/net/proxy_service_factory.h" @@ -19,7 +19,7 @@ index 2d08d23e04008415f04b4d45d46c0aa6ed4dfee8..6207b646b0041628653532b014500e99 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "content/public/browser/browser_thread.h" #include "mojo/public/cpp/bindings/associated_interface_ptr.h" -@@ -17,12 +19,13 @@ +@@ -19,12 +21,13 @@ #include "chrome/browser/chromeos/profiles/profile_helper.h" #endif // defined(OS_CHROMEOS) @@ -34,7 +34,7 @@ index 2d08d23e04008415f04b4d45d46c0aa6ed4dfee8..6207b646b0041628653532b014500e99 ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); DCHECK(profile); -@@ -52,6 +55,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { +@@ -54,6 +57,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) { proxy_config_service_->AddObserver(this); } @@ -42,7 +42,7 @@ index 2d08d23e04008415f04b4d45d46c0aa6ed4dfee8..6207b646b0041628653532b014500e99 ProxyConfigMonitor::ProxyConfigMonitor(PrefService* local_state) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) || -@@ -132,9 +136,11 @@ void ProxyConfigMonitor::OnLazyProxyConfigPoll() { +@@ -134,9 +138,11 @@ void ProxyConfigMonitor::OnLazyProxyConfigPoll() { void ProxyConfigMonitor::OnPACScriptError(int32_t line_number, const std::string& details) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -54,7 +54,7 @@ index 2d08d23e04008415f04b4d45d46c0aa6ed4dfee8..6207b646b0041628653532b014500e99 } void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings( -@@ -148,9 +154,10 @@ void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings( +@@ -150,9 +156,10 @@ void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings( // controlled. return; } @@ -67,10 +67,10 @@ index 2d08d23e04008415f04b4d45d46c0aa6ed4dfee8..6207b646b0041628653532b014500e99 } #endif diff --git a/chrome/browser/net/proxy_config_monitor.h b/chrome/browser/net/proxy_config_monitor.h -index 172e71b085a58ff3060a3c90e7e3b9f3ef6df199..30764a251b9a09defaca86c2ac80877914dd1fe9 100644 +index c6c1fa51cbf35e8183a34848f79ed8dcbc97e0e2..c511bf188b0f24a9bf6c8729d9188c9bf342cf6a 100644 --- a/chrome/browser/net/proxy_config_monitor.h +++ b/chrome/browser/net/proxy_config_monitor.h -@@ -37,11 +37,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, +@@ -38,11 +38,12 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, { public: @@ -84,7 +84,7 @@ index 172e71b085a58ff3060a3c90e7e3b9f3ef6df199..30764a251b9a09defaca86c2ac808779 // Creates a ProxyConfigMonitor that gets proxy settings from the // |local_state|, for use with NetworkContexts not // associated with a profile. Must be destroyed before |local_state|. -@@ -88,7 +89,6 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, +@@ -89,7 +90,6 @@ class ProxyConfigMonitor : public net::ProxyConfigService::Observer, #if BUILDFLAG(ENABLE_EXTENSIONS) mojo::BindingSet error_binding_set_; diff --git a/patches/common/chromium/render_widget_host_view_base.patch b/patches/common/chromium/render_widget_host_view_base.patch index ce2e931b91..d804f65378 100644 --- a/patches/common/chromium/render_widget_host_view_base.patch +++ b/patches/common/chromium/render_widget_host_view_base.patch @@ -5,10 +5,10 @@ Subject: render_widget_host_view_base.patch diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc -index 20733af1a1d9cae2c13a381b61aa4aecfebb0877..1b7404c2f05a0225c6dd55aacc7e8b31290ef68f 100644 +index 7e2761a4afb131982ad436388e73d9bf69618627..f6f72559a711e65c48f555b849b78966774e606f 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.cc +++ b/content/browser/renderer_host/render_widget_host_view_base.cc -@@ -657,6 +657,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint( +@@ -670,6 +670,15 @@ viz::FrameSinkId RenderWidgetHostViewBase::FrameSinkIdAtPoint( return frame_sink_id.is_valid() ? frame_sink_id : GetFrameSinkId(); } @@ -25,7 +25,7 @@ index 20733af1a1d9cae2c13a381b61aa4aecfebb0877..1b7404c2f05a0225c6dd55aacc7e8b31 const blink::WebMouseEvent& event, const ui::LatencyInfo& latency) { diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h -index 62bc30a0539f2e0d5b9e86716fe1be9b45726ff7..4b2111b57ca1bf10f5bc4d2589bd23964fa34d62 100644 +index b7febba61de2018127b365ae9d707030406098e5..c07184c23b9e8f89919e623338db4bfa86a0f6ee 100644 --- a/content/browser/renderer_host/render_widget_host_view_base.h +++ b/content/browser/renderer_host/render_widget_host_view_base.h @@ -23,8 +23,10 @@ @@ -62,7 +62,7 @@ index 62bc30a0539f2e0d5b9e86716fe1be9b45726ff7..4b2111b57ca1bf10f5bc4d2589bd2396 // This only needs to be overridden by RenderWidgetHostViewBase subclasses // that handle content embedded within other RenderWidgetHostViews. gfx::PointF TransformPointToRootCoordSpaceF( -@@ -363,6 +370,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -365,6 +372,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase virtual void ProcessGestureEvent(const blink::WebGestureEvent& event, const ui::LatencyInfo& latency); diff --git a/patches/common/chromium/render_widget_host_view_mac.patch b/patches/common/chromium/render_widget_host_view_mac.patch index cc2fc14d4d..bbbfffa495 100644 --- a/patches/common/chromium/render_widget_host_view_mac.patch +++ b/patches/common/chromium/render_widget_host_view_mac.patch @@ -5,10 +5,10 @@ Subject: render_widget_host_view_mac.patch diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm -index 040b482030aa4dcc91fb4ed0b97ef51acb78cfa5..36f35ae5eba37a24951540057069e32ac88d2980 100644 +index 57a608c1a1d4463ba813e1d9132e7f565be85305..be122f9ce470519e630d418550a60324c73a3f42 100644 --- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm +++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm -@@ -142,6 +142,11 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -144,6 +144,11 @@ void ExtractUnderlines(NSAttributedString* string, } // namespace @@ -20,7 +20,7 @@ index 040b482030aa4dcc91fb4ed0b97ef51acb78cfa5..36f35ae5eba37a24951540057069e32a // These are not documented, so use only after checking -respondsToSelector:. @interface NSApplication (UndocumentedSpeechMethods) - (void)speakString:(NSString*)string; -@@ -401,6 +406,9 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -403,6 +408,9 @@ - (BOOL)acceptsMouseEventsWhenInactive { } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -30,7 +30,7 @@ index 040b482030aa4dcc91fb4ed0b97ef51acb78cfa5..36f35ae5eba37a24951540057069e32a return [self acceptsMouseEventsWhenInactive]; } -@@ -763,6 +771,10 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -765,6 +773,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv { eventType == NSKeyDown && !(modifierFlags & NSCommandKeyMask); @@ -41,7 +41,7 @@ index 040b482030aa4dcc91fb4ed0b97ef51acb78cfa5..36f35ae5eba37a24951540057069e32a // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { clientHelper_->ForwardKeyboardEvent(event, latency_info); -@@ -1503,9 +1515,11 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -1506,9 +1518,11 @@ - (id)accessibilityFocusedUIElement { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -53,7 +53,7 @@ index 040b482030aa4dcc91fb4ed0b97ef51acb78cfa5..36f35ae5eba37a24951540057069e32a - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1514,7 +1528,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName; +@@ -1517,7 +1531,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, @@ -66,7 +66,7 @@ index 040b482030aa4dcc91fb4ed0b97ef51acb78cfa5..36f35ae5eba37a24951540057069e32a return validAttributesForMarkedText_.get(); } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 86e898d4591d3fd8af325f7f204d0f19b019238e..9103cb06553d86fb8fe4c22c05ad88925e09891d 100644 +index 6a40bd5c67aa14b47727c61d8392195ebeb704d0..534b3bd2c70b5d68e02856f068a1fdb6269aab4f 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -61,6 +61,7 @@ diff --git a/patches/common/chromium/resource_file_conflict.patch b/patches/common/chromium/resource_file_conflict.patch index 704fa4a501..bd9576f20d 100644 --- a/patches/common/chromium/resource_file_conflict.patch +++ b/patches/common/chromium/resource_file_conflict.patch @@ -52,10 +52,10 @@ Some alternatives to this patch: None of these options seems like a substantial maintainability win over this patch to me (@nornagon). diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn -index b3ebd3da653f731094d1c1a88fdedeccfa9be682..dc0b51a3fd113ba363d1f7944d578fb85d174eb7 100644 +index 11e4c4c9fd436fd57501e0e2c71e5fe6f66f4204..fcc072d6d9347feffd49450eb3d3172882a80289 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn -@@ -1634,7 +1634,7 @@ if (is_chrome_branded && !is_android) { +@@ -1642,7 +1642,7 @@ if (is_chrome_branded && !is_android) { } } @@ -64,7 +64,7 @@ index b3ebd3da653f731094d1c1a88fdedeccfa9be682..dc0b51a3fd113ba363d1f7944d578fb8 chrome_paks("packed_resources") { if (is_mac) { output_dir = "$root_gen_dir/repack" -@@ -1658,6 +1658,12 @@ if (!is_android) { +@@ -1666,6 +1666,12 @@ if (!is_android) { } } diff --git a/patches/common/chromium/scroll_bounce_flag.patch b/patches/common/chromium/scroll_bounce_flag.patch index 4e6e3b77fb..136e460818 100644 --- a/patches/common/chromium/scroll_bounce_flag.patch +++ b/patches/common/chromium/scroll_bounce_flag.patch @@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch Patch to make scrollBounce option work. diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc -index 68682fd876dd8a07d2548e32a0ce453ca41a339b..341c74c6247f7cf7b119f4357cb80b0b6a688068 100644 +index 44df5d5461c718d2a793171d3592691c7bba12c8..8ff5baae959a3362ca6b7bc094a985d7ae030ff3 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1538,7 +1538,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() { +@@ -1534,7 +1534,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/common/chromium/ssl_security_state_tab_helper.patch b/patches/common/chromium/ssl_security_state_tab_helper.patch index b36d0a80d7..1b64305195 100644 --- a/patches/common/chromium/ssl_security_state_tab_helper.patch +++ b/patches/common/chromium/ssl_security_state_tab_helper.patch @@ -6,12 +6,12 @@ Subject: ssl_security_state_tab_helper.patch Allows populating security tab info for devtools in Electron. diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc -index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70fff77fb858 100644 +index 254f203e4db90b9ad09022409defc82a6dfa6100..3f121d32629920284ed45201f423ae5747fc994f 100644 --- a/chrome/browser/ssl/security_state_tab_helper.cc +++ b/chrome/browser/ssl/security_state_tab_helper.cc -@@ -13,16 +13,20 @@ +@@ -12,16 +12,20 @@ + #include "base/strings/pattern.h" #include "base/strings/string_util.h" - #include "base/time/time.h" #include "build/build_config.h" +#if 0 #include "chrome/browser/browser_process.h" @@ -30,7 +30,7 @@ index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70ff #include "components/security_state/content/content_utils.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/navigation_entry.h" -@@ -43,7 +47,7 @@ +@@ -42,7 +46,7 @@ #include "chrome/browser/chromeos/policy/policy_cert_service_factory.h" #endif // defined(OS_CHROMEOS) @@ -39,7 +39,7 @@ index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70ff #include "chrome/browser/safe_browsing/chrome_password_protection_service.h" #endif -@@ -79,7 +83,9 @@ bool IsOriginSecureWithWhitelist( +@@ -78,7 +82,9 @@ bool IsOriginSecureWithWhitelist( } // namespace @@ -49,21 +49,7 @@ index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70ff SecurityStateTabHelper::SecurityStateTabHelper( content::WebContents* web_contents) -@@ -87,8 +93,11 @@ SecurityStateTabHelper::SecurityStateTabHelper( - logged_http_warning_on_current_navigation_(false), - is_incognito_(false) { - content::BrowserContext* context = web_contents->GetBrowserContext(); -- if (context->IsOffTheRecord() && -- !Profile::FromBrowserContext(context)->IsGuestSession()) { -+ if (context->IsOffTheRecord() -+#if 0 -+ && !Profile::FromBrowserContext(context)->IsGuestSession() -+#endif -+ ) { - is_incognito_ = true; - } - } -@@ -173,6 +182,7 @@ void SecurityStateTabHelper::DidFinishNavigation( +@@ -138,6 +144,7 @@ void SecurityStateTabHelper::DidFinishNavigation( UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true); } @@ -71,7 +57,7 @@ index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70ff // Security indicator UI study (https://crbug.com/803501): Show a message in // the console to reduce developer confusion about the experimental UI // treatments for HTTPS pages with EV certificates. -@@ -200,6 +210,7 @@ void SecurityStateTabHelper::DidFinishNavigation( +@@ -165,6 +172,7 @@ void SecurityStateTabHelper::DidFinishNavigation( "Validation is still valid."); } } @@ -79,7 +65,7 @@ index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70ff } void SecurityStateTabHelper::DidChangeVisibleSecurityState() { -@@ -273,6 +284,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { +@@ -190,6 +198,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { web_contents()->GetController().GetVisibleEntry(); if (!entry) return security_state::MALICIOUS_CONTENT_STATUS_NONE; @@ -87,7 +73,7 @@ index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70ff safe_browsing::SafeBrowsingService* sb_service = g_browser_process->safe_browsing_service(); if (!sb_service) -@@ -341,6 +353,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { +@@ -259,6 +268,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const { break; } } @@ -95,7 +81,7 @@ index 1da4480f5a154920e38754d02e197835f82a94c3..f3b2885793a8f3ba46da9914b97f70ff return security_state::MALICIOUS_CONTENT_STATUS_NONE; } -@@ -361,15 +374,19 @@ std::vector SecurityStateTabHelper::GetSecureOriginsAndPatterns() +@@ -277,15 +287,19 @@ std::vector SecurityStateTabHelper::GetSecureOriginsAndPatterns() const { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); diff --git a/patches/common/chromium/support_mixed_sandbox_with_zygote.patch b/patches/common/chromium/support_mixed_sandbox_with_zygote.patch index 9ba38b36b3..ba6495fc5c 100644 --- a/patches/common/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/common/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index b5146d9180c970aed912c497aa319969cb563895..fe73adb24cf444a942c7cdd1c1f6d25d869d5277 100644 +index e5f26ffd7ee5d3dc543c40f77a564a02b439399a..f341e362a338595d617e28d9273cb4d47940dd7b 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -473,6 +473,10 @@ class RendererSandboxedProcessLauncherDelegate +@@ -470,6 +470,10 @@ class RendererSandboxedProcessLauncherDelegate : public SandboxedProcessLauncherDelegate { public: RendererSandboxedProcessLauncherDelegate() {} @@ -36,7 +36,7 @@ index b5146d9180c970aed912c497aa319969cb563895..fe73adb24cf444a942c7cdd1c1f6d25d ~RendererSandboxedProcessLauncherDelegate() override {} -@@ -492,6 +496,9 @@ class RendererSandboxedProcessLauncherDelegate +@@ -489,6 +493,9 @@ class RendererSandboxedProcessLauncherDelegate #if BUILDFLAG(USE_ZYGOTE_HANDLE) service_manager::ZygoteHandle GetZygote() override { @@ -46,7 +46,7 @@ index b5146d9180c970aed912c497aa319969cb563895..fe73adb24cf444a942c7cdd1c1f6d25d const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -505,6 +512,11 @@ class RendererSandboxedProcessLauncherDelegate +@@ -502,6 +509,11 @@ class RendererSandboxedProcessLauncherDelegate service_manager::SandboxType GetSandboxType() override { return service_manager::SANDBOX_TYPE_RENDERER; } @@ -58,7 +58,7 @@ index b5146d9180c970aed912c497aa319969cb563895..fe73adb24cf444a942c7cdd1c1f6d25d }; const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey"; -@@ -1827,11 +1839,18 @@ bool RenderProcessHostImpl::Init() { +@@ -1835,11 +1847,18 @@ bool RenderProcessHostImpl::Init() { cmd_line->PrependWrapper(renderer_prefix); AppendRendererCommandLine(cmd_line.get()); diff --git a/patches/common/chromium/thread_capabilities.patch b/patches/common/chromium/thread_capabilities.patch index e5cb79b5c9..abfd882135 100644 --- a/patches/common/chromium/thread_capabilities.patch +++ b/patches/common/chromium/thread_capabilities.patch @@ -11,7 +11,7 @@ system. See https://github.com/atom/electron/issues/3666 diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc -index ad0714a7f5edad1784d5e055a392519f750973cc..1406e1d53f2f13bbbcc5b96a1681b9ec18c3e49c 100644 +index ee0fa017409099bf4574a8c7aa4fbb0f53ed07c2..aeec2cb89b23f80997c9d5f195f099d95fa6068b 100644 --- a/sandbox/linux/services/credentials.cc +++ b/sandbox/linux/services/credentials.cc @@ -348,8 +348,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() { diff --git a/patches/common/chromium/tts.patch b/patches/common/chromium/tts.patch index c4822abf38..f283191320 100644 --- a/patches/common/chromium/tts.patch +++ b/patches/common/chromium/tts.patch @@ -10,17 +10,18 @@ Subject: tts.patch destruction from content layer. diff --git a/chrome/browser/speech/tts_controller_delegate_impl.cc b/chrome/browser/speech/tts_controller_delegate_impl.cc -index 9e071512872c1e9350b29e499a28e3033fa1b95f..905cd40368b029ed546af2fb37b42e6cd8cc1d8e 100644 +index dbfed8996b92c8e1208f3455c56447e35f9e9e43..ab85a77adf20b600cd7e400f105ade7b16d53e86 100644 --- a/chrome/browser/speech/tts_controller_delegate_impl.cc +++ b/chrome/browser/speech/tts_controller_delegate_impl.cc -@@ -533,12 +533,14 @@ const PrefService* TtsControllerDelegateImpl::GetPrefService( - const content::Utterance* utterance) { +@@ -213,6 +213,7 @@ void TtsControllerDelegateImpl::UpdateUtteranceDefaultsFromPrefs( + const PrefService* TtsControllerDelegateImpl::GetPrefService( + const content::TtsUtterance* utterance) { const PrefService* prefs = nullptr; - // The utterance->browser_context() is null in tests. +#if 0 - if (utterance->browser_context()) { + // The utterance->GetBrowserContext() is null in tests. + if (utterance->GetBrowserContext()) { const Profile* profile = - Profile::FromBrowserContext(utterance->browser_context()); +@@ -220,6 +221,7 @@ const PrefService* TtsControllerDelegateImpl::GetPrefService( if (profile) prefs = profile->GetPrefs(); } @@ -29,7 +30,7 @@ index 9e071512872c1e9350b29e499a28e3033fa1b95f..905cd40368b029ed546af2fb37b42e6c } diff --git a/chrome/browser/speech/tts_message_filter.cc b/chrome/browser/speech/tts_message_filter.cc -index 7ff9a9219beffc015ae8a96303595ee529715819..d2394892c2a0d2b4f88407cd412af143cf40881d 100644 +index b1ccc84efa99a616d9b196f741dfa57018ae1fd2..f0d9b2ec8b765ffb7e4a3460b2627a2009db500f 100644 --- a/chrome/browser/speech/tts_message_filter.cc +++ b/chrome/browser/speech/tts_message_filter.cc @@ -10,8 +10,11 @@ @@ -117,7 +118,7 @@ index 7ff9a9219beffc015ae8a96303595ee529715819..d2394892c2a0d2b4f88407cd412af143 } } -@@ -211,10 +236,8 @@ void TtsMessageFilter::Cleanup() { +@@ -210,10 +235,8 @@ void TtsMessageFilter::Cleanup() { content::TtsController::GetInstance()->RemoveUtteranceEventDelegate(this); } @@ -132,7 +133,7 @@ index 7ff9a9219beffc015ae8a96303595ee529715819..d2394892c2a0d2b4f88407cd412af143 + browser_context_shutdown_notifier_.reset(); } diff --git a/chrome/browser/speech/tts_message_filter.h b/chrome/browser/speech/tts_message_filter.h -index 2fbbc4b4f2a79eac6b686894f2b6463abe404e50..e02c1af7e002a70df5fa925ba758c7c2379ffac5 100644 +index 37c62a4d004ccc8e26f36bbc7244c1a0c6c18ecd..3075b45945911cb3019e8a1eb7896d8e33193598 100644 --- a/chrome/browser/speech/tts_message_filter.h +++ b/chrome/browser/speech/tts_message_filter.h @@ -8,6 +8,7 @@ diff --git a/patches/common/chromium/verbose_generate_breakpad_symbols.patch b/patches/common/chromium/verbose_generate_breakpad_symbols.patch index c6715807ae..f83dee8d0d 100644 --- a/patches/common/chromium/verbose_generate_breakpad_symbols.patch +++ b/patches/common/chromium/verbose_generate_breakpad_symbols.patch @@ -7,10 +7,10 @@ Temporarily add additional debugging statements to generate_breakpad_symbols.py to determine why it is hanging. diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py -index 58646a10591a1d3e7c2dd1782c3642b9cbe06738..0ae9c3c8ae27ca5684ebcb4f6a87f014c0e512b5 100755 +index 58558b6cd1e3af826a7066c035e1ad589eff4cb5..d9f697749847caf59d78f5643d2efaf7815e050d 100755 --- a/components/crash/content/tools/generate_breakpad_symbols.py +++ b/components/crash/content/tools/generate_breakpad_symbols.py -@@ -59,7 +59,10 @@ def Resolve(path, exe_path, loader_path, rpaths): +@@ -60,7 +60,10 @@ def Resolve(path, exe_path, loader_path, rpaths): return path @@ -19,21 +19,21 @@ index 58646a10591a1d3e7c2dd1782c3642b9cbe06738..0ae9c3c8ae27ca5684ebcb4f6a87f014 + if options.verbose: + print "GetSharedLibraryDependencies for %s" % binary + - """Return absolute paths to all shared library dependecies of the binary. + """Return absolute paths to all shared library dependencies of the binary. This implementation assumes that we're running on a Linux system.""" -@@ -73,6 +76,9 @@ def GetSharedLibraryDependenciesLinux(binary): +@@ -74,6 +77,9 @@ def GetSharedLibraryDependenciesLinux(binary): m = lib_re.match(line) if m: - result.append(m.group(1)) + result.append(os.path.abspath(m.group(1))) + if options.verbose: + print "Done GetSharedLibraryDependencies for %s" % binary + print result return result -@@ -167,7 +173,7 @@ def GetSharedLibraryDependencies(options, binary, exe_path): - """Return absolute paths to all shared library dependecies of the binary.""" +@@ -168,7 +174,7 @@ def GetSharedLibraryDependencies(options, binary, exe_path): + """Return absolute paths to all shared library dependencies of the binary.""" deps = [] if sys.platform.startswith('linux'): - deps = GetSharedLibraryDependenciesLinux(binary) @@ -41,7 +41,7 @@ index 58646a10591a1d3e7c2dd1782c3642b9cbe06738..0ae9c3c8ae27ca5684ebcb4f6a87f014 elif sys.platform == 'darwin': deps = GetSharedLibraryDependenciesMac(binary, exe_path) else: -@@ -204,7 +210,8 @@ def GetBinaryInfoFromHeaderInfo(header_info): +@@ -228,7 +234,8 @@ def GetBinaryInfoFromHeaderInfo(header_info): def GenerateSymbols(options, binaries): """Dumps the symbols of binary and places them in the given directory.""" @@ -51,7 +51,7 @@ index 58646a10591a1d3e7c2dd1782c3642b9cbe06738..0ae9c3c8ae27ca5684ebcb4f6a87f014 queue = Queue.Queue() print_lock = threading.Lock() -@@ -224,8 +231,15 @@ def GenerateSymbols(options, binaries): +@@ -248,8 +255,15 @@ def GenerateSymbols(options, binaries): reason = "Could not locate dump_syms executable." break @@ -67,7 +67,7 @@ index 58646a10591a1d3e7c2dd1782c3642b9cbe06738..0ae9c3c8ae27ca5684ebcb4f6a87f014 if not binary_info: should_dump_syms = False reason = "Could not obtain binary information." -@@ -242,8 +256,14 @@ def GenerateSymbols(options, binaries): +@@ -266,8 +280,14 @@ def GenerateSymbols(options, binaries): # See if there is a symbol file already found next to the binary potential_symbol_files = glob.glob('%s.breakpad*' % binary) for potential_symbol_file in potential_symbol_files: diff --git a/patches/common/chromium/web_contents.patch b/patches/common/chromium/web_contents.patch index bcfaf7fafe..7c4e0583fc 100644 --- a/patches/common/chromium/web_contents.patch +++ b/patches/common/chromium/web_contents.patch @@ -5,10 +5,10 @@ Subject: web_contents.patch diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index b7fed5f660c7fcd50f6ca1c583b87f78eed1f40b..51d309ebad100b0f5af3922fa51305141398c34d 100644 +index 5f747b549e8dde330c44be29faa009d8fae332bf..e729d0b650194bd2c961338aa9bee6c7cd533093 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -1980,6 +1980,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2020,6 +2020,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -21,7 +21,7 @@ index b7fed5f660c7fcd50f6ca1c583b87f78eed1f40b..51d309ebad100b0f5af3922fa5130514 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -1995,6 +2001,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2035,6 +2041,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { &render_view_host_delegate_view_); } } @@ -90,7 +90,7 @@ index 5de4d7cf8a7a812ad3f6383cd60acbd39135924d..dca9ec76b44be34124a12f453d3c6ecb RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget( diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h -index 060e2194d9eae8ff35e981e0a04ad78f7e35157b..9edc7b536ff4e9fadd1d07a1c9d01e6abd9313ca 100644 +index e6b4cd044895cf8c2ddd46038e958b39566cffb8..7e76f04798861bec7bff3dd721ac14a8c3e8392e 100644 --- a/content/public/browser/web_contents.h +++ b/content/public/browser/web_contents.h @@ -73,9 +73,12 @@ class BrowserPluginGuestDelegate; diff --git a/patches/common/chromium/webgl_context_attributes.patch b/patches/common/chromium/webgl_context_attributes.patch index 6376e49166..ba47797661 100644 --- a/patches/common/chromium/webgl_context_attributes.patch +++ b/patches/common/chromium/webgl_context_attributes.patch @@ -5,10 +5,10 @@ Subject: webgl_context_attributes.patch diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index d80d269e5cb4ca15c2bc2abfe1e617ee62d37cb1..c1b28e91fdae8ca9a8ccdc87610f3e949c7ce2f9 100644 +index e4acd1d1ec3ca10f10aacb6f4a4ad132ea8d4316..e75ddaf4d518172242287ee277f7e5bc6f91bcbe 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -998,8 +998,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( +@@ -895,8 +895,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( attributes.sample_buffers = 0; attributes.bind_generates_resource = false; attributes.enable_raster_interface = web_attributes.enable_raster_interface; @@ -22,10 +22,10 @@ index d80d269e5cb4ca15c2bc2abfe1e617ee62d37cb1..c1b28e91fdae8ca9a8ccdc87610f3e94 attributes.fail_if_major_perf_caveat = web_attributes.fail_if_major_performance_caveat; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index e3f1a22160b6dcc9560574206fe2c1688d3b7c64..097c18726127d20373d4f6d8659589cdb7ae6914 100644 +index bfc4a95febcf44249cd3793b883c03ab9bd1e3ec..03c6046fb6541f7864b504d8f1470b843579ae41 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -549,6 +549,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -540,6 +540,7 @@ class BLINK_PLATFORM_EXPORT Platform { kWebGPUContextType, // WebGPU context }; struct ContextAttributes { @@ -34,7 +34,7 @@ index e3f1a22160b6dcc9560574206fe2c1688d3b7c64..097c18726127d20373d4f6d8659589cd ContextType context_type = kGLES2ContextType; // Offscreen contexts usually share a surface for the default frame buffer diff --git a/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h b/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h -index a6f46ede75f84294d34ad042a1fb103d106a0543..c62399bde32c6296d7bdede710e63f30cef50833 100644 +index 614e4e3a8737c1149baac1aedb985c6be62c9a84..3ae0b2a809532707ca9c8b3964737a1a5941e132 100644 --- a/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h +++ b/third_party/blink/renderer/core/html/canvas/canvas_context_creation_attributes_core.h @@ -30,6 +30,7 @@ class CORE_EXPORT CanvasContextCreationAttributesCore { @@ -43,10 +43,10 @@ index a6f46ede75f84294d34ad042a1fb103d106a0543..c62399bde32c6296d7bdede710e63f30 bool preserve_drawing_buffer = false; + String power_preference = "default"; bool stencil = false; - - // This attribute is of type XRDevice, defined in modules/xr/xr_device.h + bool xr_compatible = false; + }; diff --git a/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl b/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl -index 98875e974f51ea77a0adf6f6f304ff97f1f62102..36739547ce2ffda7e6f243f50dab5a63a1fc6a4f 100644 +index ad9f867f46be2c652da9fd328517de6d87de31a7..b4f97a0fdc658a23d5d021172e32d68f68a7c38f 100644 --- a/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl +++ b/third_party/blink/renderer/modules/canvas/htmlcanvas/canvas_context_creation_attributes_module.idl @@ -28,6 +28,12 @@ enum CanvasPixelFormat { @@ -68,21 +68,21 @@ index 98875e974f51ea77a0adf6f6f304ff97f1f62102..36739547ce2ffda7e6f243f50dab5a63 boolean preserveDrawingBuffer = false; + CanvasPowerPreference powerPreference = "default"; boolean failIfMajorPerformanceCaveat = false; - [OriginTrialEnabled=WebXR] XRDevice compatibleXRDevice = null; + [OriginTrialEnabled=WebXR] boolean xrCompatible = false; }; diff --git a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc -index 121b0fd872631aaef44cac34a6978d053f73813a..47154c76ca990ef582fdcb4f3acc09301a5a75f9 100644 +index 7a74942ab1f4495956d8e96ecd98b8028a20efa3..9a868cdb36ce468d3116379cfc04da28acfe010b 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc +++ b/third_party/blink/renderer/modules/webgl/webgl_context_attribute_helpers.cc -@@ -18,6 +18,7 @@ WebGLContextAttributes* ToWebGLContextAttributes( +@@ -17,6 +17,7 @@ WebGLContextAttributes* ToWebGLContextAttributes( result->setAntialias(attrs.antialias); result->setPremultipliedAlpha(attrs.premultiplied_alpha); result->setPreserveDrawingBuffer(attrs.preserve_drawing_buffer); + result->setPowerPreference(attrs.power_preference); result->setFailIfMajorPerformanceCaveat( attrs.fail_if_major_performance_caveat); - result->setCompatibleXRDevice( -@@ -31,6 +32,7 @@ Platform::ContextAttributes ToPlatformContextAttributes( + result->setXrCompatible(attrs.xr_compatible); +@@ -29,6 +30,7 @@ Platform::ContextAttributes ToPlatformContextAttributes( Platform::ContextType context_type, bool support_own_offscreen_surface) { Platform::ContextAttributes result; @@ -91,7 +91,7 @@ index 121b0fd872631aaef44cac34a6978d053f73813a..47154c76ca990ef582fdcb4f3acc0930 attrs.fail_if_major_performance_caveat; result.context_type = context_type; diff --git a/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl b/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl -index 39092f2acab0996dc4f29c3687f92fcd4b8b090f..256beda2da43bf02391943c6ca337fed141bc2a3 100644 +index 725dbfb351e7556e137750d95104648c879dffc1..2e4df15a8dfe1a8ea504205e951a3d270e23ed46 100644 --- a/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl +++ b/third_party/blink/renderer/modules/webgl/webgl_context_attributes.idl @@ -26,6 +26,12 @@ @@ -113,5 +113,5 @@ index 39092f2acab0996dc4f29c3687f92fcd4b8b090f..256beda2da43bf02391943c6ca337fed boolean preserveDrawingBuffer = false; + WebGLPowerPreference powerPreference = "default"; boolean failIfMajorPerformanceCaveat = false; - [OriginTrialEnabled=WebXR] XRDevice compatibleXRDevice = null; + [OriginTrialEnabled=WebXR] boolean xrCompatible = false; // TODO(crbug.com/788439): remove OriginTrialEnabled. diff --git a/patches/common/chromium/webview_cross_drag.patch b/patches/common/chromium/webview_cross_drag.patch index 30457d1048..c07251ac37 100644 --- a/patches/common/chromium/webview_cross_drag.patch +++ b/patches/common/chromium/webview_cross_drag.patch @@ -5,10 +5,10 @@ Subject: webview_cross_drag.patch diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index 12d8f9bd7cc569f977d8c98608a1a7ee5eaf9844..45cb5a3b0d457f8a0b0ed196d45e665e332a55ed 100644 +index 04cd7481f4e8ba382411dfad0d3c8afc74bca45b..0185081062ead3c00237d3d4692a8ebe00425749 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc -@@ -620,6 +620,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { +@@ -676,6 +676,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { bool WebContentsViewAura::IsValidDragTarget( RenderWidgetHostImpl* target_rwh) const { @@ -17,10 +17,10 @@ index 12d8f9bd7cc569f977d8c98608a1a7ee5eaf9844..45cb5a3b0d457f8a0b0ed196d45e665e GetRenderViewHostID(web_contents_->GetRenderViewHost()) != drag_start_view_id_; diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index 5bb3b17f12f5b97c50b557782c284fc4b7a2eef5..9f900db28b5c219c6d075f9963499f20d5b49196 100644 +index e8ae8e1f8da88dbb3be0274c8254098c038bda58..2dc8e8c5937c28b542d238bfb39b41079cef635c 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm -@@ -349,6 +349,7 @@ GetRenderWidgetHostAtPoint:(const NSPoint&)viewPoint +@@ -334,6 +334,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { diff --git a/patches/common/chromium/worker_context_will_destroy.patch b/patches/common/chromium/worker_context_will_destroy.patch index 3a5be61b5c..34e6cddace 100644 --- a/patches/common/chromium/worker_context_will_destroy.patch +++ b/patches/common/chromium/worker_context_will_destroy.patch @@ -5,10 +5,10 @@ Subject: worker_context_will_destroy.patch diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h -index f3bd63d891283422f2ec35a1f5545bfea98001e2..c64e51312f6a90189806ccb88ab525c0919c14b8 100644 +index cfe87b6c3903db7835c3998a65cf18a2301bbf87..e9046ad91236418942cc98372220bf59590dbdf7 100644 --- a/content/public/renderer/content_renderer_client.h +++ b/content/public/renderer/content_renderer_client.h -@@ -387,6 +387,11 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -378,6 +378,11 @@ class CONTENT_EXPORT ContentRendererClient { virtual void DidInitializeWorkerContextOnWorkerThread( v8::Local context) {} @@ -21,10 +21,10 @@ index f3bd63d891283422f2ec35a1f5545bfea98001e2..c64e51312f6a90189806ccb88ab525c0 // An empty URL is returned if the URL is not overriden. virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index c1b28e91fdae8ca9a8ccdc87610f3e949c7ce2f9..c007cc3c613ad40ca890ae9e3a7099ca33f393ac 100644 +index e75ddaf4d518172242287ee277f7e5bc6f91bcbe..05cc8f80549c76919087ac4a108c3c5c7fe76f79 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -1138,6 +1138,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -1035,6 +1035,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -38,10 +38,10 @@ index c1b28e91fdae8ca9a8ccdc87610f3e949c7ce2f9..c007cc3c613ad40ca890ae9e3a7099ca const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 63e86af7430a0eb73d3bd4451566d5b575f3d465..114c20aa6658b7975adcd18bab9462a44a3f35f1 100644 +index 0052cff07aec7cc7561d7586e5474a107f563ada..563f8f2c147899d0960042d3d23cf27520a702ea 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -205,6 +205,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -202,6 +202,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -50,10 +50,10 @@ index 63e86af7430a0eb73d3bd4451566d5b575f3d465..114c20aa6658b7975adcd18bab9462a4 // Disables the WebSandboxSupport implementation for testing. // Tests that do not set up a full sandbox environment should call diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 097c18726127d20373d4f6d8659589cdb7ae6914..7c12ea2646980958e8e1447cf873ef8a23265c0e 100644 +index 03c6046fb6541f7864b504d8f1470b843579ae41..f3b69a27768235dac24a62e6254f6bc3ea34db66 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -689,6 +689,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -680,6 +680,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} @@ -62,7 +62,7 @@ index 097c18726127d20373d4f6d8659589cdb7ae6914..7c12ea2646980958e8e1447cf873ef8a return false; } diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc -index dfe382cdefb4525d47bcb9d0f4deb4bfa309b6dc..a9a858abe454b4101a97fc6dff1de273c7107bb6 100644 +index d4549efdf247d50750ae168db6549fbab0bbc5bf..35c8ce0a141f68fc7011942120272805e69d15eb 100644 --- a/third_party/blink/renderer/core/workers/worker_thread.cc +++ b/third_party/blink/renderer/core/workers/worker_thread.cc @@ -544,6 +544,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() { From e517139e3cb3993981424049352ecc15d7bfbf6c Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 16 Jan 2019 23:39:10 +0530 Subject: [PATCH 03/52] chore: update patches/common/v8 --- patches/common/v8/.patches | 4 +- patches/common/v8/add_realloc.patch | 8 +- patches/common/v8/array_buffer.patch | 8 +- ...ild-torque-with-x64-toolchain-on-arm.patch | 8 +- patches/common/v8/build_gn.patch | 6 +- patches/common/v8/dcheck.patch | 8 +- ..._detailed_line_info_for_cpu_profiler.patch | 4 +- ...cherry-pick_88f8fe1_from_upstream_v8.patch | 258 ------- ...vide_more_v8_backwards_compatibility.patch | 54 +- ...ot_run_arm_arm64_mksnapshot_binaries.patch | 4 +- patches/common/v8/export_platform.patch | 4 +- patches/common/v8/expose_mksnapshot.patch | 4 +- ..._use_v8_initializers_code_in_v8_base.patch | 719 ------------------ 13 files changed, 55 insertions(+), 1034 deletions(-) delete mode 100644 patches/common/v8/deps_cherry-pick_88f8fe1_from_upstream_v8.patch delete mode 100644 patches/common/v8/reland_don_t_use_v8_initializers_code_in_v8_base.patch diff --git a/patches/common/v8/.patches b/patches/common/v8/.patches index d575f05774..1be080a0b1 100644 --- a/patches/common/v8/.patches +++ b/patches/common/v8/.patches @@ -3,10 +3,8 @@ add_realloc.patch build_gn.patch array_buffer.patch export_platform.patch -dcheck.patch expose_mksnapshot.patch build-torque-with-x64-toolchain-on-arm.patch do_not_run_arm_arm64_mksnapshot_binaries.patch -reland_don_t_use_v8_initializers_code_in_v8_base.patch deps_provide_more_v8_backwards_compatibility.patch -deps_cherry-pick_88f8fe1_from_upstream_v8.patch +dcheck.patch diff --git a/patches/common/v8/add_realloc.patch b/patches/common/v8/add_realloc.patch index 7ec3560c89..a302118734 100644 --- a/patches/common/v8/add_realloc.patch +++ b/patches/common/v8/add_realloc.patch @@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement Realloc on the v8 side. diff --git a/include/v8.h b/include/v8.h -index 03677d7af202d665c704dd771603322321b508cc..83b9d3d0d1f981edc444452b500df9fa5b89a056 100644 +index dd81ef81e3c0df11f5cac7a4c934b0a04e9de003..4b8fb04bc8210c0273157009b3560983b1322b18 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -4526,6 +4526,13 @@ class V8_EXPORT ArrayBuffer : public Object { +@@ -4604,6 +4604,13 @@ class V8_EXPORT ArrayBuffer : public Object { */ virtual void* AllocateUninitialized(size_t length) = 0; @@ -30,10 +30,10 @@ index 03677d7af202d665c704dd771603322321b508cc..83b9d3d0d1f981edc444452b500df9fa * Free the memory block of size |length|, pointed to by |data|. * That memory is guaranteed to be previously allocated by |Allocate|. diff --git a/src/api.cc b/src/api.cc -index 1d993044db4a969209a90c1b1f9e88d82531a538..9ddef27b9f7004fb50290f0dd91d2994d9771466 100644 +index 634ad37115faa1795a20155ed0faf51421eb1543..56be5e2e007c0ea84653a5487abef49cc206efc3 100644 --- a/src/api.cc +++ b/src/api.cc -@@ -507,6 +507,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { +@@ -512,6 +512,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { i::V8::SetSnapshotBlob(snapshot_blob); } diff --git a/patches/common/v8/array_buffer.patch b/patches/common/v8/array_buffer.patch index 571df4569e..2fb78df74f 100644 --- a/patches/common/v8/array_buffer.patch +++ b/patches/common/v8/array_buffer.patch @@ -5,10 +5,10 @@ Subject: array_buffer.patch diff --git a/include/v8.h b/include/v8.h -index 83b9d3d0d1f981edc444452b500df9fa5b89a056..6ebadc3b85b0f954305bc3a9187b996aa248a347 100644 +index 4b8fb04bc8210c0273157009b3560983b1322b18..f10a7950de2166804f779346bce580cfb2e7c3ec 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -7661,6 +7661,9 @@ class V8_EXPORT Isolate { +@@ -7701,6 +7701,9 @@ class V8_EXPORT Isolate { */ void SetIdle(bool is_idle); @@ -19,10 +19,10 @@ index 83b9d3d0d1f981edc444452b500df9fa5b89a056..6ebadc3b85b0f954305bc3a9187b996a bool InContext(); diff --git a/src/api.cc b/src/api.cc -index 9ddef27b9f7004fb50290f0dd91d2994d9771466..b4a0f5bb5e484ea80dbfc234e207b44413f2d22f 100644 +index 56be5e2e007c0ea84653a5487abef49cc206efc3..dd22b2a30b632fb9507eb2e2b95837dd9b8810db 100644 --- a/src/api.cc +++ b/src/api.cc -@@ -8072,6 +8072,13 @@ void Isolate::SetIdle(bool is_idle) { +@@ -7966,6 +7966,13 @@ void Isolate::SetIdle(bool is_idle) { isolate->SetIdle(is_idle); } diff --git a/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch index f67f3afd74..1ca409fc58 100644 --- a/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch +++ b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch @@ -6,10 +6,10 @@ Subject: build-torque-with-x64-toolchain-on-arm.patch torque binary has to be run during the build. diff --git a/BUILD.gn b/BUILD.gn -index b47a698a2f41f221290861c938c15a38e34d7b00..c564baea42f22d727990752be8b4ed086ef273f2 100644 +index 2f8a6c932efb66c5e273b9e9d2dc5887db8c6265..698b6c827f7f3cd7dc6871156daf8467bc7ff605 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -190,7 +190,8 @@ declare_args() { +@@ -184,7 +184,8 @@ declare_args() { v8_generator_toolchain = v8_snapshot_toolchain if (host_cpu == "x64" && @@ -19,7 +19,7 @@ index b47a698a2f41f221290861c938c15a38e34d7b00..c564baea42f22d727990752be8b4ed08 v8_generator_toolchain = "//build/toolchain/linux:clang_x64" } -@@ -3446,7 +3447,7 @@ if (v8_monolithic) { +@@ -3354,7 +3355,7 @@ if (v8_monolithic) { # Executables # @@ -28,7 +28,7 @@ index b47a698a2f41f221290861c938c15a38e34d7b00..c564baea42f22d727990752be8b4ed08 v8_executable("bytecode_builtins_list_generator") { visibility = [ ":*" ] # Only targets in this file can depend on this. -@@ -3492,7 +3493,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { +@@ -3404,7 +3405,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { } } diff --git a/patches/common/v8/build_gn.patch b/patches/common/v8/build_gn.patch index 2576c336e8..3b3a4e5582 100644 --- a/patches/common/v8/build_gn.patch +++ b/patches/common/v8/build_gn.patch @@ -5,10 +5,10 @@ Subject: build_gn.patch diff --git a/BUILD.gn b/BUILD.gn -index 3c039428271d6598fc4ad7137334176d80b92631..9fe1e8d67a25955fea69be89e0bcc27cf5d8529d 100644 +index bdbb29c66b2fa82e8a942421a8bdfce3d94d6e8f..fb3cfe848e97e0952829e39db5b56571e993d6a2 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -242,7 +242,7 @@ config("internal_config") { +@@ -236,7 +236,7 @@ config("internal_config") { configs = [ "//build/config/compiler:wexit_time_destructors" ] @@ -17,7 +17,7 @@ index 3c039428271d6598fc4ad7137334176d80b92631..9fe1e8d67a25955fea69be89e0bcc27c defines = [ "BUILDING_V8_SHARED" ] } } -@@ -3481,6 +3481,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { +@@ -3389,6 +3389,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/common/v8/dcheck.patch b/patches/common/v8/dcheck.patch index 2637ee54c5..9345b8e34f 100644 --- a/patches/common/v8/dcheck.patch +++ b/patches/common/v8/dcheck.patch @@ -5,10 +5,10 @@ Subject: dcheck.patch diff --git a/src/api.cc b/src/api.cc -index b4a0f5bb5e484ea80dbfc234e207b44413f2d22f..f36e504161fed27392ef66ffc0ec87898958bf2d 100644 +index b23105badb1ce643b0d3dcf6716776c53af4dfec..1df0e8a1dd8b7d490c215fb0a65b7a89aefdc231 100644 --- a/src/api.cc +++ b/src/api.cc -@@ -8637,7 +8637,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -8613,7 +8613,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { void Isolate::RunMicrotasks() { @@ -18,10 +18,10 @@ index b4a0f5bb5e484ea80dbfc234e207b44413f2d22f..f36e504161fed27392ef66ffc0ec8789 } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 98a3ec8cbcf63f1446569d6458d1f4f4bdda2ca0..316b0e123af68ea0c7a50730ba04470a42918974 100644 +index ed1bb91037677a25a8b22a7096a100f7f1cd4d1b..2ca299a96a66c000b4ff2061f283c31f906846b7 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -4723,9 +4723,9 @@ void Heap::TearDown() { +@@ -4710,9 +4710,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch b/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch index c5a9092270..bb5ba1c5d1 100644 --- a/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch +++ b/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch @@ -20,10 +20,10 @@ Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater diff --git a/src/flag-definitions.h b/src/flag-definitions.h -index add6d1f4114118b199425ff6b835a286ade5e1ce..38f25aef81c026cd80d663d75250ce16034e3eb3 100644 +index e0d486feb1da25db98faa4222f014d79d9bc37e2..26798147f40e35f3496ceebd225f2de0fd105296 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h -@@ -1270,7 +1270,7 @@ DEFINE_BOOL(log_function_events, false, +@@ -1276,7 +1276,7 @@ DEFINE_BOOL(log_function_events, false, DEFINE_BOOL(prof, false, "Log statistical profiling information (implies --log-code).") diff --git a/patches/common/v8/deps_cherry-pick_88f8fe1_from_upstream_v8.patch b/patches/common/v8/deps_cherry-pick_88f8fe1_from_upstream_v8.patch deleted file mode 100644 index 96fe6d157e..0000000000 --- a/patches/common/v8/deps_cherry-pick_88f8fe1_from_upstream_v8.patch +++ /dev/null @@ -1,258 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Yang Guo -Date: Tue, 20 Nov 2018 08:59:38 +0100 -Subject: deps: cherry-pick 88f8fe1 from upstream V8 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Original commit message: - - Fix collection iterator preview with deleted entries - - We used to assume that we know the remaining entries returned by the - iterator based on the current index. However, that is not accurate, - since entries skipped by the current index could be deleted. - - In the new approach, we allocate conservatively and shrink the result. - - R=neis@chromium.org - - Bug: v8:8433 - Change-Id: I38a3004dc3af292daabb454bb76f38d65ef437e8 - Reviewed-on: https://chromium-review.googlesource.com/c/1325966 - Commit-Queue: Yang Guo - Reviewed-by: Georg Neis - Cr-Commit-Position: refs/heads/master@{#57360} - -Refs: https://github.com/v8/v8/commit/88f8fe19a863c6392bd296faf86c06eff2a41bc1 - -PR-URL: https://github.com/nodejs/node/pull/24514 -Refs: https://github.com/nodejs/node/issues/24053 -Reviewed-By: Michaël Zasso -Reviewed-By: Anna Henningsen -Reviewed-By: Gus Caplan -Reviewed-By: Joyee Cheung - -diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc -index b49202d6127083e1d642f39ec149ce2261061ea7..dd56f7cd985db38820c94fd41b2f7f24a01e1811 100644 ---- a/test/cctest/test-api.cc -+++ b/test/cctest/test-api.cc -@@ -29364,3 +29364,217 @@ TEST(PreviewMapIteratorEntriesWithDeleted) { - } - } - } -+ -+TEST(PreviewSetIteratorEntriesWithDeleted) { -+ LocalContext env; -+ v8::HandleScope handle_scope(env->GetIsolate()); -+ v8::Local context = env.local(); -+ -+ { -+ // Create set, delete entry, create iterator, preview. -+ v8::Local iterator = -+ CompileRun("var set = new Set([1,2,3]); set.delete(1); set.keys()") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(2, entries->Length()); -+ CHECK_EQ(2, entries->Get(context, 0) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ CHECK_EQ(3, entries->Get(context, 1) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ { -+ // Create set, create iterator, delete entry, preview. -+ v8::Local iterator = -+ CompileRun("var set = new Set([1,2,3]); set.keys()") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("set.delete(1);"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(2, entries->Length()); -+ CHECK_EQ(2, entries->Get(context, 0) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ CHECK_EQ(3, entries->Get(context, 1) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ { -+ // Create set, create iterator, delete entry, iterate, preview. -+ v8::Local iterator = -+ CompileRun("var set = new Set([1,2,3]); var it = set.keys(); it") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("set.delete(1); it.next();"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(1, entries->Length()); -+ CHECK_EQ(3, entries->Get(context, 0) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ { -+ // Create set, create iterator, delete entry, iterate until empty, preview. -+ v8::Local iterator = -+ CompileRun("var set = new Set([1,2,3]); var it = set.keys(); it") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("set.delete(1); it.next(); it.next();"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(0, entries->Length()); -+ } -+ { -+ // Create set, create iterator, delete entry, iterate, trigger rehash, -+ // preview. -+ v8::Local iterator = -+ CompileRun("var set = new Set([1,2,3]); var it = set.keys(); it") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("set.delete(1); it.next();"); -+ CompileRun("for (var i = 4; i < 20; i++) set.add(i);"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(17, entries->Length()); -+ for (uint32_t i = 0; i < 17; i++) { -+ CHECK_EQ(i + 3, entries->Get(context, i) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ } -+} -+ -+TEST(PreviewMapIteratorEntriesWithDeleted) { -+ LocalContext env; -+ v8::HandleScope handle_scope(env->GetIsolate()); -+ v8::Local context = env.local(); -+ -+ { -+ // Create map, delete entry, create iterator, preview. -+ v8::Local iterator = CompileRun( -+ "var map = new Map();" -+ "var key = {}; map.set(key, 1);" -+ "map.set({}, 2); map.set({}, 3);" -+ "map.delete(key);" -+ "map.values()") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(2, entries->Length()); -+ CHECK_EQ(2, entries->Get(context, 0) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ CHECK_EQ(3, entries->Get(context, 1) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ { -+ // Create map, create iterator, delete entry, preview. -+ v8::Local iterator = CompileRun( -+ "var map = new Map();" -+ "var key = {}; map.set(key, 1);" -+ "map.set({}, 2); map.set({}, 3);" -+ "map.values()") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("map.delete(key);"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(2, entries->Length()); -+ CHECK_EQ(2, entries->Get(context, 0) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ CHECK_EQ(3, entries->Get(context, 1) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ { -+ // Create map, create iterator, delete entry, iterate, preview. -+ v8::Local iterator = CompileRun( -+ "var map = new Map();" -+ "var key = {}; map.set(key, 1);" -+ "map.set({}, 2); map.set({}, 3);" -+ "var it = map.values(); it") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("map.delete(key); it.next();"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(1, entries->Length()); -+ CHECK_EQ(3, entries->Get(context, 0) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ { -+ // Create map, create iterator, delete entry, iterate until empty, preview. -+ v8::Local iterator = CompileRun( -+ "var map = new Map();" -+ "var key = {}; map.set(key, 1);" -+ "map.set({}, 2); map.set({}, 3);" -+ "var it = map.values(); it") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("map.delete(key); it.next(); it.next();"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(0, entries->Length()); -+ } -+ { -+ // Create map, create iterator, delete entry, iterate, trigger rehash, -+ // preview. -+ v8::Local iterator = CompileRun( -+ "var map = new Map();" -+ "var key = {}; map.set(key, 1);" -+ "map.set({}, 2); map.set({}, 3);" -+ "var it = map.values(); it") -+ ->ToObject(context) -+ .ToLocalChecked(); -+ CompileRun("map.delete(key); it.next();"); -+ CompileRun("for (var i = 4; i < 20; i++) map.set({}, i);"); -+ bool is_key; -+ v8::Local entries = -+ iterator->PreviewEntries(&is_key).ToLocalChecked(); -+ CHECK(!is_key); -+ CHECK_EQ(17, entries->Length()); -+ for (uint32_t i = 0; i < 17; i++) { -+ CHECK_EQ(i + 3, entries->Get(context, i) -+ .ToLocalChecked() -+ ->Int32Value(context) -+ .FromJust()); -+ } -+ } -+} diff --git a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch index 6937a239af..483929de2d 100644 --- a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch +++ b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch @@ -22,10 +22,10 @@ Reviewed-By: Yang Guo Reviewed-By: Michaël Zasso diff --git a/include/v8.h b/include/v8.h -index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720a93d08b2 100644 +index f10a7950de2166804f779346bce580cfb2e7c3ec..44c2e648baa708d7f30105504795e4ba5402e3b3 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -998,6 +998,10 @@ class V8_EXPORT PrimitiveArray { +@@ -994,6 +994,10 @@ class V8_EXPORT PrimitiveArray { public: static Local New(Isolate* isolate, int length); int Length() const; @@ -36,7 +36,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 void Set(Isolate* isolate, int index, Local item); Local Get(Isolate* isolate, int index); }; -@@ -1705,6 +1709,8 @@ class V8_EXPORT StackTrace { +@@ -1697,6 +1701,8 @@ class V8_EXPORT StackTrace { /** * Returns a StackFrame at a particular index. */ @@ -45,7 +45,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 Local GetFrame(Isolate* isolate, uint32_t index) const; /** -@@ -2428,6 +2434,13 @@ class V8_EXPORT Value : public Data { +@@ -2405,6 +2411,13 @@ class V8_EXPORT Value : public Data { V8_DEPRECATE_SOON("Use maybe version", Local ToInt32(Isolate* isolate) const); @@ -59,7 +59,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 /** * Attempts to convert a string to an array index. * Returns an empty handle if the conversion fails. -@@ -2447,7 +2460,14 @@ class V8_EXPORT Value : public Data { +@@ -2424,7 +2437,14 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT Maybe Int32Value(Local context) const; @@ -74,7 +74,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 V8_WARN_UNUSED_RESULT Maybe Equals(Local context, Local that) const; bool StrictEquals(Local that) const; -@@ -2554,6 +2574,8 @@ class V8_EXPORT String : public Name { +@@ -2531,6 +2551,8 @@ class V8_EXPORT String : public Name { * Returns the number of bytes in the UTF-8 encoded * representation of this string. */ @@ -83,7 +83,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 int Utf8Length(Isolate* isolate) const; /** -@@ -2610,12 +2632,23 @@ class V8_EXPORT String : public Name { +@@ -2587,12 +2609,23 @@ class V8_EXPORT String : public Name { // 16-bit character codes. int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; @@ -107,7 +107,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 /** * A zero length string. -@@ -2807,6 +2840,9 @@ class V8_EXPORT String : public Name { +@@ -2784,6 +2817,9 @@ class V8_EXPORT String : public Name { */ static Local Concat(Isolate* isolate, Local left, Local right); @@ -117,7 +117,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 /** * Creates a new external string using the data defined in the given -@@ -2875,6 +2911,8 @@ class V8_EXPORT String : public Name { +@@ -2852,6 +2888,8 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Utf8Value { public: @@ -126,7 +126,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 Utf8Value(Isolate* isolate, Local obj); ~Utf8Value(); char* operator*() { return str_; } -@@ -2898,6 +2936,7 @@ class V8_EXPORT String : public Name { +@@ -2875,6 +2913,7 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Value { public: @@ -134,7 +134,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 Value(Isolate* isolate, Local obj); ~Value(); uint16_t* operator*() { return str_; } -@@ -5180,6 +5219,8 @@ class V8_EXPORT BooleanObject : public Object { +@@ -5265,6 +5304,8 @@ class V8_EXPORT BooleanObject : public Object { class V8_EXPORT StringObject : public Object { public: static Local New(Isolate* isolate, Local value); @@ -143,7 +143,7 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 Local ValueOf() const; -@@ -10045,6 +10086,30 @@ template Value* Value::Cast(T* value) { +@@ -10103,6 +10144,30 @@ template Value* Value::Cast(T* value) { } @@ -175,10 +175,10 @@ index 6ebadc3b85b0f954305bc3a9187b996aa248a347..955ea03cddf77ae5bbd91ea74b851720 #ifdef V8_ENABLE_CHECKS CheckCast(value); diff --git a/src/api.cc b/src/api.cc -index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7d892d0cc 100644 +index dd22b2a30b632fb9507eb2e2b95837dd9b8810db..b23105badb1ce643b0d3dcf6716776c53af4dfec 100644 --- a/src/api.cc +++ b/src/api.cc -@@ -2167,6 +2167,10 @@ int PrimitiveArray::Length() const { +@@ -2181,6 +2181,10 @@ int PrimitiveArray::Length() const { return array->length(); } @@ -189,7 +189,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 void PrimitiveArray::Set(Isolate* v8_isolate, int index, Local item) { i::Isolate* isolate = reinterpret_cast(v8_isolate); -@@ -2180,6 +2184,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index, +@@ -2194,6 +2198,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index, array->set(index, *i_item); } @@ -200,7 +200,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 Local PrimitiveArray::Get(Isolate* v8_isolate, int index) { i::Isolate* isolate = reinterpret_cast(v8_isolate); i::Handle array = Utils::OpenHandle(this); -@@ -2901,6 +2909,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) { +@@ -2899,6 +2907,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) { // --- S t a c k T r a c e --- @@ -211,7 +211,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 Local StackTrace::GetFrame(Isolate* v8_isolate, uint32_t index) const { i::Isolate* isolate = reinterpret_cast(v8_isolate); -@@ -3880,6 +3892,36 @@ void v8::RegExp::CheckCast(v8::Value* that) { +@@ -3858,6 +3870,36 @@ void v8::RegExp::CheckCast(v8::Value* that) { } @@ -248,7 +248,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 Maybe Value::BooleanValue(Local context) const { i::Isolate* isolate = reinterpret_cast(context->GetIsolate()); return Just(Utils::OpenHandle(this)->BooleanValue(isolate)); -@@ -3968,6 +4010,12 @@ MaybeLocal Value::ToArrayIndex(Local context) const { +@@ -3946,6 +3988,12 @@ MaybeLocal Value::ToArrayIndex(Local context) const { } @@ -261,7 +261,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 Maybe Value::Equals(Local context, Local that) const { i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate(); auto self = Utils::OpenHandle(this); -@@ -5302,6 +5350,10 @@ bool String::ContainsOnlyOneByte() const { +@@ -5269,6 +5317,10 @@ bool String::ContainsOnlyOneByte() const { return helper.Check(*str); } @@ -272,9 +272,9 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 int String::Utf8Length(Isolate* isolate) const { i::Handle str = Utils::OpenHandle(this); str = i::String::Flatten(reinterpret_cast(isolate), str); -@@ -5525,6 +5577,14 @@ static bool RecursivelySerializeToUtf8(i::String current, - return true; +@@ -5421,6 +5473,14 @@ static int WriteUtf8Impl(i::Vector string, char* write_start, } + } // anonymous namespace + +int String::WriteUtf8(char* buffer, int capacity, @@ -287,7 +287,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity, int* nchars_ref, int options) const { i::Handle str = Utils::OpenHandle(this); -@@ -5592,6 +5652,18 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string, +@@ -5461,6 +5521,18 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string, } @@ -306,7 +306,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start, int length, int options) const { return WriteHelper(reinterpret_cast(isolate), this, buffer, -@@ -6553,6 +6625,11 @@ MaybeLocal String::NewFromTwoByte(Isolate* isolate, +@@ -6430,6 +6502,11 @@ MaybeLocal String::NewFromTwoByte(Isolate* isolate, return result; } @@ -318,7 +318,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 Local v8::String::Concat(Isolate* v8_isolate, Local left, Local right) { i::Isolate* isolate = reinterpret_cast(v8_isolate); -@@ -6841,6 +6918,11 @@ bool v8::BooleanObject::ValueOf() const { +@@ -6713,6 +6790,11 @@ bool v8::BooleanObject::ValueOf() const { } @@ -330,8 +330,8 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 Local v8::StringObject::New(Isolate* v8_isolate, Local value) { i::Handle string = Utils::OpenHandle(*value); -@@ -9024,6 +9106,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) { - return isolate->IsRunningMicrotasks(); +@@ -8919,6 +9001,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) { + return isolate->default_microtask_queue()->IsRunningMicrotasks(); } +String::Utf8Value::Utf8Value(v8::Local obj) @@ -340,7 +340,7 @@ index f36e504161fed27392ef66ffc0ec87898958bf2d..0f2e56c05736d15bc637feb9fb53bdc7 String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local obj) : str_(nullptr), length_(0) { if (obj.IsEmpty()) return; -@@ -9043,6 +9128,9 @@ String::Utf8Value::~Utf8Value() { +@@ -8938,6 +9023,9 @@ String::Utf8Value::~Utf8Value() { i::DeleteArray(str_); } diff --git a/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch b/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch index 775e451569..2c57410da3 100644 --- a/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch +++ b/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch @@ -10,10 +10,10 @@ Electron does, so this patch makes sure that the build doesn't try to run the mksnapshot binary if it was built for arm or arm64. diff --git a/BUILD.gn b/BUILD.gn -index c564baea42f22d727990752be8b4ed086ef273f2..e3c8390c299e4c12e4ddba8402ccdb050e7bb6f1 100644 +index 698b6c827f7f3cd7dc6871156daf8467bc7ff605..022c55b3fe32bbde57e97f08ab2c374cc1ea047a 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -1349,9 +1349,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) { +@@ -1240,9 +1240,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) { ] public_deps = [ ":natives_blob", diff --git a/patches/common/v8/export_platform.patch b/patches/common/v8/export_platform.patch index d790551c88..7ea55c51c9 100644 --- a/patches/common/v8/export_platform.patch +++ b/patches/common/v8/export_platform.patch @@ -6,7 +6,7 @@ Subject: export_platform.patch v8::Platform::SystemClockTimeMillis must be exported so that node::NodePlatform can call it diff --git a/include/v8-platform.h b/include/v8-platform.h -index b9b0363a426de898c7db29a341f7179c45706f0a..48fba7921fd17eec79c569ab3c9173f084743218 100644 +index fc008979f69210d5e627ea735146f66c36703f43..4c097f2f06d766854c92fdbe487166e034d838b1 100644 --- a/include/v8-platform.h +++ b/include/v8-platform.h @@ -11,6 +11,7 @@ @@ -17,7 +17,7 @@ index b9b0363a426de898c7db29a341f7179c45706f0a..48fba7921fd17eec79c569ab3c9173f0 #include "v8config.h" // NOLINT(build/include) namespace v8 { -@@ -421,7 +422,7 @@ class Platform { +@@ -430,7 +431,7 @@ class Platform { * since epoch. Useful for implementing |CurrentClockTimeMillis| if * nothing special needed. */ diff --git a/patches/common/v8/expose_mksnapshot.patch b/patches/common/v8/expose_mksnapshot.patch index 724186b093..94470df2bd 100644 --- a/patches/common/v8/expose_mksnapshot.patch +++ b/patches/common/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to build mksnapshot on arm. diff --git a/BUILD.gn b/BUILD.gn -index 9fe1e8d67a25955fea69be89e0bcc27cf5d8529d..b47a698a2f41f221290861c938c15a38e34d7b00 100644 +index fb3cfe848e97e0952829e39db5b56571e993d6a2..2f8a6c932efb66c5e273b9e9d2dc5887db8c6265 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -3471,8 +3471,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -3379,8 +3379,6 @@ if (current_toolchain == v8_generator_toolchain) { if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/patches/common/v8/reland_don_t_use_v8_initializers_code_in_v8_base.patch b/patches/common/v8/reland_don_t_use_v8_initializers_code_in_v8_base.patch deleted file mode 100644 index 8e3a8dcd71..0000000000 --- a/patches/common/v8/reland_don_t_use_v8_initializers_code_in_v8_base.patch +++ /dev/null @@ -1,719 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Alexander Timokhin -Date: Thu, 13 Dec 2018 12:46:59 +0300 -Subject: Reland "Don't use |v8_initializers| code in |v8_base|" - -This is a reland of 2e36e9ea1ef3e332bc9b2d620c6d6ceb054f58a6 - -Was reverted because of v8_presubmit.py issue in -https://chromium-review.googlesource.com/c/v8/v8/+/1374292 - -Original change's description: -> Don't use |v8_initializers| code in |v8_base| -> -> Removing |CodeStubAssembler| from |v8_base| source list (see -> https://chromium-review.googlesource.com/c/v8/v8/+/1346329) leads to -> linkage problems with some build configurations because it was explicitly -> and implicitly included in |v8_base| code. -> -> This CL decouple this code and fixes problems. -> -> Bug: v8:7777 -> Change-Id: I58de5c62914bc77645ed6cc9114409890bc13189 -> Reviewed-on: https://chromium-review.googlesource.com/c/1372067 -> Reviewed-by: Jakob Kummerow -> Reviewed-by: Benedikt Meurer -> Reviewed-by: Jakob Gruber -> Commit-Queue: Jakob Gruber -> Cr-Commit-Position: refs/heads/master@{#58200} - -Bug: v8:7777 -Change-Id: Iaa00e73c7dbd8c413fbf15a17709aa12eda9a706 -Reviewed-on: https://chromium-review.googlesource.com/c/1375654 -Reviewed-by: Benedikt Meurer -Reviewed-by: Jakob Gruber -Commit-Queue: Jakob Gruber -Cr-Commit-Position: refs/heads/master@{#58209} - -diff --git a/BUILD.gn b/BUILD.gn -index e3c8390c299e4c12e4ddba8402ccdb050e7bb6f1..06c9a98f6888eff6c0794e0b83682e04abdbf1d7 100644 ---- a/BUILD.gn -+++ b/BUILD.gn -@@ -1722,6 +1722,7 @@ v8_source_set("v8_base") { - "src/builtins/builtins-number.cc", - "src/builtins/builtins-object.cc", - "src/builtins/builtins-promise.cc", -+ "src/builtins/builtins-promise.h", - "src/builtins/builtins-reflect.cc", - "src/builtins/builtins-regexp.cc", - "src/builtins/builtins-sharedarraybuffer.cc", -diff --git a/src/builtins/builtins-date.cc b/src/builtins/builtins-date.cc -index b2e054d6a2efe039c3eb622467adfdff72f582f1..8635eefd21cba5065f9c60e266575f983449dd0f 100644 ---- a/src/builtins/builtins-date.cc -+++ b/src/builtins/builtins-date.cc -@@ -5,7 +5,6 @@ - #include "src/builtins/builtins-utils-inl.h" - #include "src/builtins/builtins.h" - #include "src/code-factory.h" --#include "src/code-stub-assembler.h" - #include "src/conversions.h" - #include "src/counters.h" - #include "src/date.h" -diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc -index 5ab929a7a19edbf270f0dff518323003c3103baf..2b55abbc127c527ebd423e48fed23d51613a8302 100644 ---- a/src/builtins/builtins-object.cc -+++ b/src/builtins/builtins-object.cc -@@ -5,7 +5,6 @@ - #include "src/builtins/builtins-utils-inl.h" - #include "src/builtins/builtins.h" - #include "src/code-factory.h" --#include "src/code-stub-assembler.h" - #include "src/counters.h" - #include "src/keys.h" - #include "src/lookup.h" -diff --git a/src/builtins/builtins-promise-gen.cc b/src/builtins/builtins-promise-gen.cc -index 22f643e36df8addfcf65c98cc5004e514307f9d3..051b9d8bf82df0713df05c73e2c6677da74bd7ed 100644 ---- a/src/builtins/builtins-promise-gen.cc -+++ b/src/builtins/builtins-promise-gen.cc -@@ -6,6 +6,7 @@ - - #include "src/builtins/builtins-constructor-gen.h" - #include "src/builtins/builtins-iterator-gen.h" -+#include "src/builtins/builtins-promise.h" - #include "src/builtins/builtins-utils-gen.h" - #include "src/builtins/builtins.h" - #include "src/code-factory.h" -@@ -210,14 +211,17 @@ Node* PromiseBuiltinsAssembler::CreatePromiseAllResolveElementContext( - TNode values_array = AllocateJSArray( - PACKED_ELEMENTS, array_map, IntPtrConstant(0), SmiConstant(0)); - -- Node* const context = -- CreatePromiseContext(native_context, kPromiseAllResolveElementLength); -+ Node* const context = CreatePromiseContext( -+ native_context, PromiseBuiltins::kPromiseAllResolveElementLength); - StoreContextElementNoWriteBarrier( -- context, kPromiseAllResolveElementRemainingSlot, SmiConstant(1)); -+ context, PromiseBuiltins::kPromiseAllResolveElementRemainingSlot, -+ SmiConstant(1)); - StoreContextElementNoWriteBarrier( -- context, kPromiseAllResolveElementCapabilitySlot, promise_capability); -+ context, PromiseBuiltins::kPromiseAllResolveElementCapabilitySlot, -+ promise_capability); - StoreContextElementNoWriteBarrier( -- context, kPromiseAllResolveElementValuesArraySlot, values_array); -+ context, PromiseBuiltins::kPromiseAllResolveElementValuesArraySlot, -+ values_array); - - return context; - } -@@ -245,20 +249,22 @@ Node* PromiseBuiltinsAssembler::CreatePromiseAllResolveElementFunction( - - Node* PromiseBuiltinsAssembler::CreatePromiseResolvingFunctionsContext( - Node* promise, Node* debug_event, Node* native_context) { -- Node* const context = -- CreatePromiseContext(native_context, kPromiseContextLength); -- StoreContextElementNoWriteBarrier(context, kPromiseSlot, promise); -- StoreContextElementNoWriteBarrier(context, kAlreadyResolvedSlot, -- FalseConstant()); -- StoreContextElementNoWriteBarrier(context, kDebugEventSlot, debug_event); -+ Node* const context = CreatePromiseContext( -+ native_context, PromiseBuiltins::kPromiseContextLength); -+ StoreContextElementNoWriteBarrier(context, PromiseBuiltins::kPromiseSlot, -+ promise); -+ StoreContextElementNoWriteBarrier( -+ context, PromiseBuiltins::kAlreadyResolvedSlot, FalseConstant()); -+ StoreContextElementNoWriteBarrier(context, PromiseBuiltins::kDebugEventSlot, -+ debug_event); - return context; - } - - Node* PromiseBuiltinsAssembler::CreatePromiseGetCapabilitiesExecutorContext( - Node* promise_capability, Node* native_context) { -- int kContextLength = kCapabilitiesContextLength; -+ int kContextLength = PromiseBuiltins::kCapabilitiesContextLength; - Node* context = CreatePromiseContext(native_context, kContextLength); -- StoreContextElementNoWriteBarrier(context, kCapabilitySlot, -+ StoreContextElementNoWriteBarrier(context, PromiseBuiltins::kCapabilitySlot, - promise_capability); - return context; - } -@@ -750,22 +756,24 @@ TF_BUILTIN(PromiseCapabilityDefaultReject, PromiseBuiltinsAssembler) { - Node* const context = Parameter(Descriptor::kContext); - - // 2. Let promise be F.[[Promise]]. -- Node* const promise = LoadContextElement(context, kPromiseSlot); -+ Node* const promise = -+ LoadContextElement(context, PromiseBuiltins::kPromiseSlot); - - // 3. Let alreadyResolved be F.[[AlreadyResolved]]. - Label if_already_resolved(this, Label::kDeferred); - Node* const already_resolved = -- LoadContextElement(context, kAlreadyResolvedSlot); -+ LoadContextElement(context, PromiseBuiltins::kAlreadyResolvedSlot); - - // 4. If alreadyResolved.[[Value]] is true, return undefined. - GotoIf(IsTrue(already_resolved), &if_already_resolved); - - // 5. Set alreadyResolved.[[Value]] to true. -- StoreContextElementNoWriteBarrier(context, kAlreadyResolvedSlot, -- TrueConstant()); -+ StoreContextElementNoWriteBarrier( -+ context, PromiseBuiltins::kAlreadyResolvedSlot, TrueConstant()); - - // 6. Return RejectPromise(promise, reason). -- Node* const debug_event = LoadContextElement(context, kDebugEventSlot); -+ Node* const debug_event = -+ LoadContextElement(context, PromiseBuiltins::kDebugEventSlot); - Return(CallBuiltin(Builtins::kRejectPromise, context, promise, reason, - debug_event)); - -@@ -782,19 +790,20 @@ TF_BUILTIN(PromiseCapabilityDefaultResolve, PromiseBuiltinsAssembler) { - Node* const context = Parameter(Descriptor::kContext); - - // 2. Let promise be F.[[Promise]]. -- Node* const promise = LoadContextElement(context, kPromiseSlot); -+ Node* const promise = -+ LoadContextElement(context, PromiseBuiltins::kPromiseSlot); - - // 3. Let alreadyResolved be F.[[AlreadyResolved]]. - Label if_already_resolved(this, Label::kDeferred); - Node* const already_resolved = -- LoadContextElement(context, kAlreadyResolvedSlot); -+ LoadContextElement(context, PromiseBuiltins::kAlreadyResolvedSlot); - - // 4. If alreadyResolved.[[Value]] is true, return undefined. - GotoIf(IsTrue(already_resolved), &if_already_resolved); - - // 5. Set alreadyResolved.[[Value]] to true. -- StoreContextElementNoWriteBarrier(context, kAlreadyResolvedSlot, -- TrueConstant()); -+ StoreContextElementNoWriteBarrier( -+ context, PromiseBuiltins::kAlreadyResolvedSlot, TrueConstant()); - - // The rest of the logic (and the catch prediction) is - // encapsulated in the dedicated ResolvePromise builtin. -@@ -1396,7 +1405,8 @@ TF_BUILTIN(PromiseGetCapabilitiesExecutor, PromiseBuiltinsAssembler) { - Node* const reject = Parameter(Descriptor::kReject); - Node* const context = Parameter(Descriptor::kContext); - -- Node* const capability = LoadContextElement(context, kCapabilitySlot); -+ Node* const capability = -+ LoadContextElement(context, PromiseBuiltins::kCapabilitySlot); - - Label if_alreadyinvoked(this, Label::kDeferred); - GotoIfNot(IsUndefined( -@@ -1464,12 +1474,12 @@ TF_BUILTIN(PromiseReject, PromiseBuiltinsAssembler) { - - std::pair PromiseBuiltinsAssembler::CreatePromiseFinallyFunctions( - Node* on_finally, Node* constructor, Node* native_context) { -- Node* const promise_context = -- CreatePromiseContext(native_context, kPromiseFinallyContextLength); -- StoreContextElementNoWriteBarrier(promise_context, kOnFinallySlot, -- on_finally); -- StoreContextElementNoWriteBarrier(promise_context, kConstructorSlot, -- constructor); -+ Node* const promise_context = CreatePromiseContext( -+ native_context, PromiseBuiltins::kPromiseFinallyContextLength); -+ StoreContextElementNoWriteBarrier( -+ promise_context, PromiseBuiltins::kOnFinallySlot, on_finally); -+ StoreContextElementNoWriteBarrier( -+ promise_context, PromiseBuiltins::kConstructorSlot, constructor); - Node* const map = LoadContextElement( - native_context, Context::STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX); - Node* const then_finally_info = LoadContextElement( -@@ -1486,15 +1496,16 @@ std::pair PromiseBuiltinsAssembler::CreatePromiseFinallyFunctions( - TF_BUILTIN(PromiseValueThunkFinally, PromiseBuiltinsAssembler) { - Node* const context = Parameter(Descriptor::kContext); - -- Node* const value = LoadContextElement(context, kValueSlot); -+ Node* const value = LoadContextElement(context, PromiseBuiltins::kValueSlot); - Return(value); - } - - Node* PromiseBuiltinsAssembler::CreateValueThunkFunction(Node* value, - Node* native_context) { - Node* const value_thunk_context = CreatePromiseContext( -- native_context, kPromiseValueThunkOrReasonContextLength); -- StoreContextElementNoWriteBarrier(value_thunk_context, kValueSlot, value); -+ native_context, PromiseBuiltins::kPromiseValueThunkOrReasonContextLength); -+ StoreContextElementNoWriteBarrier(value_thunk_context, -+ PromiseBuiltins::kValueSlot, value); - Node* const map = LoadContextElement( - native_context, Context::STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX); - Node* const value_thunk_info = LoadContextElement( -@@ -1511,7 +1522,8 @@ TF_BUILTIN(PromiseThenFinally, PromiseBuiltinsAssembler) { - Node* const context = Parameter(Descriptor::kContext); - - // 1. Let onFinally be F.[[OnFinally]]. -- Node* const on_finally = LoadContextElement(context, kOnFinallySlot); -+ Node* const on_finally = -+ LoadContextElement(context, PromiseBuiltins::kOnFinallySlot); - - // 2. Assert: IsCallable(onFinally) is true. - CSA_ASSERT(this, IsCallable(on_finally)); -@@ -1522,7 +1534,8 @@ TF_BUILTIN(PromiseThenFinally, PromiseBuiltinsAssembler) { - context, on_finally, UndefinedConstant()); - - // 4. Let C be F.[[Constructor]]. -- Node* const constructor = LoadContextElement(context, kConstructorSlot); -+ Node* const constructor = -+ LoadContextElement(context, PromiseBuiltins::kConstructorSlot); - - // 5. Assert: IsConstructor(C) is true. - CSA_ASSERT(this, IsConstructor(constructor)); -@@ -1542,7 +1555,7 @@ TF_BUILTIN(PromiseThenFinally, PromiseBuiltinsAssembler) { - TF_BUILTIN(PromiseThrowerFinally, PromiseBuiltinsAssembler) { - Node* const context = Parameter(Descriptor::kContext); - -- Node* const reason = LoadContextElement(context, kValueSlot); -+ Node* const reason = LoadContextElement(context, PromiseBuiltins::kValueSlot); - CallRuntime(Runtime::kThrow, context, reason); - Unreachable(); - } -@@ -1550,8 +1563,9 @@ TF_BUILTIN(PromiseThrowerFinally, PromiseBuiltinsAssembler) { - Node* PromiseBuiltinsAssembler::CreateThrowerFunction(Node* reason, - Node* native_context) { - Node* const thrower_context = CreatePromiseContext( -- native_context, kPromiseValueThunkOrReasonContextLength); -- StoreContextElementNoWriteBarrier(thrower_context, kValueSlot, reason); -+ native_context, PromiseBuiltins::kPromiseValueThunkOrReasonContextLength); -+ StoreContextElementNoWriteBarrier(thrower_context, -+ PromiseBuiltins::kValueSlot, reason); - Node* const map = LoadContextElement( - native_context, Context::STRICT_FUNCTION_WITHOUT_PROTOTYPE_MAP_INDEX); - Node* const thrower_info = LoadContextElement( -@@ -1568,7 +1582,8 @@ TF_BUILTIN(PromiseCatchFinally, PromiseBuiltinsAssembler) { - Node* const context = Parameter(Descriptor::kContext); - - // 1. Let onFinally be F.[[OnFinally]]. -- Node* const on_finally = LoadContextElement(context, kOnFinallySlot); -+ Node* const on_finally = -+ LoadContextElement(context, PromiseBuiltins::kOnFinallySlot); - - // 2. Assert: IsCallable(onFinally) is true. - CSA_ASSERT(this, IsCallable(on_finally)); -@@ -1579,7 +1594,8 @@ TF_BUILTIN(PromiseCatchFinally, PromiseBuiltinsAssembler) { - context, on_finally, UndefinedConstant()); - - // 4. Let C be F.[[Constructor]]. -- Node* const constructor = LoadContextElement(context, kConstructorSlot); -+ Node* const constructor = -+ LoadContextElement(context, PromiseBuiltins::kConstructorSlot); - - // 5. Assert: IsConstructor(C) is true. - CSA_ASSERT(this, IsConstructor(constructor)); -@@ -1908,9 +1924,11 @@ Node* PromiseBuiltinsAssembler::PerformPromiseAll( - // Set remainingElementsCount.[[Value]] to - // remainingElementsCount.[[Value]] + 1. - TNode const remaining_elements_count = CAST(LoadContextElement( -- resolve_element_context, kPromiseAllResolveElementRemainingSlot)); -+ resolve_element_context, -+ PromiseBuiltins::kPromiseAllResolveElementRemainingSlot)); - StoreContextElementNoWriteBarrier( -- resolve_element_context, kPromiseAllResolveElementRemainingSlot, -+ resolve_element_context, -+ PromiseBuiltins::kPromiseAllResolveElementRemainingSlot, - SmiAdd(remaining_elements_count, SmiConstant(1))); - - // Let resolveElement be CreateBuiltinFunction(steps, -@@ -2027,11 +2045,13 @@ Node* PromiseBuiltinsAssembler::PerformPromiseAll( - // Set remainingElementsCount.[[Value]] to - // remainingElementsCount.[[Value]] - 1. - TNode remaining_elements_count = CAST(LoadContextElement( -- resolve_element_context, kPromiseAllResolveElementRemainingSlot)); -+ resolve_element_context, -+ PromiseBuiltins::kPromiseAllResolveElementRemainingSlot)); - remaining_elements_count = SmiSub(remaining_elements_count, SmiConstant(1)); -- StoreContextElementNoWriteBarrier(resolve_element_context, -- kPromiseAllResolveElementRemainingSlot, -- remaining_elements_count); -+ StoreContextElementNoWriteBarrier( -+ resolve_element_context, -+ PromiseBuiltins::kPromiseAllResolveElementRemainingSlot, -+ remaining_elements_count); - GotoIf(SmiEqual(remaining_elements_count, SmiConstant(0)), - &resolve_promise); - -@@ -2040,7 +2060,8 @@ Node* PromiseBuiltinsAssembler::PerformPromiseAll( - // fancy Thenable that calls the resolve callback immediately, so we need - // to handle that correctly here. - Node* const values_array = LoadContextElement( -- resolve_element_context, kPromiseAllResolveElementValuesArraySlot); -+ resolve_element_context, -+ PromiseBuiltins::kPromiseAllResolveElementValuesArraySlot); - Node* const old_elements = LoadElements(values_array); - TNode const old_capacity = LoadFixedArrayBaseLength(old_elements); - TNode const new_capacity = var_index.value(); -@@ -2063,7 +2084,8 @@ Node* PromiseBuiltinsAssembler::PerformPromiseAll( - Node* const resolve = - LoadObjectField(capability, PromiseCapability::kResolveOffset); - Node* const values_array = LoadContextElement( -- resolve_element_context, kPromiseAllResolveElementValuesArraySlot); -+ resolve_element_context, -+ PromiseBuiltins::kPromiseAllResolveElementValuesArraySlot); - Node* const resolve_call = CallJS( - CodeFactory::Call(isolate(), ConvertReceiverMode::kNullOrUndefined), - native_context, resolve, UndefinedConstant(), values_array); -@@ -2146,9 +2168,10 @@ TF_BUILTIN(PromiseAllResolveElementClosure, PromiseBuiltinsAssembler) { - // first time, in which case we make it point to the native context here - // to mark this resolve element closure as done. - GotoIf(IsNativeContext(context), &already_called); -- CSA_ASSERT(this, -- SmiEqual(LoadObjectField(context, Context::kLengthOffset), -- SmiConstant(kPromiseAllResolveElementLength))); -+ CSA_ASSERT( -+ this, -+ SmiEqual(LoadObjectField(context, Context::kLengthOffset), -+ SmiConstant(PromiseBuiltins::kPromiseAllResolveElementLength))); - TNode native_context = LoadNativeContext(context); - StoreObjectField(function, JSFunction::kContextOffset, native_context); - -@@ -2161,8 +2184,8 @@ TF_BUILTIN(PromiseAllResolveElementClosure, PromiseBuiltinsAssembler) { - TNode index = IntPtrSub(identity_hash, IntPtrConstant(1)); - - // Check if we need to grow the [[ValuesArray]] to store {value} at {index}. -- TNode values_array = CAST( -- LoadContextElement(context, kPromiseAllResolveElementValuesArraySlot)); -+ TNode values_array = CAST(LoadContextElement( -+ context, PromiseBuiltins::kPromiseAllResolveElementValuesArraySlot)); - TNode elements = CAST(LoadElements(values_array)); - TNode values_length = - LoadAndUntagObjectField(values_array, JSArray::kLengthOffset); -@@ -2221,17 +2244,18 @@ TF_BUILTIN(PromiseAllResolveElementClosure, PromiseBuiltinsAssembler) { - } - - BIND(&done); -- TNode remaining_elements_count = -- CAST(LoadContextElement(context, kPromiseAllResolveElementRemainingSlot)); -+ TNode remaining_elements_count = CAST(LoadContextElement( -+ context, PromiseBuiltins::kPromiseAllResolveElementRemainingSlot)); - remaining_elements_count = SmiSub(remaining_elements_count, SmiConstant(1)); -- StoreContextElement(context, kPromiseAllResolveElementRemainingSlot, -+ StoreContextElement(context, -+ PromiseBuiltins::kPromiseAllResolveElementRemainingSlot, - remaining_elements_count); - GotoIf(SmiEqual(remaining_elements_count, SmiConstant(0)), &resolve_promise); - Return(UndefinedConstant()); - - BIND(&resolve_promise); -- TNode capability = CAST( -- LoadContextElement(context, kPromiseAllResolveElementCapabilitySlot)); -+ TNode capability = CAST(LoadContextElement( -+ context, PromiseBuiltins::kPromiseAllResolveElementCapabilitySlot)); - TNode resolve = - LoadObjectField(capability, PromiseCapability::kResolveOffset); - CallJS(CodeFactory::Call(isolate(), ConvertReceiverMode::kNullOrUndefined), -diff --git a/src/builtins/builtins-promise-gen.h b/src/builtins/builtins-promise-gen.h -index 435f1adc87b2393c0c7a4142bb946f50940d256e..8edc2331a51ad08f19b9e470a5e76a4d78cd69f5 100644 ---- a/src/builtins/builtins-promise-gen.h -+++ b/src/builtins/builtins-promise-gen.h -@@ -6,7 +6,6 @@ - #define V8_BUILTINS_BUILTINS_PROMISE_GEN_H_ - - #include "src/code-stub-assembler.h" --#include "src/contexts.h" - #include "src/objects/promise.h" - #include "torque-generated/builtins-base-from-dsl-gen.h" - #include "torque-generated/builtins-iterator-from-dsl-gen.h" -@@ -18,59 +17,6 @@ typedef compiler::CodeAssemblerState CodeAssemblerState; - - class PromiseBuiltinsAssembler : public CodeStubAssembler { - public: -- enum PromiseResolvingFunctionContextSlot { -- // The promise which resolve/reject callbacks fulfill. -- kPromiseSlot = Context::MIN_CONTEXT_SLOTS, -- -- // Whether the callback was already invoked. -- kAlreadyResolvedSlot, -- -- // Whether to trigger a debug event or not. Used in catch -- // prediction. -- kDebugEventSlot, -- kPromiseContextLength, -- }; -- -- // TODO(bmeurer): Move this to a proper context map in contexts.h? -- // Similar to the AwaitContext that we introduced for await closures. -- enum PromiseAllResolveElementContextSlots { -- // Remaining elements count -- kPromiseAllResolveElementRemainingSlot = Context::MIN_CONTEXT_SLOTS, -- -- // Promise capability from Promise.all -- kPromiseAllResolveElementCapabilitySlot, -- -- // Values array from Promise.all -- kPromiseAllResolveElementValuesArraySlot, -- -- kPromiseAllResolveElementLength -- }; -- -- enum FunctionContextSlot { -- kCapabilitySlot = Context::MIN_CONTEXT_SLOTS, -- -- kCapabilitiesContextLength, -- }; -- -- // This is used by the Promise.prototype.finally builtin to store -- // onFinally callback and the Promise constructor. -- // TODO(gsathya): For native promises we can create a variant of -- // this without extra space for the constructor to save memory. -- enum PromiseFinallyContextSlot { -- kOnFinallySlot = Context::MIN_CONTEXT_SLOTS, -- kConstructorSlot, -- -- kPromiseFinallyContextLength, -- }; -- -- // This is used by the ThenFinally and CatchFinally builtins to -- // store the value to return or reason to throw. -- enum PromiseValueThunkOrReasonContextSlot { -- kValueSlot = Context::MIN_CONTEXT_SLOTS, -- -- kPromiseValueThunkOrReasonContextLength, -- }; -- - explicit PromiseBuiltinsAssembler(compiler::CodeAssemblerState* state) - : CodeStubAssembler(state) {} - // These allocate and initialize a promise with pending state and -diff --git a/src/builtins/builtins-promise.cc b/src/builtins/builtins-promise.cc -index 88d54b26d0295e25ffb57f154dcfeb353e46d04f..0f18d8fb459b9d256648870706118a751012b01a 100644 ---- a/src/builtins/builtins-promise.cc -+++ b/src/builtins/builtins-promise.cc -@@ -2,6 +2,8 @@ - // Use of this source code is governed by a BSD-style license that can be - // found in the LICENSE file. - -+#include "src/builtins/builtins-promise.h" -+ - #include "src/builtins/builtins-utils-inl.h" - #include "src/builtins/builtins.h" - #include "src/counters.h" -diff --git a/src/builtins/builtins-promise.h b/src/builtins/builtins-promise.h -new file mode 100644 -index 0000000000000000000000000000000000000000..66545feafed2099992a0fa57aada74298e634994 ---- /dev/null -+++ b/src/builtins/builtins-promise.h -@@ -0,0 +1,75 @@ -+// Copyright 2018 the V8 project authors. All rights reserved. -+// Use of this source code is governed by a BSD-style license that can be -+// found in the LICENSE file. -+ -+#ifndef V8_BUILTINS_BUILTINS_PROMISE_H_ -+#define V8_BUILTINS_BUILTINS_PROMISE_H_ -+ -+#include "src/contexts.h" -+ -+namespace v8 { -+namespace internal { -+ -+class PromiseBuiltins { -+ public: -+ enum PromiseResolvingFunctionContextSlot { -+ // The promise which resolve/reject callbacks fulfill. -+ kPromiseSlot = Context::MIN_CONTEXT_SLOTS, -+ -+ // Whether the callback was already invoked. -+ kAlreadyResolvedSlot, -+ -+ // Whether to trigger a debug event or not. Used in catch -+ // prediction. -+ kDebugEventSlot, -+ kPromiseContextLength, -+ }; -+ -+ // TODO(bmeurer): Move this to a proper context map in contexts.h? -+ // Similar to the AwaitContext that we introduced for await closures. -+ enum PromiseAllResolveElementContextSlots { -+ // Remaining elements count -+ kPromiseAllResolveElementRemainingSlot = Context::MIN_CONTEXT_SLOTS, -+ -+ // Promise capability from Promise.all -+ kPromiseAllResolveElementCapabilitySlot, -+ -+ // Values array from Promise.all -+ kPromiseAllResolveElementValuesArraySlot, -+ -+ kPromiseAllResolveElementLength -+ }; -+ -+ enum FunctionContextSlot { -+ kCapabilitySlot = Context::MIN_CONTEXT_SLOTS, -+ -+ kCapabilitiesContextLength, -+ }; -+ -+ // This is used by the Promise.prototype.finally builtin to store -+ // onFinally callback and the Promise constructor. -+ // TODO(gsathya): For native promises we can create a variant of -+ // this without extra space for the constructor to save memory. -+ enum PromiseFinallyContextSlot { -+ kOnFinallySlot = Context::MIN_CONTEXT_SLOTS, -+ kConstructorSlot, -+ -+ kPromiseFinallyContextLength, -+ }; -+ -+ // This is used by the ThenFinally and CatchFinally builtins to -+ // store the value to return or reason to throw. -+ enum PromiseValueThunkOrReasonContextSlot { -+ kValueSlot = Context::MIN_CONTEXT_SLOTS, -+ -+ kPromiseValueThunkOrReasonContextLength, -+ }; -+ -+ private: -+ DISALLOW_IMPLICIT_CONSTRUCTORS(PromiseBuiltins); -+}; -+ -+} // namespace internal -+} // namespace v8 -+ -+#endif // V8_BUILTINS_BUILTINS_PROMISE_H_ -diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc -index 131b50b53e67d9cdb47e20ed570875cda84c0ba7..d5985d2cdc5a50a2f38012cef5291f6b6dde0154 100644 ---- a/src/compiler/js-call-reducer.cc -+++ b/src/compiler/js-call-reducer.cc -@@ -5,7 +5,7 @@ - #include "src/compiler/js-call-reducer.h" - - #include "src/api-inl.h" --#include "src/builtins/builtins-promise-gen.h" -+#include "src/builtins/builtins-promise.h" - #include "src/builtins/builtins-utils.h" - #include "src/code-factory.h" - #include "src/code-stubs.h" -@@ -5607,21 +5607,20 @@ Reduction JSCallReducer::ReducePromiseConstructor(Node* node) { - Node* promise_context = effect = graph()->NewNode( - javascript()->CreateFunctionContext( - handle(native_context().object()->scope_info(), isolate()), -- PromiseBuiltinsAssembler::kPromiseContextLength - -- Context::MIN_CONTEXT_SLOTS, -+ PromiseBuiltins::kPromiseContextLength - Context::MIN_CONTEXT_SLOTS, - FUNCTION_SCOPE), - context, effect, control); -- effect = -- graph()->NewNode(simplified()->StoreField(AccessBuilder::ForContextSlot( -- PromiseBuiltinsAssembler::kPromiseSlot)), -- promise_context, promise, effect, control); - effect = graph()->NewNode( -- simplified()->StoreField(AccessBuilder::ForContextSlot( -- PromiseBuiltinsAssembler::kAlreadyResolvedSlot)), -+ simplified()->StoreField( -+ AccessBuilder::ForContextSlot(PromiseBuiltins::kPromiseSlot)), -+ promise_context, promise, effect, control); -+ effect = graph()->NewNode( -+ simplified()->StoreField( -+ AccessBuilder::ForContextSlot(PromiseBuiltins::kAlreadyResolvedSlot)), - promise_context, jsgraph()->FalseConstant(), effect, control); - effect = graph()->NewNode( -- simplified()->StoreField(AccessBuilder::ForContextSlot( -- PromiseBuiltinsAssembler::kDebugEventSlot)), -+ simplified()->StoreField( -+ AccessBuilder::ForContextSlot(PromiseBuiltins::kDebugEventSlot)), - promise_context, jsgraph()->TrueConstant(), effect, control); - - // Allocate the closure for the resolve case. -@@ -5927,18 +5926,18 @@ Reduction JSCallReducer::ReducePromisePrototypeFinally(Node* node) { - context = etrue = graph()->NewNode( - javascript()->CreateFunctionContext( - handle(native_context().object()->scope_info(), isolate()), -- PromiseBuiltinsAssembler::kPromiseFinallyContextLength - -+ PromiseBuiltins::kPromiseFinallyContextLength - - Context::MIN_CONTEXT_SLOTS, - FUNCTION_SCOPE), - context, etrue, if_true); -- etrue = -- graph()->NewNode(simplified()->StoreField(AccessBuilder::ForContextSlot( -- PromiseBuiltinsAssembler::kOnFinallySlot)), -- context, on_finally, etrue, if_true); -- etrue = -- graph()->NewNode(simplified()->StoreField(AccessBuilder::ForContextSlot( -- PromiseBuiltinsAssembler::kConstructorSlot)), -- context, constructor, etrue, if_true); -+ etrue = graph()->NewNode( -+ simplified()->StoreField( -+ AccessBuilder::ForContextSlot(PromiseBuiltins::kOnFinallySlot)), -+ context, on_finally, etrue, if_true); -+ etrue = graph()->NewNode( -+ simplified()->StoreField( -+ AccessBuilder::ForContextSlot(PromiseBuiltins::kConstructorSlot)), -+ context, constructor, etrue, if_true); - - // Allocate the closure for the reject case. - SharedFunctionInfoRef catch_finally = -diff --git a/src/isolate.cc b/src/isolate.cc -index a3e93d0da3dd8054a04ea15edc2c7511972f7136..44dc67d22452e4153d44edc81f26c13eb96d2920 100644 ---- a/src/isolate.cc -+++ b/src/isolate.cc -@@ -22,7 +22,7 @@ - #include "src/base/sys-info.h" - #include "src/base/utils/random-number-generator.h" - #include "src/bootstrapper.h" --#include "src/builtins/builtins-promise-gen.h" -+#include "src/builtins/builtins-promise.h" - #include "src/builtins/constants-table-builder.h" - #include "src/cancelable-task.h" - #include "src/code-stubs.h" -@@ -774,7 +774,7 @@ void CaptureAsyncStackTrace(Isolate* isolate, Handle promise, - // find the promise capability that's being resolved when all - // the concurrent promises resolve. - int const index = -- PromiseBuiltinsAssembler::kPromiseAllResolveElementCapabilitySlot; -+ PromiseBuiltins::kPromiseAllResolveElementCapabilitySlot; - Handle capability( - PromiseCapability::cast(context->get(index)), isolate); - if (!capability->promise()->IsJSPromise()) return; -diff --git a/test/cctest/test-code-stub-assembler.cc b/test/cctest/test-code-stub-assembler.cc -index 6db2eed1458bd0f07ae6774401e53a3f2d23b7ce..ab90d1a357fd141441cf1a89323a5dc7f332a882 100644 ---- a/test/cctest/test-code-stub-assembler.cc -+++ b/test/cctest/test-code-stub-assembler.cc -@@ -7,6 +7,7 @@ - #include "src/api-inl.h" - #include "src/base/utils/random-number-generator.h" - #include "src/builtins/builtins-promise-gen.h" -+#include "src/builtins/builtins-promise.h" - #include "src/builtins/builtins-string-gen.h" - #include "src/char-predicates.h" - #include "src/code-factory.h" -@@ -2360,9 +2361,9 @@ TEST(CreatePromiseResolvingFunctionsContext) { - CHECK_EQ(isolate->native_context()->scope_info(), context_js->scope_info()); - CHECK_EQ(ReadOnlyRoots(isolate).the_hole_value(), context_js->extension()); - CHECK_EQ(*isolate->native_context(), context_js->native_context()); -- CHECK(context_js->get(PromiseBuiltinsAssembler::kPromiseSlot)->IsJSPromise()); -+ CHECK(context_js->get(PromiseBuiltins::kPromiseSlot)->IsJSPromise()); - CHECK_EQ(ReadOnlyRoots(isolate).false_value(), -- context_js->get(PromiseBuiltinsAssembler::kDebugEventSlot)); -+ context_js->get(PromiseBuiltins::kDebugEventSlot)); - } - - TEST(CreatePromiseResolvingFunctions) { -@@ -2520,13 +2521,12 @@ TEST(CreatePromiseGetCapabilitiesExecutorContext) { - ft.Call(isolate->factory()->undefined_value()).ToHandleChecked(); - CHECK(result_obj->IsContext()); - Handle context_js = Handle::cast(result_obj); -- CHECK_EQ(PromiseBuiltinsAssembler::kCapabilitiesContextLength, -- context_js->length()); -+ CHECK_EQ(PromiseBuiltins::kCapabilitiesContextLength, context_js->length()); - CHECK_EQ(isolate->native_context()->scope_info(), context_js->scope_info()); - CHECK_EQ(ReadOnlyRoots(isolate).the_hole_value(), context_js->extension()); - CHECK_EQ(*isolate->native_context(), context_js->native_context()); -- CHECK(context_js->get(PromiseBuiltinsAssembler::kCapabilitySlot) -- ->IsPromiseCapability()); -+ CHECK( -+ context_js->get(PromiseBuiltins::kCapabilitySlot)->IsPromiseCapability()); - } - - TEST(NewPromiseCapability) { -@@ -2573,10 +2573,8 @@ TEST(NewPromiseCapability) { - CHECK_EQ(isolate->native_context()->scope_info(), context->scope_info()); - CHECK_EQ(ReadOnlyRoots(isolate).the_hole_value(), context->extension()); - CHECK_EQ(*isolate->native_context(), context->native_context()); -- CHECK_EQ(PromiseBuiltinsAssembler::kPromiseContextLength, -- context->length()); -- CHECK_EQ(context->get(PromiseBuiltinsAssembler::kPromiseSlot), -- result->promise()); -+ CHECK_EQ(PromiseBuiltins::kPromiseContextLength, context->length()); -+ CHECK_EQ(context->get(PromiseBuiltins::kPromiseSlot), result->promise()); - } - } - From fbefab422777b809802a95d3ed7da3dcc838b5da Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 16 Jan 2019 23:40:26 +0530 Subject: [PATCH 04/52] chore: update patches/common/ffmpeg --- patches/common/ffmpeg/build_gn.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/common/ffmpeg/build_gn.patch b/patches/common/ffmpeg/build_gn.patch index 7dc45cb970..2c38bfa538 100644 --- a/patches/common/ffmpeg/build_gn.patch +++ b/patches/common/ffmpeg/build_gn.patch @@ -8,10 +8,10 @@ when "is_component_build" is true, but we want to set even if it's false, because we are making a dylib which will be distributed inside a bundle. diff --git a/BUILD.gn b/BUILD.gn -index 494d33fc041c05acc6698e1bfe26cc3f8820bb6b..947deba96107c931582007ce89917f8896923a6f 100755 +index fd79bc4eaba90ab5e8c6df9942dbfaeeebabbc73..1e1859d5aa1567da8a768c870d8a477b052f50ec 100755 --- a/BUILD.gn +++ b/BUILD.gn -@@ -390,6 +390,10 @@ if (is_component_ffmpeg) { +@@ -397,6 +397,10 @@ if (is_component_ffmpeg) { # So we can append below and assume they're defined. ldflags = [] From f09cb56f1906893f7bc365ee06f01b9712ddcb14 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 17 Jan 2019 23:56:21 +0530 Subject: [PATCH 05/52] Refactors TtsPlatform and most platform implementations to content. https://chromium-review.googlesource.com/c/chromium/src/+/1352055 --- chromium_src/BUILD.gn | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/chromium_src/BUILD.gn b/chromium_src/BUILD.gn index 208fea0420..cf86fe1974 100644 --- a/chromium_src/BUILD.gn +++ b/chromium_src/BUILD.gn @@ -112,30 +112,21 @@ static_library("chrome") { "//chrome/browser/ui/views/color_chooser_win.cc", ] } + + if (is_linux) { + sources += [ "//chrome/browser/media/webrtc/window_icon_util_x11.cc" ] + } } if (enable_tts) { sources += [ "//chrome/browser/speech/tts_controller_delegate_impl.cc", "//chrome/browser/speech/tts_controller_delegate_impl.h", - "//chrome/browser/speech/tts_mac.mm", "//chrome/browser/speech/tts_message_filter.cc", "//chrome/browser/speech/tts_message_filter.h", - "//chrome/browser/speech/tts_platform.h ", - "//chrome/browser/speech/tts_platform_impl.cc", - "//chrome/browser/speech/tts_platform_impl.h", - "//chrome/browser/speech/tts_win.cc", "//chrome/renderer/tts_dispatcher.cc", "//chrome/renderer/tts_dispatcher.h", ] - - if (is_linux) { - sources += [ - "//chrome/browser/media/webrtc/window_icon_util_x11.cc", - "//chrome/browser/speech/tts_linux.cc", - ] - deps += [ "//third_party/speech-dispatcher" ] - } } if (enable_widevine) { From 92cfc4a62d68bd00232259509e127554a4482c48 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 21 Jan 2019 21:57:11 +0530 Subject: [PATCH 06/52] fix: update deprecated v8 api usage --- .../browser/net/url_request_async_asar_job.cc | 2 +- atom/browser/net/url_request_buffer_job.cc | 2 +- atom/browser/net/url_request_string_job.cc | 2 +- .../native_mate_converters/net_converter.cc | 8 +- .../v8_value_converter.cc | 127 ++++++++++-------- .../v8_value_converter.h | 31 +++-- atom/common/promise_util.cc | 5 +- native_mate/native_mate/converter.cc | 14 +- native_mate/native_mate/converter.h | 3 +- native_mate/native_mate/promise.cc | 17 ++- 10 files changed, 117 insertions(+), 94 deletions(-) diff --git a/atom/browser/net/url_request_async_asar_job.cc b/atom/browser/net/url_request_async_asar_job.cc index 1f3bebe8b7..1b94776f49 100644 --- a/atom/browser/net/url_request_async_asar_job.cc +++ b/atom/browser/net/url_request_async_asar_job.cc @@ -29,7 +29,7 @@ void BeforeStartInUI(base::WeakPtr job, if (args->GetNext(&value)) { V8ValueConverter converter; v8::Local context = args->isolate()->GetCurrentContext(); - request_options.reset(converter.FromV8Value(value, context)); + request_options = converter.FromV8Value(value, context); } if (request_options) { diff --git a/atom/browser/net/url_request_buffer_job.cc b/atom/browser/net/url_request_buffer_job.cc index 852e8d80bb..caea8eb7fd 100644 --- a/atom/browser/net/url_request_buffer_job.cc +++ b/atom/browser/net/url_request_buffer_job.cc @@ -40,7 +40,7 @@ void BeforeStartInUI(base::WeakPtr job, if (args->GetNext(&value)) { V8ValueConverter converter; v8::Local context = args->isolate()->GetCurrentContext(); - request_options.reset(converter.FromV8Value(value, context)); + request_options = converter.FromV8Value(value, context); } if (request_options) { diff --git a/atom/browser/net/url_request_string_job.cc b/atom/browser/net/url_request_string_job.cc index 3ab4f5a2c4..872fbaf36f 100644 --- a/atom/browser/net/url_request_string_job.cc +++ b/atom/browser/net/url_request_string_job.cc @@ -29,7 +29,7 @@ void BeforeStartInUI(base::WeakPtr job, if (args->GetNext(&value)) { V8ValueConverter converter; v8::Local context = args->isolate()->GetCurrentContext(); - request_options.reset(converter.FromV8Value(value, context)); + request_options = converter.FromV8Value(value, context); } if (request_options) { diff --git a/atom/common/native_mate_converters/net_converter.cc b/atom/common/native_mate_converters/net_converter.cc index 88061136c1..ebe68ad4a5 100644 --- a/atom/common/native_mate_converters/net_converter.cc +++ b/atom/common/native_mate_converters/net_converter.cc @@ -198,16 +198,16 @@ bool Converter::FromV8( auto context = isolate->GetCurrentContext(); auto headers = v8::Local::Cast(val); - auto keys = headers->GetOwnPropertyNames(); + auto keys = headers->GetOwnPropertyNames(context).ToLocalChecked(); for (uint32_t i = 0; i < keys->Length(); i++) { - v8::Local keyVal; - if (!keys->Get(i)->ToString(context).ToLocal(&keyVal)) { + v8::Local keyVal; + if (!keys->Get(context, i).ToLocal(&keyVal)) { return false; } std::string key; mate::ConvertFromV8(isolate, keyVal, &key); - auto localVal = headers->Get(keyVal); + auto localVal = headers->Get(context, keyVal).ToLocalChecked(); if (localVal->IsArray()) { auto values = v8::Local::Cast(localVal); for (uint32_t j = 0; j < values->Length(); j++) { diff --git a/atom/common/native_mate_converters/v8_value_converter.cc b/atom/common/native_mate_converters/v8_value_converter.cc index 73bfe5a96a..083deacf4c 100644 --- a/atom/common/native_mate_converters/v8_value_converter.cc +++ b/atom/common/native_mate_converters/v8_value_converter.cc @@ -146,7 +146,7 @@ v8::Local V8ValueConverter::ToV8Value( return handle_scope.Escape(ToV8ValueImpl(context->GetIsolate(), value)); } -base::Value* V8ValueConverter::FromV8Value( +std::unique_ptr V8ValueConverter::FromV8Value( v8::Local val, v8::Local context) const { v8::Context::Scope context_scope(context); @@ -180,7 +180,8 @@ v8::Local V8ValueConverter::ToV8ValueImpl( case base::Value::Type::STRING: { std::string val = value->GetString(); return v8::String::NewFromUtf8(isolate, val.c_str(), - v8::String::kNormalString, val.length()); + v8::NewStringType::kNormal, val.length()) + .ToLocalChecked(); } case base::Value::Type::LIST: @@ -288,38 +289,38 @@ v8::Local V8ValueConverter::ToArrayBuffer( return v8::Uint8Array::New(array_buffer, 0, length); } -base::Value* V8ValueConverter::FromV8ValueImpl(FromV8ValueState* state, - v8::Local val, - v8::Isolate* isolate) const { +std::unique_ptr V8ValueConverter::FromV8ValueImpl( + FromV8ValueState* state, + v8::Local val, + v8::Isolate* isolate) const { FromV8ValueState::Level state_level(state); if (state->HasReachedMaxRecursionDepth()) return nullptr; if (val->IsExternal()) - return std::make_unique().release(); + return std::make_unique(); if (val->IsNull()) - return std::make_unique().release(); + return std::make_unique(); auto context = isolate->GetCurrentContext(); if (val->IsBoolean()) - return new base::Value(val->ToBoolean(context).ToLocalChecked()->Value()); + return std::make_unique(val->ToBoolean(isolate)->Value()); if (val->IsInt32()) - return new base::Value(val->ToInt32(context).ToLocalChecked()->Value()); + return std::make_unique(val.As()->Value()); if (val->IsNumber()) { - double val_as_double = val->ToNumber(context).ToLocalChecked()->Value(); + double val_as_double = val.As()->Value(); if (!std::isfinite(val_as_double)) return nullptr; - return new base::Value(val_as_double); + return std::make_unique(val_as_double); } if (val->IsString()) { - v8::String::Utf8Value utf8(isolate, - val->ToString(context).ToLocalChecked()); - return new base::Value(std::string(*utf8, utf8.length())); + v8::String::Utf8Value utf8(isolate, val); + return std::make_unique(std::string(*utf8, utf8.length())); } if (val->IsUndefined()) @@ -329,15 +330,16 @@ base::Value* V8ValueConverter::FromV8ValueImpl(FromV8ValueState* state, if (val->IsDate()) { v8::Date* date = v8::Date::Cast(*val); v8::Local toISOString = - date->Get(v8::String::NewFromUtf8(isolate, "toISOString")); + date->Get(v8::String::NewFromUtf8(isolate, "toISOString", + v8::NewStringType::kNormal) + .ToLocalChecked()); if (toISOString->IsFunction()) { v8::Local result = toISOString.As() ->Call(context, val, 0, nullptr) .ToLocalChecked(); if (!result.IsEmpty()) { - v8::String::Utf8Value utf8(isolate, - result->ToString(context).ToLocalChecked()); - return new base::Value(std::string(*utf8, utf8.length())); + v8::String::Utf8Value utf8(isolate, result); + return std::make_unique(std::string(*utf8, utf8.length())); } } } @@ -345,10 +347,8 @@ base::Value* V8ValueConverter::FromV8ValueImpl(FromV8ValueState* state, if (val->IsRegExp()) { if (!reg_exp_allowed_) // JSON.stringify converts to an object. - return FromV8Object(val->ToObject(context).ToLocalChecked(), state, - isolate); - return new base::Value(*v8::String::Utf8Value( - isolate, val->ToString(context).ToLocalChecked())); + return FromV8Object(val.As(), state, isolate); + return std::make_unique(*v8::String::Utf8Value(isolate, val)); } // v8::Value doesn't have a ToArray() method for some reason. @@ -359,8 +359,7 @@ base::Value* V8ValueConverter::FromV8ValueImpl(FromV8ValueState* state, if (!function_allowed_) // JSON.stringify refuses to convert function(){}. return nullptr; - return FromV8Object(val->ToObject(context).ToLocalChecked(), state, - isolate); + return FromV8Object(val.As(), state, isolate); } if (node::Buffer::HasInstance(val)) { @@ -368,20 +367,20 @@ base::Value* V8ValueConverter::FromV8ValueImpl(FromV8ValueState* state, } if (val->IsObject()) { - return FromV8Object(val->ToObject(context).ToLocalChecked(), state, - isolate); + return FromV8Object(val.As(), state, isolate); } LOG(ERROR) << "Unexpected v8 value type encountered."; return nullptr; } -base::Value* V8ValueConverter::FromV8Array(v8::Local val, - FromV8ValueState* state, - v8::Isolate* isolate) const { +std::unique_ptr V8ValueConverter::FromV8Array( + v8::Local val, + FromV8ValueState* state, + v8::Isolate* isolate) const { ScopedUniquenessGuard uniqueness_guard(state, val); if (!uniqueness_guard.is_valid()) - return std::make_unique().release(); + return std::make_unique(); std::unique_ptr scope; // If val was created in a different context than our current one, change to @@ -390,45 +389,54 @@ base::Value* V8ValueConverter::FromV8Array(v8::Local val, val->CreationContext() != isolate->GetCurrentContext()) scope.reset(new v8::Context::Scope(val->CreationContext())); - auto* result = new base::ListValue(); + std::unique_ptr result(new base::ListValue()); // Only fields with integer keys are carried over to the ListValue. for (uint32_t i = 0; i < val->Length(); ++i) { v8::TryCatch try_catch(isolate); - v8::Local child_v8 = val->Get(i); - if (try_catch.HasCaught()) { + v8::Local child_v8; + v8::MaybeLocal maybe_child = + val->Get(isolate->GetCurrentContext(), i); + if (try_catch.HasCaught() || !maybe_child.ToLocal(&child_v8)) { LOG(ERROR) << "Getter for index " << i << " threw an exception."; child_v8 = v8::Null(isolate); } - if (!val->HasRealIndexedProperty(i)) + if (!val->HasRealIndexedProperty(isolate->GetCurrentContext(), i) + .FromMaybe(false)) { + result->Append(std::make_unique()); continue; + } - base::Value* child = FromV8ValueImpl(state, child_v8, isolate); + std::unique_ptr child = + FromV8ValueImpl(state, child_v8, isolate); if (child) - result->Append(std::unique_ptr(child)); + result->Append(std::move(child)); else // JSON.stringify puts null in places where values don't serialize, for // example undefined and functions. Emulate that behavior. result->Append(std::make_unique()); } - return result; + return std::move(result); } -base::Value* V8ValueConverter::FromNodeBuffer(v8::Local value, - FromV8ValueState* state, - v8::Isolate* isolate) const { - return new base::Value(std::vector( +std::unique_ptr V8ValueConverter::FromNodeBuffer( + v8::Local value, + FromV8ValueState* state, + v8::Isolate* isolate) const { + std::vector buffer( node::Buffer::Data(value), - node::Buffer::Data(value) + node::Buffer::Length(value))); + node::Buffer::Data(value) + node::Buffer::Length(value)); + return std::make_unique(std::move(buffer)); } -base::Value* V8ValueConverter::FromV8Object(v8::Local val, - FromV8ValueState* state, - v8::Isolate* isolate) const { +std::unique_ptr V8ValueConverter::FromV8Object( + v8::Local val, + FromV8ValueState* state, + v8::Isolate* isolate) const { ScopedUniquenessGuard uniqueness_guard(state, val); if (!uniqueness_guard.is_valid()) - return std::make_unique().release(); + return std::make_unique(); std::unique_ptr scope; // If val was created in a different context than our current one, change to @@ -438,10 +446,15 @@ base::Value* V8ValueConverter::FromV8Object(v8::Local val, scope.reset(new v8::Context::Scope(val->CreationContext())); auto result = std::make_unique(); - v8::Local property_names(val->GetOwnPropertyNames()); + v8::Local property_names; + if (!val->GetOwnPropertyNames(isolate->GetCurrentContext()) + .ToLocal(&property_names)) { + return std::move(result); + } for (uint32_t i = 0; i < property_names->Length(); ++i) { - v8::Local key(property_names->Get(i)); + v8::Local key = + property_names->Get(isolate->GetCurrentContext(), i).ToLocalChecked(); // Extend this test to cover more types as necessary and if sensible. if (!key->IsString() && !key->IsNumber()) { @@ -451,21 +464,21 @@ base::Value* V8ValueConverter::FromV8Object(v8::Local val, continue; } - v8::String::Utf8Value name_utf8( - isolate, key->ToString(isolate->GetCurrentContext()).ToLocalChecked()); + v8::String::Utf8Value name_utf8(isolate, key); v8::TryCatch try_catch(isolate); - v8::Local child_v8 = val->Get(key); - - if (try_catch.HasCaught()) { + v8::Local child_v8; + v8::MaybeLocal maybe_child = + val->Get(isolate->GetCurrentContext(), key); + if (try_catch.HasCaught() || !maybe_child.ToLocal(&child_v8)) { LOG(ERROR) << "Getter for property " << *name_utf8 << " threw an exception."; child_v8 = v8::Null(isolate); } - std::unique_ptr child( - FromV8ValueImpl(state, child_v8, isolate)); - if (!child.get()) + std::unique_ptr child = + FromV8ValueImpl(state, child_v8, isolate); + if (!child) // JSON.stringify skips properties whose values don't serialize, for // example undefined and functions. Emulate that behavior. continue; @@ -497,7 +510,7 @@ base::Value* V8ValueConverter::FromV8Object(v8::Local val, std::move(child)); } - return result.release(); + return std::move(result); } } // namespace atom diff --git a/atom/common/native_mate_converters/v8_value_converter.h b/atom/common/native_mate_converters/v8_value_converter.h index 353f5d1359..ea0909c983 100644 --- a/atom/common/native_mate_converters/v8_value_converter.h +++ b/atom/common/native_mate_converters/v8_value_converter.h @@ -5,6 +5,8 @@ #ifndef ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_ #define ATOM_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_ +#include + #include "base/compiler_specific.h" #include "base/macros.h" #include "v8/include/v8.h" @@ -26,8 +28,9 @@ class V8ValueConverter { void SetStripNullFromObjects(bool val); v8::Local ToV8Value(const base::Value* value, v8::Local context) const; - base::Value* FromV8Value(v8::Local value, - v8::Local context) const; + std::unique_ptr FromV8Value( + v8::Local value, + v8::Local context) const; private: class FromV8ValueState; @@ -43,18 +46,18 @@ class V8ValueConverter { v8::Local ToArrayBuffer(v8::Isolate* isolate, const base::Value* value) const; - base::Value* FromV8ValueImpl(FromV8ValueState* state, - v8::Local value, - v8::Isolate* isolate) const; - base::Value* FromV8Array(v8::Local array, - FromV8ValueState* state, - v8::Isolate* isolate) const; - base::Value* FromNodeBuffer(v8::Local value, - FromV8ValueState* state, - v8::Isolate* isolate) const; - base::Value* FromV8Object(v8::Local object, - FromV8ValueState* state, - v8::Isolate* isolate) const; + std::unique_ptr FromV8ValueImpl(FromV8ValueState* state, + v8::Local value, + v8::Isolate* isolate) const; + std::unique_ptr FromV8Array(v8::Local array, + FromV8ValueState* state, + v8::Isolate* isolate) const; + std::unique_ptr FromNodeBuffer(v8::Local value, + FromV8ValueState* state, + v8::Isolate* isolate) const; + std::unique_ptr FromV8Object(v8::Local object, + FromV8ValueState* state, + v8::Isolate* isolate) const; // If true, we will convert RegExp JavaScript objects to string. bool reg_exp_allowed_ = false; diff --git a/atom/common/promise_util.cc b/atom/common/promise_util.cc index 27eec4fe4f..bf4f9ecca8 100644 --- a/atom/common/promise_util.cc +++ b/atom/common/promise_util.cc @@ -30,7 +30,10 @@ v8::Maybe Promise::RejectWithErrorMessage(const std::string& string) { v8::Local::New(isolate(), GetContext())); v8::Local error_message = - v8::String::NewFromUtf8(isolate(), string.c_str()); + v8::String::NewFromUtf8(isolate(), string.c_str(), + v8::NewStringType::kNormal, + static_cast(string.size())) + .ToLocalChecked(); v8::Local error = v8::Exception::Error(error_message); return Reject(error); } diff --git a/native_mate/native_mate/converter.cc b/native_mate/native_mate/converter.cc index c8260be162..b146395b8f 100644 --- a/native_mate/native_mate/converter.cc +++ b/native_mate/native_mate/converter.cc @@ -140,13 +140,16 @@ bool Converter::FromV8(Isolate* isolate, } Local Converter::ToV8(Isolate* isolate, const char* val) { - return v8::String::NewFromUtf8(isolate, val); + return v8::String::NewFromUtf8(isolate, val, v8::NewStringType::kNormal) + .ToLocalChecked(); } Local Converter::ToV8(Isolate* isolate, const base::StringPiece& val) { - return v8::String::NewFromUtf8(isolate, val.data(), v8::String::kNormalString, - static_cast(val.length())); + return v8::String::NewFromUtf8(isolate, val.data(), + v8::NewStringType::kNormal, + static_cast(val.length())) + .ToLocalChecked(); } Local Converter::ToV8(Isolate* isolate, @@ -255,8 +258,9 @@ bool Converter>::FromV8(Isolate* isolate, v8::Local StringToSymbol(v8::Isolate* isolate, const base::StringPiece& val) { return v8::String::NewFromUtf8(isolate, val.data(), - v8::String::kInternalizedString, - static_cast(val.length())); + v8::NewStringType::kInternalized, + static_cast(val.length())) + .ToLocalChecked(); } } // namespace mate diff --git a/native_mate/native_mate/converter.h b/native_mate/native_mate/converter.h index dfe97edaf2..0e167eca9d 100644 --- a/native_mate/native_mate/converter.h +++ b/native_mate/native_mate/converter.h @@ -277,7 +277,8 @@ struct Converter> { v8::Local context = isolate->GetCurrentContext(); v8::Local dict = val->ToObject(context).ToLocalChecked(); - v8::Local keys = dict->GetOwnPropertyNames(); + v8::Local keys = + dict->GetOwnPropertyNames(context).ToLocalChecked(); for (uint32_t i = 0; i < keys->Length(); ++i) { v8::Local key = keys->Get(i); T value; diff --git a/native_mate/native_mate/promise.cc b/native_mate/native_mate/promise.cc index 81b79441e7..e89b54ce38 100644 --- a/native_mate/native_mate/promise.cc +++ b/native_mate/native_mate/promise.cc @@ -6,17 +6,13 @@ namespace mate { -Promise::Promise() - : isolate_(NULL) { -} +Promise::Promise() : isolate_(NULL) {} -Promise::Promise(v8::Isolate* isolate) - : isolate_(isolate) { +Promise::Promise(v8::Isolate* isolate) : isolate_(isolate) { resolver_ = v8::Promise::Resolver::New(isolate); } -Promise::~Promise() { -} +Promise::~Promise() {} Promise Promise::Create(v8::Isolate* isolate) { return Promise(isolate); @@ -28,7 +24,10 @@ Promise Promise::Create() { void Promise::RejectWithErrorMessage(const std::string& string) { v8::Local error_message = - v8::String::NewFromUtf8(isolate(), string.c_str()); + v8::String::NewFromUtf8(isolate(), string.c_str(), + v8::NewStringType::kNormal, + static_cast(string.size())) + .ToLocalChecked(); v8::Local error = v8::Exception::Error(error_message); resolver_->Reject(mate::ConvertToV8(isolate(), error)); } @@ -38,7 +37,7 @@ v8::Local Promise::GetHandle() const { } v8::Local Converter::ToV8(v8::Isolate* isolate, - Promise val) { + Promise val) { return val.GetHandle(); } From a864167d46281cb0bcd250c16c32c5e0adb7c386 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 21 Jan 2019 21:58:04 +0530 Subject: [PATCH 07/52] Move MediaStream Mojo and public interfaces to Blink. https://chromium-review.googlesource.com/c/chromium/src/+/1389998 --- atom/browser/api/atom_api_web_contents.cc | 2 +- atom/browser/api/atom_api_web_contents.h | 2 +- .../media/media_capture_devices_dispatcher.cc | 53 +++++------ .../media/media_capture_devices_dispatcher.h | 27 +++--- .../media/media_stream_devices_controller.cc | 87 ++++++++++--------- .../media/media_stream_devices_controller.h | 3 +- .../browser/web_contents_permission_helper.cc | 14 +-- atom/browser/web_contents_permission_helper.h | 5 +- 8 files changed, 100 insertions(+), 93 deletions(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 90e775f7ea..42166c0616 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -712,7 +712,7 @@ void WebContents::FindReply(content::WebContents* web_contents, bool WebContents::CheckMediaAccessPermission( content::RenderFrameHost* render_frame_host, const GURL& security_origin, - content::MediaStreamType type) { + blink::MediaStreamType type) { auto* web_contents = content::WebContents::FromRenderFrameHost(render_frame_host); auto* permission_helper = diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 7efc946396..9c540cbdd9 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -387,7 +387,7 @@ class WebContents : public mate::TrackableObject, bool final_update) override; bool CheckMediaAccessPermission(content::RenderFrameHost* render_frame_host, const GURL& security_origin, - content::MediaStreamType type) override; + blink::MediaStreamType type) override; void RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, diff --git a/atom/browser/media/media_capture_devices_dispatcher.cc b/atom/browser/media/media_capture_devices_dispatcher.cc index 4bcc29b2f1..95dc3a6757 100644 --- a/atom/browser/media/media_capture_devices_dispatcher.cc +++ b/atom/browser/media/media_capture_devices_dispatcher.cc @@ -7,18 +7,16 @@ #include "base/logging.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/media_capture_devices.h" -#include "content/public/common/media_stream_request.h" - -namespace atom { using content::BrowserThread; -using content::MediaStreamDevices; + +namespace atom { namespace { // Finds a device in |devices| that has |device_id|, or NULL if not found. -const content::MediaStreamDevice* FindDeviceWithId( - const content::MediaStreamDevices& devices, +const blink::MediaStreamDevice* FindDeviceWithId( + const blink::MediaStreamDevices& devices, const std::string& device_id) { auto iter = devices.begin(); for (; iter != devices.end(); ++iter) { @@ -29,11 +27,6 @@ const content::MediaStreamDevice* FindDeviceWithId( return nullptr; } -const MediaStreamDevices& EmptyDevices() { - static MediaStreamDevices* devices = new MediaStreamDevices; - return *devices; -} - } // namespace MediaCaptureDevicesDispatcher* MediaCaptureDevicesDispatcher::GetInstance() { @@ -49,75 +42,75 @@ MediaCaptureDevicesDispatcher::MediaCaptureDevicesDispatcher() MediaCaptureDevicesDispatcher::~MediaCaptureDevicesDispatcher() {} -const MediaStreamDevices& +const blink::MediaStreamDevices& MediaCaptureDevicesDispatcher::GetAudioCaptureDevices() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (is_device_enumeration_disabled_) - return EmptyDevices(); + return test_audio_devices_; return content::MediaCaptureDevices::GetInstance()->GetAudioCaptureDevices(); } -const MediaStreamDevices& +const blink::MediaStreamDevices& MediaCaptureDevicesDispatcher::GetVideoCaptureDevices() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); if (is_device_enumeration_disabled_) - return EmptyDevices(); + return test_video_devices_; return content::MediaCaptureDevices::GetInstance()->GetVideoCaptureDevices(); } void MediaCaptureDevicesDispatcher::GetDefaultDevices( bool audio, bool video, - content::MediaStreamDevices* devices) { + blink::MediaStreamDevices* devices) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(audio || video); if (audio) { - const content::MediaStreamDevice* device = GetFirstAvailableAudioDevice(); + const blink::MediaStreamDevice* device = GetFirstAvailableAudioDevice(); if (device) devices->push_back(*device); } if (video) { - const content::MediaStreamDevice* device = GetFirstAvailableVideoDevice(); + const blink::MediaStreamDevice* device = GetFirstAvailableVideoDevice(); if (device) devices->push_back(*device); } } -const content::MediaStreamDevice* +const blink::MediaStreamDevice* MediaCaptureDevicesDispatcher::GetRequestedAudioDevice( const std::string& requested_audio_device_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); - const content::MediaStreamDevice* const device = + const blink::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); + const blink::MediaStreamDevice* const device = FindDeviceWithId(audio_devices, requested_audio_device_id); return device; } -const content::MediaStreamDevice* +const blink::MediaStreamDevice* MediaCaptureDevicesDispatcher::GetFirstAvailableAudioDevice() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); + const blink::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); if (audio_devices.empty()) return nullptr; return &(*audio_devices.begin()); } -const content::MediaStreamDevice* +const blink::MediaStreamDevice* MediaCaptureDevicesDispatcher::GetRequestedVideoDevice( const std::string& requested_video_device_id) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); - const content::MediaStreamDevice* const device = + const blink::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); + const blink::MediaStreamDevice* const device = FindDeviceWithId(video_devices, requested_video_device_id); return device; } -const content::MediaStreamDevice* +const blink::MediaStreamDevice* MediaCaptureDevicesDispatcher::GetFirstAvailableVideoDevice() { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); + const blink::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); if (video_devices.empty()) return nullptr; return &(*video_devices.begin()); @@ -136,7 +129,7 @@ void MediaCaptureDevicesDispatcher::OnMediaRequestStateChanged( int render_view_id, int page_request_id, const GURL& security_origin, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, content::MediaRequestState state) {} void MediaCaptureDevicesDispatcher::OnCreatingAudioStream(int render_process_id, @@ -146,7 +139,7 @@ void MediaCaptureDevicesDispatcher::OnSetCapturingLinkSecured( int render_process_id, int render_frame_id, int page_request_id, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, bool is_secure) {} } // namespace atom diff --git a/atom/browser/media/media_capture_devices_dispatcher.h b/atom/browser/media/media_capture_devices_dispatcher.h index 3c27a403de..581032031d 100644 --- a/atom/browser/media/media_capture_devices_dispatcher.h +++ b/atom/browser/media/media_capture_devices_dispatcher.h @@ -9,7 +9,8 @@ #include "base/memory/singleton.h" #include "content/public/browser/media_observer.h" -#include "content/public/common/media_stream_request.h" +#include "content/public/browser/media_stream_request.h" +#include "third_party/blink/public/common/mediastream/media_stream_request.h" namespace atom { @@ -20,8 +21,8 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { static MediaCaptureDevicesDispatcher* GetInstance(); // Methods for observers. Called on UI thread. - const content::MediaStreamDevices& GetAudioCaptureDevices(); - const content::MediaStreamDevices& GetVideoCaptureDevices(); + const blink::MediaStreamDevices& GetAudioCaptureDevices(); + const blink::MediaStreamDevices& GetVideoCaptureDevices(); // Helper to get the default devices which can be used by the media request. // Uses the first available devices if the default devices are not available. @@ -30,19 +31,19 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { // Called on the UI thread. void GetDefaultDevices(bool audio, bool video, - content::MediaStreamDevices* devices); + blink::MediaStreamDevices* devices); // Helpers for picking particular requested devices, identified by raw id. // If the device requested is not available it will return NULL. - const content::MediaStreamDevice* GetRequestedAudioDevice( + const blink::MediaStreamDevice* GetRequestedAudioDevice( const std::string& requested_audio_device_id); - const content::MediaStreamDevice* GetRequestedVideoDevice( + const blink::MediaStreamDevice* GetRequestedVideoDevice( const std::string& requested_video_device_id); // Returns the first available audio or video device, or NULL if no devices // are available. - const content::MediaStreamDevice* GetFirstAvailableAudioDevice(); - const content::MediaStreamDevice* GetFirstAvailableVideoDevice(); + const blink::MediaStreamDevice* GetFirstAvailableAudioDevice(); + const blink::MediaStreamDevice* GetFirstAvailableVideoDevice(); // Unittests that do not require actual device enumeration should call this // API on the singleton. It is safe to call this multiple times on the @@ -56,14 +57,14 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { int render_view_id, int page_request_id, const GURL& security_origin, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, content::MediaRequestState state) override; void OnCreatingAudioStream(int render_process_id, int render_view_id) override; void OnSetCapturingLinkSecured(int render_process_id, int render_frame_id, int page_request_id, - content::MediaStreamType stream_type, + blink::MediaStreamType stream_type, bool is_secure) override; private: @@ -72,6 +73,12 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { MediaCaptureDevicesDispatcher(); ~MediaCaptureDevicesDispatcher() override; + // Only for testing, a list of cached audio capture devices. + blink::MediaStreamDevices test_audio_devices_; + + // Only for testing, a list of cached video capture devices. + blink::MediaStreamDevices test_video_devices_; + // Flag used by unittests to disable device enumeration. bool is_device_enumeration_disabled_; diff --git a/atom/browser/media/media_stream_devices_controller.cc b/atom/browser/media/media_stream_devices_controller.cc index 3ed306c64e..eb6623cf1b 100644 --- a/atom/browser/media/media_stream_devices_controller.cc +++ b/atom/browser/media/media_stream_devices_controller.cc @@ -9,16 +9,16 @@ #include "atom/browser/media/media_capture_devices_dispatcher.h" #include "content/public/browser/desktop_media_id.h" -#include "content/public/common/media_stream_request.h" +#include "content/public/browser/media_stream_request.h" namespace atom { namespace { bool HasAnyAvailableDevice() { - const content::MediaStreamDevices& audio_devices = + const blink::MediaStreamDevices& audio_devices = MediaCaptureDevicesDispatcher::GetInstance()->GetAudioCaptureDevices(); - const content::MediaStreamDevices& video_devices = + const blink::MediaStreamDevices& video_devices = MediaCaptureDevicesDispatcher::GetInstance()->GetVideoCaptureDevices(); return !audio_devices.empty() || !video_devices.empty(); @@ -34,33 +34,33 @@ MediaStreamDevicesController::MediaStreamDevicesController( // For MEDIA_OPEN_DEVICE requests (Pepper) we always request both webcam // and microphone to avoid popping two infobars. microphone_requested_( - request.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE || - request.request_type == content::MEDIA_OPEN_DEVICE_PEPPER_ONLY), + request.audio_type == blink::MEDIA_DEVICE_AUDIO_CAPTURE || + request.request_type == blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY), webcam_requested_( - request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE || - request.request_type == content::MEDIA_OPEN_DEVICE_PEPPER_ONLY) {} + request.video_type == blink::MEDIA_DEVICE_VIDEO_CAPTURE || + request.request_type == blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY) {} MediaStreamDevicesController::~MediaStreamDevicesController() { if (!callback_.is_null()) { - std::move(callback_).Run(content::MediaStreamDevices(), - content::MEDIA_DEVICE_INVALID_STATE, + std::move(callback_).Run(blink::MediaStreamDevices(), + blink::MEDIA_DEVICE_FAILED_DUE_TO_SHUTDOWN, std::unique_ptr()); } } bool MediaStreamDevicesController::TakeAction() { // Do special handling of desktop screen cast. - if (request_.audio_type == content::MEDIA_GUM_TAB_AUDIO_CAPTURE || - request_.video_type == content::MEDIA_GUM_TAB_VIDEO_CAPTURE || - request_.audio_type == content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE || - request_.video_type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) { + if (request_.audio_type == blink::MEDIA_GUM_TAB_AUDIO_CAPTURE || + request_.video_type == blink::MEDIA_GUM_TAB_VIDEO_CAPTURE || + request_.audio_type == blink::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE || + request_.video_type == blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) { HandleUserMediaRequest(); return true; } // Deny the request if there is no device attached to the OS. if (!HasAnyAvailableDevice()) { - Deny(content::MEDIA_DEVICE_NO_HARDWARE); + Deny(blink::MEDIA_DEVICE_NO_HARDWARE); return true; } @@ -70,14 +70,14 @@ bool MediaStreamDevicesController::TakeAction() { void MediaStreamDevicesController::Accept() { // Get the default devices for the request. - content::MediaStreamDevices devices; + blink::MediaStreamDevices devices; if (microphone_requested_ || webcam_requested_) { switch (request_.request_type) { - case content::MEDIA_OPEN_DEVICE_PEPPER_ONLY: { - const content::MediaStreamDevice* device = nullptr; + case blink::MEDIA_OPEN_DEVICE_PEPPER_ONLY: { + const blink::MediaStreamDevice* device = nullptr; // For open device request pick the desired device or fall back to the // first available of the given type. - if (request_.audio_type == content::MEDIA_DEVICE_AUDIO_CAPTURE) { + if (request_.audio_type == blink::MEDIA_DEVICE_AUDIO_CAPTURE) { device = MediaCaptureDevicesDispatcher::GetInstance() ->GetRequestedAudioDevice(request_.requested_audio_device_id); @@ -86,7 +86,7 @@ void MediaStreamDevicesController::Accept() { device = MediaCaptureDevicesDispatcher::GetInstance() ->GetFirstAvailableAudioDevice(); } - } else if (request_.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE) { + } else if (request_.video_type == blink::MEDIA_DEVICE_VIDEO_CAPTURE) { // Pepper API opens only one device at a time. device = MediaCaptureDevicesDispatcher::GetInstance() @@ -101,13 +101,13 @@ void MediaStreamDevicesController::Accept() { devices.push_back(*device); break; } - case content::MEDIA_GENERATE_STREAM: { + case blink::MEDIA_GENERATE_STREAM: { bool needs_audio_device = microphone_requested_; bool needs_video_device = webcam_requested_; // Get the exact audio or video device if an id is specified. if (!request_.requested_audio_device_id.empty()) { - const content::MediaStreamDevice* audio_device = + const blink::MediaStreamDevice* audio_device = MediaCaptureDevicesDispatcher::GetInstance() ->GetRequestedAudioDevice(request_.requested_audio_device_id); if (audio_device) { @@ -116,7 +116,7 @@ void MediaStreamDevicesController::Accept() { } } if (!request_.requested_video_device_id.empty()) { - const content::MediaStreamDevice* video_device = + const blink::MediaStreamDevice* video_device = MediaCaptureDevicesDispatcher::GetInstance() ->GetRequestedVideoDevice(request_.requested_video_device_id); if (video_device) { @@ -133,40 +133,45 @@ void MediaStreamDevicesController::Accept() { } break; } - case content::MEDIA_DEVICE_ACCESS: + case blink::MEDIA_DEVICE_ACCESS: { // Get the default devices for the request. MediaCaptureDevicesDispatcher::GetInstance()->GetDefaultDevices( microphone_requested_, webcam_requested_, &devices); break; + } + case blink::MEDIA_DEVICE_UPDATE: { + NOTREACHED(); + break; + } } } - std::move(callback_).Run(devices, content::MEDIA_DEVICE_OK, + std::move(callback_).Run(devices, blink::MEDIA_DEVICE_OK, std::unique_ptr()); } void MediaStreamDevicesController::Deny( - content::MediaStreamRequestResult result) { - std::move(callback_).Run(content::MediaStreamDevices(), result, + blink::MediaStreamRequestResult result) { + std::move(callback_).Run(blink::MediaStreamDevices(), result, std::unique_ptr()); } void MediaStreamDevicesController::HandleUserMediaRequest() { - content::MediaStreamDevices devices; + blink::MediaStreamDevices devices; - if (request_.audio_type == content::MEDIA_GUM_TAB_AUDIO_CAPTURE) { - devices.push_back(content::MediaStreamDevice( - content::MEDIA_GUM_TAB_AUDIO_CAPTURE, "", "")); + if (request_.audio_type == blink::MEDIA_GUM_TAB_AUDIO_CAPTURE) { + devices.push_back( + blink::MediaStreamDevice(blink::MEDIA_GUM_TAB_AUDIO_CAPTURE, "", "")); } - if (request_.video_type == content::MEDIA_GUM_TAB_VIDEO_CAPTURE) { - devices.push_back(content::MediaStreamDevice( - content::MEDIA_GUM_TAB_VIDEO_CAPTURE, "", "")); + if (request_.video_type == blink::MEDIA_GUM_TAB_VIDEO_CAPTURE) { + devices.push_back( + blink::MediaStreamDevice(blink::MEDIA_GUM_TAB_VIDEO_CAPTURE, "", "")); } - if (request_.audio_type == content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE) { - devices.push_back(content::MediaStreamDevice( - content::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE, "loopback", "System Audio")); + if (request_.audio_type == blink::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE) { + devices.push_back(blink::MediaStreamDevice( + blink::MEDIA_GUM_DESKTOP_AUDIO_CAPTURE, "loopback", "System Audio")); } - if (request_.video_type == content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) { + if (request_.video_type == blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE) { content::DesktopMediaID screen_id; // If the device id wasn't specified then this is a screen capture request // (i.e. chooseDesktopMedia() API wasn't used to generate device id). @@ -179,13 +184,13 @@ void MediaStreamDevicesController::HandleUserMediaRequest() { } devices.push_back( - content::MediaStreamDevice(content::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, - screen_id.ToString(), "Screen")); + blink::MediaStreamDevice(blink::MEDIA_GUM_DESKTOP_VIDEO_CAPTURE, + screen_id.ToString(), "Screen")); } std::move(callback_).Run(devices, - devices.empty() ? content::MEDIA_DEVICE_INVALID_STATE - : content::MEDIA_DEVICE_OK, + devices.empty() ? blink::MEDIA_DEVICE_NO_HARDWARE + : blink::MEDIA_DEVICE_OK, std::unique_ptr()); } diff --git a/atom/browser/media/media_stream_devices_controller.h b/atom/browser/media/media_stream_devices_controller.h index 5326a0ab05..f0f496fc74 100644 --- a/atom/browser/media/media_stream_devices_controller.h +++ b/atom/browser/media/media_stream_devices_controller.h @@ -6,6 +6,7 @@ #define ATOM_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ #include "content/public/browser/web_contents_delegate.h" +#include "third_party/blink/public/common/mediastream/media_stream_request.h" namespace atom { @@ -21,7 +22,7 @@ class MediaStreamDevicesController { // Explicitly accept or deny the request. void Accept(); - void Deny(content::MediaStreamRequestResult result); + void Deny(blink::MediaStreamRequestResult result); private: // Handle the request of desktop or tab screen cast. diff --git a/atom/browser/web_contents_permission_helper.cc b/atom/browser/web_contents_permission_helper.cc index ebea4eba82..5efa8fdd9a 100644 --- a/atom/browser/web_contents_permission_helper.cc +++ b/atom/browser/web_contents_permission_helper.cc @@ -16,11 +16,11 @@ namespace { -std::string MediaStreamTypeToString(content::MediaStreamType type) { +std::string MediaStreamTypeToString(blink::MediaStreamType type) { switch (type) { - case content::MediaStreamType::MEDIA_DEVICE_AUDIO_CAPTURE: + case blink::MediaStreamType::MEDIA_DEVICE_AUDIO_CAPTURE: return "audio"; - case content::MediaStreamType::MEDIA_DEVICE_VIDEO_CAPTURE: + case blink::MediaStreamType::MEDIA_DEVICE_VIDEO_CAPTURE: return "video"; default: return "unknown"; @@ -40,7 +40,7 @@ void MediaAccessAllowed(const content::MediaStreamRequest& request, if (allowed) controller.TakeAction(); else - controller.Deny(content::MEDIA_DEVICE_PERMISSION_DENIED); + controller.Deny(blink::MEDIA_DEVICE_PERMISSION_DENIED); } void OnPointerLockResponse(content::WebContents* web_contents, bool allowed) { @@ -105,11 +105,11 @@ void WebContentsPermissionHelper::RequestMediaAccessPermission( base::DictionaryValue details; std::unique_ptr media_types(new base::ListValue); if (request.audio_type == - content::MediaStreamType::MEDIA_DEVICE_AUDIO_CAPTURE) { + blink::MediaStreamType::MEDIA_DEVICE_AUDIO_CAPTURE) { media_types->AppendString("audio"); } if (request.video_type == - content::MediaStreamType::MEDIA_DEVICE_VIDEO_CAPTURE) { + blink::MediaStreamType::MEDIA_DEVICE_VIDEO_CAPTURE) { media_types->AppendString("video"); } details.SetList("mediaTypes", std::move(media_types)); @@ -145,7 +145,7 @@ void WebContentsPermissionHelper::RequestOpenExternalPermission( bool WebContentsPermissionHelper::CheckMediaAccessPermission( const GURL& security_origin, - content::MediaStreamType type) const { + blink::MediaStreamType type) const { base::DictionaryValue details; details.SetString("securityOrigin", security_origin.spec()); details.SetString("mediaType", MediaStreamTypeToString(type)); diff --git a/atom/browser/web_contents_permission_helper.h b/atom/browser/web_contents_permission_helper.h index 012a012711..c6b869b7ec 100644 --- a/atom/browser/web_contents_permission_helper.h +++ b/atom/browser/web_contents_permission_helper.h @@ -5,9 +5,10 @@ #ifndef ATOM_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ #define ATOM_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ +#include "content/public/browser/media_stream_request.h" #include "content/public/browser/permission_type.h" #include "content/public/browser/web_contents_user_data.h" -#include "content/public/common/media_stream_request.h" +#include "third_party/blink/public/common/mediastream/media_stream_request.h" namespace atom { @@ -36,7 +37,7 @@ class WebContentsPermissionHelper // Synchronous Checks bool CheckMediaAccessPermission(const GURL& security_origin, - content::MediaStreamType type) const; + blink::MediaStreamType type) const; private: explicit WebContentsPermissionHelper(content::WebContents* web_contents); From 9439ac108dff65ceadb1f5237a2e9c635cb2b809 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 21 Jan 2019 22:26:54 +0530 Subject: [PATCH 08/52] content: Fix WebContentsUserData for usage across components. https://chromium-review.googlesource.com/c/chromium/src/+/1354402 --- atom/browser/api/atom_api_web_contents.cc | 3 +-- atom/browser/api/atom_api_web_contents_view.cc | 4 ++++ atom/browser/child_web_contents_tracker.cc | 14 ++++++++++++++ atom/browser/child_web_contents_tracker.h | 5 +++-- atom/browser/common_web_contents_delegate.cc | 3 +-- atom/browser/native_window.cc | 13 ++++++------- atom/browser/native_window.h | 4 ++-- .../printing/print_preview_message_handler.cc | 2 ++ .../printing/print_preview_message_handler.h | 2 ++ atom/browser/web_contents_permission_helper.cc | 2 ++ atom/browser/web_contents_permission_helper.h | 2 ++ atom/browser/web_contents_preferences.cc | 2 ++ atom/browser/web_contents_preferences.h | 2 ++ atom/browser/web_contents_zoom_controller.cc | 2 ++ atom/browser/web_contents_zoom_controller.h | 2 ++ filenames.gni | 1 + 16 files changed, 48 insertions(+), 15 deletions(-) create mode 100644 atom/browser/child_web_contents_tracker.cc diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 42166c0616..fc16202174 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -999,8 +999,7 @@ void WebContents::DevToolsOpened() { // Inherit owner window in devtools when it doesn't have one. auto* devtools = managed_web_contents()->GetDevToolsWebContents(); - bool has_window = - devtools->GetUserData(NativeWindowRelay::kNativeWindowRelayUserDataKey); + bool has_window = devtools->GetUserData(NativeWindowRelay::UserDataKey()); if (owner_window() && !has_window) handle->SetOwnerWindow(devtools, owner_window()); diff --git a/atom/browser/api/atom_api_web_contents_view.cc b/atom/browser/api/atom_api_web_contents_view.cc index 82468929db..5711a3b6f7 100644 --- a/atom/browser/api/atom_api_web_contents_view.cc +++ b/atom/browser/api/atom_api_web_contents_view.cc @@ -31,9 +31,13 @@ class WebContentsViewRelay atom::api::WebContentsView* view_ = nullptr; + WEB_CONTENTS_USER_DATA_KEY_DECL(); + DISALLOW_COPY_AND_ASSIGN(WebContentsViewRelay); }; +WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsViewRelay) + } // namespace namespace atom { diff --git a/atom/browser/child_web_contents_tracker.cc b/atom/browser/child_web_contents_tracker.cc new file mode 100644 index 0000000000..dd6c4b2a0e --- /dev/null +++ b/atom/browser/child_web_contents_tracker.cc @@ -0,0 +1,14 @@ +// Copyright (c) 2019 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/browser/child_web_contents_tracker.h" + +namespace atom { + +ChildWebContentsTracker::ChildWebContentsTracker( + content::WebContents* web_contents) {} + +WEB_CONTENTS_USER_DATA_KEY_IMPL(ChildWebContentsTracker) + +} // namespace atom diff --git a/atom/browser/child_web_contents_tracker.h b/atom/browser/child_web_contents_tracker.h index 64b80d5ce9..05f981ab07 100644 --- a/atom/browser/child_web_contents_tracker.h +++ b/atom/browser/child_web_contents_tracker.h @@ -18,11 +18,12 @@ struct ChildWebContentsTracker GURL url; std::string frame_name; - explicit ChildWebContentsTracker(content::WebContents* web_contents) {} - private: + explicit ChildWebContentsTracker(content::WebContents* web_contents); friend class content::WebContentsUserData; + WEB_CONTENTS_USER_DATA_KEY_DECL(); + DISALLOW_COPY_AND_ASSIGN(ChildWebContentsTracker); }; diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 49430bae6b..8ca255e88c 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -213,8 +213,7 @@ void CommonWebContentsDelegate::SetOwnerWindow( owner_window->GetWeakPtr()); } else { owner_window_ = nullptr; - web_contents->RemoveUserData( - NativeWindowRelay::kNativeWindowRelayUserDataKey); + web_contents->RemoveUserData(NativeWindowRelay::UserDataKey()); } #if BUILDFLAG(ENABLE_OSR) auto* osr_wcv = GetOffScreenWebContentsView(); diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index cbe66abfed..88228a1753 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -577,18 +577,15 @@ const views::Widget* NativeWindow::GetWidget() const { return widget(); } -// static -const void* const NativeWindowRelay::kNativeWindowRelayUserDataKey = - &NativeWindowRelay::kNativeWindowRelayUserDataKey; - // static void NativeWindowRelay::CreateForWebContents( content::WebContents* web_contents, base::WeakPtr window) { DCHECK(web_contents); - DCHECK(!web_contents->GetUserData(kNativeWindowRelayUserDataKey)); - web_contents->SetUserData(kNativeWindowRelayUserDataKey, - base::WrapUnique(new NativeWindowRelay(window))); + if (!web_contents->GetUserData(UserDataKey())) { + web_contents->SetUserData(UserDataKey(), + base::WrapUnique(new NativeWindowRelay(window))); + } } NativeWindowRelay::NativeWindowRelay(base::WeakPtr window) @@ -596,4 +593,6 @@ NativeWindowRelay::NativeWindowRelay(base::WeakPtr window) NativeWindowRelay::~NativeWindowRelay() = default; +WEB_CONTENTS_USER_DATA_KEY_IMPL(NativeWindowRelay) + } // namespace atom diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index 7dee6b2443..d2a52c5dbb 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -360,8 +360,6 @@ class NativeWindow : public base::SupportsUserData, class NativeWindowRelay : public content::WebContentsUserData { public: - static const void* const kNativeWindowRelayUserDataKey; - static void CreateForWebContents(content::WebContents*, base::WeakPtr); @@ -369,6 +367,8 @@ class NativeWindowRelay NativeWindow* GetNativeWindow() const { return native_window_.get(); } + WEB_CONTENTS_USER_DATA_KEY_DECL(); + private: friend class content::WebContentsUserData; explicit NativeWindowRelay(base::WeakPtr window); diff --git a/atom/browser/printing/print_preview_message_handler.cc b/atom/browser/printing/print_preview_message_handler.cc index bed50b2bc3..3d703695d5 100644 --- a/atom/browser/printing/print_preview_message_handler.cc +++ b/atom/browser/printing/print_preview_message_handler.cc @@ -195,4 +195,6 @@ void PrintPreviewMessageHandler::RejectPromise(int request_id) { promise->RejectWithErrorMessage("Failed to generate PDF"); } +WEB_CONTENTS_USER_DATA_KEY_IMPL(PrintPreviewMessageHandler) + } // namespace atom diff --git a/atom/browser/printing/print_preview_message_handler.h b/atom/browser/printing/print_preview_message_handler.h index 4e2a80ee9f..05fd0faa7d 100644 --- a/atom/browser/printing/print_preview_message_handler.h +++ b/atom/browser/printing/print_preview_message_handler.h @@ -67,6 +67,8 @@ class PrintPreviewMessageHandler base::WeakPtrFactory weak_ptr_factory_; + WEB_CONTENTS_USER_DATA_KEY_DECL(); + DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); }; diff --git a/atom/browser/web_contents_permission_helper.cc b/atom/browser/web_contents_permission_helper.cc index 5efa8fdd9a..acf8baef9a 100644 --- a/atom/browser/web_contents_permission_helper.cc +++ b/atom/browser/web_contents_permission_helper.cc @@ -154,4 +154,6 @@ bool WebContentsPermissionHelper::CheckMediaAccessPermission( return CheckPermission(content::PermissionType::AUDIO_CAPTURE, &details); } +WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPermissionHelper) + } // namespace atom diff --git a/atom/browser/web_contents_permission_helper.h b/atom/browser/web_contents_permission_helper.h index c6b869b7ec..991f5904c9 100644 --- a/atom/browser/web_contents_permission_helper.h +++ b/atom/browser/web_contents_permission_helper.h @@ -53,6 +53,8 @@ class WebContentsPermissionHelper content::WebContents* web_contents_; + WEB_CONTENTS_USER_DATA_KEY_DECL(); + DISALLOW_COPY_AND_ASSIGN(WebContentsPermissionHelper); }; diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index e4ac7092e4..4fd64a99bc 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -436,4 +436,6 @@ void WebContentsPreferences::OverrideWebkitPrefs( prefs->default_encoding = encoding; } +WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPreferences) + } // namespace atom diff --git a/atom/browser/web_contents_preferences.h b/atom/browser/web_contents_preferences.h index 2b6ebccbd5..f635008021 100644 --- a/atom/browser/web_contents_preferences.h +++ b/atom/browser/web_contents_preferences.h @@ -82,6 +82,8 @@ class WebContentsPreferences base::Value preference_ = base::Value(base::Value::Type::DICTIONARY); base::Value last_preference_ = base::Value(base::Value::Type::DICTIONARY); + WEB_CONTENTS_USER_DATA_KEY_DECL(); + DISALLOW_COPY_AND_ASSIGN(WebContentsPreferences); }; diff --git a/atom/browser/web_contents_zoom_controller.cc b/atom/browser/web_contents_zoom_controller.cc index a809544984..0da2d75525 100644 --- a/atom/browser/web_contents_zoom_controller.cc +++ b/atom/browser/web_contents_zoom_controller.cc @@ -278,4 +278,6 @@ void WebContentsZoomController::SetZoomFactorOnNavigationIfNeeded( SetZoomLevel(zoom_level); } +WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsZoomController) + } // namespace atom diff --git a/atom/browser/web_contents_zoom_controller.h b/atom/browser/web_contents_zoom_controller.h index 7863431857..b118c3e805 100644 --- a/atom/browser/web_contents_zoom_controller.h +++ b/atom/browser/web_contents_zoom_controller.h @@ -112,6 +112,8 @@ class WebContentsZoomController content::HostZoomMap* host_zoom_map_; + WEB_CONTENTS_USER_DATA_KEY_DECL(); + DISALLOW_COPY_AND_ASSIGN(WebContentsZoomController); }; diff --git a/filenames.gni b/filenames.gni index d851c5a105..81df0d54dc 100644 --- a/filenames.gni +++ b/filenames.gni @@ -251,6 +251,7 @@ filenames = { "atom/browser/browser_observer.h", "atom/browser/browser_process_impl.cc", "atom/browser/browser_process_impl.h", + "atom/browser/child_web_contents_tracker.cc", "atom/browser/child_web_contents_tracker.h", "atom/browser/common_web_contents_delegate_mac.mm", "atom/browser/common_web_contents_delegate_views.cc", From 79040e348a5aba0ec455829ba242fb1a4c3c2bfa Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 21 Jan 2019 23:44:57 +0530 Subject: [PATCH 09/52] Change the source origin parameter type for CanCreateWindow from GURL to url::Origin. https://chromium-review.googlesource.com/c/chromium/src/+/1395066 --- atom/browser/api/atom_api_app.cc | 2 +- atom/browser/api/atom_api_app.h | 2 +- atom/browser/atom_browser_client.cc | 2 +- atom/browser/atom_browser_client.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index 5d154f438f..98da6cd79b 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -690,7 +690,7 @@ bool App::CanCreateWindow( content::RenderFrameHost* opener, const GURL& opener_url, const GURL& opener_top_level_frame_url, - const GURL& source_origin, + const url::Origin& source_origin, content::mojom::WindowContainerType container_type, const GURL& target_url, const content::Referrer& referrer, diff --git a/atom/browser/api/atom_api_app.h b/atom/browser/api/atom_api_app.h index 0fdd0200cc..bda2a75b3d 100644 --- a/atom/browser/api/atom_api_app.h +++ b/atom/browser/api/atom_api_app.h @@ -141,7 +141,7 @@ class App : public AtomBrowserClient::Delegate, bool CanCreateWindow(content::RenderFrameHost* opener, const GURL& opener_url, const GURL& opener_top_level_frame_url, - const GURL& source_origin, + const url::Origin& source_origin, content::mojom::WindowContainerType container_type, const GURL& target_url, const content::Referrer& referrer, diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index b2c986681b..0eb36f8690 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -596,7 +596,7 @@ bool AtomBrowserClient::CanCreateWindow( content::RenderFrameHost* opener, const GURL& opener_url, const GURL& opener_top_level_frame_url, - const GURL& source_origin, + const url::Origin& source_origin, content::mojom::WindowContainerType container_type, const GURL& target_url, const content::Referrer& referrer, diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 71faf97128..61c5f2e53b 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -112,7 +112,7 @@ class AtomBrowserClient : public content::ContentBrowserClient, bool CanCreateWindow(content::RenderFrameHost* opener, const GURL& opener_url, const GURL& opener_top_level_frame_url, - const GURL& source_origin, + const url::Origin& source_origin, content::mojom::WindowContainerType container_type, const GURL& target_url, const content::Referrer& referrer, From a913e396d59698c6293de042e9689c1f4fc921f8 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 21 Jan 2019 23:50:22 +0530 Subject: [PATCH 10/52] [SM] Use C++ Manifests for SM embedders https://chromium-review.googlesource.com/c/chromium/src/+/1383530 --- atom/browser/atom_browser_client.cc | 9 +++++---- atom/browser/atom_browser_client.h | 2 +- atom/utility/atom_content_utility_client.cc | 1 + 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 0eb36f8690..2f47a23f66 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -715,8 +715,8 @@ void AtomBrowserClient::RegisterOutOfProcessServices( #endif } -std::unique_ptr AtomBrowserClient::GetServiceManifestOverlay( - base::StringPiece name) { +base::Optional +AtomBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); int id = -1; if (name == content::mojom::kBrowserServiceName) @@ -725,10 +725,11 @@ std::unique_ptr AtomBrowserClient::GetServiceManifestOverlay( id = IDR_ELECTRON_CONTENT_PACKAGED_SERVICES_MANIFEST_OVERLAY; if (id == -1) - return nullptr; + return base::nullopt; base::StringPiece manifest_contents = rb.GetRawDataResource(id); - return base::JSONReader::Read(manifest_contents); + return service_manager::Manifest::FromValueDeprecated( + base::JSONReader::Read(manifest_contents)); } net::NetLog* AtomBrowserClient::GetNetLog() { diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 61c5f2e53b..52de6e3231 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -138,7 +138,7 @@ class AtomBrowserClient : public content::ContentBrowserClient, bool in_memory, const base::FilePath& relative_partition_path) override; void RegisterOutOfProcessServices(OutOfProcessServiceMap* services) override; - std::unique_ptr GetServiceManifestOverlay( + base::Optional GetServiceManifestOverlay( base::StringPiece name) override; net::NetLog* GetNetLog() override; content::MediaObserver* GetMediaObserver() override; diff --git a/atom/utility/atom_content_utility_client.cc b/atom/utility/atom_content_utility_client.cc index f95c8fffa7..e98741ccb8 100644 --- a/atom/utility/atom_content_utility_client.cc +++ b/atom/utility/atom_content_utility_client.cc @@ -10,6 +10,7 @@ #include "content/public/child/child_thread.h" #include "content/public/common/service_manager_connection.h" #include "content/public/common/simple_connection_filter.h" +#include "content/public/utility/utility_thread.h" #include "services/proxy_resolver/proxy_resolver_service.h" #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" #include "services/service_manager/sandbox/switches.h" From abec938b0a9a1a7a29cdf152651000ead746c3bd Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 21 Jan 2019 23:56:33 +0530 Subject: [PATCH 11/52] Use base::size rather than arraysize https://bugs.chromium.org/p/chromium/issues/detail?id=837308 --- atom/browser/atom_browser_client.cc | 2 +- atom/browser/font_defaults.cc | 3 ++- .../browser/ui/inspectable_web_contents_impl.cc | 3 ++- atom/browser/ui/win/jump_list.cc | 7 +++---- atom/common/crash_reporter/win/crash_service.cc | 3 ++- atom/common/native_mate_converters/callback.cc | 3 ++- atom/common/node_includes.h | 1 - atom/common/platform_util_win.cc | 3 ++- .../chrome/browser/process_singleton_posix.cc | 17 +++++++++-------- 9 files changed, 23 insertions(+), 19 deletions(-) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 2f47a23f66..229ffa29fa 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -478,7 +478,7 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches( switches::kServiceWorkerSchemes}; command_line->CopySwitchesFrom(*base::CommandLine::ForCurrentProcess(), kCommonSwitchNames, - arraysize(kCommonSwitchNames)); + base::size(kCommonSwitchNames)); #if defined(OS_WIN) // Append --app-user-model-id. diff --git a/atom/browser/font_defaults.cc b/atom/browser/font_defaults.cc index 85e57feb9d..0eb75a0c2b 100644 --- a/atom/browser/font_defaults.cc +++ b/atom/browser/font_defaults.cc @@ -7,6 +7,7 @@ #include #include +#include "base/stl_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "chrome/common/pref_names.h" @@ -103,7 +104,7 @@ const FontDefault kFontDefaults[] = { IDS_FIXED_FONT_FAMILY_TRADITIONAL_HAN}, #endif }; -const size_t kFontDefaultsLength = arraysize(kFontDefaults); +const size_t kFontDefaultsLength = base::size(kFontDefaults); // ^^^^^ DO NOT EDIT ^^^^^ diff --git a/atom/browser/ui/inspectable_web_contents_impl.cc b/atom/browser/ui/inspectable_web_contents_impl.cc index 5b08e79d73..27b90fcaf6 100644 --- a/atom/browser/ui/inspectable_web_contents_impl.cc +++ b/atom/browser/ui/inspectable_web_contents_impl.cc @@ -16,6 +16,7 @@ #include "base/json/json_reader.h" #include "base/json/json_writer.h" #include "base/metrics/histogram.h" +#include "base/stl_util.h" #include "base/strings/pattern.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" @@ -109,7 +110,7 @@ void SetZoomLevelForWebContents(content::WebContents* web_contents, double GetNextZoomLevel(double level, bool out) { double factor = content::ZoomLevelToZoomFactor(level); - size_t size = arraysize(kPresetZoomFactors); + size_t size = base::size(kPresetZoomFactors); for (size_t i = 0; i < size; ++i) { if (!content::ZoomValuesEqual(kPresetZoomFactors[i], factor)) continue; diff --git a/atom/browser/ui/win/jump_list.cc b/atom/browser/ui/win/jump_list.cc index 4a76126214..171bf84f6e 100644 --- a/atom/browser/ui/win/jump_list.cc +++ b/atom/browser/ui/win/jump_list.cc @@ -83,7 +83,7 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link, item->type = JumpListItem::Type::TASK; wchar_t path[MAX_PATH]; - if (FAILED(shell_link->GetPath(path, arraysize(path), nullptr, 0))) + if (FAILED(shell_link->GetPath(path, MAX_PATH, nullptr, 0))) return false; CComQIPtr property_store = shell_link; @@ -100,14 +100,13 @@ bool ConvertShellLinkToJumpListItem(IShellLink* shell_link, } int icon_index; - if (SUCCEEDED( - shell_link->GetIconLocation(path, arraysize(path), &icon_index))) { + if (SUCCEEDED(shell_link->GetIconLocation(path, MAX_PATH, &icon_index))) { item->icon_path = base::FilePath(path); item->icon_index = icon_index; } wchar_t item_desc[INFOTIPSIZE]; - if (SUCCEEDED(shell_link->GetDescription(item_desc, arraysize(item_desc)))) + if (SUCCEEDED(shell_link->GetDescription(item_desc, INFOTIPSIZE))) item->description = item_desc; return true; diff --git a/atom/common/crash_reporter/win/crash_service.cc b/atom/common/crash_reporter/win/crash_service.cc index d13111f495..a68c9e18fe 100644 --- a/atom/common/crash_reporter/win/crash_service.cc +++ b/atom/common/crash_reporter/win/crash_service.cc @@ -13,6 +13,7 @@ #include "base/command_line.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/time/time.h" @@ -414,7 +415,7 @@ DWORD CrashService::AsyncSendDump(void* context) { const DWORD kSleepSchedule[] = {24 * kOneHour, 8 * kOneHour, 4 * kOneHour, kOneHour, 15 * kOneMinute, 0}; - int retry_round = arraysize(kSleepSchedule) - 1; + int retry_round = base::size(kSleepSchedule) - 1; do { ::Sleep(kSleepSchedule[retry_round]); diff --git a/atom/common/native_mate_converters/callback.cc b/atom/common/native_mate_converters/callback.cc index dc3300e439..9121c72845 100644 --- a/atom/common/native_mate_converters/callback.cc +++ b/atom/common/native_mate_converters/callback.cc @@ -3,6 +3,7 @@ // found in the LICENSE file. #include "atom/common/native_mate_converters/callback.h" +#include "base/stl_util.h" #include "content/public/browser/browser_thread.h" #include "native_mate/dictionary.h" @@ -151,7 +152,7 @@ v8::Local BindFunctionWith(v8::Isolate* isolate, v8::Local bind_func = v8::Local::Cast(bind.ToLocalChecked()); v8::Local converted[] = {func, arg1, arg2}; - return bind_func->Call(context, func, arraysize(converted), converted) + return bind_func->Call(context, func, base::size(converted), converted) .ToLocalChecked(); } diff --git a/atom/common/node_includes.h b/atom/common/node_includes.h index ef40162e89..639f7f964e 100644 --- a/atom/common/node_includes.h +++ b/atom/common/node_includes.h @@ -29,7 +29,6 @@ #undef DISALLOW_COPY_AND_ASSIGN #undef NO_RETURN #undef LIKELY -#undef arraysize #undef debug_string // This is defined in macOS SDK in AssertMacros.h. #undef require_string // This is defined in macOS SDK in AssertMacros.h. #include "env-inl.h" diff --git a/atom/common/platform_util_win.cc b/atom/common/platform_util_win.cc index 5712200ec6..a19d74fc30 100644 --- a/atom/common/platform_util_win.cc +++ b/atom/common/platform_util_win.cc @@ -20,6 +20,7 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/logging.h" +#include "base/stl_util.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/win/registry.h" @@ -263,7 +264,7 @@ bool ShowItemInFolder(const base::FilePath& full_path) { const ITEMIDLIST* highlight[] = {file_item}; - hr = SHOpenFolderAndSelectItems(dir_item, arraysize(highlight), highlight, + hr = SHOpenFolderAndSelectItems(dir_item, base::size(highlight), highlight, NULL); if (!FAILED(hr)) return true; diff --git a/chromium_src/chrome/browser/process_singleton_posix.cc b/chromium_src/chrome/browser/process_singleton_posix.cc index f7132b4361..8c6893b246 100644 --- a/chromium_src/chrome/browser/process_singleton_posix.cc +++ b/chromium_src/chrome/browser/process_singleton_posix.cc @@ -76,6 +76,7 @@ #include "base/rand_util.h" #include "base/sequenced_task_runner_helpers.h" #include "base/single_thread_task_runner.h" +#include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" @@ -114,7 +115,7 @@ const char kACKToken[] = "ACK"; const char kShutdownToken[] = "SHUTDOWN"; const char kTokenDelimiter = '\0'; const int kMaxMessageLength = 32 * 1024; -const int kMaxACKMessageLength = arraysize(kShutdownToken) - 1; +const int kMaxACKMessageLength = base::size(kShutdownToken) - 1; const char kLockDelimiter = '-'; @@ -225,9 +226,9 @@ ssize_t ReadFromSocket(int fd, // Set up a sockaddr appropriate for messaging. void SetupSockAddr(const std::string& path, struct sockaddr_un* addr) { addr->sun_family = AF_UNIX; - CHECK(path.length() < arraysize(addr->sun_path)) + CHECK(path.length() < base::size(addr->sun_path)) << "Socket path too long: " << path; - base::strlcpy(addr->sun_path, path.c_str(), arraysize(addr->sun_path)); + base::strlcpy(addr->sun_path, path.c_str(), base::size(addr->sun_path)); } // Set up a socket appropriate for messaging. @@ -604,13 +605,13 @@ void ProcessSingleton::LinuxWatcher::HandleMessage( if (parent_->notification_callback_.Run(argv, base::FilePath(current_dir))) { // Send back "ACK" message to prevent the client process from starting up. - reader->FinishWithACK(kACKToken, arraysize(kACKToken) - 1); + reader->FinishWithACK(kACKToken, base::size(kACKToken) - 1); } else { LOG(WARNING) << "Not handling interprocess notification as browser" " is shutting down"; // Send back "SHUTDOWN" message, so that the client process can start up // without killing this process. - reader->FinishWithACK(kShutdownToken, arraysize(kShutdownToken) - 1); + reader->FinishWithACK(kShutdownToken, base::size(kShutdownToken) - 1); return; } } @@ -654,7 +655,7 @@ void ProcessSingleton::LinuxWatcher::SocketReader:: } // Validate the message. The shortest message is kStartToken\0x\0x - const size_t kMinMessageLength = arraysize(kStartToken) + 4; + const size_t kMinMessageLength = base::size(kStartToken) + 4; if (bytes_read_ < kMinMessageLength) { buf_[bytes_read_] = 0; LOG(ERROR) << "Invalid socket message (wrong length):" << buf_; @@ -857,10 +858,10 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( } buf[len] = '\0'; - if (strncmp(buf, kShutdownToken, arraysize(kShutdownToken) - 1) == 0) { + if (strncmp(buf, kShutdownToken, base::size(kShutdownToken) - 1) == 0) { // The other process is shutting down, it's safe to start a new process. return PROCESS_NONE; - } else if (strncmp(buf, kACKToken, arraysize(kACKToken) - 1) == 0) { + } else if (strncmp(buf, kACKToken, base::size(kACKToken) - 1) == 0) { #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS) // Likely NULL in unit tests. views::LinuxUI* linux_ui = views::LinuxUI::instance(); From e1502f6953aaf870a4425f0785683c5d61182dde Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 00:02:34 +0530 Subject: [PATCH 12/52] Move GetUserAgent from ContentClient to ContentBrowserClient https://chromium-review.googlesource.com/c/chromium/src/+/1352086 --- atom/app/atom_content_client.cc | 13 --------- atom/app/atom_content_client.h | 2 -- atom/browser/atom_browser_client.cc | 10 +++++++ atom/browser/atom_browser_client.h | 2 ++ atom/browser/atom_browser_context.cc | 27 +------------------ atom/browser/common_web_contents_delegate.cc | 3 ++- .../net/system_network_context_manager.cc | 3 +++ atom/common/application_info.cc | 22 +++++++++++++++ atom/common/application_info.h | 2 ++ 9 files changed, 42 insertions(+), 42 deletions(-) diff --git a/atom/app/atom_content_client.cc b/atom/app/atom_content_client.cc index 2317a65470..ff5dce323d 100644 --- a/atom/app/atom_content_client.cc +++ b/atom/app/atom_content_client.cc @@ -7,17 +7,14 @@ #include #include -#include "atom/common/atom_version.h" #include "atom/common/options_switches.h" #include "base/command_line.h" #include "base/files/file_util.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" -#include "chrome/common/chrome_version.h" #include "content/public/common/content_constants.h" #include "content/public/common/pepper_plugin_info.h" -#include "content/public/common/user_agent.h" #include "electron/buildflags/buildflags.h" #include "ppapi/shared_impl/ppapi_permissions.h" #include "ui/base/l10n/l10n_util.h" @@ -180,16 +177,6 @@ AtomContentClient::AtomContentClient() {} AtomContentClient::~AtomContentClient() {} -std::string AtomContentClient::GetProduct() const { - return "Chrome/" CHROME_VERSION_STRING; -} - -std::string AtomContentClient::GetUserAgent() const { - return content::BuildUserAgentFromProduct("Chrome/" CHROME_VERSION_STRING - " " ATOM_PRODUCT_NAME - "/" ATOM_VERSION_STRING); -} - base::string16 AtomContentClient::GetLocalizedString(int message_id) const { return l10n_util::GetStringUTF16(message_id); } diff --git a/atom/app/atom_content_client.h b/atom/app/atom_content_client.h index bf07825c47..f7095f6ab0 100644 --- a/atom/app/atom_content_client.h +++ b/atom/app/atom_content_client.h @@ -20,8 +20,6 @@ class AtomContentClient : public content::ContentClient { protected: // content::ContentClient: - std::string GetProduct() const override; - std::string GetUserAgent() const override; base::string16 GetLocalizedString(int message_id) const override; base::StringPiece GetDataResource(int resource_id, ui::ScaleFactor) const override; diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 229ffa29fa..4941a19123 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -32,6 +32,7 @@ #include "atom/browser/web_contents_permission_helper.h" #include "atom/browser/web_contents_preferences.h" #include "atom/browser/window_list.h" +#include "atom/common/application_info.h" #include "atom/common/options_switches.h" #include "atom/common/platform_util.h" #include "base/command_line.h" @@ -47,6 +48,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/post_task.h" #include "chrome/browser/browser_process.h" +#include "chrome/common/chrome_version.h" #include "components/net_log/chrome_net_log.h" #include "content/public/browser/browser_ppapi_host.h" #include "content/public/browser/browser_task_traits.h" @@ -898,6 +900,14 @@ bool AtomBrowserClient::ShouldBypassCORB(int render_process_id) const { return it != process_preferences_.end() && !it->second.web_security; } +std::string AtomBrowserClient::GetProduct() const { + return "Chrome/" CHROME_VERSION_STRING; +} + +std::string AtomBrowserClient::GetUserAgent() const { + return GetApplicationUserAgent(); +} + std::string AtomBrowserClient::GetApplicationLocale() { if (BrowserThread::CurrentlyOn(BrowserThread::IO)) return g_io_thread_application_locale.Get(); diff --git a/atom/browser/atom_browser_client.h b/atom/browser/atom_browser_client.h index 52de6e3231..65a0aba20d 100644 --- a/atom/browser/atom_browser_client.h +++ b/atom/browser/atom_browser_client.h @@ -153,6 +153,8 @@ class AtomBrowserClient : public content::ContentBrowserClient, void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; bool ShouldBypassCORB(int render_process_id) const override; + std::string GetProduct() const override; + std::string GetUserAgent() const override; // content::RenderProcessHostObserver: void RenderProcessHostDestroyed(content::RenderProcessHost* host) override; diff --git a/atom/browser/atom_browser_context.cc b/atom/browser/atom_browser_context.cc index 55f783c185..9d4ac92f1b 100644 --- a/atom/browser/atom_browser_context.cc +++ b/atom/browser/atom_browser_context.cc @@ -11,7 +11,6 @@ #include "atom/browser/atom_download_manager_delegate.h" #include "atom/browser/atom_paths.h" #include "atom/browser/atom_permission_manager.h" -#include "atom/browser/browser.h" #include "atom/browser/cookie_change_notifier.h" #include "atom/browser/net/resolve_proxy_helper.h" #include "atom/browser/pref_store_delegate.h" @@ -20,17 +19,14 @@ #include "atom/browser/web_view_manager.h" #include "atom/browser/zoom_level_delegate.h" #include "atom/common/application_info.h" -#include "atom/common/atom_version.h" #include "atom/common/options_switches.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/path_service.h" #include "base/strings/string_util.h" -#include "base/strings/stringprintf.h" #include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/thread_restrictions.h" #include "chrome/common/chrome_paths.h" -#include "chrome/common/chrome_version.h" #include "chrome/common/pref_names.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/prefs/json_pref_store.h" @@ -42,7 +38,6 @@ #include "components/proxy_config/proxy_config_pref_names.h" #include "content/browser/blob_storage/chrome_blob_storage_context.h" #include "content/public/browser/storage_partition.h" -#include "content/public/common/user_agent.h" #include "net/base/escape.h" using content::BrowserThread; @@ -51,14 +46,6 @@ namespace atom { namespace { -std::string RemoveWhitespace(const std::string& str) { - std::string trimmed; - if (base::RemoveChars(str, " ", &trimmed)) - return trimmed; - else - return str; -} - // Convert string to lower case and escape it. std::string MakePartitionName(const std::string& input) { return net::EscapePath(base::ToLowerASCII(input)); @@ -78,19 +65,7 @@ AtomBrowserContext::AtomBrowserContext(const std::string& partition, storage_policy_(new SpecialStoragePolicy), in_memory_(in_memory), weak_factory_(this) { - // Construct user agent string. - Browser* browser = Browser::Get(); - std::string name = RemoveWhitespace(browser->GetName()); - std::string user_agent; - if (name == ATOM_PRODUCT_NAME) { - user_agent = "Chrome/" CHROME_VERSION_STRING " " ATOM_PRODUCT_NAME - "/" ATOM_VERSION_STRING; - } else { - user_agent = base::StringPrintf( - "%s/%s Chrome/%s " ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING, - name.c_str(), browser->GetVersion().c_str(), CHROME_VERSION_STRING); - } - user_agent_ = content::BuildUserAgentFromProduct(user_agent); + user_agent_ = GetApplicationUserAgent(); // Read options. base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 8ca255e88c..114e484d50 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -183,7 +183,8 @@ void CommonWebContentsDelegate::InitWithWebContents( #if BUILDFLAG(ENABLE_PRINTING) PrintPreviewMessageHandler::CreateForWebContents(web_contents); printing::PrintViewManagerBasic::CreateForWebContents(web_contents); - printing::CreateCompositeClientIfNeeded(web_contents); + printing::CreateCompositeClientIfNeeded(web_contents, + browser_context->GetUserAgent()); #endif // Determien whether the WebContents is offscreen. diff --git a/atom/browser/net/system_network_context_manager.cc b/atom/browser/net/system_network_context_manager.cc index 82069a2ea7..964376afbb 100644 --- a/atom/browser/net/system_network_context_manager.cc +++ b/atom/browser/net/system_network_context_manager.cc @@ -8,6 +8,7 @@ #include #include "atom/browser/io_thread.h" +#include "atom/common/application_info.h" #include "atom/common/options_switches.h" #include "base/command_line.h" #include "base/lazy_instance.h" @@ -222,6 +223,8 @@ SystemNetworkContextManager::CreateNetworkContextParams() { network_context_params->context_name = std::string("system"); + network_context_params->user_agent = atom::GetApplicationUserAgent(); + network_context_params->http_cache_enabled = false; // These are needed for PAC scripts that use file or data URLs (Or FTP URLs?). diff --git a/atom/common/application_info.cc b/atom/common/application_info.cc index 53a1b0a52d..c0f7715768 100644 --- a/atom/common/application_info.cc +++ b/atom/common/application_info.cc @@ -4,7 +4,12 @@ #include "atom/common/application_info.h" +#include "atom/browser/browser.h" +#include "atom/common/atom_version.h" #include "base/no_destructor.h" +#include "base/strings/stringprintf.h" +#include "chrome/common/chrome_version.h" +#include "content/public/common/user_agent.h" namespace atom { @@ -31,4 +36,21 @@ std::string GetOverriddenApplicationVersion() { return *g_overridden_application_version; } +std::string GetApplicationUserAgent() { + // Construct user agent string. + Browser* browser = Browser::Get(); + std::string name, user_agent; + if (!base::RemoveChars(browser->GetName(), " ", &name)) + name = browser->GetName(); + if (name == ATOM_PRODUCT_NAME) { + user_agent = "Chrome/" CHROME_VERSION_STRING " " ATOM_PRODUCT_NAME + "/" ATOM_VERSION_STRING; + } else { + user_agent = base::StringPrintf( + "%s/%s Chrome/%s " ATOM_PRODUCT_NAME "/" ATOM_VERSION_STRING, + name.c_str(), browser->GetVersion().c_str(), CHROME_VERSION_STRING); + } + return content::BuildUserAgentFromProduct(user_agent); +} + } // namespace atom diff --git a/atom/common/application_info.h b/atom/common/application_info.h index 6243f28868..f899d3583d 100644 --- a/atom/common/application_info.h +++ b/atom/common/application_info.h @@ -22,6 +22,8 @@ std::string GetOverriddenApplicationVersion(); std::string GetApplicationName(); std::string GetApplicationVersion(); +// Returns the user agent of Electron. +std::string GetApplicationUserAgent(); #if defined(OS_WIN) PCWSTR GetRawAppUserModelID(); From b2bd9ffd704b37e0818feed89226100209ec8ffd Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 02:12:36 +0530 Subject: [PATCH 13/52] Downloads : Adding metered network info and retry count to download item https://chromium-review.googlesource.com/c/chromium/src/+/1352628 --- atom/browser/api/atom_api_download_item.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_download_item.cc b/atom/browser/api/atom_api_download_item.cc index 0db325237c..ef474201b1 100644 --- a/atom/browser/api/atom_api_download_item.cc +++ b/atom/browser/api/atom_api_download_item.cc @@ -103,7 +103,7 @@ bool DownloadItem::IsPaused() const { } void DownloadItem::Resume() { - download_item_->Resume(); + download_item_->Resume(true /* user_gesture */); } bool DownloadItem::CanResume() const { From 1c4241bff5396da7ca287eee867dc8e11899562f Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 02:13:17 +0530 Subject: [PATCH 14/52] Move BackgroundColor from widgets and child frames to the WebView. https://chromium-review.googlesource.com/c/chromium/src/+/1382861 --- atom/browser/api/atom_api_browser_window.cc | 6 ++++-- atom/browser/osr/osr_render_widget_host_view.cc | 4 ++-- atom/renderer/renderer_client_base.cc | 9 +++++---- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/atom/browser/api/atom_api_browser_window.cc b/atom/browser/api/atom_api_browser_window.cc index 05ebd4ab1a..7c7afe18e5 100644 --- a/atom/browser/api/atom_api_browser_window.cc +++ b/atom/browser/api/atom_api_browser_window.cc @@ -18,6 +18,7 @@ #include "atom/common/options_switches.h" #include "base/threading/thread_task_runner_handle.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" #include "gin/converter.h" @@ -130,7 +131,7 @@ void BrowserWindow::RenderViewCreated( render_view_host->GetProcess()->GetID(), render_view_host->GetRoutingID()); if (impl) - impl->SetBackgroundOpaque(false); + impl->owner_delegate()->SetBackgroundOpaque(false); } void BrowserWindow::DidFirstVisuallyNonEmptyPaint() { @@ -349,7 +350,8 @@ void BrowserWindow::SetVibrancy(v8::Isolate* isolate, render_view_host->GetProcess()->GetID(), render_view_host->GetRoutingID()); if (impl) - impl->SetBackgroundOpaque(type.empty() ? !window_->transparent() : false); + impl->owner_delegate()->SetBackgroundOpaque( + type.empty() ? !window_->transparent() : false); } TopLevelWindow::SetVibrancy(isolate, value); diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index 364a956c60..04a6afd235 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -529,8 +529,8 @@ void OffScreenRenderWidgetHostView::SetBackgroundColor(SkColor color) { UpdateBackgroundColorFromRenderer(color); if (render_widget_host_) { - render_widget_host_->SetBackgroundOpaque(SkColorGetA(color) == - SK_AlphaOPAQUE); + render_widget_host_->owner_delegate()->SetBackgroundOpaque( + SkColorGetA(color) == SK_AlphaOPAQUE); } } diff --git a/atom/renderer/renderer_client_base.cc b/atom/renderer/renderer_client_base.cc index 81abd32bc5..5b1c975bcd 100644 --- a/atom/renderer/renderer_client_base.cc +++ b/atom/renderer/renderer_client_base.cc @@ -32,6 +32,7 @@ #include "third_party/blink/public/web/web_plugin_params.h" #include "third_party/blink/public/web/web_script_source.h" #include "third_party/blink/public/web/web_security_policy.h" +#include "third_party/blink/public/web/web_view.h" #include "third_party/blink/renderer/platform/weborigin/scheme_registry.h" #if defined(OS_MACOSX) @@ -221,16 +222,16 @@ void RendererClientBase::RenderFrameCreated( content::RenderView* render_view = render_frame->GetRenderView(); if (render_frame->IsMainFrame() && render_view) { - blink::WebFrameWidget* web_frame_widget = render_view->GetWebFrameWidget(); - if (web_frame_widget) { + blink::WebView* webview = render_view->GetWebView(); + if (webview) { base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); if (cmd->HasSwitch(switches::kGuestInstanceID)) { // webview. - web_frame_widget->SetBaseBackgroundColor(SK_ColorTRANSPARENT); + webview->SetBaseBackgroundColor(SK_ColorTRANSPARENT); } else { // normal window. std::string name = cmd->GetSwitchValueASCII(switches::kBackgroundColor); SkColor color = name.empty() ? SK_ColorTRANSPARENT : ParseHexColor(name); - web_frame_widget->SetBaseBackgroundColor(color); + webview->SetBaseBackgroundColor(color); } } } From 2c282203b523af99431c4151d8d3e49451fb5e56 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 02:13:53 +0530 Subject: [PATCH 15/52] v8: Remove obsolete V8 extras flag https://chromium-review.googlesource.com/c/chromium/src/+/1404554 --- atom/browser/javascript_environment.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/browser/javascript_environment.cc b/atom/browser/javascript_environment.cc index 746ee55946..d1f2846274 100644 --- a/atom/browser/javascript_environment.cc +++ b/atom/browser/javascript_environment.cc @@ -54,10 +54,10 @@ v8::Isolate* JavascriptEnvironment::Initialize(uv_loop_t* event_loop) { tracing_controller); v8::V8::InitializePlatform(platform_); - gin::IsolateHolder::Initialize( - gin::IsolateHolder::kNonStrictMode, gin::IsolateHolder::kStableV8Extras, - gin::ArrayBufferAllocator::SharedInstance(), - nullptr /* external_reference_table */, false /* create_v8_platform */); + gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode, + gin::ArrayBufferAllocator::SharedInstance(), + nullptr /* external_reference_table */, + false /* create_v8_platform */); v8::Isolate* isolate = v8::Isolate::Allocate(); platform_->RegisterIsolate(isolate, event_loop); From 606c84b30233a440ae5741dfbe740d14d3fb49cb Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 02:15:15 +0530 Subject: [PATCH 16/52] Blink: Plumb correct security origin for isolated world CSPs. https://chromium-review.googlesource.com/c/chromium/src/+/1395190 --- atom/renderer/api/atom_api_web_frame.cc | 46 +++++---------------- atom/renderer/atom_render_frame_observer.cc | 13 +++--- lib/renderer/api/web-frame.js | 9 ++-- 3 files changed, 23 insertions(+), 45 deletions(-) diff --git a/atom/renderer/api/atom_api_web_frame.cc b/atom/renderer/api/atom_api_web_frame.cc index b7e414009d..829a826af0 100644 --- a/atom/renderer/api/atom_api_web_frame.cc +++ b/atom/renderer/api/atom_api_web_frame.cc @@ -22,6 +22,7 @@ #include "native_mate/dictionary.h" #include "native_mate/object_template_builder.h" #include "third_party/blink/public/platform/web_cache.h" +#include "third_party/blink/public/platform/web_isolated_world_info.h" #include "third_party/blink/public/web/web_custom_element.h" #include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_element.h" @@ -377,46 +378,27 @@ void ExecuteJavaScriptInIsolatedWorld( scriptExecutionType, callback.release()); } -void SetIsolatedWorldSecurityOrigin(v8::Local window, - int world_id, - const std::string& origin_url) { - GetRenderFrame(window)->GetWebFrame()->SetIsolatedWorldSecurityOrigin( - world_id, blink::WebSecurityOrigin::CreateFromString( - blink::WebString::FromUTF8(origin_url))); -} - -void SetIsolatedWorldContentSecurityPolicy(v8::Local window, - int world_id, - const std::string& security_policy) { - GetRenderFrame(window)->GetWebFrame()->SetIsolatedWorldContentSecurityPolicy( - world_id, blink::WebString::FromUTF8(security_policy)); -} - -void SetIsolatedWorldHumanReadableName(v8::Local window, - int world_id, - const std::string& name) { - GetRenderFrame(window)->GetWebFrame()->SetIsolatedWorldHumanReadableName( - world_id, blink::WebString::FromUTF8(name)); -} - void SetIsolatedWorldInfo(v8::Local window, int world_id, const mate::Dictionary& options, mate::Arguments* args) { - std::string origin, csp, name; - options.Get("securityOrigin", &origin); - options.Get("csp", &csp); + std::string origin_url, security_policy, name; + options.Get("securityOrigin", &origin_url); + options.Get("csp", &security_policy); options.Get("name", &name); - if (!csp.empty() && origin.empty()) { + if (!security_policy.empty() && origin_url.empty()) { args->ThrowError( "If csp is specified, securityOrigin should also be specified"); return; } - SetIsolatedWorldSecurityOrigin(window, world_id, origin); - SetIsolatedWorldContentSecurityPolicy(window, world_id, csp); - SetIsolatedWorldHumanReadableName(window, world_id, name); + blink::WebIsolatedWorldInfo info; + info.security_origin = blink::WebSecurityOrigin::CreateFromString( + blink::WebString::FromUTF8(origin_url)); + info.content_security_policy = blink::WebString::FromUTF8(security_policy); + info.human_readable_name = blink::WebString::FromUTF8(name); + GetRenderFrame(window)->GetWebFrame()->SetIsolatedWorldInfo(world_id, info); } blink::WebCache::ResourceTypeStats GetResourceUsage(v8::Isolate* isolate) { @@ -550,12 +532,6 @@ void Initialize(v8::Local exports, dict.SetMethod("executeJavaScript", &ExecuteJavaScript); dict.SetMethod("executeJavaScriptInIsolatedWorld", &ExecuteJavaScriptInIsolatedWorld); - dict.SetMethod("_setIsolatedWorldSecurityOrigin", - &SetIsolatedWorldSecurityOrigin); - dict.SetMethod("_setIsolatedWorldContentSecurityPolicy", - &SetIsolatedWorldContentSecurityPolicy); - dict.SetMethod("_setIsolatedWorldHumanReadableName", - &SetIsolatedWorldHumanReadableName); dict.SetMethod("setIsolatedWorldInfo", &SetIsolatedWorldInfo); dict.SetMethod("getResourceUsage", &GetResourceUsage); dict.SetMethod("clearCache", &ClearCache); diff --git a/atom/renderer/atom_render_frame_observer.cc b/atom/renderer/atom_render_frame_observer.cc index f8a54a199e..4be1fb8536 100644 --- a/atom/renderer/atom_render_frame_observer.cc +++ b/atom/renderer/atom_render_frame_observer.cc @@ -21,6 +21,7 @@ #include "native_mate/dictionary.h" #include "net/base/net_module.h" #include "net/grit/net_resources.h" +#include "third_party/blink/public/platform/web_isolated_world_info.h" #include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/web_document.h" #include "third_party/blink/public/web/web_draggable_region.h" @@ -131,16 +132,14 @@ void AtomRenderFrameObserver::OnDestruct() { void AtomRenderFrameObserver::CreateIsolatedWorldContext() { auto* frame = render_frame_->GetWebFrame(); - + blink::WebIsolatedWorldInfo info; // This maps to the name shown in the context combo box in the Console tab // of the dev tools. - frame->SetIsolatedWorldHumanReadableName( - World::ISOLATED_WORLD, - blink::WebString::FromUTF8("Electron Isolated Context")); - + info.human_readable_name = + blink::WebString::FromUTF8("Electron Isolated Context"); // Setup document's origin policy in isolated world - frame->SetIsolatedWorldSecurityOrigin( - World::ISOLATED_WORLD, frame->GetDocument().GetSecurityOrigin()); + info.security_origin = frame->GetDocument().GetSecurityOrigin(); + frame->SetIsolatedWorldInfo(World::ISOLATED_WORLD, info); // Create initial script context in isolated world blink::WebScriptSource source("void 0"); diff --git a/lib/renderer/api/web-frame.js b/lib/renderer/api/web-frame.js index fd2b9ba571..4279d54933 100644 --- a/lib/renderer/api/web-frame.js +++ b/lib/renderer/api/web-frame.js @@ -53,17 +53,20 @@ class WebFrame extends EventEmitter { // TODO(nitsakh): Remove in 6.0 setIsolatedWorldSecurityOrigin (worldId, securityOrigin) { deprecate.warn('webFrame.setIsolatedWorldSecurityOrigin', 'webFrame.setIsolatedWorldInfo') - binding._setIsolatedWorldSecurityOrigin(this.context, worldId, securityOrigin) + binding.setIsolatedWorldInfo(this.context, worldId, { securityOrigin }) } setIsolatedWorldContentSecurityPolicy (worldId, csp) { deprecate.warn('webFrame.setIsolatedWorldContentSecurityPolicy', 'webFrame.setIsolatedWorldInfo') - binding._setIsolatedWorldContentSecurityPolicy(this.context, worldId, csp) + binding.setIsolatedWorldInfo(this.context, worldId, { + securityOrigin: window.location.origin, + csp + }) } setIsolatedWorldHumanReadableName (worldId, name) { deprecate.warn('webFrame.setIsolatedWorldHumanReadableName', 'webFrame.setIsolatedWorldInfo') - binding._setIsolatedWorldHumanReadableName(this.context, worldId, name) + binding.setIsolatedWorldInfo(this.context, worldId, { name }) } } From 0e39ec688ad0ad7e7be342c66646c59e9d5e562d Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 03:08:23 +0530 Subject: [PATCH 17/52] More migration of ServiceContext to ServiceBinding https://chromium-review.googlesource.com/c/chromium/src/+/1357534 --- atom/utility/atom_content_utility_client.cc | 74 ++++++++++++++++----- atom/utility/atom_content_utility_client.h | 7 +- 2 files changed, 61 insertions(+), 20 deletions(-) diff --git a/atom/utility/atom_content_utility_client.cc b/atom/utility/atom_content_utility_client.cc index e98741ccb8..8192104d29 100644 --- a/atom/utility/atom_content_utility_client.cc +++ b/atom/utility/atom_content_utility_client.cc @@ -7,12 +7,14 @@ #include #include "base/command_line.h" +#include "base/threading/sequenced_task_runner_handle.h" #include "content/public/child/child_thread.h" #include "content/public/common/service_manager_connection.h" #include "content/public/common/simple_connection_filter.h" #include "content/public/utility/utility_thread.h" #include "services/proxy_resolver/proxy_resolver_service.h" #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h" +#include "services/service_manager/public/cpp/service.h" #include "services/service_manager/sandbox/switches.h" #if BUILDFLAG(ENABLE_PRINTING) @@ -30,6 +32,40 @@ namespace atom { +namespace { + +void RunServiceAsyncThenTerminateProcess( + std::unique_ptr service) { + service_manager::Service::RunAsyncUntilTermination( + std::move(service), + base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); })); +} + +std::unique_ptr CreateProxyResolverService( + service_manager::mojom::ServiceRequest request) { + return std::make_unique( + std::move(request)); +} + +using ServiceFactory = + base::OnceCallback()>; +void RunServiceOnIOThread(ServiceFactory factory) { + base::OnceClosure terminate_process = base::BindOnce( + base::IgnoreResult(&base::SequencedTaskRunner::PostTask), + base::SequencedTaskRunnerHandle::Get(), FROM_HERE, + base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); })); + content::ChildThread::Get()->GetIOTaskRunner()->PostTask( + FROM_HERE, + base::BindOnce( + [](ServiceFactory factory, base::OnceClosure terminate_process) { + service_manager::Service::RunAsyncUntilTermination( + std::move(factory).Run(), std::move(terminate_process)); + }, + std::move(factory), std::move(terminate_process))); +} + +} // namespace + AtomContentUtilityClient::AtomContentUtilityClient() : elevated_(false) { #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN) printing_handler_ = std::make_unique(); @@ -85,31 +121,35 @@ bool AtomContentUtilityClient::OnMessageReceived(const IPC::Message& message) { return false; } -void AtomContentUtilityClient::RegisterServices(StaticServiceMap* services) { - service_manager::EmbeddedServiceInfo proxy_resolver_info; - proxy_resolver_info.task_runner = - content::ChildThread::Get()->GetIOTaskRunner(); - proxy_resolver_info.factory = - base::BindRepeating(&proxy_resolver::ProxyResolverService::CreateService); - services->emplace(proxy_resolver::mojom::kProxyResolverServiceName, - proxy_resolver_info); +bool AtomContentUtilityClient::HandleServiceRequest( + const std::string& service_name, + service_manager::mojom::ServiceRequest request) { + if (service_name == proxy_resolver::mojom::kProxyResolverServiceName) { + RunServiceOnIOThread( + base::BindOnce(&CreateProxyResolverService, std::move(request))); + return true; + } -#if BUILDFLAG(ENABLE_PRINTING) - service_manager::EmbeddedServiceInfo printing_info; - printing_info.factory = - base::BindRepeating(&printing::PrintingService::CreateService); - services->emplace(printing::mojom::kChromePrintingServiceName, printing_info); -#endif + auto service = MaybeCreateMainThreadService(service_name, std::move(request)); + if (service) { + RunServiceAsyncThenTerminateProcess(std::move(service)); + return true; + } + + return false; } std::unique_ptr -AtomContentUtilityClient::HandleServiceRequest( +AtomContentUtilityClient::MaybeCreateMainThreadService( const std::string& service_name, service_manager::mojom::ServiceRequest request) { #if BUILDFLAG(ENABLE_PRINTING) if (service_name == printing::mojom::kServiceName) { - return printing::CreatePdfCompositorService(std::string(), - std::move(request)); + return printing::CreatePdfCompositorService(std::move(request)); + } + + if (service_name == printing::mojom::kChromePrintingServiceName) { + return std::make_unique(std::move(request)); } #endif diff --git a/atom/utility/atom_content_utility_client.h b/atom/utility/atom_content_utility_client.h index fc5f4a89d6..e41f53eebf 100644 --- a/atom/utility/atom_content_utility_client.h +++ b/atom/utility/atom_content_utility_client.h @@ -26,13 +26,14 @@ class AtomContentUtilityClient : public content::ContentUtilityClient { void UtilityThreadStarted() override; bool OnMessageReceived(const IPC::Message& message) override; - void RegisterServices(StaticServiceMap* services) override; - - std::unique_ptr HandleServiceRequest( + bool HandleServiceRequest( const std::string& service_name, service_manager::mojom::ServiceRequest request) override; private: + std::unique_ptr MaybeCreateMainThreadService( + const std::string& service_name, + service_manager::mojom::ServiceRequest request); #if BUILDFLAG(ENABLE_PRINTING) && defined(OS_WIN) std::unique_ptr printing_handler_; #endif From 52ef6d9ae4b7a4dddb3a009837564932037174dc Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 12:54:36 +0530 Subject: [PATCH 18/52] [Printing] Stop using GetUserAgent from non-browser process https://chromium-review.googlesource.com/c/chromium/src/+/1353052 --- atom/browser/common_web_contents_delegate.cc | 1 + atom/renderer/renderer_client_base.cc | 7 +++++++ atom/renderer/renderer_client_base.h | 1 + 3 files changed, 9 insertions(+) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 114e484d50..b29086d80c 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -10,6 +10,7 @@ #include #include +#include "atom/browser/atom_browser_client.h" #include "atom/browser/atom_browser_context.h" #include "atom/browser/native_window.h" #include "atom/browser/ui/file_dialog.h" diff --git a/atom/renderer/renderer_client_base.cc b/atom/renderer/renderer_client_base.cc index 5b1c975bcd..d7682a2150 100644 --- a/atom/renderer/renderer_client_base.cc +++ b/atom/renderer/renderer_client_base.cc @@ -58,6 +58,7 @@ #if BUILDFLAG(ENABLE_PRINTING) #include "atom/renderer/printing/print_render_frame_helper_delegate.h" #include "components/printing/renderer/print_render_frame_helper.h" +#include "printing/print_settings.h" #endif // BUILDFLAG(ENABLE_PRINTING) namespace atom { @@ -288,6 +289,12 @@ bool RendererClientBase::IsKeySystemsUpdateNeeded() { #endif } +void RendererClientBase::DidSetUserAgent(const std::string& user_agent) { +#if BUILDFLAG(ENABLE_PRINTING) + printing::SetAgent(user_agent); +#endif +} + v8::Local RendererClientBase::GetContext( blink::WebLocalFrame* frame, v8::Isolate* isolate) const { diff --git a/atom/renderer/renderer_client_base.h b/atom/renderer/renderer_client_base.h index bba22357a7..508ad391ca 100644 --- a/atom/renderer/renderer_client_base.h +++ b/atom/renderer/renderer_client_base.h @@ -61,6 +61,7 @@ class RendererClientBase : public content::ContentRendererClient { std::vector>* key_systems) override; bool IsKeySystemsUpdateNeeded() override; + void DidSetUserAgent(const std::string& user_agent) override; private: std::unique_ptr preferences_manager_; From dd4a31633f81693a9b89eba81be2360cab05d954 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 13:22:00 +0530 Subject: [PATCH 19/52] split out color chooser browser dialog header https://chromium-review.googlesource.com/c/chromium/src/+/1395146 --- atom/browser/common_web_contents_delegate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index b29086d80c..6c104cc5b1 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -24,7 +24,7 @@ #include "base/threading/scoped_blocking_call.h" #include "base/threading/sequenced_task_runner_handle.h" #include "chrome/browser/ssl/security_state_tab_helper.h" -#include "chrome/browser/ui/browser_dialogs.h" +#include "chrome/browser/ui/color_chooser.h" #include "chrome/common/pref_names.h" #include "components/prefs/pref_service.h" #include "components/prefs/scoped_user_pref_update.h" From 547add94d0a92ac82d01ce408077e6349ed9e8f8 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 16:43:22 +0530 Subject: [PATCH 20/52] Make //ui/base/idle API synchronous https://chromium-review.googlesource.com/c/chromium/src/+/1379183 --- atom/browser/api/atom_api_power_monitor.cc | 16 ++++++------- atom/browser/api/atom_api_power_monitor.h | 6 ++--- lib/browser/api/power-monitor.js | 26 ++++++++++++++++++++++ 3 files changed, 36 insertions(+), 12 deletions(-) diff --git a/atom/browser/api/atom_api_power_monitor.cc b/atom/browser/api/atom_api_power_monitor.cc index bf19927078..c96eb15275 100644 --- a/atom/browser/api/atom_api_power_monitor.cc +++ b/atom/browser/api/atom_api_power_monitor.cc @@ -84,19 +84,19 @@ void PowerMonitor::OnResume() { Emit("resume"); } -void PowerMonitor::QuerySystemIdleState(v8::Isolate* isolate, - int idle_threshold, - const ui::IdleCallback& callback) { +ui::IdleState PowerMonitor::QuerySystemIdleState(v8::Isolate* isolate, + int idle_threshold) { if (idle_threshold > 0) { - ui::CalculateIdleState(idle_threshold, callback); + return ui::CalculateIdleState(idle_threshold); } else { isolate->ThrowException(v8::Exception::TypeError(mate::StringToV8( isolate, "Invalid idle threshold, must be greater than 0"))); + return ui::IDLE_STATE_UNKNOWN; } } -void PowerMonitor::QuerySystemIdleTime(const ui::IdleTimeCallback& callback) { - ui::CalculateIdleTime(callback); +int PowerMonitor::QuerySystemIdleTime() { + return ui::CalculateIdleTime(); } // static @@ -122,8 +122,8 @@ void PowerMonitor::BuildPrototype(v8::Isolate* isolate, .SetMethod("blockShutdown", &PowerMonitor::BlockShutdown) .SetMethod("unblockShutdown", &PowerMonitor::UnblockShutdown) #endif - .SetMethod("querySystemIdleState", &PowerMonitor::QuerySystemIdleState) - .SetMethod("querySystemIdleTime", &PowerMonitor::QuerySystemIdleTime); + .SetMethod("_querySystemIdleState", &PowerMonitor::QuerySystemIdleState) + .SetMethod("_querySystemIdleTime", &PowerMonitor::QuerySystemIdleTime); } } // namespace api diff --git a/atom/browser/api/atom_api_power_monitor.h b/atom/browser/api/atom_api_power_monitor.h index c7a6169d88..e1f08d0974 100644 --- a/atom/browser/api/atom_api_power_monitor.h +++ b/atom/browser/api/atom_api_power_monitor.h @@ -46,10 +46,8 @@ class PowerMonitor : public mate::TrackableObject, void OnResume() override; private: - void QuerySystemIdleState(v8::Isolate* isolate, - int idle_threshold, - const ui::IdleCallback& callback); - void QuerySystemIdleTime(const ui::IdleTimeCallback& callback); + ui::IdleState QuerySystemIdleState(v8::Isolate* isolate, int idle_threshold); + int QuerySystemIdleTime(); #if defined(OS_WIN) // Static callback invoked when a message comes in to our messaging window. diff --git a/lib/browser/api/power-monitor.js b/lib/browser/api/power-monitor.js index 5e3371dcc5..858521a9dd 100644 --- a/lib/browser/api/power-monitor.js +++ b/lib/browser/api/power-monitor.js @@ -22,4 +22,30 @@ if (process.platform === 'linux') { }) } +// TODO(deepak1556): Deprecate async api in favor of sync version in 5.0 +powerMonitor.querySystemIdleState = function (threshold, callback) { + if (typeof threshold !== 'number') { + throw new Error('Must pass threshold as a number') + } + + if (typeof callback !== 'function') { + throw new Error('Must pass callback as a function argument') + } + + const idleState = this._querySystemIdleState(threshold) + + process.nextTick(() => callback(idleState)) +} + +// TODO(deepak1556): Deprecate async api in favor of sync version in 5.0 +powerMonitor.querySystemIdleTime = function (callback) { + if (typeof callback !== 'function') { + throw new Error('Must pass function as an argument') + } + + const idleTime = this._querySystemIdleTime() + + process.nextTick(() => callback(idleTime)) +} + module.exports = powerMonitor From 3898a44e884505e2ba2d5bd521ff7e2e7f5676e4 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 16:54:48 +0530 Subject: [PATCH 21/52] Increase scope of URLLoader::FollowRedirect() API implementation. https://chromium-review.googlesource.com/c/chromium/src/+/1369856 --- atom/browser/net/atom_url_request.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/net/atom_url_request.cc b/atom/browser/net/atom_url_request.cc index 413f5387ab..e4967a1ec1 100644 --- a/atom/browser/net/atom_url_request.cc +++ b/atom/browser/net/atom_url_request.cc @@ -267,8 +267,8 @@ void AtomURLRequest::DoCancel() { void AtomURLRequest::DoFollowRedirect() { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); if (request_ && request_->is_redirecting() && redirect_policy_ == "manual") { - request_->FollowDeferredRedirect( - base::nullopt /* modified_request_headers */); + request_->FollowDeferredRedirect(base::nullopt /* removed_headers */, + base::nullopt /* modified_headers */); } } From e4cfc52c296dfe509c7ecedfeb5a9bcf2974551d Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 17:20:42 +0530 Subject: [PATCH 22/52] Remove const interfaces from content::RenderProcessHost. https://chromium-review.googlesource.com/c/chromium/src/+/1356004 --- atom/browser/api/atom_api_web_contents.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index fc16202174..6ea37533cd 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -1126,7 +1126,7 @@ void WebContents::SetBackgroundThrottling(bool allowed) { return; } - const auto* render_process_host = render_view_host->GetProcess(); + auto* render_process_host = render_view_host->GetProcess(); if (!render_process_host) { return; } From 61c46c6313d9b0c61624cc55c2d283f02a418b33 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 22 Jan 2019 20:40:36 +0530 Subject: [PATCH 23/52] Replace SiteInstance::IsSameWebSite() with a new non-static method. https://chromium-review.googlesource.com/c/chromium/src/+/1352856 --- atom/browser/atom_browser_client.cc | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 4941a19123..22e0d3656b 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -119,15 +119,14 @@ namespace { bool g_suppress_renderer_process_restart = false; bool IsSameWebSite(content::BrowserContext* browser_context, - const GURL& src_url, + content::SiteInstance* site_instance, const GURL& dest_url) { - return content::SiteInstance::IsSameWebSite(browser_context, src_url, - dest_url) || - // `IsSameWebSite` doesn't seem to work for some URIs such as `file:`, - // handle these scenarios by comparing only the site as defined by - // `GetSiteForURL`. - content::SiteInstance::GetSiteForURL(browser_context, dest_url) == - src_url; + return site_instance->IsSameSiteWithURL(dest_url) || + // `IsSameSiteWithURL` doesn't seem to work for some URIs such as + // `file:`, handle these scenarios by comparing only the site as + // defined by `GetSiteForURL`. + (content::SiteInstance::GetSiteForURL(browser_context, dest_url) == + site_instance->GetSiteURL()); } AtomBrowserClient* g_browser_client = nullptr; @@ -226,8 +225,7 @@ bool AtomBrowserClient::ShouldForceNewSiteInstance( } // Create new a SiteInstance if navigating to a different site. - auto src_url = current_instance->GetSiteURL(); - return !IsSameWebSite(browser_context, src_url, url); + return !IsSameWebSite(browser_context, current_instance, url); } bool AtomBrowserClient::NavigationWasRedirectedCrossSite( @@ -238,13 +236,12 @@ bool AtomBrowserClient::NavigationWasRedirectedCrossSite( bool has_response_started) const { bool navigation_was_redirected = false; if (has_response_started) { - navigation_was_redirected = !IsSameWebSite( - browser_context, current_instance->GetSiteURL(), dest_url); + navigation_was_redirected = + !IsSameWebSite(browser_context, current_instance, dest_url); } else { navigation_was_redirected = speculative_instance && - !IsSameWebSite(browser_context, speculative_instance->GetSiteURL(), - dest_url); + !IsSameWebSite(browser_context, speculative_instance, dest_url); } return navigation_was_redirected; @@ -308,7 +305,7 @@ content::SiteInstance* AtomBrowserClient::GetSiteInstanceFromAffinity( auto iter = site_per_affinities_.find(affinity); GURL dest_site = content::SiteInstance::GetSiteForURL(browser_context, url); if (iter != site_per_affinities_.end() && - IsSameWebSite(browser_context, iter->second->GetSiteURL(), dest_site)) { + IsSameWebSite(browser_context, iter->second, dest_site)) { return iter->second; } } From 9b82e7d27b077e98a7bad94fb3216af7f45550ee Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 23 Jan 2019 00:24:18 +0530 Subject: [PATCH 24/52] Change DevToolsEmbedderMessageDispatcher to use unique_ptr instead of raw pointers. https://chromium-review.googlesource.com/c/chromium/src/+/1382701 --- atom/browser/ui/inspectable_web_contents_impl.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/ui/inspectable_web_contents_impl.cc b/atom/browser/ui/inspectable_web_contents_impl.cc index 27b90fcaf6..08e51b118e 100644 --- a/atom/browser/ui/inspectable_web_contents_impl.cc +++ b/atom/browser/ui/inspectable_web_contents_impl.cc @@ -321,8 +321,8 @@ void InspectableWebContentsImpl::ShowDevTools(bool activate) { // Show devtools only after it has done loading, this is to make sure the // SetIsDocked is called *BEFORE* ShowDevTools. - embedder_message_dispatcher_.reset( - DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(this)); + embedder_message_dispatcher_ = + DevToolsEmbedderMessageDispatcher::CreateForDevToolsFrontend(this); if (!external_devtools_web_contents_) { // no external devtools managed_devtools_web_contents_ = content::WebContents::Create( From 315f8c0cc7adce2420de9e1df9d4bff3ca134e68 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 23 Jan 2019 00:26:19 +0530 Subject: [PATCH 25/52] DevToolsFrontendHost::Create to return unique_ptr instead of raw pointer https://chromium-review.googlesource.com/c/chromium/src/+/1396614 --- atom/browser/ui/inspectable_web_contents_impl.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/browser/ui/inspectable_web_contents_impl.cc b/atom/browser/ui/inspectable_web_contents_impl.cc index 08e51b118e..3e080d1e4b 100644 --- a/atom/browser/ui/inspectable_web_contents_impl.cc +++ b/atom/browser/ui/inspectable_web_contents_impl.cc @@ -732,10 +732,10 @@ void InspectableWebContentsImpl::RenderFrameHostChanged( content::RenderFrameHost* new_host) { if (new_host->GetParent()) return; - frontend_host_.reset(content::DevToolsFrontendHost::Create( + frontend_host_ = content::DevToolsFrontendHost::Create( new_host, base::Bind(&InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend, - weak_factory_.GetWeakPtr()))); + weak_factory_.GetWeakPtr())); } void InspectableWebContentsImpl::WebContentsDestroyed() { @@ -836,11 +836,11 @@ void InspectableWebContentsImpl::ReadyToCommitNavigation( frontend_host_) { return; } - frontend_host_.reset(content::DevToolsFrontendHost::Create( + frontend_host_ = content::DevToolsFrontendHost::Create( web_contents()->GetMainFrame(), base::Bind( &InspectableWebContentsImpl::HandleMessageFromDevToolsFrontend, - base::Unretained(this)))); + base::Unretained(this))); return; } } From 1d21e9c35da45d40fa2e30b784ba142e122e7cec Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 23 Jan 2019 01:20:25 +0530 Subject: [PATCH 26/52] Move client hints to content https://chromium-review.googlesource.com/c/chromium/src/+/1376709 --- atom/browser/atom_browser_context.cc | 6 ++++++ atom/browser/atom_browser_context.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/atom/browser/atom_browser_context.cc b/atom/browser/atom_browser_context.cc index 9d4ac92f1b..d8e805d4cd 100644 --- a/atom/browser/atom_browser_context.cc +++ b/atom/browser/atom_browser_context.cc @@ -37,6 +37,7 @@ #include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "components/proxy_config/proxy_config_pref_names.h" #include "content/browser/blob_storage/chrome_blob_storage_context.h" +#include "content/public/browser/browser_thread.h" #include "content/public/browser/storage_partition.h" #include "net/base/escape.h" @@ -260,6 +261,11 @@ AtomBrowserContext::GetBrowsingDataRemoverDelegate() { return nullptr; } +content::ClientHintsControllerDelegate* +AtomBrowserContext::GetClientHintsControllerDelegate() { + return nullptr; +} + net::URLRequestContextGetter* AtomBrowserContext::CreateRequestContextForStoragePartition( const base::FilePath& partition_path, diff --git a/atom/browser/atom_browser_context.h b/atom/browser/atom_browser_context.h index 782d04f2a6..0a370377d3 100644 --- a/atom/browser/atom_browser_context.h +++ b/atom/browser/atom_browser_context.h @@ -88,6 +88,8 @@ class AtomBrowserContext content::ProtocolHandlerMap* protocol_handlers, content::URLRequestInterceptorScopedVector request_interceptors) override; net::URLRequestContextGetter* CreateMediaRequestContext() override; + content::ClientHintsControllerDelegate* GetClientHintsControllerDelegate() + override; CookieChangeNotifier* cookie_change_notifier() const { return cookie_change_notifier_.get(); From c2be0846c2f7855f213b2c128e1fbf0dfe3c1d5a Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 23 Jan 2019 03:45:07 +0530 Subject: [PATCH 27/52] chore: rm fix_test_compilation_error.patch --- patches/common/chromium/.patches | 1 - .../chromium/fix_test_compilation_error.patch | 363 ------------------ 2 files changed, 364 deletions(-) delete mode 100644 patches/common/chromium/fix_test_compilation_error.patch diff --git a/patches/common/chromium/.patches b/patches/common/chromium/.patches index 2b1db2270d..9bb068f1f6 100644 --- a/patches/common/chromium/.patches +++ b/patches/common/chromium/.patches @@ -69,5 +69,4 @@ content_allow_embedder_to_prevent_locking_scheme_registry.patch support_mixed_sandbox_with_zygote.patch disable_color_correct_rendering.patch disable_time_ticks_dcheck.patch -fix_test_compilation_error.patch autofill_size_calculation.patch diff --git a/patches/common/chromium/fix_test_compilation_error.patch b/patches/common/chromium/fix_test_compilation_error.patch deleted file mode 100644 index dd601f939d..0000000000 --- a/patches/common/chromium/fix_test_compilation_error.patch +++ /dev/null @@ -1,363 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Xianzhu Wang -Date: Thu, 6 Dec 2018 02:00:06 +0000 -Subject: Backport dedab04b5256f88ec4dbbbae9492941e8cf1221a which fixes - compilation error for the test files. - -This patch can be removed after updating to Chrome 73. - -diff --git a/third_party/blink/renderer/platform/graphics/paint/display_item_raster_invalidator_test.cc b/third_party/blink/renderer/platform/graphics/paint/display_item_raster_invalidator_test.cc -index 97ffe553cd1e620152126639a1589621abaad00e..771392a0137b3eeb465651a228201e4fa5fa7b8f 100644 ---- a/third_party/blink/renderer/platform/graphics/paint/display_item_raster_invalidator_test.cc -+++ b/third_party/blink/renderer/platform/graphics/paint/display_item_raster_invalidator_test.cc -@@ -8,13 +8,15 @@ - #include "third_party/blink/renderer/platform/graphics/paint/paint_artifact.h" - #include "third_party/blink/renderer/platform/graphics/paint/paint_controller_test.h" - #include "third_party/blink/renderer/platform/testing/paint_property_test_helpers.h" -+#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h" - #include "third_party/blink/renderer/platform/testing/test_paint_artifact.h" - - namespace blink { - - using ::testing::UnorderedElementsAre; - --class DisplayItemRasterInvalidatorTest : public PaintControllerTestBase { -+class DisplayItemRasterInvalidatorTest : public PaintControllerTestBase, -+ public PaintTestConfigurations { - protected: - DisplayItemRasterInvalidatorTest() : invalidator_([](const IntRect&) {}) {} - -@@ -26,6 +28,10 @@ class DisplayItemRasterInvalidatorTest : public PaintControllerTestBase { - // invalidation rects. - IntRect(0, 0, 20000, 20000), PropertyTreeState::Root()); - GetPaintController().FinishCycle(); -+ if (RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) { -+ GetPaintController().ClearPropertyTreeChangedStateTo( -+ PropertyTreeState::Root()); -+ } - - if (invalidator_.GetTracking()) - return invalidator_.GetTracking()->Invalidations(); -@@ -37,7 +43,9 @@ class DisplayItemRasterInvalidatorTest : public PaintControllerTestBase { - RasterInvalidator invalidator_; - }; - --TEST_F(DisplayItemRasterInvalidatorTest, RemoveItemInMiddle) { -+INSTANTIATE_PAINT_TEST_CASE_P(DisplayItemRasterInvalidatorTest); -+ -+TEST_P(DisplayItemRasterInvalidatorTest, RemoveItemInMiddle) { - FakeDisplayItemClient first("first", LayoutRect(100, 100, 300, 300)); - FakeDisplayItemClient second("second", LayoutRect(100, 100, 200, 200)); - GraphicsContext context(GetPaintController()); -@@ -60,7 +68,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, RemoveItemInMiddle) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SwapOrder) { -+TEST_P(DisplayItemRasterInvalidatorTest, SwapOrder) { - FakeDisplayItemClient first("first", LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient second("second", LayoutRect(100, 100, 50, 200)); - FakeDisplayItemClient unaffected("unaffected", LayoutRect(300, 300, 10, 10)); -@@ -91,7 +99,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SwapOrder) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderAndInvalidateFirst) { -+TEST_P(DisplayItemRasterInvalidatorTest, SwapOrderAndInvalidateFirst) { - FakeDisplayItemClient first("first", LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient second("second", LayoutRect(100, 100, 50, 200)); - FakeDisplayItemClient unaffected("unaffected", LayoutRect(300, 300, 10, 10)); -@@ -117,7 +125,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderAndInvalidateFirst) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderAndInvalidateSecond) { -+TEST_P(DisplayItemRasterInvalidatorTest, SwapOrderAndInvalidateSecond) { - FakeDisplayItemClient first("first", LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient second("second", LayoutRect(100, 100, 50, 200)); - FakeDisplayItemClient unaffected("unaffected", LayoutRect(300, 300, 10, 10)); -@@ -143,7 +151,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderAndInvalidateSecond) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderWithIncrementalInvalidation) { -+TEST_P(DisplayItemRasterInvalidatorTest, SwapOrderWithIncrementalInvalidation) { - FakeDisplayItemClient first("first", LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient second("second", LayoutRect(100, 100, 50, 200)); - FakeDisplayItemClient unaffected("unaffected", LayoutRect(300, 300, 10, 10)); -@@ -171,7 +179,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderWithIncrementalInvalidation) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, NewItemInMiddle) { -+TEST_P(DisplayItemRasterInvalidatorTest, NewItemInMiddle) { - FakeDisplayItemClient first("first", LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient second("second", LayoutRect(100, 100, 50, 200)); - FakeDisplayItemClient third("third", LayoutRect(125, 100, 200, 50)); -@@ -195,7 +203,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, NewItemInMiddle) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, Incremental) { -+TEST_P(DisplayItemRasterInvalidatorTest, Incremental) { - LayoutRect initial_rect(100, 100, 100, 100); - std::unique_ptr clients[6]; - for (size_t i = 0; i < base::size(clients); i++) { -@@ -259,7 +267,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, Incremental) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, AddRemoveFirstAndInvalidateSecond) { -+TEST_P(DisplayItemRasterInvalidatorTest, AddRemoveFirstAndInvalidateSecond) { - FakeDisplayItemClient chunk("chunk"); - FakeDisplayItemClient first("first", LayoutRect(100, 100, 150, 150)); - FakeDisplayItemClient second("second", LayoutRect(200, 200, 50, 50)); -@@ -304,7 +312,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, AddRemoveFirstAndInvalidateSecond) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, InvalidateFirstAndAddRemoveSecond) { -+TEST_P(DisplayItemRasterInvalidatorTest, InvalidateFirstAndAddRemoveSecond) { - FakeDisplayItemClient first("first", LayoutRect(100, 100, 150, 150)); - FakeDisplayItemClient second("second", LayoutRect(200, 200, 50, 50)); - GraphicsContext context(GetPaintController()); -@@ -351,7 +359,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, InvalidateFirstAndAddRemoveSecond) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderWithChildren) { -+TEST_P(DisplayItemRasterInvalidatorTest, SwapOrderWithChildren) { - FakeDisplayItemClient container1("container1", - LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient content1("content1", LayoutRect(100, 100, 50, 200)); -@@ -395,7 +403,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderWithChildren) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderWithChildrenAndInvalidation) { -+TEST_P(DisplayItemRasterInvalidatorTest, SwapOrderWithChildrenAndInvalidation) { - FakeDisplayItemClient container1("container1", - LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient content1("content1", LayoutRect(100, 100, 50, 200)); -@@ -443,7 +451,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderWithChildrenAndInvalidation) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderCrossingChunks) { -+TEST_P(DisplayItemRasterInvalidatorTest, SwapOrderCrossingChunks) { - FakeDisplayItemClient container1("container1", - LayoutRect(100, 100, 100, 100)); - FakeDisplayItemClient content1("content1", LayoutRect(100, 100, 50, 200)); -@@ -492,7 +500,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SwapOrderCrossingChunks) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, SkipCache) { -+TEST_P(DisplayItemRasterInvalidatorTest, SkipCache) { - FakeDisplayItemClient multicol("multicol", LayoutRect(100, 100, 200, 200)); - FakeDisplayItemClient content("content", LayoutRect(100, 100, 100, 100)); - GraphicsContext context(GetPaintController()); -@@ -549,7 +557,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, SkipCache) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, PartialSkipCache) { -+TEST_P(DisplayItemRasterInvalidatorTest, PartialSkipCache) { - FakeDisplayItemClient content("content", LayoutRect(100, 100, 250, 250)); - GraphicsContext context(GetPaintController()); - -@@ -581,7 +589,7 @@ TEST_F(DisplayItemRasterInvalidatorTest, PartialSkipCache) { - invalidator_.SetTracksRasterInvalidations(false); - } - --TEST_F(DisplayItemRasterInvalidatorTest, Partial) { -+TEST_P(DisplayItemRasterInvalidatorTest, Partial) { - FakeDisplayItemClient client("client", LayoutRect(100, 100, 300, 300)); - GraphicsContext context(GetPaintController()); - -diff --git a/third_party/blink/renderer/platform/graphics/paint/raster_invalidator_test.cc b/third_party/blink/renderer/platform/graphics/paint/raster_invalidator_test.cc -index 13cbaaab2ea04726d0a2461fbd8e78e865443ce4..6a7e25139ad4848e14cb1548105eff2cdfdb94a1 100644 ---- a/third_party/blink/renderer/platform/graphics/paint/raster_invalidator_test.cc -+++ b/third_party/blink/renderer/platform/graphics/paint/raster_invalidator_test.cc -@@ -8,13 +8,15 @@ - #include "third_party/blink/renderer/platform/graphics/paint/geometry_mapper.h" - #include "third_party/blink/renderer/platform/graphics/paint/paint_artifact.h" - #include "third_party/blink/renderer/platform/testing/paint_property_test_helpers.h" -+#include "third_party/blink/renderer/platform/testing/paint_test_configurations.h" - #include "third_party/blink/renderer/platform/testing/test_paint_artifact.h" - - namespace blink { - - static const IntRect kDefaultLayerBounds(-9999, -7777, 18888, 16666); - --class RasterInvalidatorTest : public testing::Test { -+class RasterInvalidatorTest : public testing::Test, -+ public PaintTestConfigurations { - public: - static PropertyTreeState DefaultPropertyTreeState() { - return PropertyTreeState::Root(); -@@ -31,6 +33,11 @@ class RasterInvalidatorTest : public testing::Test { - void FinishCycle(PaintArtifact& artifact) { - artifact.FinishCycle(); - ClearGeometryMapperCache(); -+ if (RuntimeEnabledFeatures::BlinkGenPropertyTreesEnabled()) { -+ // See PaintArtifact::FinishCycle() for the reason of doing this. -+ for (auto& chunk : artifact.PaintChunks()) -+ chunk.properties.ClearChangedToRoot(); -+ } - } - - static const Vector TrackedRasterInvalidations( -@@ -54,6 +61,8 @@ class RasterInvalidatorTest : public testing::Test { - [](const IntRect& rect) {}; - }; - -+INSTANTIATE_PAINT_TEST_CASE_P(RasterInvalidatorTest); -+ - #define EXPECT_CHUNK_INVALIDATION_CUSTOM( \ - invalidations, index, chunk, expected_reason, layer_offset, mapper) \ - do { \ -@@ -78,7 +87,7 @@ class RasterInvalidatorTest : public testing::Test { - EXPECT_EQ(PaintInvalidationReason::kIncremental, info.reason); \ - } while (false) - --TEST_F(RasterInvalidatorTest, ImplicitFullLayerInvalidation) { -+TEST_P(RasterInvalidatorTest, ImplicitFullLayerInvalidation) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - auto artifact = TestPaintArtifact().Chunk(0).Build(); - -@@ -94,7 +103,7 @@ TEST_F(RasterInvalidatorTest, ImplicitFullLayerInvalidation) { - invalidator.SetTracksRasterInvalidations(false); - } - --TEST_F(RasterInvalidatorTest, LayerBounds) { -+TEST_P(RasterInvalidatorTest, LayerBounds) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - auto artifact = TestPaintArtifact().Chunk(0).Build(); - -@@ -122,7 +131,7 @@ TEST_F(RasterInvalidatorTest, LayerBounds) { - FinishCycle(*artifact); - } - --TEST_F(RasterInvalidatorTest, ReorderChunks) { -+TEST_P(RasterInvalidatorTest, ReorderChunks) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - auto artifact = TestPaintArtifact().Chunk(0).Chunk(1).Chunk(2).Build(); - invalidator.Generate(artifact, kDefaultLayerBounds, -@@ -150,7 +159,7 @@ TEST_F(RasterInvalidatorTest, ReorderChunks) { - FinishCycle(*new_artifact); - } - --TEST_F(RasterInvalidatorTest, ReorderChunkSubsequences) { -+TEST_P(RasterInvalidatorTest, ReorderChunkSubsequences) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - auto artifact = - TestPaintArtifact().Chunk(0).Chunk(1).Chunk(2).Chunk(3).Chunk(4).Build(); -@@ -185,7 +194,7 @@ TEST_F(RasterInvalidatorTest, ReorderChunkSubsequences) { - FinishCycle(*new_artifact); - } - --TEST_F(RasterInvalidatorTest, ChunkAppearAndDisappear) { -+TEST_P(RasterInvalidatorTest, ChunkAppearAndDisappear) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - auto artifact = TestPaintArtifact().Chunk(0).Chunk(1).Chunk(2).Build(); - invalidator.Generate(artifact, kDefaultLayerBounds, -@@ -210,7 +219,7 @@ TEST_F(RasterInvalidatorTest, ChunkAppearAndDisappear) { - FinishCycle(*new_artifact); - } - --TEST_F(RasterInvalidatorTest, ChunkAppearAtEnd) { -+TEST_P(RasterInvalidatorTest, ChunkAppearAtEnd) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - auto artifact = TestPaintArtifact().Chunk(0).Build(); - invalidator.Generate(artifact, kDefaultLayerBounds, -@@ -230,7 +239,7 @@ TEST_F(RasterInvalidatorTest, ChunkAppearAtEnd) { - FinishCycle(*new_artifact); - } - --TEST_F(RasterInvalidatorTest, UncacheableChunks) { -+TEST_P(RasterInvalidatorTest, UncacheableChunks) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - auto artifact = - TestPaintArtifact().Chunk(0).Chunk(1).Uncacheable().Chunk(2).Build(); -@@ -254,7 +263,7 @@ TEST_F(RasterInvalidatorTest, UncacheableChunks) { - } - - // Tests the path based on ClipPaintPropertyNode::Changed(). --TEST_F(RasterInvalidatorTest, ClipPropertyChangeRounded) { -+TEST_P(RasterInvalidatorTest, ClipPropertyChangeRounded) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - FloatRoundedRect::Radii radii(FloatSize(1, 2), FloatSize(2, 3), - FloatSize(3, 4), FloatSize(4, 5)); -@@ -316,7 +325,7 @@ TEST_F(RasterInvalidatorTest, ClipPropertyChangeRounded) { - } - - // Tests the path detecting change of PaintChunkInfo::chunk_to_layer_clip. --TEST_F(RasterInvalidatorTest, ClipPropertyChangeSimple) { -+TEST_P(RasterInvalidatorTest, ClipPropertyChangeSimple) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - FloatRoundedRect clip_rect(-1000, -1000, 2000, 2000); - auto clip0 = CreateClip(c0(), &t0(), clip_rect); -@@ -385,7 +394,7 @@ TEST_F(RasterInvalidatorTest, ClipPropertyChangeSimple) { - FinishCycle(*artifact); - } - --TEST_F(RasterInvalidatorTest, ClipLocalTransformSpaceChange) { -+TEST_P(RasterInvalidatorTest, ClipLocalTransformSpaceChange) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - - auto t1 = CreateTransform(t0(), TransformationMatrix()); -@@ -422,7 +431,7 @@ TEST_F(RasterInvalidatorTest, ClipLocalTransformSpaceChange) { - // This is based on ClipLocalTransformSpaceChange, but tests the no-invalidation - // path by letting the clip's LocalTransformSpace be the same as the chunk's - // transform. --TEST_F(RasterInvalidatorTest, ClipLocalTransformSpaceChangeNoInvalidation) { -+TEST_P(RasterInvalidatorTest, ClipLocalTransformSpaceChangeNoInvalidation) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - - auto t1 = CreateTransform(t0(), TransformationMatrix()); -@@ -453,7 +462,7 @@ TEST_F(RasterInvalidatorTest, ClipLocalTransformSpaceChangeNoInvalidation) { - FinishCycle(*artifact); - } - --TEST_F(RasterInvalidatorTest, TransformPropertyChange) { -+TEST_P(RasterInvalidatorTest, TransformPropertyChange) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - - auto layer_transform = CreateTransform(t0(), TransformationMatrix().Scale(5)); -@@ -534,7 +543,7 @@ TEST_F(RasterInvalidatorTest, TransformPropertyChange) { - FinishCycle(*artifact); - } - --TEST_F(RasterInvalidatorTest, TransformPropertyTinyChange) { -+TEST_P(RasterInvalidatorTest, TransformPropertyTinyChange) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - - auto layer_transform = CreateTransform(t0(), TransformationMatrix().Scale(5)); -@@ -580,7 +589,7 @@ TEST_F(RasterInvalidatorTest, TransformPropertyTinyChange) { - EXPECT_TRUE(invalidated); - } - --TEST_F(RasterInvalidatorTest, TransformPropertyTinyChangeScale) { -+TEST_P(RasterInvalidatorTest, TransformPropertyTinyChangeScale) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - - auto layer_transform = CreateTransform(t0(), TransformationMatrix().Scale(5)); -@@ -621,7 +630,7 @@ TEST_F(RasterInvalidatorTest, TransformPropertyTinyChangeScale) { - FinishCycle(*artifact); - } - --TEST_F(RasterInvalidatorTest, EffectLocalTransformSpaceChange) { -+TEST_P(RasterInvalidatorTest, EffectLocalTransformSpaceChange) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - - auto t1 = CreateTransform(t0(), TransformationMatrix()); -@@ -659,7 +668,7 @@ TEST_F(RasterInvalidatorTest, EffectLocalTransformSpaceChange) { - // This is based on EffectLocalTransformSpaceChange, but tests the no- - // invalidation path by letting the effect's LocalTransformSpace be the same as - // the chunk's transform. --TEST_F(RasterInvalidatorTest, EffectLocalTransformSpaceChangeNoInvalidation) { -+TEST_P(RasterInvalidatorTest, EffectLocalTransformSpaceChangeNoInvalidation) { - RasterInvalidator invalidator(kNoopRasterInvalidation); - - auto t1 = CreateTransform(t0(), TransformationMatrix()); From 10850808e9961a98341683fb5c7ca0580daeb3b5 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 24 Jan 2019 15:12:21 +0530 Subject: [PATCH 28/52] chore: roll 73.0.3679.0 --- DEPS | 2 +- patches/common/chromium/add_realloc.patch | 4 +- .../chromium/allow_webview_file_url.patch | 4 +- ...ink-worker-enable-csp-in-file-scheme.patch | 4 +- .../common/chromium/blink_local_frame.patch | 2 +- .../common/chromium/blink_world_context.patch | 2 +- .../common/chromium/can_create_window.patch | 16 ++--- .../common/chromium/compositor_delegate.patch | 4 +- ...cross_site_document_resource_handler.patch | 4 +- .../common/chromium/disable-redraw-lock.patch | 2 +- .../disable_color_correct_rendering.patch | 48 +++++++-------- patches/common/chromium/disable_hidden.patch | 6 +- ...requirement_for_beforeunload_dialogs.patch | 4 +- .../chromium/enable_osr_components.patch | 2 +- .../exclude-a-few-test-files-from-build.patch | 4 +- .../common/chromium/frame_host_manager.patch | 6 +- patches/common/chromium/gtk_visibility.patch | 4 +- .../common/chromium/mas_no_private_api.patch | 2 +- .../chromium/notification_provenance.patch | 4 +- patches/common/chromium/pepper_flash.patch | 2 +- patches/common/chromium/printing.patch | 58 +++++++++---------- .../render_widget_host_view_mac.patch | 2 +- .../support_mixed_sandbox_with_zygote.patch | 4 +- .../common/chromium/thread_capabilities.patch | 4 +- patches/common/chromium/web_contents.patch | 6 +- .../chromium/webgl_context_attributes.patch | 4 +- .../common/chromium/webview_cross_drag.patch | 6 +- .../worker_context_will_destroy.patch | 4 +- patches/common/config.json | 2 - patches/common/swiftshader/.patches | 1 - patches/common/swiftshader/fix_arm64.patch | 38 ------------ patches/common/v8/add_realloc.patch | 6 +- patches/common/v8/array_buffer.patch | 6 +- ...ild-torque-with-x64-toolchain-on-arm.patch | 6 +- patches/common/v8/build_gn.patch | 4 +- patches/common/v8/dcheck.patch | 10 ++-- ..._detailed_line_info_for_cpu_profiler.patch | 4 +- ...vide_more_v8_backwards_compatibility.patch | 12 ++-- ...ot_run_arm_arm64_mksnapshot_binaries.patch | 2 +- patches/common/v8/expose_mksnapshot.patch | 4 +- 40 files changed, 134 insertions(+), 175 deletions(-) delete mode 100644 patches/common/swiftshader/.patches delete mode 100644 patches/common/swiftshader/fix_arm64.patch diff --git a/DEPS b/DEPS index ffb6ea3b11..f37643b1cc 100644 --- a/DEPS +++ b/DEPS @@ -10,7 +10,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '73.0.3673.0', + '73.0.3679.0', 'node_version': 'ad2c89ec3be0f5db3ea02b0f591d36a5d84c51ad', diff --git a/patches/common/chromium/add_realloc.patch b/patches/common/chromium/add_realloc.patch index c9e6b49df2..21b86a7102 100644 --- a/patches/common/chromium/add_realloc.patch +++ b/patches/common/chromium/add_realloc.patch @@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f GIN_EXPORT static ArrayBufferAllocator* SharedInstance(); diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -index 544e1f638f5e23613dff785f5b74803f2831b960..07098f60eeea370e7a46df39a3877847e29f3a1a 100644 +index bec05f5222c6653f6f42c87a2f71e4aa0f244b5e..96533b347ca9e1e140fb019a2b95093d5e1aee73 100644 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc -@@ -662,6 +662,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { +@@ -649,6 +649,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { size, WTF::ArrayBufferContents::kDontInitialize); } diff --git a/patches/common/chromium/allow_webview_file_url.patch b/patches/common/chromium/allow_webview_file_url.patch index 3e2bdfe166..e0f8b83ef8 100644 --- a/patches/common/chromium/allow_webview_file_url.patch +++ b/patches/common/chromium/allow_webview_file_url.patch @@ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch Allow webview to load non-web URLs. diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc -index 14bfd604d8e4fb3935f22fcc2d60257cd680f3c7..99becfe8a77498bd7d557c1275773ff82f2df691 100644 +index 8a67808f690a2baf526f39095dd5e1122319ee91..1ab079b1fe97c506dca39b5b175f045394abae62 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc -@@ -1458,6 +1458,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( +@@ -1449,6 +1449,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( !policy->IsWebSafeScheme(info.common_params.url.scheme()) && !is_external_protocol; diff --git a/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch b/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch index 717f0d1a32..3c0bea0862 100644 --- a/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch +++ b/patches/common/chromium/blink-worker-enable-csp-in-file-scheme.patch @@ -5,10 +5,10 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -index 03b5004edc9dd9bba39db188c71f52625bcce80e..ad37ea96307be715070a21b859b8756e6d837132 100644 +index c404b0a5966416599a62075e0a616fda368e07ec..98a3e02f1335dd7256b7926bc6e7774c79e00d4a 100644 --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc -@@ -307,7 +307,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( +@@ -308,7 +308,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy( // document (which is implemented in WorkerMessagingProxy, and // m_contentSecurityPolicy should be left as nullptr to inherit the policy). if (!response.CurrentRequestUrl().ProtocolIs("blob") && diff --git a/patches/common/chromium/blink_local_frame.patch b/patches/common/chromium/blink_local_frame.patch index 1383b7c015..830f8dbad2 100644 --- a/patches/common/chromium/blink_local_frame.patch +++ b/patches/common/chromium/blink_local_frame.patch @@ -14,7 +14,7 @@ when there is code doing that. This patch reverts the change to fix the crash in Electron. diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index 7a728dc2c0d71579f4b7ed2c97cfedbd8e0590e6..af7e96da33bc4e77b2870b108896018ae92078b8 100644 +index e07ace500ef1dd60ce9833e7324e238de1018ae6..950c5ff5b14129ab2ca4b8c929ff583b5523b04b 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -403,10 +403,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { diff --git a/patches/common/chromium/blink_world_context.patch b/patches/common/chromium/blink_world_context.patch index 1b369ad363..7a92e81f89 100644 --- a/patches/common/chromium/blink_world_context.patch +++ b/patches/common/chromium/blink_world_context.patch @@ -19,7 +19,7 @@ index 0c72c57ac767b84626476e929308148714098c4e..1fb098418471a6c9919ec40792bbb867 // that the script evaluated to with callback. Script execution can be // suspend. diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc -index 96799bc7f05fd5dc9bf13153ad2abf03c4056be4..a3ceb250ba8648cbf59ad71194195e4f03f9bec2 100644 +index 5a9963e8ed555444a4995df22ba11cbb59fcf444..64e9262f04883a5d35ce671c422386e5b3d6420f 100644 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc @@ -888,6 +888,13 @@ v8::Local WebLocalFrameImpl::GlobalProxy() const { diff --git a/patches/common/chromium/can_create_window.patch b/patches/common/chromium/can_create_window.patch index 3631a59d88..5220eb6718 100644 --- a/patches/common/chromium/can_create_window.patch +++ b/patches/common/chromium/can_create_window.patch @@ -5,10 +5,10 @@ Subject: can_create_window.patch diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index a76dcf7c0197a146ac060cabcdf8f0d77b7d80f1..b9871c1fb327352dd9c83a751efea0052cc1e997 100644 +index 1a023385a3d27d9145f2a0a069ff6799c69ec66a..30328f5e62b4fdbb423a97454ee0591c076ac6bc 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -3664,6 +3664,38 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -3669,6 +3669,38 @@ void RenderFrameHostImpl::CreateNewWindow( "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url", params->target_url.possibly_invalid_spec()); @@ -47,7 +47,7 @@ index a76dcf7c0197a146ac060cabcdf8f0d77b7d80f1..b9871c1fb327352dd9c83a751efea005 bool no_javascript_access = false; // Filter out URLs to which navigation is disallowed from this context. -@@ -3692,6 +3724,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -3697,6 +3729,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -56,10 +56,10 @@ index a76dcf7c0197a146ac060cabcdf8f0d77b7d80f1..b9871c1fb327352dd9c83a751efea005 &no_javascript_access); diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc -index 0da371ff7af08265ff5a06c5fe8c3bea59b5f1ea..2f00c1e7fd7dd138c53c3eff3e0010f17db68ca3 100644 +index 8d01f4e181793677a1eee7585fd7c484767a58b0..01f7a49e7a559e6ae70a4311a2539bc4f60849d7 100644 --- a/content/browser/security_exploit_browsertest.cc +++ b/content/browser/security_exploit_browsertest.cc -@@ -387,6 +387,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, +@@ -364,6 +364,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New(); params->target_url = GURL("about:blank"); @@ -117,7 +117,7 @@ index e566a15b798e2586fa4fae3c4db97ce5f4f2f09f..8a08c7a79eba24bce7f11cf8c4994325 // Operation result when the renderer asks the browser to create a new window. diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index dc653fc3af345d20fbff9fc4c399bc1452c4850b..499c853a9a3d4c294ae0e6bfdb857ac67c31a144 100644 +index bce9b68c989da1e287b7e593e1ae281923d1a557..e2f2b8e8d09d1f14b58eb8b093042b89141cdd35 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -494,6 +494,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -130,7 +130,7 @@ index dc653fc3af345d20fbff9fc4c399bc1452c4850b..499c853a9a3d4c294ae0e6bfdb857ac6 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 2e5e199c4bc6ff6b1559f8c6f1e03e344fcb110b..384b51c1faa7045f2319854db59be27af779569d 100644 +index 92425b0bded161d513a3e39b8f9631d4c98c143c..5dc21230970fe23a25ad6e811d65c434760d1d1b 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -171,6 +171,7 @@ class RenderFrameHost; @@ -151,7 +151,7 @@ index 2e5e199c4bc6ff6b1559f8c6f1e03e344fcb110b..384b51c1faa7045f2319854db59be27a bool opener_suppressed, bool* no_javascript_access); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index ceb8568c9da3109dbc2f9a04cc8fc93e394d5294..bba68744d600f5f4482cf9cb3941f38a79478966 100644 +index ad23a9040c21a674c1b011e7120d4288a722f2bb..c16005d6e20b801217249ed8b902cb42d9223dc4 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -76,6 +76,7 @@ diff --git a/patches/common/chromium/compositor_delegate.patch b/patches/common/chromium/compositor_delegate.patch index ec50f97280..b4a22fd789 100644 --- a/patches/common/chromium/compositor_delegate.patch +++ b/patches/common/chromium/compositor_delegate.patch @@ -5,10 +5,10 @@ Subject: compositor_delegate.patch diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc -index 9d960547e17cc5459a2034f15de3c0f9e4ae92c7..fb9fb933ff19bf23224fb219e70039d99e42c0f8 100644 +index 5aeda7bd9caf6b5b9e2a95293e4409dc7f9a6d2d..d15e1462babe97b5d68014f4d67236653046aa5f 100644 --- a/content/browser/compositor/gpu_process_transport_factory.cc +++ b/content/browser/compositor/gpu_process_transport_factory.cc -@@ -482,10 +482,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( +@@ -485,10 +485,20 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( // surfaces as they are not following the correct mode. DisableGpuCompositing(compositor.get()); } diff --git a/patches/common/chromium/cross_site_document_resource_handler.patch b/patches/common/chromium/cross_site_document_resource_handler.patch index d26d9c1e57..3c85d5304f 100644 --- a/patches/common/chromium/cross_site_document_resource_handler.patch +++ b/patches/common/chromium/cross_site_document_resource_handler.patch @@ -22,7 +22,7 @@ index 7d5a3367774f558583ea69e60c46ab8636a19a81..190565b067ef869a332b77322dc62403 } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index cbd25b0f44a74671c924fd7a35f6fd84632c5f8c..aebf393cf0598335bc395c5584d4e7bcce6bf737 100644 +index 84b324992f22a65030b8badc05f6ce542929dea6..5703236f5ea937ebe3111fe79cf30f9ffb172a04 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -58,6 +58,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should @@ -37,7 +37,7 @@ index cbd25b0f44a74671c924fd7a35f6fd84632c5f8c..aebf393cf0598335bc395c5584d4e7bc const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index d2aa50c1e0ff84ef2313fa058b9ecc677cd20d5c..59d53c27e66e532e7531bf0e8ccee97800a759a5 100644 +index 031332e91cf38cb3d69cd73778a9e4a0701f7645..108c1e2f57b4fd86bbf819452da37da3cc96e5bb 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -237,6 +237,9 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/common/chromium/disable-redraw-lock.patch b/patches/common/chromium/disable-redraw-lock.patch index b543aef2c7..c9c3cc54f6 100644 --- a/patches/common/chromium/disable-redraw-lock.patch +++ b/patches/common/chromium/disable-redraw-lock.patch @@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue can be found at https://github.com/electron/electron/issues/1821 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc -index 66ddf5c2737785943c01adeb040b7da7d24ea624..a963ee677e4b3777ba6a8c6fcfd1bf0d8c7e07c8 100644 +index f3523d2a05c3f93215c6a78e81e015c4b965b758..39ff4f17822b4552218cb3a11c478eb22f0ada17 100644 --- a/ui/views/win/hwnd_message_handler.cc +++ b/ui/views/win/hwnd_message_handler.cc @@ -288,6 +288,10 @@ const int kSynthesizedMouseMessagesTimeDifference = 500; diff --git a/patches/common/chromium/disable_color_correct_rendering.patch b/patches/common/chromium/disable_color_correct_rendering.patch index a6f7c6c6ae..da9cb0d157 100644 --- a/patches/common/chromium/disable_color_correct_rendering.patch +++ b/patches/common/chromium/disable_color_correct_rendering.patch @@ -19,10 +19,10 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index 5413674c05060cfca539037fbe4a26316fbab504..970a259c5d04d5af7191958505e7806ffa2ece65 100644 +index bc110bfd003e41b1b170c4d8cd404ab0a88240e3..8979c777978216b6e0f7f89f19200afc57f08012 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc -@@ -1570,6 +1570,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( +@@ -1569,6 +1569,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( } RasterColorSpace LayerTreeHostImpl::GetRasterColorSpace() const { @@ -47,10 +47,10 @@ index 9de6c5f5f45d7cb3e9141ffb480f6052090cc696..30f491ec4a2663d18bf22c27eff8dbbd // Image Decode Service and raster tiles without images until the decode is // ready. diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h -index f9df82b198680b7069516ae2a4d65fe5f529fd35..1032b3646c9479d74ebd823739778ba884d70f30 100644 +index 2b8cd275a5ee29b665f1a0fb27105cf75eab13ed..3493572110e2dda18c57fe079174f0934fb288b9 100644 --- a/components/viz/common/display/renderer_settings.h +++ b/components/viz/common/display/renderer_settings.h -@@ -19,6 +19,7 @@ class VIZ_COMMON_EXPORT RendererSettings { +@@ -20,6 +20,7 @@ class VIZ_COMMON_EXPORT RendererSettings { RendererSettings(const RendererSettings& other); ~RendererSettings(); @@ -80,10 +80,10 @@ index e63d201943faf1b537df711299168d0378823bd0..fb5ca48f16b78a4d0a45cb57988d1d94 !command_line->HasSwitch(switches::kUIDisablePartialSwap); #if defined(OS_WIN) diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc -index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7d88fc7d0 100644 +index 6ee04d0919d9b4ae5e2d6719f1417f00a3d600fa..62c0b5da24e02102b268429b1d8e3654064300fc 100644 --- a/components/viz/service/display/gl_renderer.cc +++ b/components/viz/service/display/gl_renderer.cc -@@ -77,6 +77,9 @@ +@@ -78,6 +78,9 @@ using gpu::gles2::GLES2Interface; @@ -93,7 +93,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 namespace viz { namespace { -@@ -521,8 +524,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, +@@ -523,8 +526,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad, void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) { SetBlendEnabled(quad->ShouldDrawWithBlending()); @@ -105,7 +105,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 // Use the full quad_rect for debug quads to not move the edges based on // partial swaps. -@@ -1321,7 +1325,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, +@@ -1326,7 +1330,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params, tex_coord_precision, sampler_type, shader_blend_mode, params->use_aa ? USE_AA : NO_AA, mask_mode, mask_for_background, params->use_color_matrix, tint_gl_composited_content_), @@ -115,7 +115,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 } void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) { -@@ -1784,8 +1789,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, +@@ -1789,8 +1794,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad, gfx::ColorSpace quad_color_space = gfx::ColorSpace::CreateSRGB(); SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA, tint_gl_composited_content_), @@ -126,7 +126,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 SetShaderColor(color, opacity); if (current_program_->tint_color_matrix_location() != -1) { -@@ -1935,8 +1940,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, +@@ -1940,8 +1945,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad, quad->is_premultiplied ? PREMULTIPLIED_ALPHA : NON_PREMULTIPLIED_ALPHA, false, false, tint_gl_composited_content_), @@ -137,7 +137,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2024,8 +2029,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, +@@ -2029,8 +2034,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad, : NON_PREMULTIPLIED_ALPHA, !quad->ShouldDrawWithBlending(), has_tex_clamp_rect, tint_gl_composited_content_), @@ -148,7 +148,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 if (current_program_->tint_color_matrix_location() != -1) { auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix(); -@@ -2120,7 +2125,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, +@@ -2125,7 +2130,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad, DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB()); gfx::ColorSpace dst_color_space = @@ -157,7 +157,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 // Force sRGB output on Windows for overlay candidate video quads to match // DirectComposition behavior in case these switch between overlays and // compositing. See https://crbug.com/811118 for details. -@@ -2268,8 +2273,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, +@@ -2273,8 +2278,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad, quad->resource_id()); SetUseProgram(ProgramKey::VideoStream(tex_coord_precision), @@ -168,7 +168,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id()); -@@ -2321,8 +2326,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { +@@ -2326,8 +2331,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) { draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR); // Bind the program to the GL state. @@ -179,7 +179,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_)); gl_->BindTexture(locked_quad.target(), locked_quad.texture_id()); -@@ -2977,7 +2982,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) { +@@ -2982,7 +2987,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) { void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color, const gfx::ColorSpace& src_color_space, const gfx::ColorSpace& dst_color_space) { @@ -190,7 +190,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 ProgramKey program_key = program_key_no_color; const gfx::ColorTransform* color_transform = -@@ -3331,7 +3338,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( +@@ -3336,7 +3343,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource( *overlay_texture = FindOrCreateOverlayTexture( params.quad->render_pass_id, iosurface_width, iosurface_height, @@ -199,7 +199,7 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 *new_bounds = gfx::RectF(updated_dst_rect.origin(), gfx::SizeF((*overlay_texture)->texture.size())); -@@ -3535,8 +3542,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { +@@ -3540,8 +3547,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) { PrepareGeometry(SHARED_BINDING); @@ -211,17 +211,17 @@ index e7c6461cf2928282285adfebbd4eb17c1f11b015..893cd866af94a206ff98abac97f6bdd7 gfx::Transform render_matrix; render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(), -@@ -3696,3 +3704,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize( +@@ -3701,3 +3709,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize( } } // namespace viz + +#undef PATCH_CS diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc -index cf3b497ef8415e351adf4821f3e6fc5714249178..3dbda6a3ca1ed4726e136fdb2ae83453d65284a3 100644 +index 54e1614d979ef2afa5e23404541cfc2d1227e17d..97190566b60140cbdac43a5c57deb03e1fc48982 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc -@@ -709,9 +709,11 @@ void SkiaRenderer::DrawPictureQuad(const PictureDrawQuad* quad, +@@ -707,9 +707,11 @@ void SkiaRenderer::DrawPictureQuad(const PictureDrawQuad* quad, std::unique_ptr color_transform_canvas; // TODO(enne): color transform needs to be replicated in gles2_cmd_decoder @@ -268,7 +268,7 @@ index 4aa391a6bfe2408b84da4ffe5b3dc27a0544d0ca..649efb7ed16e6f4850010c8b9df5d0b7 service_manager::switches::kGpuSandboxAllowSysVShm, service_manager::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index f341e362a338595d617e28d9273cb4d47940dd7b..4c5d49d24962ca36cb31cee00f91d36d2433d19d 100644 +index ecbfc65e474409a0d073362d6734047b098d2c7f..2aa5ba9d51adda083a5eeac2c200b2ffba106b21 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -221,6 +221,7 @@ @@ -279,7 +279,7 @@ index f341e362a338595d617e28d9273cb4d47940dd7b..4c5d49d24962ca36cb31cee00f91d36d #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" -@@ -3012,6 +3013,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3052,6 +3053,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { @@ -288,10 +288,10 @@ index f341e362a338595d617e28d9273cb4d47940dd7b..4c5d49d24962ca36cb31cee00f91d36d network::switches::kExplicitlyAllowedPorts, service_manager::switches::kDisableInProcessStackTraces, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc -index a03ed6d9462933bf0749e2cf5964f3abb40ec657..95d2701f64c231619e559ada41a3212122899dab 100644 +index 6d5833dc1bef727aba4c012563c3e161a9dab9ae..3215ab16ad51e7d519baa1e82fd0a9c489b8e31a 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc -@@ -2601,6 +2601,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( +@@ -2641,6 +2641,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); diff --git a/patches/common/chromium/disable_hidden.patch b/patches/common/chromium/disable_hidden.patch index 4a5e5e9ee1..e4b0bb9378 100644 --- a/patches/common/chromium/disable_hidden.patch +++ b/patches/common/chromium/disable_hidden.patch @@ -5,10 +5,10 @@ Subject: disable_hidden.patch diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 17a49b9497b6c4f64bd384e932b8786f536e4982..92becaca36b8e536b9a856aa9f48f6dad0442fa6 100644 +index 801517c670e4cfb5adcfa0a14d2626c2be90e833..e63f00a1c4013f1e07f3b1adcdb34ea24eac3916 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -760,6 +760,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -763,6 +763,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -19,7 +19,7 @@ index 17a49b9497b6c4f64bd384e932b8786f536e4982..92becaca36b8e536b9a856aa9f48f6da TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden"); diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h -index 3c8816a1e740a113317b7924dbb07e75d8b3f18a..6ec259f3508dd63e601b5fc5e8c7d6dec5acf66a 100644 +index 4fd95dc7bdcd99342bd110d46b5829eb784e0f40..47af7e316c36c2f1733721170a6eff7fae39fa77 100644 --- a/content/browser/renderer_host/render_widget_host_impl.h +++ b/content/browser/renderer_host/render_widget_host_impl.h @@ -153,6 +153,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl diff --git a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch index 067fd5c6dd..4110fae10f 100644 --- a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch +++ b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch @@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch See https://github.com/electron/electron/issues/10754 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc -index 848a439d6e7d4f54521621a00899354b2c63dd0c..142f24f566b963d5e1c7f89099e91136b5fb3f77 100644 +index 09418dad61316ad4534e8f9c71cc153ffc5e0ffd..20e90ed973b0de71c07cbcd21578d7eee8cab06e 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -3665,7 +3665,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, +@@ -3675,7 +3675,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, "frame that never had a user gesture since its load. " "https://www.chromestatus.com/feature/5082396709879808"; Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message); diff --git a/patches/common/chromium/enable_osr_components.patch b/patches/common/chromium/enable_osr_components.patch index 3fce2f1d84..2c96b6e42f 100644 --- a/patches/common/chromium/enable_osr_components.patch +++ b/patches/common/chromium/enable_osr_components.patch @@ -6,7 +6,7 @@ Subject: enable_osr_components.patch Add MouseWheelPhaseHandler for OSR. diff --git a/content/browser/renderer_host/input/mouse_wheel_phase_handler.h b/content/browser/renderer_host/input/mouse_wheel_phase_handler.h -index 305095fc420e1732bdf089dfeee7672f69d85167..f5ca4eda4a663b9297ce69e6a455d7554f1fbe5c 100644 +index fc252b6ceffd92e85f545f848bb8bde4e518cbd9..b0dfd847ec03ca7843d2c1c217b172213bed097c 100644 --- a/content/browser/renderer_host/input/mouse_wheel_phase_handler.h +++ b/content/browser/renderer_host/input/mouse_wheel_phase_handler.h @@ -7,6 +7,7 @@ diff --git a/patches/common/chromium/exclude-a-few-test-files-from-build.patch b/patches/common/chromium/exclude-a-few-test-files-from-build.patch index a24e6d2286..17862e37d7 100644 --- a/patches/common/chromium/exclude-a-few-test-files-from-build.patch +++ b/patches/common/chromium/exclude-a-few-test-files-from-build.patch @@ -7,10 +7,10 @@ Compilation of those files fails with the Chromium 68. Remove the patch during the Chromium 69 upgrade. diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index 0e2af5b005b740eb20ffdde67b050d049951615b..7aee0638efc5a050cf7b6825ebda953e556e1782 100644 +index 145086ca57c6b72512c01e612087d4e994991bcb..2ccb86380fa944a783e8f7c131ebe71db7022f2d 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn -@@ -1739,7 +1739,7 @@ jumbo_source_set("blink_platform_unittests_sources") { +@@ -1741,7 +1741,7 @@ jumbo_source_set("blink_platform_unittests_sources") { "graphics/paint/drawing_display_item_test.cc", "graphics/paint/drawing_recorder_test.cc", "graphics/paint/float_clip_rect_test.cc", diff --git a/patches/common/chromium/frame_host_manager.patch b/patches/common/chromium/frame_host_manager.patch index 380510f331..3b4ad54443 100644 --- a/patches/common/chromium/frame_host_manager.patch +++ b/patches/common/chromium/frame_host_manager.patch @@ -7,7 +7,7 @@ Allows embedder to intercept site instances chosen by chromium and respond with custom instance. diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc -index 75804f991fb2e75115de6408e50fe7328dc58ef9..0cbd955d3e4ff9196e6666fe0ab0b66ffe8c5261 100644 +index 53586512b68f79ebf9addf0d344a5a0785d89877..1417ce14d9e976da08c8924e32d2cb8e6408652b 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc @@ -1970,6 +1970,16 @@ bool RenderFrameHostManager::InitRenderView( @@ -108,7 +108,7 @@ index 75804f991fb2e75115de6408e50fe7328dc58ef9..0cbd955d3e4ff9196e6666fe0ab0b66f } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index 499c853a9a3d4c294ae0e6bfdb857ac67c31a144..cbd25b0f44a74671c924fd7a35f6fd84632c5f8c 100644 +index e2f2b8e8d09d1f14b58eb8b093042b89141cdd35..84b324992f22a65030b8badc05f6ce542929dea6 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -48,6 +48,16 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info, @@ -129,7 +129,7 @@ index 499c853a9a3d4c294ae0e6bfdb857ac67c31a144..cbd25b0f44a74671c924fd7a35f6fd84 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 384b51c1faa7045f2319854db59be27af779569d..d2aa50c1e0ff84ef2313fa058b9ecc677cd20d5c 100644 +index 5dc21230970fe23a25ad6e811d65c434760d1d1b..031332e91cf38cb3d69cd73778a9e4a0701f7645 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -206,8 +206,37 @@ CONTENT_EXPORT void OverrideOnBindInterface( diff --git a/patches/common/chromium/gtk_visibility.patch b/patches/common/chromium/gtk_visibility.patch index c451aa5520..107fb24abf 100644 --- a/patches/common/chromium/gtk_visibility.patch +++ b/patches/common/chromium/gtk_visibility.patch @@ -6,7 +6,7 @@ Subject: gtk_visibility.patch Allow electron to depend on GTK in the GN build. diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn -index a2b40d82674eec5c20f705ace36cf590d46b307a..98b93a08b9a0bdbbd68925e94bf4247666b69cc4 100644 +index fe2e10627f42c8355fd176ed24b54cfab916a72a..7b48b68de04c2cbfc4380e6e38c9ac07dbc7784a 100644 --- a/build/config/linux/gtk/BUILD.gn +++ b/build/config/linux/gtk/BUILD.gn @@ -26,6 +26,7 @@ group("gtk") { @@ -16,4 +16,4 @@ index a2b40d82674eec5c20f705ace36cf590d46b307a..98b93a08b9a0bdbbd68925e94bf42476 + "//electron:*", "//examples:peerconnection_client", "//gpu/gles2_conform_support:gles2_conform_test_windowless", - "//remoting/host", + "//remoting/host/linux", diff --git a/patches/common/chromium/mas_no_private_api.patch b/patches/common/chromium/mas_no_private_api.patch index 7f92e0c4bd..316757d4cf 100644 --- a/patches/common/chromium/mas_no_private_api.patch +++ b/patches/common/chromium/mas_no_private_api.patch @@ -277,7 +277,7 @@ index 6299846975301964c4066dff1a7eec40778e8d7f..c9c64e9ea8af9c02099695db38c27871 void BluetoothAdapterMac::RemovePairingDelegateInternal( diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn -index 9dc0255ab94c11f5cbfeb9a335460294a136e125..91ac682d1abc1e82641e73e3186ae0b47f5902c2 100644 +index 982904023e2538bbb3039e0014542248b6f589ca..f909eeb8ac8f876897dbbd233d6fd17636607974 100644 --- a/media/audio/BUILD.gn +++ b/media/audio/BUILD.gn @@ -186,6 +186,12 @@ source_set("audio") { diff --git a/patches/common/chromium/notification_provenance.patch b/patches/common/chromium/notification_provenance.patch index b55fff4519..ffe93ec682 100644 --- a/patches/common/chromium/notification_provenance.patch +++ b/patches/common/chromium/notification_provenance.patch @@ -106,10 +106,10 @@ index 653f487b0b0e01de7cdda8483f081550a9077e98..da9e5f53d07eaaf11525efd996be9420 // Removes |service| from the list of owned services, for example because the diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc -index 87ecafbac4bd9cdba9036238d3bd2bd4ae661e8a..75ed7fc917083e70194cee68ba19f8f8c4d20a28 100644 +index 8e4df0b15aebc30c517a8c99f20201d8148777e0..ad49782df16c92a6ed0f736a5980263de908c137 100644 --- a/content/browser/renderer_interface_binders.cc +++ b/content/browser/renderer_interface_binders.cc -@@ -182,7 +182,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { +@@ -189,7 +189,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() { RenderProcessHost* host, const url::Origin& origin) { static_cast(host->GetStoragePartition()) ->GetPlatformNotificationContext() diff --git a/patches/common/chromium/pepper_flash.patch b/patches/common/chromium/pepper_flash.patch index 2e41519bad..8171a13f82 100644 --- a/patches/common/chromium/pepper_flash.patch +++ b/patches/common/chromium/pepper_flash.patch @@ -435,7 +435,7 @@ index d63e90b6c5079ab3237c4bad3d5e63ce2f99c657..c98a7bd07ddd9527fc67b05b24463ed4 return nullptr; } diff --git a/chrome/renderer/pepper/pepper_flash_renderer_host.cc b/chrome/renderer/pepper/pepper_flash_renderer_host.cc -index 05aadc1737ec3b90448eb37dc0c3b98a2b93c2e4..6e688ded28cc802997f7cbd100a32966751f522e 100644 +index 880dd83122400909c2768c339ea1e8835b214406..2eab439f74e3d65c0a07c4aba7f2119b598037e8 100644 --- a/chrome/renderer/pepper/pepper_flash_renderer_host.cc +++ b/chrome/renderer/pepper/pepper_flash_renderer_host.cc @@ -13,7 +13,9 @@ diff --git a/patches/common/chromium/printing.patch b/patches/common/chromium/printing.patch index f48b38fbca..0b169b4de0 100644 --- a/patches/common/chromium/printing.patch +++ b/patches/common/chromium/printing.patch @@ -9,7 +9,7 @@ majority of changes originally come from these PRs: * https://github.com/electron/electron/pull/8596 diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc -index 1e2d43fb562522f7ebe50a8acc47645495f02436..1a04e1fff488dfde1cf8089ac9ba1b5acc646803 100644 +index 961e1560aa914942c01372c354059d6d6b72c50f..aa51b2b2b0e1950f7a660d48bda5e61ecea8951c 100644 --- a/chrome/browser/printing/print_job_worker.cc +++ b/chrome/browser/printing/print_job_worker.cc @@ -21,12 +21,12 @@ @@ -27,7 +27,7 @@ index 1e2d43fb562522f7ebe50a8acc47645495f02436..1a04e1fff488dfde1cf8089ac9ba1b5a #include "printing/printed_document.h" #include "printing/printing_utils.h" diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15bad85a33d 100644 +index cfd13b0ac5956fe28ab81bb3cd3d71ab6fdcb747..6d4d1e2e4478bb60a1c53458a3dc7d84cd28125c 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -27,10 +27,7 @@ @@ -66,7 +66,7 @@ index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15b } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -110,12 +111,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) +@@ -109,12 +110,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents) queue_(g_browser_process->print_job_manager()->queue()), weak_ptr_factory_(this) { DCHECK(queue_); @@ -81,7 +81,7 @@ index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15b } PrintViewManagerBase::~PrintViewManagerBase() { -@@ -123,12 +126,14 @@ PrintViewManagerBase::~PrintViewManagerBase() { +@@ -122,12 +125,14 @@ PrintViewManagerBase::~PrintViewManagerBase() { DisconnectFromCurrentPrintJob(); } @@ -99,7 +99,7 @@ index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15b } #if BUILDFLAG(ENABLE_PRINT_PREVIEW) -@@ -244,9 +249,9 @@ void PrintViewManagerBase::StartLocalPrintJob( +@@ -242,9 +247,9 @@ void PrintViewManagerBase::StartLocalPrintJob( void PrintViewManagerBase::UpdatePrintingEnabled() { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); // The Unretained() is safe because ForEachFrame() is synchronous. @@ -112,7 +112,7 @@ index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15b } void PrintViewManagerBase::NavigationStopped() { -@@ -338,7 +343,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) { +@@ -336,7 +341,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) { PrintManager::OnPrintingFailed(cookie); #if BUILDFLAG(ENABLE_PRINT_PREVIEW) @@ -121,7 +121,7 @@ index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15b #endif ReleasePrinterQuery(); -@@ -586,6 +591,9 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -585,6 +590,9 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; @@ -132,7 +132,7 @@ index 620c8907653c5757c7ab88d7f1c599a876800313..1ed8551cd851f04b59a0d517a8b0f15b return; diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h -index fa8d5a178aee2399c05d4f31b42edbc563883355..a6d1430c74e6d52abf3ceaf95678fef0135f566a 100644 +index a2569836d04ff968e690215f56f6de3b6d884874..6ddec22641b74d5484c2e0d4f62e5d71d8d783e9 100644 --- a/chrome/browser/printing/print_view_manager_base.h +++ b/chrome/browser/printing/print_view_manager_base.h @@ -39,6 +39,8 @@ class PrintJob; @@ -155,7 +155,7 @@ index fa8d5a178aee2399c05d4f31b42edbc563883355..a6d1430c74e6d52abf3ceaf95678fef0 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) // Prints the document in |print_data| with settings specified in -@@ -198,6 +202,9 @@ class PrintViewManagerBase : public content::NotificationObserver, +@@ -197,6 +201,9 @@ class PrintViewManagerBase : public content::NotificationObserver, // The current RFH that is printing with a system printing dialog. content::RenderFrameHost* printing_rfh_; @@ -166,7 +166,7 @@ index fa8d5a178aee2399c05d4f31b42edbc563883355..a6d1430c74e6d52abf3ceaf95678fef0 bool printing_succeeded_; diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc -index e415483aaee80c0c797b04f49b69060e33253546..77dce4d5acbc6c3d9e7167480771db7ca64314fc 100644 +index 8cf82aafd3fd2b8546b8fabfd8b2cc107846681d..07274855cf8311eb4f71a57b171cc04d66edbf31 100644 --- a/chrome/browser/printing/printing_message_filter.cc +++ b/chrome/browser/printing/printing_message_filter.cc @@ -22,6 +22,7 @@ @@ -218,9 +218,9 @@ index e415483aaee80c0c797b04f49b69060e33253546..77dce4d5acbc6c3d9e7167480771db7c printer_query = queue_->PopPrinterQuery(0); if (!printer_query.get()) { printer_query = -@@ -311,11 +317,13 @@ void PrintingMessageFilter::OnUpdatePrintSettings( - std::unique_ptr new_settings(job_settings.DeepCopy()); - +@@ -309,11 +315,13 @@ void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, + base::Value job_settings, + IPC::Message* reply_msg) { scoped_refptr printer_query; +#if 0 if (!is_printing_enabled_.GetValue()) { @@ -232,7 +232,7 @@ index e415483aaee80c0c797b04f49b69060e33253546..77dce4d5acbc6c3d9e7167480771db7c printer_query = queue_->PopPrinterQuery(document_cookie); if (!printer_query.get()) { printer_query = queue_->CreatePrinterQuery( -@@ -374,7 +382,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( +@@ -372,7 +380,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids, bool* cancel) { @@ -242,12 +242,12 @@ index e415483aaee80c0c797b04f49b69060e33253546..77dce4d5acbc6c3d9e7167480771db7c #endif diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h -index a881a853bfb0b46d0e074b7e86121429a5a761a3..0b41890bb9b5f10765c12158f6e8b7d373b335b9 100644 +index 63b71257e4ad25fa27b461969ffec0afb9505203..e18dfc55a02db46300fe96fda00199271d07ba7a 100644 --- a/chrome/browser/printing/printing_message_filter.h +++ b/chrome/browser/printing/printing_message_filter.h @@ -29,6 +29,10 @@ struct FileDescriptor; - #endif } + #endif +namespace content { +class BrowserContext; @@ -283,10 +283,10 @@ index 7dd892feb181293d3c52fb6a3fd9600c899ee2d3..1ca51744e1046e5dfbedf5af8c6f7535 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72cb76fa8e 100644 +index 0af11fbfa50e334af7926f7e98304960869415d3..d747dd0f2e162b1b4efa89a99ccc0f417202e8e8 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc -@@ -1114,7 +1114,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { +@@ -1115,7 +1115,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { web_frame->DispatchBeforePrintEvent(); if (!weak_this) return; @@ -297,7 +297,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 if (weak_this) web_frame->DispatchAfterPrintEvent(); } -@@ -1162,7 +1164,10 @@ void PrintRenderFrameHelper::OnDestruct() { +@@ -1163,7 +1165,10 @@ void PrintRenderFrameHelper::OnDestruct() { delete this; } @@ -309,7 +309,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 if (ipc_nesting_level_ > 1) return; -@@ -1175,7 +1180,8 @@ void PrintRenderFrameHelper::OnPrintPages() { +@@ -1176,7 +1181,8 @@ void PrintRenderFrameHelper::OnPrintPages() { // If we are printing a PDF extension frame, find the plugin node and print // that instead. auto plugin = delegate_->GetPdfElement(frame); @@ -319,7 +319,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 if (weak_this) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1192,7 +1198,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() { +@@ -1193,7 +1199,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() { } auto weak_this = weak_ptr_factory_.GetWeakPtr(); Print(frame, print_preview_context_.source_node(), @@ -328,7 +328,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 if (weak_this) frame->DispatchAfterPrintEvent(); // WARNING: |this| may be gone at this point. Do not do any more work here and -@@ -1228,6 +1234,8 @@ void PrintRenderFrameHelper::OnPrintPreview( +@@ -1229,6 +1235,8 @@ void PrintRenderFrameHelper::OnPrintPreview( if (ipc_nesting_level_ > 1) return; @@ -337,7 +337,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 print_preview_context_.OnPrintPreview(); UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent", -@@ -1622,7 +1630,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1623,7 +1631,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { auto self = weak_ptr_factory_.GetWeakPtr(); Print(duplicate_node.GetDocument().GetFrame(), duplicate_node, @@ -349,7 +349,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 // Check if |this| is still valid. if (!self) return; -@@ -1633,7 +1644,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { +@@ -1634,7 +1645,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) { void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, const blink::WebNode& node, @@ -361,7 +361,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 // If still not finished with earlier print request simply ignore. if (prep_frame_view_) return; -@@ -1646,7 +1660,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1647,7 +1661,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, } int expected_page_count = 0; @@ -370,7 +370,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 DidFinishPrinting(FAIL_PRINT_INIT); return; // Failed to init print page settings. } -@@ -1666,8 +1680,9 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1667,8 +1681,9 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, PrintMsg_PrintPages_Params print_settings; auto self = weak_ptr_factory_.GetWeakPtr(); @@ -382,7 +382,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 // Check if |this| is still valid. if (!self) return; -@@ -1677,6 +1692,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, +@@ -1678,6 +1693,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame, ? blink::kWebPrintScalingOptionSourceSize : scaling_option; SetPrintPagesParams(print_settings); @@ -390,7 +390,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 if (print_settings.params.dpi.IsEmpty() || !print_settings.params.document_cookie) { DidFinishPrinting(OK); // Release resources and fail silently on failure. -@@ -1867,10 +1883,24 @@ std::vector PrintRenderFrameHelper::GetPrintedPages( +@@ -1868,10 +1884,24 @@ std::vector PrintRenderFrameHelper::GetPrintedPages( return printed_pages; } @@ -418,7 +418,7 @@ index 748bc9432518d699f414f809daec20972bdc9514..acb0759c6cdf95819e4444f0ac8b6e72 // Check if the printer returned any settings, if the settings is empty, we // can safely assume there are no printer drivers configured. So we safely // terminate. -@@ -1890,12 +1920,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -1891,12 +1921,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } diff --git a/patches/common/chromium/render_widget_host_view_mac.patch b/patches/common/chromium/render_widget_host_view_mac.patch index bbbfffa495..2b511921e7 100644 --- a/patches/common/chromium/render_widget_host_view_mac.patch +++ b/patches/common/chromium/render_widget_host_view_mac.patch @@ -66,7 +66,7 @@ index 57a608c1a1d4463ba813e1d9132e7f565be85305..be122f9ce470519e630d418550a60324 return validAttributesForMarkedText_.get(); } diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm -index 6a40bd5c67aa14b47727c61d8392195ebeb704d0..534b3bd2c70b5d68e02856f068a1fdb6269aab4f 100644 +index 7bdf6790c3b2275979cfcbe8c100c05e0f668ee7..82e72fd8bd923cb013dc655c83ccf4b5838d569f 100644 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm @@ -61,6 +61,7 @@ diff --git a/patches/common/chromium/support_mixed_sandbox_with_zygote.patch b/patches/common/chromium/support_mixed_sandbox_with_zygote.patch index ba6495fc5c..baf6bad3c1 100644 --- a/patches/common/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/common/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index e5f26ffd7ee5d3dc543c40f77a564a02b439399a..f341e362a338595d617e28d9273cb4d47940dd7b 100644 +index e27ad6494834c9948f1b85fcef894372d62c5c23..ecbfc65e474409a0d073362d6734047b098d2c7f 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -470,6 +470,10 @@ class RendererSandboxedProcessLauncherDelegate @@ -58,7 +58,7 @@ index e5f26ffd7ee5d3dc543c40f77a564a02b439399a..f341e362a338595d617e28d9273cb4d4 }; const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey"; -@@ -1835,11 +1847,18 @@ bool RenderProcessHostImpl::Init() { +@@ -1856,11 +1868,18 @@ bool RenderProcessHostImpl::Init() { cmd_line->PrependWrapper(renderer_prefix); AppendRendererCommandLine(cmd_line.get()); diff --git a/patches/common/chromium/thread_capabilities.patch b/patches/common/chromium/thread_capabilities.patch index abfd882135..e33b70bfad 100644 --- a/patches/common/chromium/thread_capabilities.patch +++ b/patches/common/chromium/thread_capabilities.patch @@ -11,10 +11,10 @@ system. See https://github.com/atom/electron/issues/3666 diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc -index ee0fa017409099bf4574a8c7aa4fbb0f53ed07c2..aeec2cb89b23f80997c9d5f195f099d95fa6068b 100644 +index 542567f3ee58776a8ca915f1f62dcffa29141798..0f5f017b0ee63bbe7107f39143484bc6d728104e 100644 --- a/sandbox/linux/services/credentials.cc +++ b/sandbox/linux/services/credentials.cc -@@ -348,8 +348,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() { +@@ -352,8 +352,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() { return pid; } diff --git a/patches/common/chromium/web_contents.patch b/patches/common/chromium/web_contents.patch index 7c4e0583fc..1594991940 100644 --- a/patches/common/chromium/web_contents.patch +++ b/patches/common/chromium/web_contents.patch @@ -5,10 +5,10 @@ Subject: web_contents.patch diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 5f747b549e8dde330c44be29faa009d8fae332bf..e729d0b650194bd2c961338aa9bee6c7cd533093 100644 +index 9e41df626aa90ad9afbadcaca76c02dbaec4d719..9d9d16afd710153eac4fe70e87d1b7eecbce831f 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc -@@ -2020,6 +2020,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2033,6 +2033,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -21,7 +21,7 @@ index 5f747b549e8dde330c44be29faa009d8fae332bf..e729d0b650194bd2c961338aa9bee6c7 WebContentsViewDelegate* delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -2035,6 +2041,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2048,6 +2054,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { &render_view_host_delegate_view_); } } diff --git a/patches/common/chromium/webgl_context_attributes.patch b/patches/common/chromium/webgl_context_attributes.patch index ba47797661..1b14384359 100644 --- a/patches/common/chromium/webgl_context_attributes.patch +++ b/patches/common/chromium/webgl_context_attributes.patch @@ -5,10 +5,10 @@ Subject: webgl_context_attributes.patch diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index e4acd1d1ec3ca10f10aacb6f4a4ad132ea8d4316..e75ddaf4d518172242287ee277f7e5bc6f91bcbe 100644 +index 704ee01d0a30f68275653591428e9d16eeb5d5a0..2adc208e36b66fcf8cbdbf05abfa1cd877361745 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -895,8 +895,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( +@@ -896,8 +896,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( attributes.sample_buffers = 0; attributes.bind_generates_resource = false; attributes.enable_raster_interface = web_attributes.enable_raster_interface; diff --git a/patches/common/chromium/webview_cross_drag.patch b/patches/common/chromium/webview_cross_drag.patch index c07251ac37..3e01cd5197 100644 --- a/patches/common/chromium/webview_cross_drag.patch +++ b/patches/common/chromium/webview_cross_drag.patch @@ -5,7 +5,7 @@ Subject: webview_cross_drag.patch diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index 04cd7481f4e8ba382411dfad0d3c8afc74bca45b..0185081062ead3c00237d3d4692a8ebe00425749 100644 +index 8e02ca39a947abc26b001f230f4e568fa9e61a89..dfed57b3f79ad359a3807567765fa70214771a3a 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -676,6 +676,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { @@ -17,10 +17,10 @@ index 04cd7481f4e8ba382411dfad0d3c8afc74bca45b..0185081062ead3c00237d3d4692a8ebe GetRenderViewHostID(web_contents_->GetRenderViewHost()) != drag_start_view_id_; diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index e8ae8e1f8da88dbb3be0274c8254098c038bda58..2dc8e8c5937c28b542d238bfb39b41079cef635c 100644 +index 576d60b4718e7742ee3eab31904590ed0b447e88..c28be0a78759b48954298cd9bbfdae37a0b72fb8 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm -@@ -334,6 +334,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { +@@ -335,6 +335,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { diff --git a/patches/common/chromium/worker_context_will_destroy.patch b/patches/common/chromium/worker_context_will_destroy.patch index 34e6cddace..9870407668 100644 --- a/patches/common/chromium/worker_context_will_destroy.patch +++ b/patches/common/chromium/worker_context_will_destroy.patch @@ -21,10 +21,10 @@ index cfe87b6c3903db7835c3998a65cf18a2301bbf87..e9046ad91236418942cc98372220bf59 // An empty URL is returned if the URL is not overriden. virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index e75ddaf4d518172242287ee277f7e5bc6f91bcbe..05cc8f80549c76919087ac4a108c3c5c7fe76f79 100644 +index 2adc208e36b66fcf8cbdbf05abfa1cd877361745..7df930a5114a3cfd930eb801958f5c421395e5c3 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -1035,6 +1035,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -1036,6 +1036,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } diff --git a/patches/common/config.json b/patches/common/config.json index bfed6e8500..978dbd6636 100644 --- a/patches/common/config.json +++ b/patches/common/config.json @@ -5,7 +5,5 @@ "src/electron/patches/common/ffmpeg": "src/third_party/ffmpeg", - "src/electron/patches/common/swiftshader": "src/third_party/swiftshader", - "src/electron/patches/common/v8": "src/v8" } diff --git a/patches/common/swiftshader/.patches b/patches/common/swiftshader/.patches deleted file mode 100644 index 915dc191f2..0000000000 --- a/patches/common/swiftshader/.patches +++ /dev/null @@ -1 +0,0 @@ -fix_arm64.patch diff --git a/patches/common/swiftshader/fix_arm64.patch b/patches/common/swiftshader/fix_arm64.patch deleted file mode 100644 index 7867ee0515..0000000000 --- a/patches/common/swiftshader/fix_arm64.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Cheng Zhao -Date: Thu Dec 6 02:00:06 2018 +0000 - -Backport fed67899a7b44c9409e94442eaca0deab2f809e3 to fix build on arm64. -https://swiftshader.googlesource.com/SwiftShader.git/+/fed67899a7b44c9409e94442eaca0deab2f809e3%5E%21/ - -Can be removed after updating to Chrome 73. - -diff --git a/src/Reactor/BUILD.gn b/src/Reactor/BUILD.gn -index c983c4361..be5e5055d 100644 ---- a/src/Reactor/BUILD.gn -+++ b/src/Reactor/BUILD.gn -@@ -170,6 +170,9 @@ config("swiftshader_reactor_private_config") { - ] - } else { - cflags = [ "-Wno-unused-local-typedef" ] -+ if(target_cpu == "arm64") { -+ cflags += [ "-Wno-defaulted-function-deleted" ] -+ } - defines = [ - "__STDC_CONSTANT_MACROS", - "__STDC_LIMIT_MACROS", -diff --git a/third_party/llvm-7.0/BUILD.gn b/third_party/llvm-7.0/BUILD.gn -index 4ccc6d15e..f0b3dc807 100644 ---- a/third_party/llvm-7.0/BUILD.gn -+++ b/third_party/llvm-7.0/BUILD.gn -@@ -61,6 +61,10 @@ config("swiftshader_llvm_private_config") { - } - } - -+ if(target_cpu == "arm64") { -+ cflags += [ "-Wno-defaulted-function-deleted" ] -+ } -+ - cflags += [ - "-Wno-attributes", - "-Wno-deprecated-declarations", diff --git a/patches/common/v8/add_realloc.patch b/patches/common/v8/add_realloc.patch index a302118734..10d8c13aad 100644 --- a/patches/common/v8/add_realloc.patch +++ b/patches/common/v8/add_realloc.patch @@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement Realloc on the v8 side. diff --git a/include/v8.h b/include/v8.h -index dd81ef81e3c0df11f5cac7a4c934b0a04e9de003..4b8fb04bc8210c0273157009b3560983b1322b18 100644 +index c56c31b31f13dd55dc528afb2b3468f48fbfa177..4d513fc2e28ce60ae4c0e50a56e4e59084a017cf 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -4604,6 +4604,13 @@ class V8_EXPORT ArrayBuffer : public Object { +@@ -4608,6 +4608,13 @@ class V8_EXPORT ArrayBuffer : public Object { */ virtual void* AllocateUninitialized(size_t length) = 0; @@ -30,7 +30,7 @@ index dd81ef81e3c0df11f5cac7a4c934b0a04e9de003..4b8fb04bc8210c0273157009b3560983 * Free the memory block of size |length|, pointed to by |data|. * That memory is guaranteed to be previously allocated by |Allocate|. diff --git a/src/api.cc b/src/api.cc -index 634ad37115faa1795a20155ed0faf51421eb1543..56be5e2e007c0ea84653a5487abef49cc206efc3 100644 +index 3d8611671fe8aabc939c62b9c9b5169ec9245456..95d242de7d11b1ea990d277d2f09c23749401f5e 100644 --- a/src/api.cc +++ b/src/api.cc @@ -512,6 +512,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { diff --git a/patches/common/v8/array_buffer.patch b/patches/common/v8/array_buffer.patch index 2fb78df74f..8c8c357545 100644 --- a/patches/common/v8/array_buffer.patch +++ b/patches/common/v8/array_buffer.patch @@ -5,10 +5,10 @@ Subject: array_buffer.patch diff --git a/include/v8.h b/include/v8.h -index 4b8fb04bc8210c0273157009b3560983b1322b18..f10a7950de2166804f779346bce580cfb2e7c3ec 100644 +index 4d513fc2e28ce60ae4c0e50a56e4e59084a017cf..fd061fde06956418373ded038f6f37e4488ac1a3 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -7701,6 +7701,9 @@ class V8_EXPORT Isolate { +@@ -7705,6 +7705,9 @@ class V8_EXPORT Isolate { */ void SetIdle(bool is_idle); @@ -19,7 +19,7 @@ index 4b8fb04bc8210c0273157009b3560983b1322b18..f10a7950de2166804f779346bce580cf bool InContext(); diff --git a/src/api.cc b/src/api.cc -index 56be5e2e007c0ea84653a5487abef49cc206efc3..dd22b2a30b632fb9507eb2e2b95837dd9b8810db 100644 +index 95d242de7d11b1ea990d277d2f09c23749401f5e..d963a10525dbdeb60c9d762f1fa5038c4d410010 100644 --- a/src/api.cc +++ b/src/api.cc @@ -7966,6 +7966,13 @@ void Isolate::SetIdle(bool is_idle) { diff --git a/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch index 1ca409fc58..ca1aaa1391 100644 --- a/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch +++ b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch @@ -6,7 +6,7 @@ Subject: build-torque-with-x64-toolchain-on-arm.patch torque binary has to be run during the build. diff --git a/BUILD.gn b/BUILD.gn -index 2f8a6c932efb66c5e273b9e9d2dc5887db8c6265..698b6c827f7f3cd7dc6871156daf8467bc7ff605 100644 +index 8bdc4ac595e82e1272ade2f715188bcb07653c82..b593ac20ef722146ca0c50ba01d6ee6b8d6d3035 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -184,7 +184,8 @@ declare_args() { @@ -19,7 +19,7 @@ index 2f8a6c932efb66c5e273b9e9d2dc5887db8c6265..698b6c827f7f3cd7dc6871156daf8467 v8_generator_toolchain = "//build/toolchain/linux:clang_x64" } -@@ -3354,7 +3355,7 @@ if (v8_monolithic) { +@@ -3351,7 +3352,7 @@ if (v8_monolithic) { # Executables # @@ -28,7 +28,7 @@ index 2f8a6c932efb66c5e273b9e9d2dc5887db8c6265..698b6c827f7f3cd7dc6871156daf8467 v8_executable("bytecode_builtins_list_generator") { visibility = [ ":*" ] # Only targets in this file can depend on this. -@@ -3404,7 +3405,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { +@@ -3401,7 +3402,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { } } diff --git a/patches/common/v8/build_gn.patch b/patches/common/v8/build_gn.patch index 3b3a4e5582..85e396e8d5 100644 --- a/patches/common/v8/build_gn.patch +++ b/patches/common/v8/build_gn.patch @@ -5,7 +5,7 @@ Subject: build_gn.patch diff --git a/BUILD.gn b/BUILD.gn -index bdbb29c66b2fa82e8a942421a8bdfce3d94d6e8f..fb3cfe848e97e0952829e39db5b56571e993d6a2 100644 +index cc9b7a906a111451eff86e8f78571617256136f1..139a777e304ab0449693664feb248a714995aa26 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -236,7 +236,7 @@ config("internal_config") { @@ -17,7 +17,7 @@ index bdbb29c66b2fa82e8a942421a8bdfce3d94d6e8f..fb3cfe848e97e0952829e39db5b56571 defines = [ "BUILDING_V8_SHARED" ] } } -@@ -3389,6 +3389,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { +@@ -3386,6 +3386,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/common/v8/dcheck.patch b/patches/common/v8/dcheck.patch index 9345b8e34f..3a3c3b79b6 100644 --- a/patches/common/v8/dcheck.patch +++ b/patches/common/v8/dcheck.patch @@ -5,7 +5,7 @@ Subject: dcheck.patch diff --git a/src/api.cc b/src/api.cc -index b23105badb1ce643b0d3dcf6716776c53af4dfec..1df0e8a1dd8b7d490c215fb0a65b7a89aefdc231 100644 +index 63538cc4ab571f9be27ea8e0d1e7df94ff3dac71..5b8948425fd9f9db2f175eb2d0f435f4c045be0c 100644 --- a/src/api.cc +++ b/src/api.cc @@ -8613,7 +8613,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { @@ -14,14 +14,14 @@ index b23105badb1ce643b0d3dcf6716776c53af4dfec..1df0e8a1dd8b7d490c215fb0a65b7a89 void Isolate::RunMicrotasks() { - DCHECK_NE(MicrotasksPolicy::kScoped, GetMicrotasksPolicy()); + // DCHECK_NE(MicrotasksPolicy::kScoped, GetMicrotasksPolicy()); - reinterpret_cast(this)->RunMicrotasks(); + i::Isolate* isolate = reinterpret_cast(this); + isolate->default_microtask_queue()->RunMicrotasks(isolate); } - diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index ed1bb91037677a25a8b22a7096a100f7f1cd4d1b..2ca299a96a66c000b4ff2061f283c31f906846b7 100644 +index 6a277353d721feb9f76b70e4e18f17f1deb5e281..d3f403555669838124d6720186230b01b18d6092 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -4710,9 +4710,9 @@ void Heap::TearDown() { +@@ -4719,9 +4719,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch b/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch index bb5ba1c5d1..a7c9f39a34 100644 --- a/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch +++ b/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch @@ -20,10 +20,10 @@ Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater diff --git a/src/flag-definitions.h b/src/flag-definitions.h -index e0d486feb1da25db98faa4222f014d79d9bc37e2..26798147f40e35f3496ceebd225f2de0fd105296 100644 +index 82729fe9a3e8ac4c7ea7ec984421d2af055d4922..b5de2854a6ff348b44f0bae8169b1d16a0209d71 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h -@@ -1276,7 +1276,7 @@ DEFINE_BOOL(log_function_events, false, +@@ -1289,7 +1289,7 @@ DEFINE_BOOL(log_function_events, false, DEFINE_BOOL(prof, false, "Log statistical profiling information (implies --log-code).") diff --git a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch index 483929de2d..dfea700f3f 100644 --- a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch +++ b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch @@ -22,7 +22,7 @@ Reviewed-By: Yang Guo Reviewed-By: Michaël Zasso diff --git a/include/v8.h b/include/v8.h -index f10a7950de2166804f779346bce580cfb2e7c3ec..44c2e648baa708d7f30105504795e4ba5402e3b3 100644 +index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83dbd57eb4 100644 --- a/include/v8.h +++ b/include/v8.h @@ -994,6 +994,10 @@ class V8_EXPORT PrimitiveArray { @@ -134,7 +134,7 @@ index f10a7950de2166804f779346bce580cfb2e7c3ec..44c2e648baa708d7f30105504795e4ba Value(Isolate* isolate, Local obj); ~Value(); uint16_t* operator*() { return str_; } -@@ -5265,6 +5304,8 @@ class V8_EXPORT BooleanObject : public Object { +@@ -5269,6 +5308,8 @@ class V8_EXPORT BooleanObject : public Object { class V8_EXPORT StringObject : public Object { public: static Local New(Isolate* isolate, Local value); @@ -143,7 +143,7 @@ index f10a7950de2166804f779346bce580cfb2e7c3ec..44c2e648baa708d7f30105504795e4ba Local ValueOf() const; -@@ -10103,6 +10144,30 @@ template Value* Value::Cast(T* value) { +@@ -10123,6 +10164,30 @@ template Value* Value::Cast(T* value) { } @@ -175,7 +175,7 @@ index f10a7950de2166804f779346bce580cfb2e7c3ec..44c2e648baa708d7f30105504795e4ba #ifdef V8_ENABLE_CHECKS CheckCast(value); diff --git a/src/api.cc b/src/api.cc -index dd22b2a30b632fb9507eb2e2b95837dd9b8810db..b23105badb1ce643b0d3dcf6716776c53af4dfec 100644 +index d963a10525dbdeb60c9d762f1fa5038c4d410010..63538cc4ab571f9be27ea8e0d1e7df94ff3dac71 100644 --- a/src/api.cc +++ b/src/api.cc @@ -2181,6 +2181,10 @@ int PrimitiveArray::Length() const { @@ -330,7 +330,7 @@ index dd22b2a30b632fb9507eb2e2b95837dd9b8810db..b23105badb1ce643b0d3dcf6716776c5 Local v8::StringObject::New(Isolate* v8_isolate, Local value) { i::Handle string = Utils::OpenHandle(*value); -@@ -8919,6 +9001,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) { +@@ -8927,6 +9009,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) { return isolate->default_microtask_queue()->IsRunningMicrotasks(); } @@ -340,7 +340,7 @@ index dd22b2a30b632fb9507eb2e2b95837dd9b8810db..b23105badb1ce643b0d3dcf6716776c5 String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local obj) : str_(nullptr), length_(0) { if (obj.IsEmpty()) return; -@@ -8938,6 +9023,9 @@ String::Utf8Value::~Utf8Value() { +@@ -8946,6 +9031,9 @@ String::Utf8Value::~Utf8Value() { i::DeleteArray(str_); } diff --git a/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch b/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch index 2c57410da3..2b78002080 100644 --- a/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch +++ b/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch @@ -10,7 +10,7 @@ Electron does, so this patch makes sure that the build doesn't try to run the mksnapshot binary if it was built for arm or arm64. diff --git a/BUILD.gn b/BUILD.gn -index 698b6c827f7f3cd7dc6871156daf8467bc7ff605..022c55b3fe32bbde57e97f08ab2c374cc1ea047a 100644 +index b593ac20ef722146ca0c50ba01d6ee6b8d6d3035..da0d7810547ab1205f7ad768b76ce27b197f6505 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1240,9 +1240,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) { diff --git a/patches/common/v8/expose_mksnapshot.patch b/patches/common/v8/expose_mksnapshot.patch index 94470df2bd..8b0d9f255a 100644 --- a/patches/common/v8/expose_mksnapshot.patch +++ b/patches/common/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to build mksnapshot on arm. diff --git a/BUILD.gn b/BUILD.gn -index fb3cfe848e97e0952829e39db5b56571e993d6a2..2f8a6c932efb66c5e273b9e9d2dc5887db8c6265 100644 +index 139a777e304ab0449693664feb248a714995aa26..8bdc4ac595e82e1272ade2f715188bcb07653c82 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -3379,8 +3379,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -3376,8 +3376,6 @@ if (current_toolchain == v8_generator_toolchain) { if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { From 1b982e200ad55f80fa51869ef44b3e5587667bd5 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 24 Jan 2019 15:13:15 +0530 Subject: [PATCH 29/52] Autoplay: remove cross-origin autoplay policy from //chrome and //content. https://chromium-review.googlesource.com/c/chromium/src/+/1362225 --- atom/browser/web_contents_preferences.cc | 3 --- docs/api/browser-window.md | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index 4fd64a99bc..c2713f9bb3 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -84,9 +84,6 @@ bool GetAsAutoplayPolicy(const base::Value* val, } else if (policy_str == "user-gesture-required") { *out = content::AutoplayPolicy::kUserGestureRequired; return true; - } else if (policy_str == "user-gesture-required-for-cross-origin") { - *out = content::AutoplayPolicy::kUserGestureRequiredForCrossOrigin; - return true; } else if (policy_str == "document-user-activation-required") { *out = content::AutoplayPolicy::kDocumentUserActivationRequired; return true; diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 294ecba017..b5dc64d81d 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -377,8 +377,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. file or link onto the page causes a navigation. Default is `false`. * `autoplayPolicy` String (optional) - Autoplay policy to apply to content in the window, can be `no-user-gesture-required`, - `user-gesture-required`, `user-gesture-required-for-cross-origin`, - `document-user-activation-required`. Defaults to + `user-gesture-required`, `document-user-activation-required`. Defaults to `no-user-gesture-required`. When setting minimum or maximum window size with `minWidth`/`maxWidth`/ From 035eee5c032c7ac156546fd5758e0386304d8cd6 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 24 Jan 2019 20:22:14 +0530 Subject: [PATCH 30/52] [OnionSoup] replace network::DataElement::Type with DataElementType https://chromium-review.googlesource.com/c/chromium/src/+/1393106 --- .../network_converter.cc | 6 +- .../common/chromium/can_create_window.patch | 141 ++---------------- 2 files changed, 12 insertions(+), 135 deletions(-) diff --git a/atom/common/native_mate_converters/network_converter.cc b/atom/common/native_mate_converters/network_converter.cc index b4ae1b8c71..1707ed018b 100644 --- a/atom/common/native_mate_converters/network_converter.cc +++ b/atom/common/native_mate_converters/network_converter.cc @@ -27,12 +27,12 @@ Converter>::ToV8( for (const auto& element : *(val->elements())) { auto post_data_dict = std::make_unique(); auto type = element.type(); - if (type == network::DataElement::TYPE_BYTES) { + if (type == network::mojom::DataElementType::kBytes) { auto bytes = std::make_unique(std::vector( element.bytes(), element.bytes() + (element.length()))); post_data_dict->SetString("type", "rawData"); post_data_dict->Set("bytes", std::move(bytes)); - } else if (type == network::DataElement::TYPE_FILE) { + } else if (type == network::mojom::DataElementType::kFile) { post_data_dict->SetString("type", "file"); post_data_dict->SetKey("filePath", base::Value(element.path().AsUTF8Unsafe())); @@ -40,7 +40,7 @@ Converter>::ToV8( post_data_dict->SetInteger("length", static_cast(element.length())); post_data_dict->SetDouble( "modificationTime", element.expected_modification_time().ToDoubleT()); - } else if (type == network::DataElement::TYPE_BLOB) { + } else if (type == network::mojom::DataElementType::kBlob) { post_data_dict->SetString("type", "blob"); post_data_dict->SetString("blobUUID", element.blob_uuid()); } diff --git a/patches/common/chromium/can_create_window.patch b/patches/common/chromium/can_create_window.patch index 5220eb6718..22b8d817b1 100644 --- a/patches/common/chromium/can_create_window.patch +++ b/patches/common/chromium/can_create_window.patch @@ -5,114 +5,29 @@ Subject: can_create_window.patch diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index 1a023385a3d27d9145f2a0a069ff6799c69ec66a..30328f5e62b4fdbb423a97454ee0591c076ac6bc 100644 +index 1a023385a3d27d9145f2a0a069ff6799c69ec66a..8289c09b9e3d30ae171942a987fbc1dca83f58d9 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -3669,6 +3669,38 @@ void RenderFrameHostImpl::CreateNewWindow( - "frame_tree_node", frame_tree_node_->frame_tree_node_id(), "url", - params->target_url.possibly_invalid_spec()); - -+ scoped_refptr body; -+ if (params->body->has_object) { -+ body = new network::ResourceRequestBody; -+ std::vector elements; -+ for (const auto& iter : params->body->elements) { -+ network::DataElement element; -+ switch (iter->type) { -+ case network::DataElement::TYPE_BYTES: { -+ element.SetToBytes(iter->bytes.data(), iter->bytes.length()); -+ break; -+ } -+ case network::DataElement::TYPE_FILE: { -+ element.SetToFilePathRange(iter->path, iter->offset, iter->length, -+ iter->expected_modification_time); -+ break; -+ } -+ case network::DataElement::TYPE_BLOB: { -+ element.SetToBlobRange(iter->blob_uuid, iter->offset, iter->length); -+ break; -+ } -+ case network::DataElement::TYPE_DATA_PIPE: -+ default: -+ NOTREACHED(); -+ break; -+ } -+ elements.push_back(std::move(element)); -+ } -+ body->swap_elements(&elements); -+ body->set_identifier(params->body->identifier); -+ body->set_contains_sensitive_info(params->body->contains_sensitive_info); -+ } -+ - bool no_javascript_access = false; - - // Filter out URLs to which navigation is disallowed from this context. -@@ -3697,6 +3729,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -3697,6 +3697,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, -+ params->additional_features, body, ++ params->additional_features, params->body, effective_transient_activation_state, params->opener_suppressed, &no_javascript_access); -diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc -index 8d01f4e181793677a1eee7585fd7c484767a58b0..01f7a49e7a559e6ae70a4311a2539bc4f60849d7 100644 ---- a/content/browser/security_exploit_browsertest.cc -+++ b/content/browser/security_exploit_browsertest.cc -@@ -364,6 +364,7 @@ IN_PROC_BROWSER_TEST_F(SecurityExploitBrowserTest, - - mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New(); - params->target_url = GURL("about:blank"); -+ params->body = mojom::ResourceRequestBody::New(); - pending_rfh->CreateNewWindow( - std::move(params), base::BindOnce([](mojom::CreateNewWindowStatus, - mojom::CreateNewWindowReplyPtr) {})); diff --git a/content/common/frame.mojom b/content/common/frame.mojom -index e566a15b798e2586fa4fae3c4db97ce5f4f2f09f..8a08c7a79eba24bce7f11cf8c499432549c4f25b 100644 +index e566a15b798e2586fa4fae3c4db97ce5f4f2f09f..08f52fd73bc9b6231a75f7804bb9b9f367bca62e 100644 --- a/content/common/frame.mojom +++ b/content/common/frame.mojom -@@ -12,6 +12,8 @@ import "content/public/common/resource_type.mojom"; - import "content/public/common/resource_load_info.mojom"; - import "content/public/common/transferrable_url_loader.mojom"; - import "content/public/common/window_container_type.mojom"; -+import "mojo/public/mojom/base/file_path.mojom"; -+import "mojo/public/mojom/base/time.mojom"; - import "mojo/public/mojom/base/string16.mojom"; - import "mojo/public/mojom/base/unguessable_token.mojom"; - import "services/network/public/mojom/url_loader.mojom"; -@@ -187,6 +189,24 @@ interface FrameFactory { - CreateFrame(int32 frame_routing_id, Frame& frame); - }; - -+struct DataElement { -+ int32 type; -+ int64 length; -+ string bytes; -+ mojo_base.mojom.FilePath path; -+ int64 offset; -+ mojo_base.mojom.Time expected_modification_time; -+ url.mojom.Url filesystem_url; -+ string blob_uuid; -+}; -+ -+struct ResourceRequestBody { -+ bool has_object; -+ int64 identifier; -+ bool contains_sensitive_info; -+ array elements; -+}; -+ - struct CreateNewWindowParams { - // True if this open request came in the context of a user gesture. - // -@@ -226,6 +246,10 @@ struct CreateNewWindowParams { +@@ -226,6 +226,10 @@ struct CreateNewWindowParams { // The window features to use for the new window. blink.mojom.WindowFeatures features; + + // Extra fields added by Electron. + array additional_features; -+ ResourceRequestBody body; ++ network.mojom.URLRequestBody? body; }; // Operation result when the renderer asks the browser to create a new window. @@ -151,7 +66,7 @@ index 92425b0bded161d513a3e39b8f9631d4c98c143c..5dc21230970fe23a25ad6e811d65c434 bool opener_suppressed, bool* no_javascript_access); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index ad23a9040c21a674c1b011e7120d4288a722f2bb..c16005d6e20b801217249ed8b902cb42d9223dc4 100644 +index ad23a9040c21a674c1b011e7120d4288a722f2bb..ffe7e5d4b2359d8490c514b8abee91c885ac973b 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -76,6 +76,7 @@ @@ -162,49 +77,11 @@ index ad23a9040c21a674c1b011e7120d4288a722f2bb..c16005d6e20b801217249ed8b902cb42 #include "content/renderer/media/audio/audio_device_factory.h" #include "content/renderer/media/stream/media_stream_device_observer.h" #include "content/renderer/media/video_capture_impl_manager.h" -@@ -1345,6 +1346,46 @@ WebView* RenderViewImpl::CreateView( +@@ -1345,6 +1346,8 @@ WebView* RenderViewImpl::CreateView( } params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features); -+ params->body = mojom::ResourceRequestBody::New(); -+ auto body = GetRequestBodyForWebURLRequest(request); -+ if (body) { -+ params->body->has_object = true; -+ params->body->identifier = body->identifier(); -+ params->body->contains_sensitive_info = body->contains_sensitive_info(); -+ for (const auto& element : *body->elements()) { -+ content::mojom::DataElementPtr ptr = content::mojom::DataElement::New(); -+ ptr->type = element.type(); -+ switch (element.type()) { -+ case network::DataElement::TYPE_BYTES: { -+ ptr->bytes = std::string(element.bytes(), element.length()); -+ break; -+ } -+ case network::DataElement::TYPE_FILE: { -+ ptr->path = element.path(); -+ ptr->offset = element.offset(); -+ ptr->length = element.length(); -+ ptr->expected_modification_time = element.expected_modification_time(); -+ break; -+ } -+ case network::DataElement::TYPE_BLOB: { -+ ptr->blob_uuid = element.blob_uuid(); -+ ptr->offset = element.offset(); -+ ptr->length = element.length(); -+ break; -+ } -+ case network::DataElement::TYPE_CHUNKED_DATA_PIPE: -+ case network::DataElement::TYPE_RAW_FILE: -+ case network::DataElement::TYPE_DATA_PIPE: -+ case network::DataElement::TYPE_UNKNOWN: -+ NOTREACHED(); -+ break; -+ } -+ params->body->elements.push_back(std::move(ptr)); -+ } -+ } else { -+ params->body->has_object = false; -+ } ++ params->body = GetRequestBodyForWebURLRequest(request); + // We preserve this information before sending the message since |params| is // moved on send. From 86a94126fb2ecd1357e87420d693d4478a24d68a Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Thu, 24 Jan 2019 20:27:08 +0530 Subject: [PATCH 31/52] Convert ProxyResolutionServiceProvider to use Network Service. https://chromium-review.googlesource.com/c/chromium/src/+/1419264 --- atom/browser/net/resolve_proxy_helper.cc | 3 ++- atom/browser/net/resolve_proxy_helper.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/atom/browser/net/resolve_proxy_helper.cc b/atom/browser/net/resolve_proxy_helper.cc index 553ea6424c..7fa4315685 100644 --- a/atom/browser/net/resolve_proxy_helper.cc +++ b/atom/browser/net/resolve_proxy_helper.cc @@ -52,7 +52,7 @@ void ResolveProxyHelper::StartPendingRequest() { binding_.Bind(mojo::MakeRequest(&proxy_lookup_client)); binding_.set_connection_error_handler( base::BindOnce(&ResolveProxyHelper::OnProxyLookupComplete, - base::Unretained(this), base::nullopt)); + base::Unretained(this), net::ERR_ABORTED, base::nullopt)); content::BrowserContext::GetDefaultStoragePartition(browser_context_) ->GetNetworkContext() ->LookUpProxyForURL(pending_requests_.front().url, @@ -60,6 +60,7 @@ void ResolveProxyHelper::StartPendingRequest() { } void ResolveProxyHelper::OnProxyLookupComplete( + int32_t net_error, const base::Optional& proxy_info) { DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK(!pending_requests_.empty()); diff --git a/atom/browser/net/resolve_proxy_helper.h b/atom/browser/net/resolve_proxy_helper.h index 1ebf7d61c2..e2cf9ddb05 100644 --- a/atom/browser/net/resolve_proxy_helper.h +++ b/atom/browser/net/resolve_proxy_helper.h @@ -54,6 +54,7 @@ class ResolveProxyHelper // network::mojom::ProxyLookupClient implementation. void OnProxyLookupComplete( + int32_t net_error, const base::Optional& proxy_info) override; // Self-reference. Owned as long as there's an outstanding proxy lookup. From 0545d47ca7a62bd6d168c6e1a14119dee608694f Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Fri, 25 Jan 2019 04:58:50 +0530 Subject: [PATCH 32/52] chore: roll node --- DEPS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DEPS b/DEPS index f37643b1cc..7a65671e9d 100644 --- a/DEPS +++ b/DEPS @@ -12,7 +12,7 @@ vars = { 'chromium_version': '73.0.3679.0', 'node_version': - 'ad2c89ec3be0f5db3ea02b0f591d36a5d84c51ad', + 'fac6d766c143db8db05bb3b0c0871df8f032363c', 'boto_version': 'f7574aa6cc2c819430c1f05e9a1a1a666ef8169b', 'pyyaml_version': '3.12', From 510ca79dddcbc8833b38b149ea745c3c70ddd865 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Fri, 25 Jan 2019 13:51:08 +0530 Subject: [PATCH 33/52] Enable DCHECK for renderer-initiated navigations requiring initiator. https://chromium-review.googlesource.com/c/chromium/src/+/1385495 --- atom/browser/common_web_contents_delegate.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 6c104cc5b1..112b5a179b 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -275,6 +275,7 @@ content::WebContents* CommonWebContentsDelegate::OpenURLFromTab( load_url_params.should_replace_current_entry = params.should_replace_current_entry; load_url_params.is_renderer_initiated = params.is_renderer_initiated; + load_url_params.initiator_origin = params.initiator_origin; load_url_params.should_clear_history_list = true; source->GetController().LoadURLWithParams(load_url_params); From 005b7d809969857259123bc430a609f753f50cdd Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Sun, 27 Jan 2019 21:32:56 +0530 Subject: [PATCH 34/52] Print Preview: Add validity check for kSettingPagesPerSheet. https://chromium-review.googlesource.com/c/chromium/src/+/1381133 --- lib/browser/api/web-contents.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/browser/api/web-contents.js b/lib/browser/api/web-contents.js index 60c34fcc17..21eb6c9157 100644 --- a/lib/browser/api/web-contents.js +++ b/lib/browser/api/web-contents.js @@ -78,6 +78,7 @@ const defaultPrintingSetting = { printWithCloudPrint: false, printWithPrivet: false, printWithExtension: false, + pagesPerSheet: 1, deviceName: 'Save as PDF', generateDraftData: true, fitToPageEnabled: false, From a9ab4c5039b15bfa29c3a0b436ba3828cf82ab76 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 11:19:22 +0530 Subject: [PATCH 35/52] chore: roll 73.0.3683.10 --- DEPS | 2 +- patches/common/boringssl/expose_aes-cfb.patch | 2 +- .../chromium/allow_webview_file_url.patch | 4 +- .../common/chromium/blink_local_frame.patch | 2 +- .../common/chromium/boringssl_build_gn.patch | 2 +- .../common/chromium/can_create_window.patch | 12 +++--- .../common/chromium/command-ismediakey.patch | 12 +++--- .../common/chromium/compositor_delegate.patch | 4 +- .../chromium/content_browser_main_loop.patch | 4 +- ...cross_site_document_resource_handler.patch | 8 ++-- patches/common/chromium/dcheck.patch | 10 ++--- .../disable_color_correct_rendering.patch | 12 +++--- .../disable_detach_webview_frame.patch | 2 +- patches/common/chromium/disable_hidden.patch | 4 +- ...requirement_for_beforeunload_dialogs.patch | 4 +- .../exclude-a-few-test-files-from-build.patch | 2 +- .../common/chromium/frame_host_manager.patch | 4 +- patches/common/chromium/mas-cfisobjc.patch | 6 +-- .../common/chromium/mas_no_private_api.patch | 2 +- .../chromium/out_of_process_instance.patch | 4 +- patches/common/chromium/printing.patch | 40 +++++++++---------- .../render_widget_host_view_mac.patch | 6 +-- .../support_mixed_sandbox_with_zygote.patch | 2 +- patches/common/chromium/web_contents.patch | 2 +- .../common/chromium/webview_cross_drag.patch | 6 +-- patches/common/v8/add_realloc.patch | 6 +-- patches/common/v8/array_buffer.patch | 6 +-- ...ild-torque-with-x64-toolchain-on-arm.patch | 6 +-- patches/common/v8/build_gn.patch | 4 +- patches/common/v8/dcheck.patch | 8 ++-- ..._detailed_line_info_for_cpu_profiler.patch | 4 +- ...vide_more_v8_backwards_compatibility.patch | 30 +++++++------- ...ot_run_arm_arm64_mksnapshot_binaries.patch | 4 +- patches/common/v8/expose_mksnapshot.patch | 4 +- 34 files changed, 115 insertions(+), 115 deletions(-) diff --git a/DEPS b/DEPS index 7a65671e9d..c4cf797288 100644 --- a/DEPS +++ b/DEPS @@ -10,7 +10,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '73.0.3679.0', + '73.0.3683.10', 'node_version': 'fac6d766c143db8db05bb3b0c0871df8f032363c', diff --git a/patches/common/boringssl/expose_aes-cfb.patch b/patches/common/boringssl/expose_aes-cfb.patch index 880550a646..d5ee8d44de 100644 --- a/patches/common/boringssl/expose_aes-cfb.patch +++ b/patches/common/boringssl/expose_aes-cfb.patch @@ -71,7 +71,7 @@ index acc4719b7e9c4c4461fc6142f2ae9156b407915b..8b008a401ec2f2d0673f6876609dd578 callback(EVP_aes_256_ecb(), "aes-256-ecb", NULL, arg); callback(EVP_aes_256_ofb(), "aes-256-ofb", NULL, arg); diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h -index 59634138cb60237f008eb99e7d8df54da7629c1a..b30b8434b301fb5b8630ae954698b6fee255df77 100644 +index e9545c82ca7e663ae25d9e85d29acea2be54d38f..4902859cdb96012eae7956d9fc3b1dcd47a71c07 100644 --- a/include/openssl/cipher.h +++ b/include/openssl/cipher.h @@ -421,6 +421,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_192_ofb(void); diff --git a/patches/common/chromium/allow_webview_file_url.patch b/patches/common/chromium/allow_webview_file_url.patch index e0f8b83ef8..354ecd32c4 100644 --- a/patches/common/chromium/allow_webview_file_url.patch +++ b/patches/common/chromium/allow_webview_file_url.patch @@ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch Allow webview to load non-web URLs. diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc -index 8a67808f690a2baf526f39095dd5e1122319ee91..1ab079b1fe97c506dca39b5b175f045394abae62 100644 +index a206be71b8d9f28d659000cd2ea72cdb8f876e07..f4ad084900723a5c0cf78affae7744d8039a8395 100644 --- a/content/browser/loader/resource_dispatcher_host_impl.cc +++ b/content/browser/loader/resource_dispatcher_host_impl.cc -@@ -1449,6 +1449,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( +@@ -1447,6 +1447,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest( !policy->IsWebSafeScheme(info.common_params.url.scheme()) && !is_external_protocol; diff --git a/patches/common/chromium/blink_local_frame.patch b/patches/common/chromium/blink_local_frame.patch index 830f8dbad2..15f28df8b1 100644 --- a/patches/common/chromium/blink_local_frame.patch +++ b/patches/common/chromium/blink_local_frame.patch @@ -14,7 +14,7 @@ when there is code doing that. This patch reverts the change to fix the crash in Electron. diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc -index e07ace500ef1dd60ce9833e7324e238de1018ae6..950c5ff5b14129ab2ca4b8c929ff583b5523b04b 100644 +index 9c8ffb99f78ef29df08e139551af984dc23e9de2..8196880b6da930557d22f4c29a6de35c1aa7a763 100644 --- a/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc @@ -403,10 +403,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) { diff --git a/patches/common/chromium/boringssl_build_gn.patch b/patches/common/chromium/boringssl_build_gn.patch index a73248d1bb..b36157a1c2 100644 --- a/patches/common/chromium/boringssl_build_gn.patch +++ b/patches/common/chromium/boringssl_build_gn.patch @@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn Build BoringSSL with some extra functions that nodejs needs. diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn -index 6e4fc85f124ed6dd4a7ac1812686fa59c4e50cdf..fd45cfcb50fb659ff8d5a07b06aeecc8f0ecd3ee 100644 +index 8d460717d4c5d2ee56a10689f3d4cead9740ae36..fe8753c128759b9b0421238cabf89a990e600735 100644 --- a/third_party/boringssl/BUILD.gn +++ b/third_party/boringssl/BUILD.gn @@ -45,6 +45,19 @@ config("no_asm_config") { diff --git a/patches/common/chromium/can_create_window.patch b/patches/common/chromium/can_create_window.patch index 22b8d817b1..c7914f142a 100644 --- a/patches/common/chromium/can_create_window.patch +++ b/patches/common/chromium/can_create_window.patch @@ -5,10 +5,10 @@ Subject: can_create_window.patch diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index 1a023385a3d27d9145f2a0a069ff6799c69ec66a..8289c09b9e3d30ae171942a987fbc1dca83f58d9 100644 +index a6c9e15b29af4ede177593db58a189153a392515..23ecf8e1a679676ef11ad82616bc68f845be1643 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -3697,6 +3697,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -3723,6 +3723,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -32,7 +32,7 @@ index e566a15b798e2586fa4fae3c4db97ce5f4f2f09f..08f52fd73bc9b6231a75f7804bb9b9f3 // Operation result when the renderer asks the browser to create a new window. diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index bce9b68c989da1e287b7e593e1ae281923d1a557..e2f2b8e8d09d1f14b58eb8b093042b89141cdd35 100644 +index abc9829f296f26c2217066f68927861d032d9868..f43321b9f7513a1e51367bbd38006e7e2f930923 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -494,6 +494,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -45,7 +45,7 @@ index bce9b68c989da1e287b7e593e1ae281923d1a557..e2f2b8e8d09d1f14b58eb8b093042b89 bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 92425b0bded161d513a3e39b8f9631d4c98c143c..5dc21230970fe23a25ad6e811d65c434760d1d1b 100644 +index 694796bf8dbba514ae9f09e51186e53be14ae50e..73ea7c49ee5993536902f21a51c8cd3bbe30e3f2 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -171,6 +171,7 @@ class RenderFrameHost; @@ -66,7 +66,7 @@ index 92425b0bded161d513a3e39b8f9631d4c98c143c..5dc21230970fe23a25ad6e811d65c434 bool opener_suppressed, bool* no_javascript_access); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index ad23a9040c21a674c1b011e7120d4288a722f2bb..ffe7e5d4b2359d8490c514b8abee91c885ac973b 100644 +index 77b93bd04c8b7887f9fc5e9dc7d5f42c034e3bfa..468e9ed1d7c24b7b3a1e4e37239c42b75be4e7a9 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -76,6 +76,7 @@ @@ -77,7 +77,7 @@ index ad23a9040c21a674c1b011e7120d4288a722f2bb..ffe7e5d4b2359d8490c514b8abee91c8 #include "content/renderer/media/audio/audio_device_factory.h" #include "content/renderer/media/stream/media_stream_device_observer.h" #include "content/renderer/media/video_capture_impl_manager.h" -@@ -1345,6 +1346,8 @@ WebView* RenderViewImpl::CreateView( +@@ -1343,6 +1344,8 @@ WebView* RenderViewImpl::CreateView( } params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features); diff --git a/patches/common/chromium/command-ismediakey.patch b/patches/common/chromium/command-ismediakey.patch index dae5cfef69..afc6abbdb1 100644 --- a/patches/common/chromium/command-ismediakey.patch +++ b/patches/common/chromium/command-ismediakey.patch @@ -15,10 +15,10 @@ and electron/electron@d2368d2d3b3de9eec4cc32b6aaf035cc89921bf1 as patches. diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/browser/extensions/global_shortcut_listener_mac.mm -index 5ab71f9a7632f0211f2efd7be2298203f32fa83d..e99f55c82e1d59e919fbab65b9cbe833dfa79771 100644 +index befe726af9c10b1563a7fc0bb77cc55f65943d5c..46c6fe08bab8471007f78d3ef227e5195bfdf0e1 100644 --- a/chrome/browser/extensions/global_shortcut_listener_mac.mm +++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm -@@ -20,6 +20,26 @@ +@@ -21,6 +21,26 @@ namespace extensions { @@ -46,10 +46,10 @@ index 5ab71f9a7632f0211f2efd7be2298203f32fa83d..e99f55c82e1d59e919fbab65b9cbe833 GlobalShortcutListener* GlobalShortcutListener::GetInstance() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc -index e5cfd70cc2effcbfd75e60357a44ce467e35fbc9..41d3ebd0628b4a8b5966b2b573d5feac4a19dc82 100644 +index eb58c51eb768bb013e293649e0308786c5482e21..e469e5115fce12fe5d382bd75d9c6f41fa24293e 100644 --- a/chrome/browser/extensions/global_shortcut_listener_win.cc +++ b/chrome/browser/extensions/global_shortcut_listener_win.cc -@@ -60,6 +60,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, +@@ -62,6 +62,8 @@ void GlobalShortcutListenerWin::OnWndProc(HWND hwnd, modifiers |= (LOWORD(lparam) & MOD_SHIFT) ? ui::EF_SHIFT_DOWN : 0; modifiers |= (LOWORD(lparam) & MOD_ALT) ? ui::EF_ALT_DOWN : 0; modifiers |= (LOWORD(lparam) & MOD_CONTROL) ? ui::EF_CONTROL_DOWN : 0; @@ -80,7 +80,7 @@ index 392cf3d58c64c088596e8d321a2ce37b0ec60b6e..43e30f47240dc10a3a9b950255d4e487 ui::Accelerator accelerator( ui::KeyboardCodeFromXKeyEvent(x_event), modifiers); diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm -index 2320015f9d38f3313bee1de6872910e27cd259d1..33f2ac9c021b69fe17c1857b6dfaa9808e90136b 100644 +index b48fa8e63867021bdd77bf585a0e02c366980d91..bae9e24e7bcf7615be243bcb5629cc5981a31b06 100644 --- a/ui/base/accelerators/media_keys_listener_mac.mm +++ b/ui/base/accelerators/media_keys_listener_mac.mm @@ -31,6 +31,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) { @@ -96,7 +96,7 @@ index 2320015f9d38f3313bee1de6872910e27cd259d1..33f2ac9c021b69fe17c1857b6dfaa980 } return VKEY_UNKNOWN; } -@@ -189,7 +195,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy, +@@ -190,7 +196,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy, int key_code = (data1 & 0xFFFF0000) >> 16; if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT && key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST && diff --git a/patches/common/chromium/compositor_delegate.patch b/patches/common/chromium/compositor_delegate.patch index b4a22fd789..3219b69050 100644 --- a/patches/common/chromium/compositor_delegate.patch +++ b/patches/common/chromium/compositor_delegate.patch @@ -32,7 +32,7 @@ index 5aeda7bd9caf6b5b9e2a95293e4409dc7f9a6d2d..d15e1462babe97b5d68014f4d6723665 } else { DCHECK(context_provider); diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h -index a445b569ede1cd9331003e21b0427971d98ef924..087802fc0d47276c1449b4d9153756f6beb39bad 100644 +index 313431f82ee7e181dad2c48dd27950129afbb223..b8c2632e49b7b96adbb06a03678961823f0790f6 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h @@ -25,6 +25,7 @@ @@ -69,7 +69,7 @@ index a445b569ede1cd9331003e21b0427971d98ef924..087802fc0d47276c1449b4d9153756f6 // Sets the root of the layer tree drawn by this Compositor. The root layer // must have no parent. The compositor's root layer is reset if the root layer // is destroyed. NULL can be passed to reset the root layer, in which case the -@@ -440,6 +453,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -442,6 +455,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, ui::ContextFactory* context_factory_; ui::ContextFactoryPrivate* context_factory_private_; diff --git a/patches/common/chromium/content_browser_main_loop.patch b/patches/common/chromium/content_browser_main_loop.patch index 442ace6273..9a4b099105 100644 --- a/patches/common/chromium/content_browser_main_loop.patch +++ b/patches/common/chromium/content_browser_main_loop.patch @@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously in atom::CommonWebContentsDelegate::ResetManageWebContents. diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc -index a69d86afff84745e1b0cd85ae6eec48f10127ab5..0782f0e890ee86c4f051e3102e3d20bee8276479 100644 +index 81d99cb7f9e200e2b8b487eae9292cc61adcbccc..9948a2621ade7b227cbed7d82e885a63197a2ed4 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc -@@ -1543,7 +1543,7 @@ void BrowserMainLoop::MainMessageLoopRun() { +@@ -1550,7 +1550,7 @@ void BrowserMainLoop::MainMessageLoopRun() { } base::RunLoop run_loop; diff --git a/patches/common/chromium/cross_site_document_resource_handler.patch b/patches/common/chromium/cross_site_document_resource_handler.patch index 3c85d5304f..5838d6569b 100644 --- a/patches/common/chromium/cross_site_document_resource_handler.patch +++ b/patches/common/chromium/cross_site_document_resource_handler.patch @@ -8,10 +8,10 @@ this patch can be removed once we switch to network service, where the embedders have a chance to design their URLLoaders. diff --git a/content/browser/loader/cross_site_document_resource_handler.cc b/content/browser/loader/cross_site_document_resource_handler.cc -index 7d5a3367774f558583ea69e60c46ab8636a19a81..190565b067ef869a332b77322dc62403c36c1a00 100644 +index bd62ed07876ad4a2a7c6e8309843281719dbefb6..13e67994997caf175ba1b30ba8070718a697588d 100644 --- a/content/browser/loader/cross_site_document_resource_handler.cc +++ b/content/browser/loader/cross_site_document_resource_handler.cc -@@ -631,6 +631,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders( +@@ -673,6 +673,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders( return false; } @@ -22,7 +22,7 @@ index 7d5a3367774f558583ea69e60c46ab8636a19a81..190565b067ef869a332b77322dc62403 } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index 84b324992f22a65030b8badc05f6ce542929dea6..5703236f5ea937ebe3111fe79cf30f9ffb172a04 100644 +index 2d1eb5e9f7c9494920e626a1c89cb3417627d12d..d10724466f8802d434b868da769379f49fe115bc 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -58,6 +58,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should @@ -37,7 +37,7 @@ index 84b324992f22a65030b8badc05f6ce542929dea6..5703236f5ea937ebe3111fe79cf30f9f const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 031332e91cf38cb3d69cd73778a9e4a0701f7645..108c1e2f57b4fd86bbf819452da37da3cc96e5bb 100644 +index de03cae23d8c9e93181562f9d09f215ce8eddc2f..cc29e2795477e3ace7c57a04502c8c3dc7b04fb4 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -237,6 +237,9 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/common/chromium/dcheck.patch b/patches/common/chromium/dcheck.patch index c854b6278d..a8b6b2686a 100644 --- a/patches/common/chromium/dcheck.patch +++ b/patches/common/chromium/dcheck.patch @@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc -index 63f520bae169ecdcc311bf038b962b1ff3e30126..734e51af5ecbf5faa210255a1fae3efda5293ac8 100644 +index 5249401e58a57f0278665f2c6648c7e6e8e1bf77..518b1279714888121095af9bdb077f3622c1255d 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc -@@ -1153,8 +1153,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( +@@ -1170,8 +1170,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( return NAVIGATION_TYPE_NEW_SUBFRAME; } @@ -33,7 +33,7 @@ index 63f520bae169ecdcc311bf038b962b1ff3e30126..734e51af5ecbf5faa210255a1fae3efd if (rfh->GetParent()) { // All manual subframes would be did_create_new_entry and handled above, so -@@ -1395,7 +1397,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( +@@ -1412,7 +1414,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage( new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon(); } @@ -46,10 +46,10 @@ index 63f520bae169ecdcc311bf038b962b1ff3e30126..734e51af5ecbf5faa210255a1fae3efd // navigation. Now we know that the renderer has updated its state accordingly // and it is safe to also clear the browser side history. diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc -index 1857bfa07ce3d8656105e696363a760889794e77..c25d8c241907fb166218670533a3b6e1e2f32769 100644 +index 49654c95675e0240d82232eb971f85ab3611ab29..8f0737841f70144770dc4dfd7353f7bdba3ffcfd 100644 --- a/ui/base/clipboard/clipboard_win.cc +++ b/ui/base/clipboard/clipboard_win.cc -@@ -913,9 +913,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap, +@@ -726,9 +726,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap, } void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) { diff --git a/patches/common/chromium/disable_color_correct_rendering.patch b/patches/common/chromium/disable_color_correct_rendering.patch index da9cb0d157..fb1ae31e9f 100644 --- a/patches/common/chromium/disable_color_correct_rendering.patch +++ b/patches/common/chromium/disable_color_correct_rendering.patch @@ -19,7 +19,7 @@ to deal with color spaces. That is being tracked at https://crbug.com/634542 and https://crbug.com/711107. diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc -index bc110bfd003e41b1b170c4d8cd404ab0a88240e3..8979c777978216b6e0f7f89f19200afc57f08012 100644 +index 6a44080f30936c8383f575c8c65c5582d9ed7fc3..b4394286e0a54357973d23ed94731ae7e830b2a8 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -1569,6 +1569,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw( @@ -218,10 +218,10 @@ index 6ee04d0919d9b4ae5e2d6719f1417f00a3d600fa..62c0b5da24e02102b268429b1d8e3654 + +#undef PATCH_CS diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc -index 54e1614d979ef2afa5e23404541cfc2d1227e17d..97190566b60140cbdac43a5c57deb03e1fc48982 100644 +index 5a757c437d36f98d6d813ef2af81b46434cdc5de..86ed034d207fe5cdf6810de085cc34ea8981169c 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc -@@ -707,9 +707,11 @@ void SkiaRenderer::DrawPictureQuad(const PictureDrawQuad* quad, +@@ -708,9 +708,11 @@ void SkiaRenderer::DrawPictureQuad(const PictureDrawQuad* quad, std::unique_ptr color_transform_canvas; // TODO(enne): color transform needs to be replicated in gles2_cmd_decoder @@ -268,7 +268,7 @@ index 4aa391a6bfe2408b84da4ffe5b3dc27a0544d0ca..649efb7ed16e6f4850010c8b9df5d0b7 service_manager::switches::kGpuSandboxAllowSysVShm, service_manager::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index ecbfc65e474409a0d073362d6734047b098d2c7f..2aa5ba9d51adda083a5eeac2c200b2ffba106b21 100644 +index 5759d527ecc355a88cb8632a2cebdf2e76ab3940..2c9d59feb24caf009dfd909f19334486ab87177d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -221,6 +221,7 @@ @@ -288,10 +288,10 @@ index ecbfc65e474409a0d073362d6734047b098d2c7f..2aa5ba9d51adda083a5eeac2c200b2ff network::switches::kExplicitlyAllowedPorts, service_manager::switches::kDisableInProcessStackTraces, diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc -index 6d5833dc1bef727aba4c012563c3e161a9dab9ae..3215ab16ad51e7d519baa1e82fd0a9c489b8e31a 100644 +index 3eb59602364dc178fc783867c5dff036c8be70d3..4f4f4c08bf62752df1a47d5e8c91452365b8ea5b 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc -@@ -2641,6 +2641,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( +@@ -2658,6 +2658,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings( settings.main_frame_before_activation_enabled = cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation); diff --git a/patches/common/chromium/disable_detach_webview_frame.patch b/patches/common/chromium/disable_detach_webview_frame.patch index 9178ee7f98..750b3c45ed 100644 --- a/patches/common/chromium/disable_detach_webview_frame.patch +++ b/patches/common/chromium/disable_detach_webview_frame.patch @@ -12,7 +12,7 @@ this patch was introduced in Chrome 66. Update(zcbenz): The bug is still in Chrome 72. diff --git a/content/browser/frame_host/render_frame_proxy_host.cc b/content/browser/frame_host/render_frame_proxy_host.cc -index 656498fdbad93c8fcc758e08653f5417e7406345..476db3bdc90a6bf014e0a2ab4f2b47651ef8e1cc 100644 +index f075640df52ca30b29b03eed1ac5ffdbba995957..09877293148fa486c4b48cbd8d6554f92a330ddc 100644 --- a/content/browser/frame_host/render_frame_proxy_host.cc +++ b/content/browser/frame_host/render_frame_proxy_host.cc @@ -263,6 +263,12 @@ void RenderFrameProxyHost::SetDestructionCallback( diff --git a/patches/common/chromium/disable_hidden.patch b/patches/common/chromium/disable_hidden.patch index e4b0bb9378..47e355ace3 100644 --- a/patches/common/chromium/disable_hidden.patch +++ b/patches/common/chromium/disable_hidden.patch @@ -5,10 +5,10 @@ Subject: disable_hidden.patch diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 801517c670e4cfb5adcfa0a14d2626c2be90e833..e63f00a1c4013f1e07f3b1adcdb34ea24eac3916 100644 +index 316e7cf9819c0ffe3a15a55e6bcada781d6d7832..d90f50ed29740b14e6259c4d6d14434222ddbfb4 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -763,6 +763,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -760,6 +760,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; diff --git a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch index 4110fae10f..ef542f6671 100644 --- a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch +++ b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch @@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch See https://github.com/electron/electron/issues/10754 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc -index 09418dad61316ad4534e8f9c71cc153ffc5e0ffd..20e90ed973b0de71c07cbcd21578d7eee8cab06e 100644 +index 21ef6fd598dfedb5d443fc7162d08af19c137bf1..b3d157158db866aaa8f5132d71453ced61553577 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc -@@ -3675,7 +3675,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, +@@ -3665,7 +3665,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, "frame that never had a user gesture since its load. " "https://www.chromestatus.com/feature/5082396709879808"; Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message); diff --git a/patches/common/chromium/exclude-a-few-test-files-from-build.patch b/patches/common/chromium/exclude-a-few-test-files-from-build.patch index 17862e37d7..d7476dc9d9 100644 --- a/patches/common/chromium/exclude-a-few-test-files-from-build.patch +++ b/patches/common/chromium/exclude-a-few-test-files-from-build.patch @@ -7,7 +7,7 @@ Compilation of those files fails with the Chromium 68. Remove the patch during the Chromium 69 upgrade. diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn -index 145086ca57c6b72512c01e612087d4e994991bcb..2ccb86380fa944a783e8f7c131ebe71db7022f2d 100644 +index 1277dd8a03d1a5931b751781f219b617542be500..09809f43489711b117b0751f322d081b7ea1c3c8 100644 --- a/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn @@ -1741,7 +1741,7 @@ jumbo_source_set("blink_platform_unittests_sources") { diff --git a/patches/common/chromium/frame_host_manager.patch b/patches/common/chromium/frame_host_manager.patch index 3b4ad54443..87a979ffbb 100644 --- a/patches/common/chromium/frame_host_manager.patch +++ b/patches/common/chromium/frame_host_manager.patch @@ -108,7 +108,7 @@ index 53586512b68f79ebf9addf0d344a5a0785d89877..1417ce14d9e976da08c8924e32d2cb8e } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index e2f2b8e8d09d1f14b58eb8b093042b89141cdd35..84b324992f22a65030b8badc05f6ce542929dea6 100644 +index f43321b9f7513a1e51367bbd38006e7e2f930923..2d1eb5e9f7c9494920e626a1c89cb3417627d12d 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -48,6 +48,16 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info, @@ -129,7 +129,7 @@ index e2f2b8e8d09d1f14b58eb8b093042b89141cdd35..84b324992f22a65030b8badc05f6ce54 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 5dc21230970fe23a25ad6e811d65c434760d1d1b..031332e91cf38cb3d69cd73778a9e4a0701f7645 100644 +index 73ea7c49ee5993536902f21a51c8cd3bbe30e3f2..de03cae23d8c9e93181562f9d09f215ce8eddc2f 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -206,8 +206,37 @@ CONTENT_EXPORT void OverrideOnBindInterface( diff --git a/patches/common/chromium/mas-cfisobjc.patch b/patches/common/chromium/mas-cfisobjc.patch index 7757b2f9b6..b2f9271fdd 100644 --- a/patches/common/chromium/mas-cfisobjc.patch +++ b/patches/common/chromium/mas-cfisobjc.patch @@ -6,7 +6,7 @@ Subject: mas-cfisobjc.patch Removes usage of the _CFIsObjC private API. diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm -index 38954c89527012ec72503240b0197bc24110d3ad..aebb6ec5815220f47a79dac59443e3b4bf3f0416 100644 +index 5046eedeb4391903e661c93d855035069c0d8e90..e96337ed71ce64d4172878d682cdea79f80f03ae 100644 --- a/base/mac/foundation_util.mm +++ b/base/mac/foundation_util.mm @@ -26,7 +26,6 @@ @@ -17,7 +17,7 @@ index 38954c89527012ec72503240b0197bc24110d3ad..aebb6ec5815220f47a79dac59443e3b4 #endif } // extern "C" -@@ -325,8 +324,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { +@@ -326,8 +325,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) { const_cast(reinterpret_cast(cf_val)); DCHECK(!cf_val || CTFontGetTypeID() == CFGetTypeID(cf_val) || @@ -27,7 +27,7 @@ index 38954c89527012ec72503240b0197bc24110d3ad..aebb6ec5815220f47a79dac59443e3b4 return ns_val; } -@@ -394,9 +392,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { +@@ -395,9 +393,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) { return (CTFontRef)(cf_val); } diff --git a/patches/common/chromium/mas_no_private_api.patch b/patches/common/chromium/mas_no_private_api.patch index 316757d4cf..9e0fecdb98 100644 --- a/patches/common/chromium/mas_no_private_api.patch +++ b/patches/common/chromium/mas_no_private_api.patch @@ -38,7 +38,7 @@ index d38fa48b8b890d90f2911995a2a51c249005c827..5fe68c71fe101a307ef565013a91b109 // is concerned. @property(nonatomic, readonly) NSString* subrole; diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm -index 9e5070bd034c16905ec29c7aba6471b41b5f16f4..9bf52f660b61c1a42c051d610318f6f2443ae91f 100644 +index d1e716429cd96588c2df06d7c55ed6053d190f64..e1f41179b1cb3f9c68900ad0f0b0dbad6e989746 100644 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm @@ -135,6 +135,7 @@ diff --git a/patches/common/chromium/out_of_process_instance.patch b/patches/common/chromium/out_of_process_instance.patch index ebb6d09e53..78da4ba046 100644 --- a/patches/common/chromium/out_of_process_instance.patch +++ b/patches/common/chromium/out_of_process_instance.patch @@ -5,10 +5,10 @@ Subject: out_of_process_instance.patch diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc -index aa9db1908a00e89a88d2ea27b0e05184ac3e5aeb..86c299624bcd83847a4b651c1f0d53f7f6df1cd5 100644 +index 7ef9271e59d7e6841150975f8b74b3565a6aaae5..23502ff1f08b7332eb32121f52f040520241b084 100644 --- a/pdf/out_of_process_instance.cc +++ b/pdf/out_of_process_instance.cc -@@ -461,7 +461,9 @@ bool OutOfProcessInstance::Init(uint32_t argc, +@@ -462,7 +462,9 @@ bool OutOfProcessInstance::Init(uint32_t argc, std::string document_url = document_url_var.AsString(); base::StringPiece document_url_piece(document_url); is_print_preview_ = IsPrintPreviewUrl(document_url_piece); diff --git a/patches/common/chromium/printing.patch b/patches/common/chromium/printing.patch index 0b169b4de0..12f2bd8ed2 100644 --- a/patches/common/chromium/printing.patch +++ b/patches/common/chromium/printing.patch @@ -27,7 +27,7 @@ index 961e1560aa914942c01372c354059d6d6b72c50f..aa51b2b2b0e1950f7a660d48bda5e61e #include "printing/printed_document.h" #include "printing/printing_utils.h" diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc -index cfd13b0ac5956fe28ab81bb3cd3d71ab6fdcb747..6d4d1e2e4478bb60a1c53458a3dc7d84cd28125c 100644 +index 007b003dd58d44acd6e1351c237fca6463d90602..4ddbf18e335609623aba42cc39a7c977fe8c5229 100644 --- a/chrome/browser/printing/print_view_manager_base.cc +++ b/chrome/browser/printing/print_view_manager_base.cc @@ -27,10 +27,7 @@ @@ -49,7 +49,7 @@ index cfd13b0ac5956fe28ab81bb3cd3d71ab6fdcb747..6d4d1e2e4478bb60a1c53458a3dc7d84 #include "mojo/public/cpp/system/buffer.h" #include "printing/buildflags/buildflags.h" #include "printing/metafile_skia.h" -@@ -67,6 +65,8 @@ using PrintSettingsCallback = +@@ -64,6 +62,8 @@ using PrintSettingsCallback = base::OnceCallback)>; void ShowWarningMessageBox(const base::string16& message) { @@ -58,7 +58,7 @@ index cfd13b0ac5956fe28ab81bb3cd3d71ab6fdcb747..6d4d1e2e4478bb60a1c53458a3dc7d84 // Runs always on the UI thread. static bool is_dialog_shown = false; if (is_dialog_shown) -@@ -75,6 +75,7 @@ void ShowWarningMessageBox(const base::string16& message) { +@@ -72,6 +72,7 @@ void ShowWarningMessageBox(const base::string16& message) { base::AutoReset auto_reset(&is_dialog_shown, true); chrome::ShowWarningMessageBox(nullptr, base::string16(), message); @@ -121,7 +121,7 @@ index cfd13b0ac5956fe28ab81bb3cd3d71ab6fdcb747..6d4d1e2e4478bb60a1c53458a3dc7d84 #endif ReleasePrinterQuery(); -@@ -585,6 +590,9 @@ void PrintViewManagerBase::ReleasePrintJob() { +@@ -594,6 +599,9 @@ void PrintViewManagerBase::ReleasePrintJob() { content::RenderFrameHost* rfh = printing_rfh_; printing_rfh_ = nullptr; @@ -166,7 +166,7 @@ index a2569836d04ff968e690215f56f6de3b6d884874..6ddec22641b74d5484c2e0d4f62e5d71 bool printing_succeeded_; diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc -index 8cf82aafd3fd2b8546b8fabfd8b2cc107846681d..07274855cf8311eb4f71a57b171cc04d66edbf31 100644 +index df6cdee86c1bc34eef013f7d36deb77a8dfa7ecb..2692f831de4699b68a5b79982d440c318e40da69 100644 --- a/chrome/browser/printing/printing_message_filter.cc +++ b/chrome/browser/printing/printing_message_filter.cc @@ -22,6 +22,7 @@ @@ -177,7 +177,7 @@ index 8cf82aafd3fd2b8546b8fabfd8b2cc107846681d..07274855cf8311eb4f71a57b171cc04d #include "content/public/browser/render_frame_host.h" #include "content/public/browser/web_contents.h" #include "content/public/common/child_process_host.h" -@@ -100,20 +101,23 @@ PrintViewManager* GetPrintViewManager(int render_process_id, +@@ -82,20 +83,23 @@ PrintViewManager* GetPrintViewManager(int render_process_id, } // namespace @@ -204,7 +204,7 @@ index 8cf82aafd3fd2b8546b8fabfd8b2cc107846681d..07274855cf8311eb4f71a57b171cc04d } PrintingMessageFilter::~PrintingMessageFilter() { -@@ -194,11 +198,13 @@ void PrintingMessageFilter::OnTempFileForPrintingWritten(int render_frame_id, +@@ -131,11 +135,13 @@ bool PrintingMessageFilter::OnMessageReceived(const IPC::Message& message) { void PrintingMessageFilter::OnGetDefaultPrintSettings(IPC::Message* reply_msg) { DCHECK_CURRENTLY_ON(BrowserThread::IO); scoped_refptr printer_query; @@ -218,7 +218,7 @@ index 8cf82aafd3fd2b8546b8fabfd8b2cc107846681d..07274855cf8311eb4f71a57b171cc04d printer_query = queue_->PopPrinterQuery(0); if (!printer_query.get()) { printer_query = -@@ -309,11 +315,13 @@ void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, +@@ -221,11 +227,13 @@ void PrintingMessageFilter::OnUpdatePrintSettings(int document_cookie, base::Value job_settings, IPC::Message* reply_msg) { scoped_refptr printer_query; @@ -232,7 +232,7 @@ index 8cf82aafd3fd2b8546b8fabfd8b2cc107846681d..07274855cf8311eb4f71a57b171cc04d printer_query = queue_->PopPrinterQuery(document_cookie); if (!printer_query.get()) { printer_query = queue_->CreatePrinterQuery( -@@ -372,7 +380,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( +@@ -284,7 +292,7 @@ void PrintingMessageFilter::OnUpdatePrintSettingsReply( #if BUILDFLAG(ENABLE_PRINT_PREVIEW) void PrintingMessageFilter::OnCheckForCancel(const PrintHostMsg_PreviewIds& ids, bool* cancel) { @@ -242,12 +242,12 @@ index 8cf82aafd3fd2b8546b8fabfd8b2cc107846681d..07274855cf8311eb4f71a57b171cc04d #endif diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h -index 63b71257e4ad25fa27b461969ffec0afb9505203..e18dfc55a02db46300fe96fda00199271d07ba7a 100644 +index c4d586e62f14c3002993a2dbc7e478027d8f9b02..85d5fc55e93bea0080cd03316f29856bcaf27b59 100644 --- a/chrome/browser/printing/printing_message_filter.h +++ b/chrome/browser/printing/printing_message_filter.h -@@ -29,6 +29,10 @@ struct FileDescriptor; - } - #endif +@@ -23,6 +23,10 @@ struct PrintHostMsg_PreviewIds; + struct PrintHostMsg_ScriptedPrint_Params; + class Profile; +namespace content { +class BrowserContext; @@ -256,7 +256,7 @@ index 63b71257e4ad25fa27b461969ffec0afb9505203..e18dfc55a02db46300fe96fda0019927 namespace printing { class PrintQueriesQueue; -@@ -38,7 +42,8 @@ class PrinterQuery; +@@ -32,7 +36,8 @@ class PrinterQuery; // renderer process on the IPC thread. class PrintingMessageFilter : public content::BrowserMessageFilter { public: @@ -264,10 +264,10 @@ index 63b71257e4ad25fa27b461969ffec0afb9505203..e18dfc55a02db46300fe96fda0019927 + PrintingMessageFilter(int render_process_id, + content::BrowserContext* browser_context); - // content::BrowserMessageFilter methods. - void OverrideThreadForMessage(const IPC::Message& message, + // content::BrowserMessageFilter: + bool OnMessageReceived(const IPC::Message& message) override; diff --git a/components/printing/common/print_messages.h b/components/printing/common/print_messages.h -index 7dd892feb181293d3c52fb6a3fd9600c899ee2d3..1ca51744e1046e5dfbedf5af8c6f75358e84acb7 100644 +index 1802034a6e15a6ad8b0d9591cfb79ba5873dc982..a827091facdb4f6b1d74ce826c3492ced27c008e 100644 --- a/components/printing/common/print_messages.h +++ b/components/printing/common/print_messages.h @@ -368,7 +368,10 @@ IPC_MESSAGE_ROUTED0(PrintMsg_PrintNodeUnderContextMenu) @@ -283,7 +283,7 @@ index 7dd892feb181293d3c52fb6a3fd9600c899ee2d3..1ca51744e1046e5dfbedf5af8c6f7535 // Like PrintMsg_PrintPages, but using the print preview document's frame/node. IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog) diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc -index 0af11fbfa50e334af7926f7e98304960869415d3..d747dd0f2e162b1b4efa89a99ccc0f417202e8e8 100644 +index cd9306860bba75602109959c93817471e119fb50..5255d4cea70e959fae9035e091d7a60f470fc1aa 100644 --- a/components/printing/renderer/print_render_frame_helper.cc +++ b/components/printing/renderer/print_render_frame_helper.cc @@ -1115,7 +1115,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) { @@ -390,7 +390,7 @@ index 0af11fbfa50e334af7926f7e98304960869415d3..d747dd0f2e162b1b4efa89a99ccc0f41 if (print_settings.params.dpi.IsEmpty() || !print_settings.params.document_cookie) { DidFinishPrinting(OK); // Release resources and fail silently on failure. -@@ -1868,10 +1884,24 @@ std::vector PrintRenderFrameHelper::GetPrintedPages( +@@ -1866,10 +1882,24 @@ std::vector PrintRenderFrameHelper::GetPrintedPages( return printed_pages; } @@ -418,7 +418,7 @@ index 0af11fbfa50e334af7926f7e98304960869415d3..d747dd0f2e162b1b4efa89a99ccc0f41 // Check if the printer returned any settings, if the settings is empty, we // can safely assume there are no printer drivers configured. So we safely // terminate. -@@ -1891,12 +1921,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { +@@ -1889,12 +1919,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) { return result; } diff --git a/patches/common/chromium/render_widget_host_view_mac.patch b/patches/common/chromium/render_widget_host_view_mac.patch index 2b511921e7..811c5f3ee1 100644 --- a/patches/common/chromium/render_widget_host_view_mac.patch +++ b/patches/common/chromium/render_widget_host_view_mac.patch @@ -5,7 +5,7 @@ Subject: render_widget_host_view_mac.patch diff --git a/content/browser/renderer_host/render_widget_host_view_cocoa.mm b/content/browser/renderer_host/render_widget_host_view_cocoa.mm -index 57a608c1a1d4463ba813e1d9132e7f565be85305..be122f9ce470519e630d418550a60324c73a3f42 100644 +index 673c7dacfa323462af4cc53843294e512d342dc7..8e8fae2db94886f4fab190151427e74d627a52ca 100644 --- a/content/browser/renderer_host/render_widget_host_view_cocoa.mm +++ b/content/browser/renderer_host/render_widget_host_view_cocoa.mm @@ -144,6 +144,11 @@ void ExtractUnderlines(NSAttributedString* string, @@ -41,7 +41,7 @@ index 57a608c1a1d4463ba813e1d9132e7f565be85305..be122f9ce470519e630d418550a60324 // We only handle key down events and just simply forward other events. if (eventType != NSKeyDown) { clientHelper_->ForwardKeyboardEvent(event, latency_info); -@@ -1506,9 +1518,11 @@ - (id)accessibilityFocusedUIElement { +@@ -1513,9 +1525,11 @@ - (id)accessibilityFocusedUIElement { // Since this implementation doesn't have to wait any IPC calls, this doesn't // make any key-typing jank. --hbono 7/23/09 // @@ -53,7 +53,7 @@ index 57a608c1a1d4463ba813e1d9132e7f565be85305..be122f9ce470519e630d418550a60324 - (NSArray*)validAttributesForMarkedText { // This code is just copied from WebKit except renaming variables. -@@ -1517,7 +1531,10 @@ - (NSArray*)validAttributesForMarkedText { +@@ -1524,7 +1538,10 @@ - (NSArray*)validAttributesForMarkedText { initWithObjects:NSUnderlineStyleAttributeName, NSUnderlineColorAttributeName, NSMarkedClauseSegmentAttributeName, diff --git a/patches/common/chromium/support_mixed_sandbox_with_zygote.patch b/patches/common/chromium/support_mixed_sandbox_with_zygote.patch index baf6bad3c1..b27bdd72f9 100644 --- a/patches/common/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/common/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index e27ad6494834c9948f1b85fcef894372d62c5c23..ecbfc65e474409a0d073362d6734047b098d2c7f 100644 +index 2841e44002e7458e71a32a5ab470469af21c629c..5759d527ecc355a88cb8632a2cebdf2e76ab3940 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -470,6 +470,10 @@ class RendererSandboxedProcessLauncherDelegate diff --git a/patches/common/chromium/web_contents.patch b/patches/common/chromium/web_contents.patch index 1594991940..f7f4ce7101 100644 --- a/patches/common/chromium/web_contents.patch +++ b/patches/common/chromium/web_contents.patch @@ -5,7 +5,7 @@ Subject: web_contents.patch diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 9e41df626aa90ad9afbadcaca76c02dbaec4d719..9d9d16afd710153eac4fe70e87d1b7eecbce831f 100644 +index bdc3ae99f2b3031dbfd8f347e01681b459ea819b..6df5aa205b034789ad19daae960babb8eb2e4304 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -2033,6 +2033,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { diff --git a/patches/common/chromium/webview_cross_drag.patch b/patches/common/chromium/webview_cross_drag.patch index 3e01cd5197..9520f92a12 100644 --- a/patches/common/chromium/webview_cross_drag.patch +++ b/patches/common/chromium/webview_cross_drag.patch @@ -5,7 +5,7 @@ Subject: webview_cross_drag.patch diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc -index 8e02ca39a947abc26b001f230f4e568fa9e61a89..dfed57b3f79ad359a3807567765fa70214771a3a 100644 +index 68fb77a4a2f6528e9344741e25bfc2ce60069ecb..3b06cee64b4400ca57f24b52384bb2b60649cff7 100644 --- a/content/browser/web_contents/web_contents_view_aura.cc +++ b/content/browser/web_contents/web_contents_view_aura.cc @@ -676,6 +676,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const { @@ -17,10 +17,10 @@ index 8e02ca39a947abc26b001f230f4e568fa9e61a89..dfed57b3f79ad359a3807567765fa702 GetRenderViewHostID(web_contents_->GetRenderViewHost()) != drag_start_view_id_; diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm -index 576d60b4718e7742ee3eab31904590ed0b447e88..c28be0a78759b48954298cd9bbfdae37a0b72fb8 100644 +index 9423f9c8a225f9d18f6dcd0b9f7de033cbe495df..e7fe311327f698a760c09db2c7677a10c59f5224 100644 --- a/content/browser/web_contents/web_drag_dest_mac.mm +++ b/content/browser/web_contents/web_drag_dest_mac.mm -@@ -335,6 +335,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { +@@ -336,6 +336,7 @@ - (void)setDragStartTrackersForProcess:(int)processID { } - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH { diff --git a/patches/common/v8/add_realloc.patch b/patches/common/v8/add_realloc.patch index 10d8c13aad..88bcaa2b94 100644 --- a/patches/common/v8/add_realloc.patch +++ b/patches/common/v8/add_realloc.patch @@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement Realloc on the v8 side. diff --git a/include/v8.h b/include/v8.h -index c56c31b31f13dd55dc528afb2b3468f48fbfa177..4d513fc2e28ce60ae4c0e50a56e4e59084a017cf 100644 +index b23114f4ff8bfadffb35df4d92a832a2320c718e..fc20cf50c3a6dc66c37b8b46d06db7a2f0f558ce 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -4608,6 +4608,13 @@ class V8_EXPORT ArrayBuffer : public Object { +@@ -4610,6 +4610,13 @@ class V8_EXPORT ArrayBuffer : public Object { */ virtual void* AllocateUninitialized(size_t length) = 0; @@ -30,7 +30,7 @@ index c56c31b31f13dd55dc528afb2b3468f48fbfa177..4d513fc2e28ce60ae4c0e50a56e4e590 * Free the memory block of size |length|, pointed to by |data|. * That memory is guaranteed to be previously allocated by |Allocate|. diff --git a/src/api.cc b/src/api.cc -index 3d8611671fe8aabc939c62b9c9b5169ec9245456..95d242de7d11b1ea990d277d2f09c23749401f5e 100644 +index 23b496706a310f03331d0cefe85ea1ca94778d7a..55b2a1a2da257924eba7e3757994d68c1b508367 100644 --- a/src/api.cc +++ b/src/api.cc @@ -512,6 +512,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { diff --git a/patches/common/v8/array_buffer.patch b/patches/common/v8/array_buffer.patch index 8c8c357545..4fe7cbc12b 100644 --- a/patches/common/v8/array_buffer.patch +++ b/patches/common/v8/array_buffer.patch @@ -5,10 +5,10 @@ Subject: array_buffer.patch diff --git a/include/v8.h b/include/v8.h -index 4d513fc2e28ce60ae4c0e50a56e4e59084a017cf..fd061fde06956418373ded038f6f37e4488ac1a3 100644 +index fc20cf50c3a6dc66c37b8b46d06db7a2f0f558ce..f23567c1429ae0bbc5f916e4ee0a1190dae8d88f 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -7705,6 +7705,9 @@ class V8_EXPORT Isolate { +@@ -7707,6 +7707,9 @@ class V8_EXPORT Isolate { */ void SetIdle(bool is_idle); @@ -19,7 +19,7 @@ index 4d513fc2e28ce60ae4c0e50a56e4e59084a017cf..fd061fde06956418373ded038f6f37e4 bool InContext(); diff --git a/src/api.cc b/src/api.cc -index 95d242de7d11b1ea990d277d2f09c23749401f5e..d963a10525dbdeb60c9d762f1fa5038c4d410010 100644 +index 55b2a1a2da257924eba7e3757994d68c1b508367..279edffbcc283ebfd11faf263d60f5a20c121d87 100644 --- a/src/api.cc +++ b/src/api.cc @@ -7966,6 +7966,13 @@ void Isolate::SetIdle(bool is_idle) { diff --git a/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch index ca1aaa1391..d33166cb40 100644 --- a/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch +++ b/patches/common/v8/build-torque-with-x64-toolchain-on-arm.patch @@ -6,7 +6,7 @@ Subject: build-torque-with-x64-toolchain-on-arm.patch torque binary has to be run during the build. diff --git a/BUILD.gn b/BUILD.gn -index 8bdc4ac595e82e1272ade2f715188bcb07653c82..b593ac20ef722146ca0c50ba01d6ee6b8d6d3035 100644 +index b70c09aa34aa7547e7d26d9e35795904a17c092f..0fa207082101165ec5d888cd21e4ca916ee458a9 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -184,7 +184,8 @@ declare_args() { @@ -19,7 +19,7 @@ index 8bdc4ac595e82e1272ade2f715188bcb07653c82..b593ac20ef722146ca0c50ba01d6ee6b v8_generator_toolchain = "//build/toolchain/linux:clang_x64" } -@@ -3351,7 +3352,7 @@ if (v8_monolithic) { +@@ -3352,7 +3353,7 @@ if (v8_monolithic) { # Executables # @@ -28,7 +28,7 @@ index 8bdc4ac595e82e1272ade2f715188bcb07653c82..b593ac20ef722146ca0c50ba01d6ee6b v8_executable("bytecode_builtins_list_generator") { visibility = [ ":*" ] # Only targets in this file can depend on this. -@@ -3401,7 +3402,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { +@@ -3402,7 +3403,7 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { } } diff --git a/patches/common/v8/build_gn.patch b/patches/common/v8/build_gn.patch index 85e396e8d5..e988d15f4a 100644 --- a/patches/common/v8/build_gn.patch +++ b/patches/common/v8/build_gn.patch @@ -5,7 +5,7 @@ Subject: build_gn.patch diff --git a/BUILD.gn b/BUILD.gn -index cc9b7a906a111451eff86e8f78571617256136f1..139a777e304ab0449693664feb248a714995aa26 100644 +index 16e0b60ca784417321871cb2e192b74fba3b3131..ee2607fad94220c6390b129ee2f069775b00a5d2 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -236,7 +236,7 @@ config("internal_config") { @@ -17,7 +17,7 @@ index cc9b7a906a111451eff86e8f78571617256136f1..139a777e304ab0449693664feb248a71 defines = [ "BUILDING_V8_SHARED" ] } } -@@ -3386,6 +3386,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { +@@ -3387,6 +3387,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/common/v8/dcheck.patch b/patches/common/v8/dcheck.patch index 3a3c3b79b6..49cc078d85 100644 --- a/patches/common/v8/dcheck.patch +++ b/patches/common/v8/dcheck.patch @@ -5,10 +5,10 @@ Subject: dcheck.patch diff --git a/src/api.cc b/src/api.cc -index 63538cc4ab571f9be27ea8e0d1e7df94ff3dac71..5b8948425fd9f9db2f175eb2d0f435f4c045be0c 100644 +index c796a6ee6426ff88b6a08bf1d858b720e1526b86..ea0727bc4cd746c14b0fb94513c32b70e286bb44 100644 --- a/src/api.cc +++ b/src/api.cc -@@ -8613,7 +8613,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { +@@ -8611,7 +8611,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { void Isolate::RunMicrotasks() { @@ -18,10 +18,10 @@ index 63538cc4ab571f9be27ea8e0d1e7df94ff3dac71..5b8948425fd9f9db2f175eb2d0f435f4 isolate->default_microtask_queue()->RunMicrotasks(isolate); } diff --git a/src/heap/heap.cc b/src/heap/heap.cc -index 6a277353d721feb9f76b70e4e18f17f1deb5e281..d3f403555669838124d6720186230b01b18d6092 100644 +index d399d070b84b948840de84a92c64e366e5aa42bb..413e18d9cdf6c947c86752a86473d095cc29c011 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc -@@ -4719,9 +4719,9 @@ void Heap::TearDown() { +@@ -4773,9 +4773,9 @@ void Heap::TearDown() { void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback, GCType gc_type, void* data) { DCHECK_NOT_NULL(callback); diff --git a/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch b/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch index a7c9f39a34..82fe3a340c 100644 --- a/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch +++ b/patches/common/v8/deps_backport_detailed_line_info_for_cpu_profiler.patch @@ -20,10 +20,10 @@ Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater diff --git a/src/flag-definitions.h b/src/flag-definitions.h -index 82729fe9a3e8ac4c7ea7ec984421d2af055d4922..b5de2854a6ff348b44f0bae8169b1d16a0209d71 100644 +index d262fb70129fe93cab35fffbca01f38dac461a30..deec6d034505ca531db6acc711bce7bff62190b3 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h -@@ -1289,7 +1289,7 @@ DEFINE_BOOL(log_function_events, false, +@@ -1290,7 +1290,7 @@ DEFINE_BOOL(log_function_events, false, DEFINE_BOOL(prof, false, "Log statistical profiling information (implies --log-code).") diff --git a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch index dfea700f3f..caf17d248f 100644 --- a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch +++ b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch @@ -22,10 +22,10 @@ Reviewed-By: Yang Guo Reviewed-By: Michaël Zasso diff --git a/include/v8.h b/include/v8.h -index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83dbd57eb4 100644 +index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b85294e9ffae 100644 --- a/include/v8.h +++ b/include/v8.h -@@ -994,6 +994,10 @@ class V8_EXPORT PrimitiveArray { +@@ -996,6 +996,10 @@ class V8_EXPORT PrimitiveArray { public: static Local New(Isolate* isolate, int length); int Length() const; @@ -36,7 +36,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 void Set(Isolate* isolate, int index, Local item); Local Get(Isolate* isolate, int index); }; -@@ -1697,6 +1701,8 @@ class V8_EXPORT StackTrace { +@@ -1699,6 +1703,8 @@ class V8_EXPORT StackTrace { /** * Returns a StackFrame at a particular index. */ @@ -45,7 +45,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 Local GetFrame(Isolate* isolate, uint32_t index) const; /** -@@ -2405,6 +2411,13 @@ class V8_EXPORT Value : public Data { +@@ -2407,6 +2413,13 @@ class V8_EXPORT Value : public Data { V8_DEPRECATE_SOON("Use maybe version", Local ToInt32(Isolate* isolate) const); @@ -59,7 +59,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 /** * Attempts to convert a string to an array index. * Returns an empty handle if the conversion fails. -@@ -2424,7 +2437,14 @@ class V8_EXPORT Value : public Data { +@@ -2426,7 +2439,14 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT Maybe Int32Value(Local context) const; @@ -74,7 +74,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 V8_WARN_UNUSED_RESULT Maybe Equals(Local context, Local that) const; bool StrictEquals(Local that) const; -@@ -2531,6 +2551,8 @@ class V8_EXPORT String : public Name { +@@ -2533,6 +2553,8 @@ class V8_EXPORT String : public Name { * Returns the number of bytes in the UTF-8 encoded * representation of this string. */ @@ -83,7 +83,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 int Utf8Length(Isolate* isolate) const; /** -@@ -2587,12 +2609,23 @@ class V8_EXPORT String : public Name { +@@ -2589,12 +2611,23 @@ class V8_EXPORT String : public Name { // 16-bit character codes. int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1, int options = NO_OPTIONS) const; @@ -107,7 +107,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 /** * A zero length string. -@@ -2784,6 +2817,9 @@ class V8_EXPORT String : public Name { +@@ -2786,6 +2819,9 @@ class V8_EXPORT String : public Name { */ static Local Concat(Isolate* isolate, Local left, Local right); @@ -117,7 +117,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 /** * Creates a new external string using the data defined in the given -@@ -2852,6 +2888,8 @@ class V8_EXPORT String : public Name { +@@ -2854,6 +2890,8 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Utf8Value { public: @@ -126,7 +126,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 Utf8Value(Isolate* isolate, Local obj); ~Utf8Value(); char* operator*() { return str_; } -@@ -2875,6 +2913,7 @@ class V8_EXPORT String : public Name { +@@ -2877,6 +2915,7 @@ class V8_EXPORT String : public Name { */ class V8_EXPORT Value { public: @@ -134,7 +134,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 Value(Isolate* isolate, Local obj); ~Value(); uint16_t* operator*() { return str_; } -@@ -5269,6 +5308,8 @@ class V8_EXPORT BooleanObject : public Object { +@@ -5271,6 +5310,8 @@ class V8_EXPORT BooleanObject : public Object { class V8_EXPORT StringObject : public Object { public: static Local New(Isolate* isolate, Local value); @@ -143,7 +143,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 Local ValueOf() const; -@@ -10123,6 +10164,30 @@ template Value* Value::Cast(T* value) { +@@ -10127,6 +10168,30 @@ template Value* Value::Cast(T* value) { } @@ -175,7 +175,7 @@ index fd061fde06956418373ded038f6f37e4488ac1a3..46592e3e57dbb00b617c5c8ad29b0f83 #ifdef V8_ENABLE_CHECKS CheckCast(value); diff --git a/src/api.cc b/src/api.cc -index d963a10525dbdeb60c9d762f1fa5038c4d410010..63538cc4ab571f9be27ea8e0d1e7df94ff3dac71 100644 +index 279edffbcc283ebfd11faf263d60f5a20c121d87..c796a6ee6426ff88b6a08bf1d858b720e1526b86 100644 --- a/src/api.cc +++ b/src/api.cc @@ -2181,6 +2181,10 @@ int PrimitiveArray::Length() const { @@ -330,7 +330,7 @@ index d963a10525dbdeb60c9d762f1fa5038c4d410010..63538cc4ab571f9be27ea8e0d1e7df94 Local v8::StringObject::New(Isolate* v8_isolate, Local value) { i::Handle string = Utils::OpenHandle(*value); -@@ -8927,6 +9009,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) { +@@ -8925,6 +9007,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8Isolate) { return isolate->default_microtask_queue()->IsRunningMicrotasks(); } @@ -340,7 +340,7 @@ index d963a10525dbdeb60c9d762f1fa5038c4d410010..63538cc4ab571f9be27ea8e0d1e7df94 String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local obj) : str_(nullptr), length_(0) { if (obj.IsEmpty()) return; -@@ -8946,6 +9031,9 @@ String::Utf8Value::~Utf8Value() { +@@ -8944,6 +9029,9 @@ String::Utf8Value::~Utf8Value() { i::DeleteArray(str_); } diff --git a/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch b/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch index 2b78002080..b40980e231 100644 --- a/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch +++ b/patches/common/v8/do_not_run_arm_arm64_mksnapshot_binaries.patch @@ -10,10 +10,10 @@ Electron does, so this patch makes sure that the build doesn't try to run the mksnapshot binary if it was built for arm or arm64. diff --git a/BUILD.gn b/BUILD.gn -index b593ac20ef722146ca0c50ba01d6ee6b8d6d3035..da0d7810547ab1205f7ad768b76ce27b197f6505 100644 +index 0fa207082101165ec5d888cd21e4ca916ee458a9..129b6ce1ba23089254fb0da8a67e4bdfd95cb4d1 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -1240,9 +1240,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) { +@@ -1241,9 +1241,19 @@ if (v8_use_snapshot && v8_use_external_startup_data) { ] public_deps = [ ":natives_blob", diff --git a/patches/common/v8/expose_mksnapshot.patch b/patches/common/v8/expose_mksnapshot.patch index 8b0d9f255a..55559c93e8 100644 --- a/patches/common/v8/expose_mksnapshot.patch +++ b/patches/common/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to build mksnapshot on arm. diff --git a/BUILD.gn b/BUILD.gn -index 139a777e304ab0449693664feb248a714995aa26..8bdc4ac595e82e1272ade2f715188bcb07653c82 100644 +index ee2607fad94220c6390b129ee2f069775b00a5d2..b70c09aa34aa7547e7d26d9e35795904a17c092f 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -3376,8 +3376,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -3377,8 +3377,6 @@ if (current_toolchain == v8_generator_toolchain) { if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { From 34d7e019ce38f1f6c853b1dfaecfe61af2f5bc4c Mon Sep 17 00:00:00 2001 From: Jeremy Apthorp Date: Thu, 31 Jan 2019 14:14:32 -0800 Subject: [PATCH 36/52] gfx::Path -> SkPath https://chromium-review.googlesource.com/c/1392181 --- atom/browser/ui/views/frameless_view.cc | 3 +-- atom/browser/ui/views/frameless_view.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/atom/browser/ui/views/frameless_view.cc b/atom/browser/ui/views/frameless_view.cc index 8959ee1361..9bbc95cdd8 100644 --- a/atom/browser/ui/views/frameless_view.cc +++ b/atom/browser/ui/views/frameless_view.cc @@ -82,8 +82,7 @@ int FramelessView::NonClientHitTest(const gfx::Point& cursor) { return HTCLIENT; } -void FramelessView::GetWindowMask(const gfx::Size& size, - gfx::Path* window_mask) {} +void FramelessView::GetWindowMask(const gfx::Size& size, SkPath* window_mask) {} void FramelessView::ResetWindowControls() {} diff --git a/atom/browser/ui/views/frameless_view.h b/atom/browser/ui/views/frameless_view.h index a9d1e4b549..fad09d255e 100644 --- a/atom/browser/ui/views/frameless_view.h +++ b/atom/browser/ui/views/frameless_view.h @@ -32,7 +32,7 @@ class FramelessView : public views::NonClientFrameView { gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const override; int NonClientHitTest(const gfx::Point& point) override; - void GetWindowMask(const gfx::Size& size, gfx::Path* window_mask) override; + void GetWindowMask(const gfx::Size& size, SkPath* window_mask) override; void ResetWindowControls() override; void UpdateWindowIcon() override; void UpdateWindowTitle() override; From 70bbbb84bb00a5972d4ac3e087e1082269e8c9ac Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 14:32:55 +0530 Subject: [PATCH 37/52] Rename BlendTowardOppositeLuma() to BlendTowardContrastingEndpoint(). https://chromium-review.googlesource.com/c/chromium/src/+/1400060 --- atom/browser/ui/views/submenu_button.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/ui/views/submenu_button.cc b/atom/browser/ui/views/submenu_button.cc index 1cf2fe7ff9..c984e60ac1 100644 --- a/atom/browser/ui/views/submenu_button.cc +++ b/atom/browser/ui/views/submenu_button.cc @@ -37,7 +37,7 @@ SubmenuButton::SubmenuButton(const base::string16& title, SetInkDropMode(InkDropMode::ON); set_ink_drop_base_color( - color_utils::BlendTowardOppositeLuma(background_color_, 0x61)); + color_utils::BlendTowardMaxContrast(background_color_, 0x61)); } SubmenuButton::~SubmenuButton() {} From 37279822173804e599743302a66056c5a59b64ec Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 14:34:33 +0530 Subject: [PATCH 38/52] Delete tab pulsing feature. https://chromium-review.googlesource.com/c/chromium/src/+/1407958 --- atom/browser/ui/views/menu_delegate.cc | 4 ---- atom/browser/ui/views/menu_delegate.h | 1 - 2 files changed, 5 deletions(-) diff --git a/atom/browser/ui/views/menu_delegate.cc b/atom/browser/ui/views/menu_delegate.cc index 5d6c3e72ca..35e389b521 100644 --- a/atom/browser/ui/views/menu_delegate.cc +++ b/atom/browser/ui/views/menu_delegate.cc @@ -88,10 +88,6 @@ bool MenuDelegate::IsItemChecked(int id) const { return adapter_->IsItemChecked(id); } -void MenuDelegate::SelectionChanged(views::MenuItemView* menu) { - adapter_->SelectionChanged(menu); -} - void MenuDelegate::WillShowMenu(views::MenuItemView* menu) { adapter_->WillShowMenu(menu); } diff --git a/atom/browser/ui/views/menu_delegate.h b/atom/browser/ui/views/menu_delegate.h index 1b26bf35c7..1a22a64f06 100644 --- a/atom/browser/ui/views/menu_delegate.h +++ b/atom/browser/ui/views/menu_delegate.h @@ -50,7 +50,6 @@ class MenuDelegate : public views::MenuDelegate { bool IsCommandEnabled(int id) const override; bool IsCommandVisible(int id) const override; bool IsItemChecked(int id) const override; - void SelectionChanged(views::MenuItemView* menu) override; void WillShowMenu(views::MenuItemView* menu) override; void WillHideMenu(views::MenuItemView* menu) override; void OnMenuClosed(views::MenuItemView* menu) override; From e11589b5be3db90e03cfeeffc04661a47975fff6 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 14:38:36 +0530 Subject: [PATCH 39/52] ui/base: move clipboard to own folder. https://chromium-review.googlesource.com/c/chromium/src/+/1369933 --- atom/common/api/atom_api_clipboard.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/atom/common/api/atom_api_clipboard.cc b/atom/common/api/atom_api_clipboard.cc index 39889e77ee..351eef8427 100644 --- a/atom/common/api/atom_api_clipboard.cc +++ b/atom/common/api/atom_api_clipboard.cc @@ -10,6 +10,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/skia/include/core/SkImageInfo.h" #include "third_party/skia/include/core/SkPixmap.h" +#include "ui/base/clipboard/clipboard_format_type.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" #include "atom/common/node_includes.h" @@ -36,13 +37,15 @@ std::vector Clipboard::AvailableFormats(mate::Arguments* args) { bool Clipboard::Has(const std::string& format_string, mate::Arguments* args) { ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); - ui::Clipboard::FormatType format(ui::Clipboard::GetFormatType(format_string)); + ui::ClipboardFormatType format( + ui::ClipboardFormatType::GetType(format_string)); return clipboard->IsFormatAvailable(format, GetClipboardType(args)); } std::string Clipboard::Read(const std::string& format_string) { ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); - ui::Clipboard::FormatType format(ui::Clipboard::GetFormatType(format_string)); + ui::ClipboardFormatType format( + ui::ClipboardFormatType::GetType(format_string)); std::string data; clipboard->ReadData(format, &data); @@ -66,7 +69,7 @@ void Clipboard::WriteBuffer(const std::string& format, ui::ScopedClipboardWriter writer(GetClipboardType(args)); writer.WriteData( - ui::Clipboard::GetFormatType(format).Serialize(), + ui::ClipboardFormatType::GetType(format).Serialize(), std::string(node::Buffer::Data(buffer), node::Buffer::Length(buffer))); } @@ -98,11 +101,11 @@ base::string16 Clipboard::ReadText(mate::Arguments* args) { base::string16 data; ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); auto type = GetClipboardType(args); - if (clipboard->IsFormatAvailable(ui::Clipboard::GetPlainTextWFormatType(), + if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::GetPlainTextWType(), type)) { clipboard->ReadText(type, &data); } else if (clipboard->IsFormatAvailable( - ui::Clipboard::GetPlainTextFormatType(), type)) { + ui::ClipboardFormatType::GetPlainTextType(), type)) { std::string result; clipboard->ReadAsciiText(type, &result); data = base::ASCIIToUTF16(result); From 8a51c9c2f688a7c16579aa8e0175cc9486c0c1cc Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 14:41:38 +0530 Subject: [PATCH 40/52] REVIEW: Have MouseWheelPhaseHandler agree on whether to route its wheel event https://chromium-review.googlesource.com/c/chromium/src/+/1401664 --- atom/browser/osr/osr_render_widget_host_view.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index 04a6afd235..e4f49cbc06 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -1080,7 +1080,11 @@ void OffScreenRenderWidgetHostView::SendMouseWheelEvent( blink::WebMouseWheelEvent mouse_wheel_event(event); - mouse_wheel_phase_handler_.SendWheelEndForTouchpadScrollingIfNeeded(); + bool should_route_event = + render_widget_host_->delegate() && + render_widget_host_->delegate()->GetInputEventRouter(); + mouse_wheel_phase_handler_.SendWheelEndForTouchpadScrollingIfNeeded( + should_route_event); mouse_wheel_phase_handler_.AddPhaseIfNeededAndScheduleEndEvent( mouse_wheel_event, false); From 76fde58e27413dacf6de172dbccfb0a2c8b50cc7 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 14:43:20 +0530 Subject: [PATCH 41/52] REVIEW: ui::Compositor: Simplify how ExternalBeginFrameClient is used. https://chromium-review.googlesource.com/c/chromium/src/+/1388384 --- atom/browser/osr/osr_render_widget_host_view.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index e4f49cbc06..d145da6887 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -349,12 +349,10 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView( content::ImageTransportFactory::GetInstance(); ui::ContextFactoryPrivate* context_factory_private = factory->GetContextFactoryPrivate(); - compositor_.reset( - new ui::Compositor(context_factory_private->AllocateFrameSinkId(), - content::GetContextFactory(), context_factory_private, - base::ThreadTaskRunnerHandle::Get(), - features::IsSurfaceSynchronizationEnabled(), - false /* enable_pixel_canvas */)); + compositor_.reset(new ui::Compositor( + context_factory_private->AllocateFrameSinkId(), + content::GetContextFactory(), context_factory_private, + base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */)); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); compositor_->SetRootLayer(root_layer_.get()); #endif From 66db62791395ab1433eeb1c005310f92a4386237 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 14:45:25 +0530 Subject: [PATCH 42/52] Remove "layouttest" or "layout test" in //content https://chromium-review.googlesource.com/c/chromium/src/+/1367391 --- atom/browser/osr/osr_render_widget_host_view.cc | 2 +- atom/browser/osr/osr_render_widget_host_view.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index d145da6887..bade725d9c 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -509,7 +509,7 @@ bool OffScreenRenderWidgetHostView::IsShowing() { return is_showing_; } -void OffScreenRenderWidgetHostView::EnsureSurfaceSynchronizedForLayoutTest() { +void OffScreenRenderWidgetHostView::EnsureSurfaceSynchronizedForWebTest() { ++latest_capture_sequence_number_; SynchronizeVisualProperties(); } diff --git a/atom/browser/osr/osr_render_widget_host_view.h b/atom/browser/osr/osr_render_widget_host_view.h index b7cd439af9..780e04e9ca 100644 --- a/atom/browser/osr/osr_render_widget_host_view.h +++ b/atom/browser/osr/osr_render_widget_host_view.h @@ -101,7 +101,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, void Show(void) override; void Hide(void) override; bool IsShowing(void) override; - void EnsureSurfaceSynchronizedForLayoutTest() override; + void EnsureSurfaceSynchronizedForWebTest() override; gfx::Rect GetViewBounds(void) const override; gfx::Size GetVisibleViewportSize() const override; void SetInsets(const gfx::Insets&) override; From cece8bce0b03e92e813c1661a0e43bcb8e78417a Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Mon, 4 Feb 2019 14:33:47 +0100 Subject: [PATCH 43/52] chore: make OSR compile on Windows --- atom/browser/osr/osr_render_widget_host_view.cc | 5 ++++- atom/browser/osr/osr_render_widget_host_view.h | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/atom/browser/osr/osr_render_widget_host_view.cc b/atom/browser/osr/osr_render_widget_host_view.cc index bade725d9c..48582705a4 100644 --- a/atom/browser/osr/osr_render_widget_host_view.cc +++ b/atom/browser/osr/osr_render_widget_host_view.cc @@ -23,6 +23,7 @@ #include "content/browser/renderer_host/cursor_manager.h" #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/render_widget_host_owner_delegate.h" #include "content/common/view_messages.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -286,6 +287,8 @@ class AtomDelegatedFrameHostClient : public content::DelegatedFrameHostClient { return view_->render_widget_host()->CollectSurfaceIdsForEviction(); } + bool ShouldShowStaleContentOnEviction() override { return false; } + void OnBeginFrame(base::TimeTicks frame_time) override {} void InvalidateLocalSurfaceIdOnEviction() override {} @@ -526,7 +529,7 @@ void OffScreenRenderWidgetHostView::SetBackgroundColor(SkColor color) { // We short-cut here to show a sensible color before that happens. UpdateBackgroundColorFromRenderer(color); - if (render_widget_host_) { + if (render_widget_host_ && render_widget_host_->owner_delegate()) { render_widget_host_->owner_delegate()->SetBackgroundOpaque( SkColorGetA(color) == SK_AlphaOPAQUE); } diff --git a/atom/browser/osr/osr_render_widget_host_view.h b/atom/browser/osr/osr_render_widget_host_view.h index 780e04e9ca..4f33182c25 100644 --- a/atom/browser/osr/osr_render_widget_host_view.h +++ b/atom/browser/osr/osr_render_widget_host_view.h @@ -343,7 +343,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, // Latest capture sequence number which is incremented when the caller // requests surfaces be synchronized via - // EnsureSurfaceSynchronizedForLayoutTest(). + // EnsureSurfaceSynchronizedForWebTest(). uint32_t latest_capture_sequence_number_ = 0u; SkColor background_color_ = SkColor(); From d7557cb66ab94c66b0f3bf14644bd728e3594148 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Mon, 4 Feb 2019 16:54:55 +0100 Subject: [PATCH 44/52] chore: use c++ manifests instead of json --- BUILD.gn | 26 +---------- atom/app/manifests.cc | 44 +++++++++++++++++++ atom/app/manifests.h | 16 +++++++ atom/browser/atom_browser_client.cc | 21 ++++----- electron_resources.grd | 2 - manifests/BUILD.gn | 23 ++++++++++ ...tron_content_browser_manifest_overlay.json | 14 ------ ...nt_packaged_services_manifest_overlay.json | 5 --- 8 files changed, 93 insertions(+), 58 deletions(-) create mode 100644 atom/app/manifests.cc create mode 100644 atom/app/manifests.h create mode 100644 manifests/BUILD.gn delete mode 100644 manifests/electron_content_browser_manifest_overlay.json delete mode 100644 manifests/electron_content_packaged_services_manifest_overlay.json diff --git a/BUILD.gn b/BUILD.gn index 51b2cfe568..6bd3938a2c 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -2,7 +2,6 @@ import("//build/config/locales.gni") import("//build/config/ui.gni") import("//build/config/win/manifest.gni") import("//pdf/features.gni") -import("//services/service_manager/public/service_manifest.gni") import("//third_party/ffmpeg/ffmpeg_options.gni") import("//tools/generate_library_loader/generate_library_loader.gni") import("//tools/grit/grit_rule.gni") @@ -281,7 +280,6 @@ grit("resources") { deps = [ ":copy_shell_devtools_discovery_page", - ":electron_content_manifest_overlays", ] output_dir = "$target_gen_dir" @@ -330,6 +328,7 @@ static_library("electron_lib") { ":atom_js2c", "buildflags", "chromium_src:chrome", + "manifests", "native_mate", "//base", "//base:base_static", @@ -1055,26 +1054,3 @@ group("electron") { ":electron_app", ] } - -group("electron_content_manifest_overlays") { - deps = [ - ":electron_content_browser_manifest_overlay", - ":electron_content_packaged_services_manifest_overlay", - ] -} - -service_manifest("electron_content_packaged_services_manifest_overlay") { - source = "//electron/manifests/electron_content_packaged_services_manifest_overlay.json" - packaged_services = [ "//services/proxy_resolver:proxy_resolver_manifest" ] - - if (enable_basic_printing) { - packaged_services += [ - "//chrome/services/printing:manifest", - "//components/services/pdf_compositor:pdf_compositor_manifest", - ] - } -} - -service_manifest("electron_content_browser_manifest_overlay") { - source = "//electron/manifests/electron_content_browser_manifest_overlay.json" -} diff --git a/atom/app/manifests.cc b/atom/app/manifests.cc new file mode 100644 index 0000000000..9b5e608621 --- /dev/null +++ b/atom/app/manifests.cc @@ -0,0 +1,44 @@ +// Copyright (c) 2019 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/app/manifests.h" + +#include "base/no_destructor.h" +#include "printing/buildflags/buildflags.h" +#include "services/proxy_resolver/proxy_resolver_manifest.h" +#include "services/service_manager/public/cpp/manifest_builder.h" + +#if BUILDFLAG(ENABLE_PRINTING) +#include "components/services/pdf_compositor/pdf_compositor_manifest.h" +#endif + +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) +#include "chrome/services/printing/manifest.h" +#endif + +const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() { + static base::NoDestructor manifest{ + service_manager::ManifestBuilder() + .WithDisplayName("Electron (browser process)") + .RequireCapability("device", "device:geolocation_control") + .RequireCapability("proxy_resolver", "factory") + .RequireCapability("chrome_printing", "converter") + .RequireCapability("pdf_compositor", "compositor") + .Build()}; + return *manifest; +} + +const std::vector& +GetElectronPackagedServicesOverlayManifest() { + static base::NoDestructor> manifests{{ + proxy_resolver::GetManifest(), +#if BUILDFLAG(ENABLE_PRINTING) + pdf_compositor::GetManifest(), +#endif +#if BUILDFLAG(ENABLE_PRINT_PREVIEW) + chrome_printing::GetManifest(), +#endif + }}; + return *manifests; +} diff --git a/atom/app/manifests.h b/atom/app/manifests.h new file mode 100644 index 0000000000..498eab0de2 --- /dev/null +++ b/atom/app/manifests.h @@ -0,0 +1,16 @@ +// Copyright (c) 2019 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ATOM_APP_MANIFESTS_H_ +#define ATOM_APP_MANIFESTS_H_ + +#include + +#include "services/service_manager/public/cpp/manifest.h" + +const service_manager::Manifest& GetElectronContentBrowserOverlayManifest(); +const std::vector& +GetElectronPackagedServicesOverlayManifest(); + +#endif // ATOM_APP_MANIFESTS_H_ diff --git a/atom/browser/atom_browser_client.cc b/atom/browser/atom_browser_client.cc index 22e0d3656b..b675f24367 100644 --- a/atom/browser/atom_browser_client.cc +++ b/atom/browser/atom_browser_client.cc @@ -11,6 +11,7 @@ #include #include +#include "atom/app/manifests.h" #include "atom/browser/api/atom_api_app.h" #include "atom/browser/api/atom_api_protocol.h" #include "atom/browser/api/atom_api_web_contents.h" @@ -716,19 +717,15 @@ void AtomBrowserClient::RegisterOutOfProcessServices( base::Optional AtomBrowserClient::GetServiceManifestOverlay(base::StringPiece name) { - ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); - int id = -1; - if (name == content::mojom::kBrowserServiceName) - id = IDR_ELECTRON_CONTENT_BROWSER_MANIFEST_OVERLAY; - else if (name == content::mojom::kPackagedServicesServiceName) - id = IDR_ELECTRON_CONTENT_PACKAGED_SERVICES_MANIFEST_OVERLAY; + if (name == content::mojom::kBrowserServiceName) { + return GetElectronContentBrowserOverlayManifest(); + } else if (name == content::mojom::kPackagedServicesServiceName) { + service_manager::Manifest overlay; + overlay.packaged_services = GetElectronPackagedServicesOverlayManifest(); + return overlay; + } - if (id == -1) - return base::nullopt; - - base::StringPiece manifest_contents = rb.GetRawDataResource(id); - return service_manager::Manifest::FromValueDeprecated( - base::JSONReader::Read(manifest_contents)); + return base::nullopt; } net::NetLog* AtomBrowserClient::GetNetLog() { diff --git a/electron_resources.grd b/electron_resources.grd index 73029b0419..e46d6f6e79 100644 --- a/electron_resources.grd +++ b/electron_resources.grd @@ -17,8 +17,6 @@ - - diff --git a/manifests/BUILD.gn b/manifests/BUILD.gn new file mode 100644 index 0000000000..7c81cefd3b --- /dev/null +++ b/manifests/BUILD.gn @@ -0,0 +1,23 @@ +import("//printing/buildflags/buildflags.gni") + +source_set("manifests") { + sources = [ + "//electron/atom/app/manifests.cc", + "//electron/atom/app/manifests.h", + ] + + include_dirs = [ "//electron" ] + + deps = [ + "//printing/buildflags", + "//services/proxy_resolver:proxy_resolver_manifest", + ] + + if (enable_basic_printing) { + deps += [ "//components/services/pdf_compositor:pdf_compositor_manifest" ] + } + + if (enable_print_preview) { + deps += [ "//chrome/services/printing:manifest" ] + } +} diff --git a/manifests/electron_content_browser_manifest_overlay.json b/manifests/electron_content_browser_manifest_overlay.json deleted file mode 100644 index 261ffa87c4..0000000000 --- a/manifests/electron_content_browser_manifest_overlay.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "content_browser", - "display_name": "Electron (browser process)", - "interface_provider_specs": { - "service_manager:connector": { - "requires": { - "device": [ "device:geolocation_control" ], - "proxy_resolver": [ "factory" ], - "chrome_printing": [ "converter" ], - "pdf_compositor": [ "compositor"] - } - } - } -} diff --git a/manifests/electron_content_packaged_services_manifest_overlay.json b/manifests/electron_content_packaged_services_manifest_overlay.json deleted file mode 100644 index 71488f02e0..0000000000 --- a/manifests/electron_content_packaged_services_manifest_overlay.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "content_packaged_services", - "display_name": "Electron Packaged Services", - "interface_provider_specs": {} -} From 2ccf5904e0199f803161fd0911db0d268cc92225 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Mon, 4 Feb 2019 16:55:22 +0100 Subject: [PATCH 45/52] chore: fix linking errors on Windows --- components/pepper_flash/BUILD.gn | 1 + 1 file changed, 1 insertion(+) diff --git a/components/pepper_flash/BUILD.gn b/components/pepper_flash/BUILD.gn index a4fc24cebe..ebf8e6b9b1 100644 --- a/components/pepper_flash/BUILD.gn +++ b/components/pepper_flash/BUILD.gn @@ -47,6 +47,7 @@ component("pepper_flash") { "//skia", "//third_party/adobe/flash:flapper_version_h", "//ui/base", + "//ui/base/clipboard", ] if (is_mac) { sources += [ From d7fea1b4848f01e9ab8a2a56624913f5ca8fd30b Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Mon, 4 Feb 2019 22:37:51 +0530 Subject: [PATCH 46/52] REVIEW: fix possible -Wdeprecated-declarations warnings --- atom/browser/browser_mac.mm | 14 ++++++++------ atom/browser/ui/cocoa/atom_bundle_mover.mm | 19 +++++-------------- atom/browser/ui/message_box_mac.mm | 6 ++++++ atom/common/platform_util_mac.mm | 3 +++ 4 files changed, 22 insertions(+), 20 deletions(-) diff --git a/atom/browser/browser_mac.mm b/atom/browser/browser_mac.mm index b6ef121318..ab757dc000 100644 --- a/atom/browser/browser_mac.mm +++ b/atom/browser/browser_mac.mm @@ -232,9 +232,10 @@ LSSharedFileListItemRef GetLoginItemForApp() { for (NSUInteger i = 0; i < [login_items_array count]; ++i) { LSSharedFileListItemRef item = reinterpret_cast(login_items_array[i]); - CFURLRef item_url_ref = NULL; - if (LSSharedFileListItemResolve(item, 0, &item_url_ref, NULL) == noErr && - item_url_ref) { + base::ScopedCFTypeRef error; + CFURLRef item_url_ref = + LSSharedFileListItemCopyResolvedURL(item, 0, error.InitializeInto()); + if (!error && item_url_ref) { base::ScopedCFTypeRef item_url(item_url_ref); if (CFEqual(item_url, url)) { CFRetain(item); @@ -265,9 +266,10 @@ void RemoveFromLoginItems() { for (NSUInteger i = 0; i < [login_items_array count]; ++i) { LSSharedFileListItemRef item = reinterpret_cast(login_items_array[i]); - CFURLRef url_ref = NULL; - if (LSSharedFileListItemResolve(item, 0, &url_ref, NULL) == noErr && - item) { + base::ScopedCFTypeRef error; + CFURLRef url_ref = + LSSharedFileListItemCopyResolvedURL(item, 0, error.InitializeInto()); + if (!error && url_ref) { base::ScopedCFTypeRef url(url_ref); if ([[base::mac::CFToNSCast(url.get()) path] hasPrefix:[[NSBundle mainBundle] bundlePath]]) diff --git a/atom/browser/ui/cocoa/atom_bundle_mover.mm b/atom/browser/ui/cocoa/atom_bundle_mover.mm index 9162b7b4c5..95a527673f 100644 --- a/atom/browser/ui/cocoa/atom_bundle_mover.mm +++ b/atom/browser/ui/cocoa/atom_bundle_mover.mm @@ -167,20 +167,11 @@ NSString* AtomBundleMover::ContainingDiskImageDevice(NSString* bundlePath) { NSData* data = [[[hdiutil standardOutput] fileHandleForReading] readDataToEndOfFile]; - NSDictionary* info = nil; - if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) { - info = [NSPropertyListSerialization - propertyListWithData:data - options:NSPropertyListImmutable - format:NULL - error:NULL]; - } else { - info = [NSPropertyListSerialization - propertyListFromData:data - mutabilityOption:NSPropertyListImmutable - format:NULL - errorDescription:NULL]; - } + NSDictionary* info = + [NSPropertyListSerialization propertyListWithData:data + options:NSPropertyListImmutable + format:NULL + error:NULL]; if (![info isKindOfClass:[NSDictionary class]]) return nil; diff --git a/atom/browser/ui/message_box_mac.mm b/atom/browser/ui/message_box_mac.mm index 94c243a810..103abdcdd6 100644 --- a/atom/browser/ui/message_box_mac.mm +++ b/atom/browser/ui/message_box_mac.mm @@ -157,10 +157,13 @@ int ShowMessageBox(NativeWindow* parent_window, callEndModal:true]; NSWindow* window = parent_window->GetNativeWindow().GetNativeNSWindow(); +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [alert beginSheetModalForWindow:window modalDelegate:delegate didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:nil]; +#pragma clang diagnostic pop [NSApp runModalForWindow:window]; return ret_code; @@ -196,11 +199,14 @@ void ShowMessageBox(NativeWindow* parent_window, NSWindow* window = parent_window ? parent_window->GetNativeWindow().GetNativeNSWindow() : nil; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" [alert beginSheetModalForWindow:window modalDelegate:delegate didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:nil]; +#pragma clang diagnostic pop } } diff --git a/atom/common/platform_util_mac.mm b/atom/common/platform_util_mac.mm index 4228704750..8e073f5060 100644 --- a/atom/common/platform_util_mac.mm +++ b/atom/common/platform_util_mac.mm @@ -141,8 +141,11 @@ void Beep() { bool GetLoginItemEnabled() { BOOL enabled = NO; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" // SMJobCopyDictionary does not work in sandbox (see rdar://13626319) CFArrayRef jobs = SMCopyAllJobDictionaries(kSMDomainUserLaunchd); +#pragma clang diagnostic pop NSArray* jobs_ = CFBridgingRelease(jobs); NSString* identifier = GetLoginHelperBundleIdentifier(); if (jobs_ && [jobs_ count] > 0) { From 2556d86c8a95b7778316b28a57c207b1ad0195ed Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 5 Feb 2019 13:19:09 +0530 Subject: [PATCH 47/52] Disable precompiled headers Workaround for https://crbug.com/924225 --- build/args/all.gn | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/args/all.gn b/build/args/all.gn index b9142c7540..b7c6ad60b2 100644 --- a/build/args/all.gn +++ b/build/args/all.gn @@ -13,3 +13,7 @@ ffmpeg_branding = "Chrome" enable_basic_printing = true is_cfi = false + +# FIXME(deepak1556): workaround for https://crbug.com/924225 +# remove this when clang roll 352138 lands. +enable_precompiled_headers = false From b6f7157910ccd318ca1b9ba0f0eae443dffba292 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Tue, 5 Feb 2019 13:39:51 +0530 Subject: [PATCH 48/52] fix compilation error for windows testing builds --- patches/common/v8/.patches | 1 + ...icit_constructors_for_macroassembler.patch | 102 ++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch diff --git a/patches/common/v8/.patches b/patches/common/v8/.patches index 1be080a0b1..9641dc6668 100644 --- a/patches/common/v8/.patches +++ b/patches/common/v8/.patches @@ -8,3 +8,4 @@ build-torque-with-x64-toolchain-on-arm.patch do_not_run_arm_arm64_mksnapshot_binaries.patch deps_provide_more_v8_backwards_compatibility.patch dcheck.patch +disallow_implicit_constructors_for_macroassembler.patch diff --git a/patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch b/patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch new file mode 100644 index 0000000000..b40eb5c087 --- /dev/null +++ b/patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch @@ -0,0 +1,102 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Tue, 5 Feb 2019 13:32:33 +0530 +Subject: DISALLOW_IMPLICIT_CONSTRUCTORS for MacroAssembler + +When BUILDING_V8_SHARED in release builds __declspec(dllexport) +causes generation of implicit constructors in the forwarding class +while its deleted in TurboAssemblerBase, which leads to compilation +errors like: + +In file included from gen/v8/v8_base_jumbo_6.cc:41: +In file included from .\../../v8/src/interface-descriptors.cc:7: +In file included from ../../v8\src/macro-assembler.h:40: +../../v8\src/x64/macro-assembler-x64.h(92,9): error: call to deleted constructor of 'v8::internal::TurboAssemblerBase' + : TurboAssemblerBase(std::forward(args)...) {} + ^ ~~~~~~~~~~~~~~~~~~~~~~~~ +../../v8\src/x64/macro-assembler-x64.h(536,25): note: in instantiation of function template specialization 'v8::internal::TurboAssembler::TurboAssembler' requested here +class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + ^ +../../v8\src/turbo-assembler.h(127,34): note: 'TurboAssemblerBase' has been explicitly marked deleted here + DISALLOW_IMPLICIT_CONSTRUCTORS(TurboAssemblerBase); + ^ +1 error generated. + +diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h +index 9b67a683e849d306bb8c085f525102a1b9ac3854..29fa10cfeac9cdfb140024c8301465ca76278f4c 100644 +--- a/src/arm/macro-assembler-arm.h ++++ b/src/arm/macro-assembler-arm.h +@@ -825,6 +825,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + // Needs access to SafepointRegisterStackIndex for compiled frame + // traversal. + friend class StandardFrame; ++ ++ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); + }; + + // ----------------------------------------------------------------------------- +diff --git a/src/arm64/macro-assembler-arm64.h b/src/arm64/macro-assembler-arm64.h +index 9327fce64064dad168b120901423ab2e7d8ecbcb..331be44a1b006ef74bd65eafc2b0dbc9af52d2a8 100644 +--- a/src/arm64/macro-assembler-arm64.h ++++ b/src/arm64/macro-assembler-arm64.h +@@ -1981,6 +1981,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + Label* on_successful_conversion = nullptr, + Label* on_failed_conversion = nullptr); + ++ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); ++ + public: + // Far branches resolving. + // +diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h +index 6839a1ac5b1533e179f6cb13f9b76dc4aaf42329..d26152663aa2900ea1c81ea27bbb2a1953e8b76a 100644 +--- a/src/ia32/macro-assembler-ia32.h ++++ b/src/ia32/macro-assembler-ia32.h +@@ -695,6 +695,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + // Needs access to SafepointRegisterStackIndex for compiled frame + // traversal. + friend class StandardFrame; ++ ++ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); + }; + + // ----------------------------------------------------------------------------- +diff --git a/src/mips/macro-assembler-mips.h b/src/mips/macro-assembler-mips.h +index a833eeb032715f68574da9557740792a42b0a331..303fbb76b21eed23041460f6c83e48b3fe2c1396 100644 +--- a/src/mips/macro-assembler-mips.h ++++ b/src/mips/macro-assembler-mips.h +@@ -1148,6 +1148,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + // Needs access to SafepointRegisterStackIndex for compiled frame + // traversal. + friend class StandardFrame; ++ ++ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); + }; + + template +diff --git a/src/mips64/macro-assembler-mips64.h b/src/mips64/macro-assembler-mips64.h +index 40c2d49ca5356e2c3b5ec597a09d625602506faf..2e6991c1ba4a6b73ed62d50f25f09347baf9d9ef 100644 +--- a/src/mips64/macro-assembler-mips64.h ++++ b/src/mips64/macro-assembler-mips64.h +@@ -1218,6 +1218,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + // Needs access to SafepointRegisterStackIndex for compiled frame + // traversal. + friend class StandardFrame; ++ ++ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); + }; + + template +diff --git a/src/x64/macro-assembler-x64.h b/src/x64/macro-assembler-x64.h +index 97292b98fa4cda503b20757b91b52c1eb8b5473a..cfd040a5c3f77b5788062bfa77bae53e14a0470d 100644 +--- a/src/x64/macro-assembler-x64.h ++++ b/src/x64/macro-assembler-x64.h +@@ -899,6 +899,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + // Needs access to SafepointRegisterStackIndex for compiled frame + // traversal. + friend class StandardFrame; ++ ++ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); + }; + + // ----------------------------------------------------------------------------- From 1d9170f1bb82d3fe3740bcbe137e45f1d866afb4 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 6 Feb 2019 04:53:58 +0530 Subject: [PATCH 49/52] FIXME: disable OSR --- buildflags/buildflags.gni | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildflags/buildflags.gni b/buildflags/buildflags.gni index 2425b927b3..2fdca86574 100644 --- a/buildflags/buildflags.gni +++ b/buildflags/buildflags.gni @@ -8,7 +8,7 @@ declare_args() { # Allow running Electron as a node binary. enable_run_as_node = true - enable_osr = true + enable_osr = false enable_view_api = false From 95386ef56f9148065e7ca84fffbcecfc83ba80a2 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 6 Feb 2019 06:39:01 +0530 Subject: [PATCH 50/52] Disable swiftshader for arm32 --- patches/common/chromium/.patches | 1 + .../revert_build_swiftshader_for_arm32.patch | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 patches/common/chromium/revert_build_swiftshader_for_arm32.patch diff --git a/patches/common/chromium/.patches b/patches/common/chromium/.patches index 9bb068f1f6..6bc7a8945c 100644 --- a/patches/common/chromium/.patches +++ b/patches/common/chromium/.patches @@ -70,3 +70,4 @@ support_mixed_sandbox_with_zygote.patch disable_color_correct_rendering.patch disable_time_ticks_dcheck.patch autofill_size_calculation.patch +revert_build_swiftshader_for_arm32.patch diff --git a/patches/common/chromium/revert_build_swiftshader_for_arm32.patch b/patches/common/chromium/revert_build_swiftshader_for_arm32.patch new file mode 100644 index 0000000000..cccd54671c --- /dev/null +++ b/patches/common/chromium/revert_build_swiftshader_for_arm32.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: deepak1556 +Date: Wed, 6 Feb 2019 06:36:32 +0530 +Subject: Revert "Build swiftshader for ARM32." + +This reverts commit e7caa7ca82fc015675aea8cecf178c83a94ab3a7. + +diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn +index 77750dc5e9f24347bba17811da7d86c9ef28e99c..07fb1573d21cf84dfd295927104fb82a254664a8 100644 +--- a/ui/gl/BUILD.gn ++++ b/ui/gl/BUILD.gn +@@ -15,8 +15,8 @@ declare_args() { + enable_swiftshader = (is_win || is_linux || (is_mac && use_egl) || + is_chromeos || is_fuchsia) && + (target_cpu == "x86" || target_cpu == "x64" || +- target_cpu == "arm" || target_cpu == "arm64" || +- target_cpu == "mipsel" || target_cpu == "mips64el") ++ target_cpu == "arm64" || target_cpu == "mipsel" || ++ target_cpu == "mips64el") + + # Whether service side logging (actual calls into the GL driver) is enabled + # or not. From b927be99828a9932c45ee04b3bd396ca075d4725 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Sun, 10 Feb 2019 17:58:46 +0530 Subject: [PATCH 51/52] chore: roll 73.0.3683.27 --- DEPS | 2 +- .../common/chromium/can_create_window.patch | 10 ++--- ...cross_site_document_resource_handler.patch | 4 +- patches/common/chromium/dcheck.patch | 2 +- .../common/chromium/disable-redraw-lock.patch | 2 +- .../disable_color_correct_rendering.patch | 2 +- ...requirement_for_beforeunload_dialogs.patch | 2 +- .../common/chromium/frame_host_manager.patch | 12 +++--- .../chromium/webgl_context_attributes.patch | 8 ++-- .../worker_context_will_destroy.patch | 12 +++--- patches/common/v8/.patches | 2 +- patches/common/v8/add_realloc.patch | 2 +- patches/common/v8/array_buffer.patch | 2 +- patches/common/v8/dcheck.patch | 2 +- ...vide_more_v8_backwards_compatibility.patch | 2 +- ...icit_constructors_for_macroassembler.patch | 43 ++++++++++++++----- patches/common/v8/export_platform.patch | 28 ------------ ...ed_v8_platform_systemclocktimemillis.patch | 29 +++++++++++++ 18 files changed, 95 insertions(+), 71 deletions(-) delete mode 100644 patches/common/v8/export_platform.patch create mode 100644 patches/common/v8/expose_protected_v8_platform_systemclocktimemillis.patch diff --git a/DEPS b/DEPS index c4cf797288..ab85ec12bf 100644 --- a/DEPS +++ b/DEPS @@ -10,7 +10,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '73.0.3683.10', + '73.0.3683.27', 'node_version': 'fac6d766c143db8db05bb3b0c0871df8f032363c', diff --git a/patches/common/chromium/can_create_window.patch b/patches/common/chromium/can_create_window.patch index c7914f142a..1f49f66082 100644 --- a/patches/common/chromium/can_create_window.patch +++ b/patches/common/chromium/can_create_window.patch @@ -5,10 +5,10 @@ Subject: can_create_window.patch diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc -index a6c9e15b29af4ede177593db58a189153a392515..23ecf8e1a679676ef11ad82616bc68f845be1643 100644 +index b4a3b637fa67bfc065490f77e87050a50f3dcfba..22563747f5e667894b65ee765e6d9372536d4b1e 100644 --- a/content/browser/frame_host/render_frame_host_impl.cc +++ b/content/browser/frame_host/render_frame_host_impl.cc -@@ -3723,6 +3723,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -3725,6 +3725,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -32,7 +32,7 @@ index e566a15b798e2586fa4fae3c4db97ce5f4f2f09f..08f52fd73bc9b6231a75f7804bb9b9f3 // Operation result when the renderer asks the browser to create a new window. diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index abc9829f296f26c2217066f68927861d032d9868..f43321b9f7513a1e51367bbd38006e7e2f930923 100644 +index 07d71b3a06f9b3b7ab4ea4f16a27fc82e51c2a6c..9d00218ae972b34073c84f2de78dee934962c3d8 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -494,6 +494,8 @@ bool ContentBrowserClient::CanCreateWindow( @@ -45,7 +45,7 @@ index abc9829f296f26c2217066f68927861d032d9868..f43321b9f7513a1e51367bbd38006e7e bool opener_suppressed, bool* no_javascript_access) { diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 694796bf8dbba514ae9f09e51186e53be14ae50e..73ea7c49ee5993536902f21a51c8cd3bbe30e3f2 100644 +index eaa7d8b25141f8f2d461f0b37054c772c8df6297..09aca495389e48a8dbc1ea45b8bb636aa13d2486 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -171,6 +171,7 @@ class RenderFrameHost; @@ -66,7 +66,7 @@ index 694796bf8dbba514ae9f09e51186e53be14ae50e..73ea7c49ee5993536902f21a51c8cd3b bool opener_suppressed, bool* no_javascript_access); diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 77b93bd04c8b7887f9fc5e9dc7d5f42c034e3bfa..468e9ed1d7c24b7b3a1e4e37239c42b75be4e7a9 100644 +index 676b344fe809fd97da67f6edebe6a869402453cc..b386bb2e3e5334f9f6c5c50a2c6ddae086c61755 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -76,6 +76,7 @@ diff --git a/patches/common/chromium/cross_site_document_resource_handler.patch b/patches/common/chromium/cross_site_document_resource_handler.patch index 5838d6569b..07534a0004 100644 --- a/patches/common/chromium/cross_site_document_resource_handler.patch +++ b/patches/common/chromium/cross_site_document_resource_handler.patch @@ -22,7 +22,7 @@ index bd62ed07876ad4a2a7c6e8309843281719dbefb6..13e67994997caf175ba1b30ba8070718 } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index 2d1eb5e9f7c9494920e626a1c89cb3417627d12d..d10724466f8802d434b868da769379f49fe115bc 100644 +index e474d899fbcebfbaf4cb2ec0b63cc963292ee39a..8446076e169efb64569fb2e463cb5ebf5e1e6ee9 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -58,6 +58,10 @@ ContentBrowserClient::SiteInstanceForNavigationType ContentBrowserClient::Should @@ -37,7 +37,7 @@ index 2d1eb5e9f7c9494920e626a1c89cb3417627d12d..d10724466f8802d434b868da769379f4 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index de03cae23d8c9e93181562f9d09f215ce8eddc2f..cc29e2795477e3ace7c57a04502c8c3dc7b04fb4 100644 +index 2cc843982a697dbd693ca1d5fda3a8ab68c96f73..3ebe17d34cdcfb02acacd3c32f5dbb87594c010f 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -237,6 +237,9 @@ class CONTENT_EXPORT ContentBrowserClient { diff --git a/patches/common/chromium/dcheck.patch b/patches/common/chromium/dcheck.patch index a8b6b2686a..9077615ebb 100644 --- a/patches/common/chromium/dcheck.patch +++ b/patches/common/chromium/dcheck.patch @@ -17,7 +17,7 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc -index 5249401e58a57f0278665f2c6648c7e6e8e1bf77..518b1279714888121095af9bdb077f3622c1255d 100644 +index 744a1d2343f67b6ba2633942de4a1fa462119b6d..b1feb2513200bdb2c0a1aa477d782775bb66aba6 100644 --- a/content/browser/frame_host/navigation_controller_impl.cc +++ b/content/browser/frame_host/navigation_controller_impl.cc @@ -1170,8 +1170,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( diff --git a/patches/common/chromium/disable-redraw-lock.patch b/patches/common/chromium/disable-redraw-lock.patch index c9c3cc54f6..16f2bac3a7 100644 --- a/patches/common/chromium/disable-redraw-lock.patch +++ b/patches/common/chromium/disable-redraw-lock.patch @@ -37,7 +37,7 @@ index f3523d2a05c3f93215c6a78e81e015c4b965b758..39ff4f17822b4552218cb3a11c478eb2 (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) || !ui::win::IsAeroGlassEnabled())) { if (should_lock_) -@@ -941,6 +946,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() { +@@ -940,6 +945,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() { hwnd()); } diff --git a/patches/common/chromium/disable_color_correct_rendering.patch b/patches/common/chromium/disable_color_correct_rendering.patch index fb1ae31e9f..85b602d0a7 100644 --- a/patches/common/chromium/disable_color_correct_rendering.patch +++ b/patches/common/chromium/disable_color_correct_rendering.patch @@ -256,7 +256,7 @@ index 0aba701c131f11f5e8be6ce9c1bebe6ccb44edf8..aac9c128ed3d212758d8d4a3ec774b65 base::Optional opacity_canvas; if (needs_transparency || disable_image_filtering) { diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc -index 4aa391a6bfe2408b84da4ffe5b3dc27a0544d0ca..649efb7ed16e6f4850010c8b9df5d0b79c03bb3e 100644 +index 12e38b8b4a7cf7e44a63dd2801e86eb37eb31623..f4352788d2480b06681a0f886d78efe4bad517d8 100644 --- a/content/browser/gpu/gpu_process_host.cc +++ b/content/browser/gpu/gpu_process_host.cc @@ -193,6 +193,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus( diff --git a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch index ef542f6671..8987afc4a4 100644 --- a/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch +++ b/patches/common/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch @@ -6,7 +6,7 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch See https://github.com/electron/electron/issues/10754 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc -index 21ef6fd598dfedb5d443fc7162d08af19c137bf1..b3d157158db866aaa8f5132d71453ced61553577 100644 +index e5d02bd5288267372a37bb4924d144abcf9a312c..228232ced3ed57cfe06d3bb77f09f3f171a8df2d 100644 --- a/third_party/blink/renderer/core/dom/document.cc +++ b/third_party/blink/renderer/core/dom/document.cc @@ -3665,7 +3665,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client, diff --git a/patches/common/chromium/frame_host_manager.patch b/patches/common/chromium/frame_host_manager.patch index 87a979ffbb..835752dd23 100644 --- a/patches/common/chromium/frame_host_manager.patch +++ b/patches/common/chromium/frame_host_manager.patch @@ -7,10 +7,10 @@ Allows embedder to intercept site instances chosen by chromium and respond with custom instance. diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc -index 53586512b68f79ebf9addf0d344a5a0785d89877..1417ce14d9e976da08c8924e32d2cb8e6408652b 100644 +index dce34d55315607c60ce0adadbcf24e1ded66de70..8f4f955e423ef61710361678f532c91053867a72 100644 --- a/content/browser/frame_host/render_frame_host_manager.cc +++ b/content/browser/frame_host/render_frame_host_manager.cc -@@ -1970,6 +1970,16 @@ bool RenderFrameHostManager::InitRenderView( +@@ -1980,6 +1980,16 @@ bool RenderFrameHostManager::InitRenderView( scoped_refptr RenderFrameHostManager::GetSiteInstanceForNavigationRequest( const NavigationRequest& request) { @@ -27,7 +27,7 @@ index 53586512b68f79ebf9addf0d344a5a0785d89877..1417ce14d9e976da08c8924e32d2cb8e // First, check if the navigation can switch SiteInstances. If not, the // navigation should use the current SiteInstance. SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance(); -@@ -2002,6 +2012,51 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2012,6 +2022,51 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request.common_params().url); no_renderer_swap_allowed |= request.from_begin_navigation() && !can_renderer_initiate_transfer; @@ -79,7 +79,7 @@ index 53586512b68f79ebf9addf0d344a5a0785d89877..1417ce14d9e976da08c8924e32d2cb8e } else { // Subframe navigations will use the current renderer, unless specifically // allowed to swap processes. -@@ -2013,23 +2068,17 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2023,23 +2078,17 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( if (no_renderer_swap_allowed && !should_swap_for_error_isolation) return scoped_refptr(current_site_instance); @@ -108,7 +108,7 @@ index 53586512b68f79ebf9addf0d344a5a0785d89877..1417ce14d9e976da08c8924e32d2cb8e } diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc -index f43321b9f7513a1e51367bbd38006e7e2f930923..2d1eb5e9f7c9494920e626a1c89cb3417627d12d 100644 +index 9d00218ae972b34073c84f2de78dee934962c3d8..e474d899fbcebfbaf4cb2ec0b63cc963292ee39a 100644 --- a/content/public/browser/content_browser_client.cc +++ b/content/public/browser/content_browser_client.cc @@ -48,6 +48,16 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info, @@ -129,7 +129,7 @@ index f43321b9f7513a1e51367bbd38006e7e2f930923..2d1eb5e9f7c9494920e626a1c89cb341 const MainFunctionParams& parameters) { return nullptr; diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h -index 73ea7c49ee5993536902f21a51c8cd3bbe30e3f2..de03cae23d8c9e93181562f9d09f215ce8eddc2f 100644 +index 09aca495389e48a8dbc1ea45b8bb636aa13d2486..2cc843982a697dbd693ca1d5fda3a8ab68c96f73 100644 --- a/content/public/browser/content_browser_client.h +++ b/content/public/browser/content_browser_client.h @@ -206,8 +206,37 @@ CONTENT_EXPORT void OverrideOnBindInterface( diff --git a/patches/common/chromium/webgl_context_attributes.patch b/patches/common/chromium/webgl_context_attributes.patch index 1b14384359..07fd3d3394 100644 --- a/patches/common/chromium/webgl_context_attributes.patch +++ b/patches/common/chromium/webgl_context_attributes.patch @@ -5,10 +5,10 @@ Subject: webgl_context_attributes.patch diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index 704ee01d0a30f68275653591428e9d16eeb5d5a0..2adc208e36b66fcf8cbdbf05abfa1cd877361745 100644 +index 4f7bbf765f92efe6a8453b9f7d2842f3bf691a64..27a164a5afb50ffb7414f5867f000ea77a16dc3f 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -896,8 +896,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( +@@ -906,8 +906,10 @@ RendererBlinkPlatformImpl::CreateOffscreenGraphicsContext3DProvider( attributes.sample_buffers = 0; attributes.bind_generates_resource = false; attributes.enable_raster_interface = web_attributes.enable_raster_interface; @@ -22,10 +22,10 @@ index 704ee01d0a30f68275653591428e9d16eeb5d5a0..2adc208e36b66fcf8cbdbf05abfa1cd8 attributes.fail_if_major_perf_caveat = web_attributes.fail_if_major_performance_caveat; diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index bfc4a95febcf44249cd3793b883c03ab9bd1e3ec..03c6046fb6541f7864b504d8f1470b843579ae41 100644 +index 3b36d5710b08016e3c467c47b31a8220c91dc971..a6d7bc8dfe52ce17926d018467371579101a687f 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -540,6 +540,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -541,6 +541,7 @@ class BLINK_PLATFORM_EXPORT Platform { kWebGPUContextType, // WebGPU context }; struct ContextAttributes { diff --git a/patches/common/chromium/worker_context_will_destroy.patch b/patches/common/chromium/worker_context_will_destroy.patch index 9870407668..b2dce02559 100644 --- a/patches/common/chromium/worker_context_will_destroy.patch +++ b/patches/common/chromium/worker_context_will_destroy.patch @@ -21,10 +21,10 @@ index cfe87b6c3903db7835c3998a65cf18a2301bbf87..e9046ad91236418942cc98372220bf59 // An empty URL is returned if the URL is not overriden. virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index 2adc208e36b66fcf8cbdbf05abfa1cd877361745..7df930a5114a3cfd930eb801958f5c421395e5c3 100644 +index 27a164a5afb50ffb7414f5867f000ea77a16dc3f..167e697b6143ec8b8a3edf4db395d3205808dd54 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -1036,6 +1036,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -1046,6 +1046,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } @@ -38,10 +38,10 @@ index 2adc208e36b66fcf8cbdbf05abfa1cd877361745..7df930a5114a3cfd930eb801958f5c42 const v8::Local& worker) { GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h -index 0052cff07aec7cc7561d7586e5474a107f563ada..563f8f2c147899d0960042d3d23cf27520a702ea 100644 +index a65c2138b708f3527b8174c97c5e8754a6a759e0..89f6ee990a913828194a245c380a60d5dea91ad5 100644 --- a/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h -@@ -202,6 +202,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -204,6 +204,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { void DidStartWorkerThread() override; void WillStopWorkerThread() override; void WorkerContextCreated(const v8::Local& worker) override; @@ -50,10 +50,10 @@ index 0052cff07aec7cc7561d7586e5474a107f563ada..563f8f2c147899d0960042d3d23cf275 // Disables the WebSandboxSupport implementation for testing. // Tests that do not set up a full sandbox environment should call diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h -index 03c6046fb6541f7864b504d8f1470b843579ae41..f3b69a27768235dac24a62e6254f6bc3ea34db66 100644 +index a6d7bc8dfe52ce17926d018467371579101a687f..a6571f68f8bce81f4cf6b7b9ec6247cea7f6a9ee 100644 --- a/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h -@@ -680,6 +680,7 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -685,6 +685,7 @@ class BLINK_PLATFORM_EXPORT Platform { virtual void DidStartWorkerThread() {} virtual void WillStopWorkerThread() {} virtual void WorkerContextCreated(const v8::Local& worker) {} diff --git a/patches/common/v8/.patches b/patches/common/v8/.patches index 9641dc6668..8511665f9e 100644 --- a/patches/common/v8/.patches +++ b/patches/common/v8/.patches @@ -2,10 +2,10 @@ deps_backport_detailed_line_info_for_cpu_profiler.patch add_realloc.patch build_gn.patch array_buffer.patch -export_platform.patch expose_mksnapshot.patch build-torque-with-x64-toolchain-on-arm.patch do_not_run_arm_arm64_mksnapshot_binaries.patch deps_provide_more_v8_backwards_compatibility.patch dcheck.patch disallow_implicit_constructors_for_macroassembler.patch +expose_protected_v8_platform_systemclocktimemillis.patch diff --git a/patches/common/v8/add_realloc.patch b/patches/common/v8/add_realloc.patch index 88bcaa2b94..996361bfff 100644 --- a/patches/common/v8/add_realloc.patch +++ b/patches/common/v8/add_realloc.patch @@ -30,7 +30,7 @@ index b23114f4ff8bfadffb35df4d92a832a2320c718e..fc20cf50c3a6dc66c37b8b46d06db7a2 * Free the memory block of size |length|, pointed to by |data|. * That memory is guaranteed to be previously allocated by |Allocate|. diff --git a/src/api.cc b/src/api.cc -index 23b496706a310f03331d0cefe85ea1ca94778d7a..55b2a1a2da257924eba7e3757994d68c1b508367 100644 +index b1f9c99860f2847f92b4d9e97fe126e4ae23cb20..59527269d2dec81e02089ebc926e74893ea7827f 100644 --- a/src/api.cc +++ b/src/api.cc @@ -512,6 +512,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) { diff --git a/patches/common/v8/array_buffer.patch b/patches/common/v8/array_buffer.patch index 4fe7cbc12b..6e155a8276 100644 --- a/patches/common/v8/array_buffer.patch +++ b/patches/common/v8/array_buffer.patch @@ -19,7 +19,7 @@ index fc20cf50c3a6dc66c37b8b46d06db7a2f0f558ce..f23567c1429ae0bbc5f916e4ee0a1190 bool InContext(); diff --git a/src/api.cc b/src/api.cc -index 55b2a1a2da257924eba7e3757994d68c1b508367..279edffbcc283ebfd11faf263d60f5a20c121d87 100644 +index 59527269d2dec81e02089ebc926e74893ea7827f..4000a95a2e52aad0e9f6110a5c53c5ea1db82645 100644 --- a/src/api.cc +++ b/src/api.cc @@ -7966,6 +7966,13 @@ void Isolate::SetIdle(bool is_idle) { diff --git a/patches/common/v8/dcheck.patch b/patches/common/v8/dcheck.patch index 49cc078d85..c700a78638 100644 --- a/patches/common/v8/dcheck.patch +++ b/patches/common/v8/dcheck.patch @@ -5,7 +5,7 @@ Subject: dcheck.patch diff --git a/src/api.cc b/src/api.cc -index c796a6ee6426ff88b6a08bf1d858b720e1526b86..ea0727bc4cd746c14b0fb94513c32b70e286bb44 100644 +index ed4113a3381fcfc83463a866a34b0fd071cc2650..7c409499a83e2f7d3dd552c2b91f77de62adfea0 100644 --- a/src/api.cc +++ b/src/api.cc @@ -8611,7 +8611,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) { diff --git a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch index caf17d248f..8c2c47eced 100644 --- a/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch +++ b/patches/common/v8/deps_provide_more_v8_backwards_compatibility.patch @@ -175,7 +175,7 @@ index f23567c1429ae0bbc5f916e4ee0a1190dae8d88f..f2e12dcfd68e3fc92024a6631d54b852 #ifdef V8_ENABLE_CHECKS CheckCast(value); diff --git a/src/api.cc b/src/api.cc -index 279edffbcc283ebfd11faf263d60f5a20c121d87..c796a6ee6426ff88b6a08bf1d858b720e1526b86 100644 +index 4000a95a2e52aad0e9f6110a5c53c5ea1db82645..ed4113a3381fcfc83463a866a34b0fd071cc2650 100644 --- a/src/api.cc +++ b/src/api.cc @@ -2181,6 +2181,10 @@ int PrimitiveArray::Length() const { diff --git a/patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch b/patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch index b40eb5c087..9ec5ae485e 100644 --- a/patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch +++ b/patches/common/v8/disallow_implicit_constructors_for_macroassembler.patch @@ -1,6 +1,6 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: deepak1556 -Date: Tue, 5 Feb 2019 13:32:33 +0530 +Date: Wed, 6 Feb 2019 16:39:34 +0530 Subject: DISALLOW_IMPLICIT_CONSTRUCTORS for MacroAssembler When BUILDING_V8_SHARED in release builds __declspec(dllexport) @@ -22,6 +22,29 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { ^ 1 error generated. +The original changes were made in https://chromium-review.googlesource.com/c/v8/v8/+/1414913 + +R=mstarzinger@chromium.org,jgruber@chromium.org,clemensh@chromium.org + +Bug: NONE +Change-Id: I87a5a678b8bae13b3adc6f1c6ac0b9313ed18d85 +Reviewed-on: https://chromium-review.googlesource.com/c/1454676 +Commit-Queue: Clemens Hammacher +Reviewed-by: Clemens Hammacher +Cr-Commit-Position: refs/heads/master@{#59427} + +diff --git a/AUTHORS b/AUTHORS +index 57c8890f29728856f09461d03666bbff73966bca..7adf005528b280581133eb43a2b6fcd3e98198d1 100644 +--- a/AUTHORS ++++ b/AUTHORS +@@ -68,6 +68,7 @@ Colin Ihrig + Daniel Andersson + Daniel Bevenius + Daniel James ++Deepak Mohan + Deon Dior + Dominic Farolini + Douglas Crosher diff --git a/src/arm/macro-assembler-arm.h b/src/arm/macro-assembler-arm.h index 9b67a683e849d306bb8c085f525102a1b9ac3854..29fa10cfeac9cdfb140024c8301465ca76278f4c 100644 --- a/src/arm/macro-assembler-arm.h @@ -36,18 +59,18 @@ index 9b67a683e849d306bb8c085f525102a1b9ac3854..29fa10cfeac9cdfb140024c8301465ca // ----------------------------------------------------------------------------- diff --git a/src/arm64/macro-assembler-arm64.h b/src/arm64/macro-assembler-arm64.h -index 9327fce64064dad168b120901423ab2e7d8ecbcb..331be44a1b006ef74bd65eafc2b0dbc9af52d2a8 100644 +index 9327fce64064dad168b120901423ab2e7d8ecbcb..ba1885a2484e6922352078e849f531fa49c9d71d 100644 --- a/src/arm64/macro-assembler-arm64.h +++ b/src/arm64/macro-assembler-arm64.h -@@ -1981,6 +1981,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { - Label* on_successful_conversion = nullptr, - Label* on_failed_conversion = nullptr); - -+ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); +@@ -1994,6 +1994,8 @@ class V8_EXPORT_PRIVATE MacroAssembler : public TurboAssembler { + // branch isntructions with a range of +-128MB. If that becomes too little + // (!), the mechanism can be extended to generate special veneers for really + // far targets. + - public: - // Far branches resolving. - // ++ DISALLOW_IMPLICIT_CONSTRUCTORS(MacroAssembler); + }; + + diff --git a/src/ia32/macro-assembler-ia32.h b/src/ia32/macro-assembler-ia32.h index 6839a1ac5b1533e179f6cb13f9b76dc4aaf42329..d26152663aa2900ea1c81ea27bbb2a1953e8b76a 100644 --- a/src/ia32/macro-assembler-ia32.h diff --git a/patches/common/v8/export_platform.patch b/patches/common/v8/export_platform.patch deleted file mode 100644 index 7ea55c51c9..0000000000 --- a/patches/common/v8/export_platform.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Aleksei Kuzmin -Date: Mon, 22 Oct 2018 10:47:12 -0700 -Subject: export_platform.patch - -v8::Platform::SystemClockTimeMillis must be exported so that node::NodePlatform can call it - -diff --git a/include/v8-platform.h b/include/v8-platform.h -index fc008979f69210d5e627ea735146f66c36703f43..4c097f2f06d766854c92fdbe487166e034d838b1 100644 ---- a/include/v8-platform.h -+++ b/include/v8-platform.h -@@ -11,6 +11,7 @@ - #include - #include - -+#include "v8.h" - #include "v8config.h" // NOLINT(build/include) - - namespace v8 { -@@ -430,7 +431,7 @@ class Platform { - * since epoch. Useful for implementing |CurrentClockTimeMillis| if - * nothing special needed. - */ -- static double SystemClockTimeMillis(); -+ V8_EXPORT static double SystemClockTimeMillis(); - }; - - } // namespace v8 diff --git a/patches/common/v8/expose_protected_v8_platform_systemclocktimemillis.patch b/patches/common/v8/expose_protected_v8_platform_systemclocktimemillis.patch new file mode 100644 index 0000000000..358e4a38de --- /dev/null +++ b/patches/common/v8/expose_protected_v8_platform_systemclocktimemillis.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Yang Guo +Date: Wed, 6 Feb 2019 15:40:15 +0100 +Subject: Expose protected v8::Platform::SystemClockTimeMillis + +This allows the embedder to use a shared library build +even if they use this method. + +R=ulan@chromium.org + +Change-Id: I613a6e5eb82b494128fb95dc89a0b73639ac5ca2 +Reviewed-on: https://chromium-review.googlesource.com/c/1456042 +Reviewed-by: Ulan Degenbaev +Commit-Queue: Yang Guo +Cr-Commit-Position: refs/heads/master@{#59455} + +diff --git a/include/v8-platform.h b/include/v8-platform.h +index fc008979f69210d5e627ea735146f66c36703f43..ece562f4338f5489ae6c457afc4fde4034abf21a 100644 +--- a/include/v8-platform.h ++++ b/include/v8-platform.h +@@ -430,7 +430,7 @@ class Platform { + * since epoch. Useful for implementing |CurrentClockTimeMillis| if + * nothing special needed. + */ +- static double SystemClockTimeMillis(); ++ V8_EXPORT static double SystemClockTimeMillis(); + }; + + } // namespace v8 From 46a49b74a61d418b127ce99a4c6e8c27beac1a51 Mon Sep 17 00:00:00 2001 From: John Kleinschmidt Date: Wed, 13 Feb 2019 12:07:18 -0500 Subject: [PATCH 52/52] Run electron tests first --- vsts-arm-test-steps.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/vsts-arm-test-steps.yml b/vsts-arm-test-steps.yml index 0d45a03c72..56ad7982db 100644 --- a/vsts-arm-test-steps.yml +++ b/vsts-arm-test-steps.yml @@ -65,6 +65,14 @@ steps: env: DISPLAY: ":99.0" +- bash: | + cd src + ./out/Default/electron electron/spec --ci --enable-logging + displayName: 'Run Electron tests' + timeoutInMinutes: 10 + env: + ELECTRON_DISABLE_SANDBOX: 1 + - bash: | cd src python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg @@ -81,14 +89,6 @@ steps: env: ELECTRON_DISABLE_SANDBOX: 1 -- bash: | - cd src - ./out/Default/electron electron/spec --ci --enable-logging - displayName: 'Run Electron tests' - timeoutInMinutes: 10 - env: - ELECTRON_DISABLE_SANDBOX: 1 - - task: PublishTestResults@2 displayName: 'Publish Test Results' inputs: