Version in base suite: 79.0.3945.130-1~deb10u1 Version in overlay suite: 80.0.3987.149-1~deb10u1 Base version: chromium_80.0.3987.149-1~deb10u1 Target version: chromium_80.0.3987.162-1~deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/c/chromium/chromium_80.0.3987.149-1~deb10u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/c/chromium/chromium_80.0.3987.162-1~deb10u1.dsc DEPS | 10 build/util/LASTCHANGE | 2 build/util/LASTCHANGE.committime | 2 chrome/VERSION | 2 chrome/browser/supervised_user/supervised_user_features.cc | 9 chrome/browser/supervised_user/supervised_user_features.h | 10 chrome/browser/supervised_user/supervised_user_service.cc | 12 chrome/browser/ui/autofill/autofill_popup_controller_impl.cc | 4 components/performance_manager/graph/process_node_impl.cc | 4 components/performance_manager/performance_manager_impl.cc | 37 + components/performance_manager/performance_manager_impl.h | 19 components/viz/service/display/surface_aggregator.cc | 12 content/browser/browser_interface_binders.cc | 2 content/browser/worker_host/dedicated_worker_host.cc | 76 +-- content/browser/worker_host/dedicated_worker_host.h | 16 content/renderer/pepper/pepper_media_stream_video_track_host.cc | 31 + content/renderer/worker/dedicated_worker_host_factory_client.cc | 10 content/renderer/worker/dedicated_worker_host_factory_client.h | 5 debian/changelog | 9 debian/patches/clang/flags.patch | 12 gpu/config/gpu_lists_version.h | 2 media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc | 2 media/gpu/vaapi/vaapi_video_encode_accelerator.cc | 15 media/gpu/vaapi/vaapi_video_encode_accelerator.h | 4 media/gpu/vaapi/vaapi_wrapper.cc | 122 +++++- media/gpu/vaapi/vaapi_wrapper.h | 3 skia/ext/skia_commit_hash.h | 2 third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom | 8 third_party/blink/public/platform/web_dedicated_worker_host_factory_client.h | 9 third_party/blink/renderer/core/workers/dedicated_worker.cc | 6 third_party/blink/renderer/modules/webaudio/base_audio_context.cc | 6 third_party/blink/renderer/modules/webaudio/base_audio_context.h | 3 third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc | 44 +- third_party/blink/renderer/modules/webaudio/deferred_task_handler.h | 8 third_party/google_android_play_core/README.chromium | 9 third_party/google_android_play_core/cipd.yaml | 2 third_party/skia/PRESUBMIT.py | 203 +++------- third_party/webrtc/modules/audio_coding/acm2/audio_coding_module.cc | 17 third_party/webrtc/modules/audio_coding/include/audio_coding_module.h | 2 third_party/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc | 10 third_party/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc | 2 v8/include/v8-version.h | 2 v8/infra/mb/mb_config.pyl | 10 v8/infra/testing/builders.pyl | 92 ++++ v8/src/builtins/builtins-function.cc | 2 45 files changed, 560 insertions(+), 309 deletions(-) diff: /srv/release.debian.org/tmp/Vo3X4aCBkZ/chromium-80.0.3987.149/third_party/perfetto/test/data: No such file or directory diff: /srv/release.debian.org/tmp/MVIB6q59yU/chromium-80.0.3987.162/third_party/perfetto/test/data: No such file or directory diff -Nru chromium-80.0.3987.149/DEPS chromium-80.0.3987.162/DEPS --- chromium-80.0.3987.149/DEPS 2020-03-17 21:56:24.000000000 +0000 +++ chromium-80.0.3987.162/DEPS 2020-03-31 18:59:48.000000000 +0000 @@ -173,11 +173,11 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling Skia # and whatever else without interference from each other. - 'skia_revision': 'ac0e515499dbbfd8de62ed1eb7b5d0f2ad6a7679', + 'skia_revision': 'a91f9f612e5eeb93cf40a3c0ce7d7c6ddf838feb', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '9c25291e705136181ede345dabcf05fb054812af', + 'v8_revision': 'f952b84f9b72a9d25e200e697048d873d2193533', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -1503,7 +1503,7 @@ Var('chromium_git') + '/external/khronosgroup/webgl.git' + '@' + 'dd55f3ca8f2ea716ca917a4aaf36f0729fe902b1', 'src/third_party/webrtc': - Var('webrtc_git') + '/src.git' + '@' + '7a0e44c1a84fb4ed57a6701cfc8093756c37af6f', + Var('webrtc_git') + '/src.git' + '@' + 'ddc7578b751b05b5078c41f3973aa8fafdd543b7', 'src/third_party/libgifcodec': Var('skia_git') + '/libgifcodec' + '@'+ Var('libgifcodec_revision'), @@ -1573,7 +1573,7 @@ Var('chromium_git') + '/v8/v8.git' + '@' + Var('v8_revision'), 'src-internal': { - 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@bc883829023812e219a69491c234d814a25a8a48', + 'url': 'https://chrome-internal.googlesource.com/chrome/src-internal.git@10380b34827100276250b72881f645ff92827963', 'condition': 'checkout_src_internal', }, @@ -1581,7 +1581,7 @@ 'packages': [ { 'package': 'chromium/third_party/android_deps/libs/com_google_android_play_core_verification', - 'version': '5WpfZCqhiL1qWTiBl_x3VTelXCJsv5r_SMuE-3H1CI0C', + 'version': 'ojrkXUE6tjG8FYmoLfCD3YdOxTyl2BXMdmk7Fb6cS5MC', }, ], 'condition': 'checkout_android', diff -Nru chromium-80.0.3987.149/build/util/LASTCHANGE chromium-80.0.3987.162/build/util/LASTCHANGE --- chromium-80.0.3987.149/build/util/LASTCHANGE 2020-03-17 22:12:26.000000000 +0000 +++ chromium-80.0.3987.162/build/util/LASTCHANGE 2020-03-31 19:08:06.000000000 +0000 @@ -1 +1 @@ -LASTCHANGE=5f4eb224680e5d7dca88504586e9fd951840cac6-refs/branch-heads/3987_137@{#16} +LASTCHANGE=f2c5dd6138153bb0658091205bd1a1717f16081a-refs/branch-heads/3987@{#1034} diff -Nru chromium-80.0.3987.149/build/util/LASTCHANGE.committime chromium-80.0.3987.162/build/util/LASTCHANGE.committime --- chromium-80.0.3987.149/build/util/LASTCHANGE.committime 2020-03-17 22:12:26.000000000 +0000 +++ chromium-80.0.3987.162/build/util/LASTCHANGE.committime 2020-03-31 19:08:06.000000000 +0000 @@ -1 +1 @@ -1584384788 \ No newline at end of file +1585609953 \ No newline at end of file diff -Nru chromium-80.0.3987.149/chrome/VERSION chromium-80.0.3987.162/chrome/VERSION --- chromium-80.0.3987.149/chrome/VERSION 2020-03-17 21:56:25.000000000 +0000 +++ chromium-80.0.3987.162/chrome/VERSION 2020-03-31 18:59:49.000000000 +0000 @@ -1,4 +1,4 @@ MAJOR=80 MINOR=0 BUILD=3987 -PATCH=149 +PATCH=162 diff -Nru chromium-80.0.3987.149/chrome/browser/supervised_user/supervised_user_features.cc chromium-80.0.3987.162/chrome/browser/supervised_user/supervised_user_features.cc --- chromium-80.0.3987.149/chrome/browser/supervised_user/supervised_user_features.cc 2020-03-17 21:56:28.000000000 +0000 +++ chromium-80.0.3987.162/chrome/browser/supervised_user/supervised_user_features.cc 2020-03-31 18:59:54.000000000 +0000 @@ -12,4 +12,11 @@ const base::Feature kSupervisedUserInitiatedExtensionInstall{ "SupervisedUserInitiatedExtensionInstall", base::FEATURE_DISABLED_BY_DEFAULT}; -} + +#if BUILDFLAG(ENABLE_EXTENSIONS) +const base::Feature kSupervisedUserAllowlistExtensionInstall{ + "SupervisedUserAllowlistExtensionInstall", + base::FEATURE_ENABLED_BY_DEFAULT}; +#endif // BUILDFLAG(ENABLE_EXTENSIONS) + +} // namespace supervised_users diff -Nru chromium-80.0.3987.149/chrome/browser/supervised_user/supervised_user_features.h chromium-80.0.3987.162/chrome/browser/supervised_user/supervised_user_features.h --- chromium-80.0.3987.149/chrome/browser/supervised_user/supervised_user_features.h 2020-03-17 21:55:44.000000000 +0000 +++ chromium-80.0.3987.162/chrome/browser/supervised_user/supervised_user_features.h 2020-03-31 18:59:54.000000000 +0000 @@ -6,6 +6,7 @@ #define CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_FEATURES_H_ #include "base/feature_list.h" +#include "extensions/buildflags/buildflags.h" namespace supervised_users { @@ -13,6 +14,13 @@ extern const base::Feature kSupervisedUserInitiatedExtensionInstall; -} +#if BUILDFLAG(ENABLE_EXTENSIONS) +// For the COVID-19 crisis. Temporarily enable supervised users to install from +// a policy allowlist of extensions without parental approval. +// TODO(crbug/1063104): Remove after the parent permission dialog launches. +extern const base::Feature kSupervisedUserAllowlistExtensionInstall; +#endif // BUILDFLAG(ENABLE_EXTENSIONS) + +} // namespace supervised_users #endif // CHROME_BROWSER_SUPERVISED_USER_SUPERVISED_USER_FEATURES_H_ diff -Nru chromium-80.0.3987.149/chrome/browser/supervised_user/supervised_user_service.cc chromium-80.0.3987.162/chrome/browser/supervised_user/supervised_user_service.cc --- chromium-80.0.3987.149/chrome/browser/supervised_user/supervised_user_service.cc 2020-03-17 21:56:28.000000000 +0000 +++ chromium-80.0.3987.162/chrome/browser/supervised_user/supervised_user_service.cc 2020-03-31 18:59:54.000000000 +0000 @@ -62,6 +62,7 @@ #endif #if BUILDFLAG(ENABLE_EXTENSIONS) +#include "chrome/browser/extensions/extension_management.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_util.h" #include "extensions/browser/extension_prefs.h" @@ -734,6 +735,17 @@ return ExtensionState::ALLOWED; } + if (base::FeatureList::IsEnabled( + supervised_users::kSupervisedUserAllowlistExtensionInstall)) { + extensions::ExtensionManagement* management = + extensions::ExtensionManagementFactory::GetForBrowserContext(profile_); + if (management && management->BlacklistedByDefault()) { + // We want to make sure that the ExtensionInstallBlacklist user policy is + // active before allowing all extensions here. + return ExtensionState::ALLOWED; + } + } + // Feature flag for gating new behavior. if (!base::FeatureList::IsEnabled( supervised_users::kSupervisedUserInitiatedExtensionInstall)) { diff -Nru chromium-80.0.3987.149/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc chromium-80.0.3987.162/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc --- chromium-80.0.3987.149/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc 2020-03-17 21:56:28.000000000 +0000 +++ chromium-80.0.3987.162/chrome/browser/ui/autofill/autofill_popup_controller_impl.cc 2020-03-31 18:59:54.000000000 +0000 @@ -130,7 +130,11 @@ ->UpdateSourceAvailability(FillingSource::AUTOFILL, !suggestions.empty()); #endif + WeakPtr weak_this = GetWeakPtr(); view_->Show(); + // crbug.com/1055981. |this| can be destroyed synchronously at this point. + if (!weak_this) + return; // We only fire the event when a new popup shows. We do not fire the // event when suggestions changed. diff -Nru chromium-80.0.3987.149/components/performance_manager/graph/process_node_impl.cc chromium-80.0.3987.162/components/performance_manager/graph/process_node_impl.cc --- chromium-80.0.3987.149/components/performance_manager/graph/process_node_impl.cc 2020-03-17 21:56:29.000000000 +0000 +++ chromium-80.0.3987.162/components/performance_manager/graph/process_node_impl.cc 2020-03-31 18:59:56.000000000 +0000 @@ -22,6 +22,10 @@ ProcessNodeImpl::~ProcessNodeImpl() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Crash if this process node is destroyed while still hosting a worker node. + // TODO(https://crbug.com/1058705): Turn this into a DCHECK once the issue is + // resolved. + CHECK(worker_nodes_.empty()); } void ProcessNodeImpl::SetCPUUsage(double cpu_usage) { diff -Nru chromium-80.0.3987.149/components/performance_manager/performance_manager_impl.cc chromium-80.0.3987.162/components/performance_manager/performance_manager_impl.cc --- chromium-80.0.3987.149/components/performance_manager/performance_manager_impl.cc 2020-03-17 21:56:29.000000000 +0000 +++ chromium-80.0.3987.162/components/performance_manager/performance_manager_impl.cc 2020-03-31 18:59:56.000000000 +0000 @@ -141,11 +141,20 @@ worker_type, process_node, url, dev_tools_token); } +void PerformanceManagerImpl::DeleteNode(std::unique_ptr node) { + GetTaskRunner()->PostTask( + FROM_HERE, base::BindOnce(&PerformanceManagerImpl::DeleteNodeImpl, + base::Unretained(this), node.release())); +} + void PerformanceManagerImpl::BatchDeleteNodes( std::vector> nodes) { + // Move the nodes vector to the heap. + auto nodes_ptr = std::make_unique>>( + std::move(nodes)); GetTaskRunner()->PostTask( FROM_HERE, base::BindOnce(&PerformanceManagerImpl::BatchDeleteNodesImpl, - base::Unretained(this), std::move(nodes))); + base::Unretained(this), nodes_ptr.release())); } PerformanceManagerImpl::PerformanceManagerImpl() { @@ -182,15 +191,12 @@ return new_node; } -void PerformanceManagerImpl::PostDeleteNode(std::unique_ptr node) { - GetTaskRunner()->PostTask( - FROM_HERE, base::BindOnce(&PerformanceManagerImpl::DeleteNodeImpl, - base::Unretained(this), std::move(node))); -} - -void PerformanceManagerImpl::DeleteNodeImpl(std::unique_ptr node) { +void PerformanceManagerImpl::DeleteNodeImpl(NodeBase* node_ptr) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Must be done first to avoid leaking |node_ptr|. + std::unique_ptr node(node_ptr); + graph_.RemoveNode(node.get()); } @@ -208,15 +214,18 @@ } // namespace void PerformanceManagerImpl::BatchDeleteNodesImpl( - std::vector> nodes) { + std::vector>* nodes_ptr) { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); + // Must be done first to avoid leaking |nodes_ptr|. + std::unique_ptr>> nodes(nodes_ptr); + base::flat_set process_nodes; - for (auto it = nodes.begin(); it != nodes.end(); ++it) { - switch ((*it)->type()) { + for (const auto& node : *nodes) { + switch (node->type()) { case PageNodeImpl::Type(): { - auto* page_node = PageNodeImpl::FromNodeBase(it->get()); + auto* page_node = PageNodeImpl::FromNodeBase(node.get()); // Delete the main frame nodes until no more exist. while (!page_node->main_frame_nodes().empty()) @@ -229,14 +238,14 @@ case ProcessNodeImpl::Type(): { // Keep track of the process nodes for removing once all frames nodes // are removed. - auto* process_node = ProcessNodeImpl::FromNodeBase(it->get()); + auto* process_node = ProcessNodeImpl::FromNodeBase(node.get()); process_nodes.insert(process_node); break; } case FrameNodeImpl::Type(): break; case WorkerNodeImpl::Type(): { - auto* worker_node = WorkerNodeImpl::FromNodeBase(it->get()); + auto* worker_node = WorkerNodeImpl::FromNodeBase(node.get()); graph_.RemoveNode(worker_node); break; } diff -Nru chromium-80.0.3987.149/components/performance_manager/performance_manager_impl.h chromium-80.0.3987.162/components/performance_manager/performance_manager_impl.h --- chromium-80.0.3987.149/components/performance_manager/performance_manager_impl.h 2020-03-17 21:56:29.000000000 +0000 +++ chromium-80.0.3987.162/components/performance_manager/performance_manager_impl.h 2020-03-31 18:59:56.000000000 +0000 @@ -102,8 +102,7 @@ // Destroys a node returned from the creation functions above. // May be called from any sequence. - template - void DeleteNode(std::unique_ptr node); + void DeleteNode(std::unique_ptr node); // Each node in |nodes| must have been returned from one of the creation // functions above. This function takes care of removing them from the graph @@ -130,9 +129,14 @@ base::OnceCallback creation_callback, Args&&... constructor_args); - void PostDeleteNode(std::unique_ptr node); - void DeleteNodeImpl(std::unique_ptr node); - void BatchDeleteNodesImpl(std::vector> nodes); + // Helper functions that removes a node/vector of nodes from the graph on the + // PM sequence and deletes them. + // + // Note that this function has similar semantics to + // SequencedTaskRunner::DeleteSoon(). The node/vector of nodes is passed via a + // regular pointer so that they are not deleted if the task is not executed. + void DeleteNodeImpl(NodeBase* node_ptr); + void BatchDeleteNodesImpl(std::vector>* nodes_ptr); void OnStartImpl(GraphImplCallback graph_callback); static void RunCallbackWithGraphImpl(GraphImplCallback graph_callback); @@ -149,11 +153,6 @@ DISALLOW_COPY_AND_ASSIGN(PerformanceManagerImpl); }; -template -void PerformanceManagerImpl::DeleteNode(std::unique_ptr node) { - PostDeleteNode(std::move(node)); -} - template void PerformanceManagerImpl::CallOnGraphAndReplyWithResult( const base::Location& from_here, diff -Nru chromium-80.0.3987.149/components/viz/service/display/surface_aggregator.cc chromium-80.0.3987.162/components/viz/service/display/surface_aggregator.cc --- chromium-80.0.3987.149/components/viz/service/display/surface_aggregator.cc 2020-03-17 21:56:30.000000000 +0000 +++ chromium-80.0.3987.162/components/viz/service/display/surface_aggregator.cc 2020-03-31 18:59:57.000000000 +0000 @@ -861,14 +861,20 @@ display_transform_render_pass_id_ = next_render_pass_id_++; auto display_transform_pass = RenderPass::Create(1, 1); - display_transform_pass->SetNew( + display_transform_pass->SetAll( display_transform_render_pass_id_, cc::MathUtil::MapEnclosedRectWith2dAxisAlignedTransform( root_surface_transform_, root_render_pass->output_rect), cc::MathUtil::MapEnclosedRectWith2dAxisAlignedTransform( root_surface_transform_, root_render_pass->damage_rect), - gfx::Transform()); - display_transform_pass->color_space = root_render_pass->color_space; + gfx::Transform(), + /*filters=*/cc::FilterOperations(), + /*backdrop_filters=*/cc::FilterOperations(), + /*backdrop_filter_bounds=*/gfx::RRectF(), root_render_pass->color_space, + root_render_pass->has_transparent_background, + /*cache_render_pass=*/false, + /*has_damage_from_contributing_content=*/false, + /*generate_mipmap=*/false); bool are_contents_opaque = true; for (const auto* sqs : root_render_pass->shared_quad_state_list) { diff -Nru chromium-80.0.3987.149/content/browser/browser_interface_binders.cc chromium-80.0.3987.162/content/browser/browser_interface_binders.cc --- chromium-80.0.3987.149/content/browser/browser_interface_binders.cc 2020-03-17 21:56:30.000000000 +0000 +++ chromium-80.0.3987.162/content/browser/browser_interface_binders.cc 2020-03-31 18:59:57.000000000 +0000 @@ -617,7 +617,7 @@ // Dedicated workers const url::Origin& GetContextForHost(DedicatedWorkerHost* host) { - return host->GetOrigin(); + return host->GetWorkerOrigin(); } void PopulateDedicatedWorkerBinders(DedicatedWorkerHost* host, diff -Nru chromium-80.0.3987.149/content/browser/worker_host/dedicated_worker_host.cc chromium-80.0.3987.162/content/browser/worker_host/dedicated_worker_host.cc --- chromium-80.0.3987.149/content/browser/worker_host/dedicated_worker_host.cc 2020-03-17 21:56:30.000000000 +0000 +++ chromium-80.0.3987.162/content/browser/worker_host/dedicated_worker_host.cc 2020-03-31 18:59:57.000000000 +0000 @@ -40,12 +40,15 @@ int worker_process_id, int ancestor_render_frame_id, int creator_render_frame_id, - const url::Origin& origin, + const url::Origin& creator_origin, mojo::PendingReceiver host) : worker_process_id_(worker_process_id), ancestor_render_frame_id_(ancestor_render_frame_id), creator_render_frame_id_(creator_render_frame_id), - origin_(origin), + creator_origin_(creator_origin), + // TODO(https://crbug.com/1058759): Calculate the worker origin based on + // the worker script URL. + worker_origin_(creator_origin), host_receiver_(this, std::move(host)) { DCHECK_CURRENTLY_ON(BrowserThread::UI); } @@ -85,7 +88,6 @@ void DedicatedWorkerHost::StartScriptLoad( const GURL& script_url, - const url::Origin& request_initiator_origin, network::mojom::CredentialsMode credentials_mode, blink::mojom::FetchClientSettingsObjectPtr outside_fetch_client_settings_object, @@ -176,14 +178,14 @@ // initiator origin to keep consistency with WorkerScriptFetchInitiator, but // probably this should be calculated based on the worker origin as the // factories be used for subresource loading on the worker. - file_url_support_ = request_initiator_origin.scheme() == url::kFileScheme; + file_url_support_ = creator_origin_.scheme() == url::kFileScheme; service_worker_handle_ = std::make_unique( storage_partition_impl->GetServiceWorkerContext()); WorkerScriptFetchInitiator::Start( worker_process_id_, script_url, creator_render_frame_host, - request_initiator_origin, network_isolation_key_, credentials_mode, + creator_origin_, network_isolation_key_, credentials_mode, std::move(outside_fetch_client_settings_object), ResourceType::kWorker, storage_partition_impl->GetServiceWorkerContext(), service_worker_handle_.get(), @@ -299,15 +301,16 @@ GetContentClient()->browser()->WillCreateURLLoaderFactory( storage_partition_impl->browser_context(), /*frame=*/nullptr, worker_process_id_, - ContentBrowserClient::URLLoaderFactoryType::kWorkerSubResource, origin_, - /*navigation_id=*/base::nullopt, &default_factory_receiver, - &default_header_client, bypass_redirect_checks, &factory_override); + ContentBrowserClient::URLLoaderFactoryType::kWorkerSubResource, + worker_origin_, /*navigation_id=*/base::nullopt, + &default_factory_receiver, &default_header_client, bypass_redirect_checks, + &factory_override); // TODO(nhiroki): Call devtools_instrumentation::WillCreateURLLoaderFactory() // here. worker_process_host->CreateURLLoaderFactory( - origin_, origin_, + worker_origin_, worker_origin_, ancestor_render_frame_host->cross_origin_embedder_policy(), /*preferences=*/nullptr, network_isolation_key_, std::move(default_header_client), @@ -344,7 +347,7 @@ } mojo::MakeSelfOwnedReceiver(std::make_unique( worker_process_id_, ancestor_render_frame_id_, - origin_, network_isolation_key_), + worker_origin_, network_isolation_key_), std::move(receiver)); } @@ -359,8 +362,8 @@ return; } mojo::MakeSelfOwnedReceiver( - std::make_unique(worker_process_id_, origin_, - network_isolation_key_), + std::make_unique( + worker_process_id_, worker_origin_, network_isolation_key_), std::move(receiver)); } @@ -370,7 +373,7 @@ CreateDedicatedWorkerHostFactory(worker_process_id_, ancestor_render_frame_id_, /*creator_render_frame_id=*/MSG_ROUTING_NONE, - origin_, std::move(receiver)); + worker_origin_, std::move(receiver)); } void DedicatedWorkerHost::CreateIdleManager( @@ -501,20 +504,19 @@ class DedicatedWorkerHostFactoryImpl final : public blink::mojom::DedicatedWorkerHostFactory { public: - DedicatedWorkerHostFactoryImpl(int creator_process_id, + DedicatedWorkerHostFactoryImpl(int worker_process_id, int ancestor_render_frame_id, int creator_render_frame_id, - const url::Origin& parent_context_origin) - : creator_process_id_(creator_process_id), + const url::Origin& creator_origin) + : worker_process_id_(worker_process_id), ancestor_render_frame_id_(ancestor_render_frame_id), creator_render_frame_id_(creator_render_frame_id), - parent_context_origin_(parent_context_origin) { + creator_origin_(creator_origin) { DCHECK_CURRENTLY_ON(BrowserThread::UI); } // blink::mojom::DedicatedWorkerHostFactory: void CreateWorkerHost( - const url::Origin& origin, mojo::PendingReceiver broker_receiver, mojo::PendingReceiver host_receiver) @@ -525,21 +527,15 @@ return; } - // TODO(crbug.com/729021): Once |parent_context_origin_| no longer races - // with the request for |DedicatedWorkerHostFactory|, enforce that - // the worker's origin either matches the origin of the creating context - // (Document or DedicatedWorkerGlobalScope), or is unique. - // Deletes itself on Mojo disconnection. auto* host = new DedicatedWorkerHost( - creator_process_id_, ancestor_render_frame_id_, - creator_render_frame_id_, origin, std::move(host_receiver)); + worker_process_id_, ancestor_render_frame_id_, creator_render_frame_id_, + creator_origin_, std::move(host_receiver)); host->BindBrowserInterfaceBrokerReceiver(std::move(broker_receiver)); } // PlzDedicatedWorker: void CreateWorkerHostAndStartScriptLoad( const GURL& script_url, - const url::Origin& request_initiator_origin, network::mojom::CredentialsMode credentials_mode, blink::mojom::FetchClientSettingsObjectPtr outside_fetch_client_settings_object, @@ -554,37 +550,27 @@ return; } - // Create a worker host that will start a new dedicated worker in the - // renderer process whose ID is |creator_process_id_|. - // - // TODO(crbug.com/729021): Once |parent_context_origin_| no longer races - // with the request for |DedicatedWorkerHostFactory|, enforce that - // the worker's origin either matches the origin of the creating context - // (Document or DedicatedWorkerGlobalScope), or is unique. - // Deletes itself on Mojo disconnection. auto* host = new DedicatedWorkerHost( - creator_process_id_, ancestor_render_frame_id_, - creator_render_frame_id_, request_initiator_origin, - std::move(host_receiver)); + worker_process_id_, ancestor_render_frame_id_, creator_render_frame_id_, + creator_origin_, std::move(host_receiver)); mojo::PendingRemote broker; host->BindBrowserInterfaceBrokerReceiver( broker.InitWithNewPipeAndPassReceiver()); mojo::Remote remote_client( std::move(client)); remote_client->OnWorkerHostCreated(std::move(broker)); - host->StartScriptLoad(script_url, request_initiator_origin, - credentials_mode, + host->StartScriptLoad(script_url, credentials_mode, std::move(outside_fetch_client_settings_object), std::move(blob_url_token), std::move(remote_client)); } private: // See comments on the corresponding members of DedicatedWorkerHost. - const int creator_process_id_; + const int worker_process_id_; const int ancestor_render_frame_id_; const int creator_render_frame_id_; - const url::Origin parent_context_origin_; + const url::Origin creator_origin_; DISALLOW_COPY_AND_ASSIGN(DedicatedWorkerHostFactoryImpl); }; @@ -592,15 +578,15 @@ } // namespace void CreateDedicatedWorkerHostFactory( - int creator_process_id, + int worker_process_id, int ancestor_render_frame_id, int creator_render_frame_id, - const url::Origin& origin, + const url::Origin& creator_origin, mojo::PendingReceiver receiver) { DCHECK_CURRENTLY_ON(BrowserThread::UI); mojo::MakeSelfOwnedReceiver(std::make_unique( - creator_process_id, ancestor_render_frame_id, - creator_render_frame_id, origin), + worker_process_id, ancestor_render_frame_id, + creator_render_frame_id, creator_origin), std::move(receiver)); } diff -Nru chromium-80.0.3987.149/content/browser/worker_host/dedicated_worker_host.h chromium-80.0.3987.162/content/browser/worker_host/dedicated_worker_host.h --- chromium-80.0.3987.149/content/browser/worker_host/dedicated_worker_host.h 2020-03-17 21:56:30.000000000 +0000 +++ chromium-80.0.3987.162/content/browser/worker_host/dedicated_worker_host.h 2020-03-31 18:59:57.000000000 +0000 @@ -41,10 +41,10 @@ // Creates a host factory for a dedicated worker. This must be called on the UI // thread. void CreateDedicatedWorkerHostFactory( - int creator_process_id, + int worker_process_id, int ancestor_render_frame_id, int creator_render_frame_id, - const url::Origin& origin, + const url::Origin& creator_origin, mojo::PendingReceiver receiver); // A host for a single dedicated worker. It deletes itself upon Mojo @@ -55,7 +55,7 @@ int worker_process_id, int ancestor_render_frame_id, int creator_render_frame_id, - const url::Origin& origin, + const url::Origin& creator_origin, mojo::PendingReceiver host); ~DedicatedWorkerHost() final; @@ -66,7 +66,7 @@ RenderProcessHost* GetProcessHost() { return RenderProcessHost::FromID(worker_process_id_); } - const url::Origin& GetOrigin() { return origin_; } + const url::Origin& GetWorkerOrigin() { return worker_origin_; } void CreateIdleManager( mojo::PendingReceiver receiver); @@ -97,7 +97,6 @@ // PlzDedicatedWorker: void StartScriptLoad( const GURL& script_url, - const url::Origin& request_initiator_origin, network::mojom::CredentialsMode credentials_mode, blink::mojom::FetchClientSettingsObjectPtr outside_fetch_client_settings_object, @@ -158,7 +157,12 @@ // MSG_ROUTING_NONE when this worker is nested. const int creator_render_frame_id_; - const url::Origin origin_; + // The origin of the frame or dedicated worker that starts this worker. + const url::Origin creator_origin_; + + // The origin of this worker. + // https://html.spec.whatwg.org/C/#concept-settings-object-origin + const url::Origin worker_origin_; // The network isolation key to be used for both the worker script and the // worker's subresources. diff -Nru chromium-80.0.3987.149/content/renderer/pepper/pepper_media_stream_video_track_host.cc chromium-80.0.3987.162/content/renderer/pepper/pepper_media_stream_video_track_host.cc --- chromium-80.0.3987.149/content/renderer/pepper/pepper_media_stream_video_track_host.cc 2020-03-17 21:56:30.000000000 +0000 +++ chromium-80.0.3987.162/content/renderer/pepper/pepper_media_stream_video_track_host.cc 2020-03-31 18:59:57.000000000 +0000 @@ -22,6 +22,7 @@ #include "ppapi/host/host_message_context.h" #include "ppapi/proxy/ppapi_messages.h" #include "ppapi/shared_impl/media_stream_buffer.h" +#include "ui/gfx/gpu_memory_buffer.h" #include "third_party/blink/public/web/modules/mediastream/media_stream_video_source.h" #include "third_party/blink/public/web/modules/mediastream/media_stream_video_track.h" #include "third_party/libyuv/include/libyuv.h" @@ -354,6 +355,36 @@ if (frame->format() == media::PIXEL_FORMAT_I420A) frame = media::WrapAsI420VideoFrame(std::move(video_frame)); PP_VideoFrame_Format ppformat = ToPpapiFormat(frame->format()); + if (frame->storage_type() == media::VideoFrame::STORAGE_GPU_MEMORY_BUFFER) { + // NV12 is the only supported GMB pixel format at the moment, and there is + // no corresponding PP_VideoFrame_Format. Convert the video frame to I420. + DCHECK_EQ(frame->format(), media::PIXEL_FORMAT_NV12); + ppformat = PP_VIDEOFRAME_FORMAT_I420; + auto* gmb = video_frame->GetGpuMemoryBuffer(); + if (!gmb->Map()) { + DLOG(WARNING) << "Failed to map GpuMemoryBuffer"; + return; + } + frame = media::VideoFrame::CreateFrame( + media::PIXEL_FORMAT_I420, video_frame->coded_size(), + video_frame->visible_rect(), video_frame->natural_size(), + video_frame->timestamp()); + int ret = libyuv::NV12ToI420( + static_cast(gmb->memory(0)), gmb->stride(0), + static_cast(gmb->memory(1)), gmb->stride(1), + frame->data(media::VideoFrame::kYPlane), + frame->stride(media::VideoFrame::kYPlane), + frame->data(media::VideoFrame::kUPlane), + frame->stride(media::VideoFrame::kUPlane), + frame->data(media::VideoFrame::kVPlane), + frame->stride(media::VideoFrame::kVPlane), + video_frame->coded_size().width(), video_frame->coded_size().height()); + gmb->Unmap(); + if (ret != 0) { + DLOG(WARNING) << "Failed to convert NV12 to I420"; + return; + } + } if (ppformat == PP_VIDEOFRAME_FORMAT_UNKNOWN) return; diff -Nru chromium-80.0.3987.149/content/renderer/worker/dedicated_worker_host_factory_client.cc chromium-80.0.3987.162/content/renderer/worker/dedicated_worker_host_factory_client.cc --- chromium-80.0.3987.149/content/renderer/worker/dedicated_worker_host_factory_client.cc 2020-03-17 21:56:30.000000000 +0000 +++ chromium-80.0.3987.162/content/renderer/worker/dedicated_worker_host_factory_client.cc 2020-03-31 18:59:57.000000000 +0000 @@ -18,7 +18,6 @@ #include "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom.h" #include "third_party/blink/public/mojom/worker/worker_main_script_load_params.mojom.h" #include "third_party/blink/public/platform/web_dedicated_worker.h" -#include "third_party/blink/public/platform/web_security_origin.h" #include "third_party/blink/public/platform/web_url.h" namespace content { @@ -32,28 +31,25 @@ DedicatedWorkerHostFactoryClient::~DedicatedWorkerHostFactoryClient() = default; -void DedicatedWorkerHostFactoryClient::CreateWorkerHostDeprecated( - const blink::WebSecurityOrigin& script_origin) { +void DedicatedWorkerHostFactoryClient::CreateWorkerHostDeprecated() { DCHECK(!base::FeatureList::IsEnabled(blink::features::kPlzDedicatedWorker)); mojo::PendingRemote browser_interface_broker; factory_->CreateWorkerHost( - script_origin, browser_interface_broker.InitWithNewPipeAndPassReceiver(), + browser_interface_broker.InitWithNewPipeAndPassReceiver(), remote_host_.BindNewPipeAndPassReceiver()); OnWorkerHostCreated(std::move(browser_interface_broker)); } void DedicatedWorkerHostFactoryClient::CreateWorkerHost( const blink::WebURL& script_url, - const blink::WebSecurityOrigin& script_origin, network::mojom::CredentialsMode credentials_mode, - const blink::WebSecurityOrigin& fetch_client_security_origin, const blink::WebFetchClientSettingsObject& fetch_client_settings_object, mojo::ScopedMessagePipeHandle blob_url_token) { DCHECK(base::FeatureList::IsEnabled(blink::features::kPlzDedicatedWorker)); factory_->CreateWorkerHostAndStartScriptLoad( - script_url, script_origin, credentials_mode, + script_url, credentials_mode, FetchClientSettingsObjectFromWebToMojom(fetch_client_settings_object), mojo::PendingRemote( std::move(blob_url_token), blink::mojom::BlobURLToken::Version_), diff -Nru chromium-80.0.3987.149/content/renderer/worker/dedicated_worker_host_factory_client.h chromium-80.0.3987.162/content/renderer/worker/dedicated_worker_host_factory_client.h --- chromium-80.0.3987.149/content/renderer/worker/dedicated_worker_host_factory_client.h 2020-03-17 21:56:30.000000000 +0000 +++ chromium-80.0.3987.162/content/renderer/worker/dedicated_worker_host_factory_client.h 2020-03-31 18:59:57.000000000 +0000 @@ -43,13 +43,10 @@ ~DedicatedWorkerHostFactoryClient() override; // Implements blink::WebDedicatedWorkerHostFactoryClient. - void CreateWorkerHostDeprecated( - const blink::WebSecurityOrigin& script_origin) override; + void CreateWorkerHostDeprecated() override; void CreateWorkerHost( const blink::WebURL& script_url, - const blink::WebSecurityOrigin& script_origin, network::mojom::CredentialsMode credentials_mode, - const blink::WebSecurityOrigin& fetch_client_security_origin, const blink::WebFetchClientSettingsObject& fetch_client_settings_object, mojo::ScopedMessagePipeHandle blob_url_token) override; scoped_refptr CloneWorkerFetchContext( diff -Nru chromium-80.0.3987.149/debian/changelog chromium-80.0.3987.162/debian/changelog --- chromium-80.0.3987.149/debian/changelog 2020-03-21 14:56:46.000000000 +0000 +++ chromium-80.0.3987.162/debian/changelog 2020-04-02 22:23:57.000000000 +0000 @@ -1,3 +1,12 @@ +chromium (80.0.3987.162-1~deb10u1) buster-security; urgency=medium + + * New upstream security release. + - CVE-2020-6450: Use after free in WebAudio. Reported by Man Yue Mo + - CVE-2020-6451: Use after free in WebAudio. Reported by Man Yue Mo + - CVE-2020-6452: Heap buffer overflow in media. Reported by asnine + + -- Michael Gilbert Thu, 02 Apr 2020 22:23:57 +0000 + chromium (80.0.3987.149-1~deb10u1) buster-security; urgency=medium * New upstream security release. diff -Nru chromium-80.0.3987.149/debian/patches/clang/flags.patch chromium-80.0.3987.162/debian/patches/clang/flags.patch --- chromium-80.0.3987.149/debian/patches/clang/flags.patch 2020-02-23 21:05:13.000000000 +0000 +++ chromium-80.0.3987.162/debian/patches/clang/flags.patch 2020-04-02 22:23:57.000000000 +0000 @@ -3,7 +3,17 @@ --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn -@@ -1520,21 +1520,6 @@ config("default_warnings") { +@@ -146,8 +146,7 @@ declare_args() { + # TODO(vitalybuka): is_win needs next llvm roll. + # 'is_android' breaks content_shell_test_apk on android-kitkat-arm-rel. + # 'use_xcode_clang' may call old clang. +- init_stack_vars = +- !is_android && !is_win && !use_xcode_clang && !is_official_build ++ init_stack_vars = false + } + + declare_args() { +@@ -1520,21 +1519,6 @@ config("default_warnings") { # Ignore warnings about MSVC optimization pragmas. # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662 "-Wno-ignored-pragma-optimize", diff -Nru chromium-80.0.3987.149/gpu/config/gpu_lists_version.h chromium-80.0.3987.162/gpu/config/gpu_lists_version.h --- chromium-80.0.3987.149/gpu/config/gpu_lists_version.h 2020-03-17 22:12:26.000000000 +0000 +++ chromium-80.0.3987.162/gpu/config/gpu_lists_version.h 2020-03-31 19:08:06.000000000 +0000 @@ -3,6 +3,6 @@ #ifndef GPU_CONFIG_GPU_LISTS_VERSION_H_ #define GPU_CONFIG_GPU_LISTS_VERSION_H_ -#define GPU_LISTS_VERSION "5f4eb224680e5d7dca88504586e9fd951840cac6" +#define GPU_LISTS_VERSION "f2c5dd6138153bb0658091205bd1a1717f16081a" #endif // GPU_CONFIG_GPU_LISTS_VERSION_H_ diff -Nru chromium-80.0.3987.149/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc chromium-80.0.3987.162/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc --- chromium-80.0.3987.149/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc 2020-03-17 21:56:31.000000000 +0000 +++ chromium-80.0.3987.162/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc 2020-03-31 18:59:58.000000000 +0000 @@ -325,7 +325,7 @@ } if (!vaapi_wrapper_->UploadVideoFrameToSurface(*request->video_frame, - va_surface_id_)) { + va_surface_id_, input_size_)) { VLOGF(1) << "Failed to upload video frame to VA surface"; notify_error_cb_.Run(task_id, PLATFORM_FAILURE); return; diff -Nru chromium-80.0.3987.149/media/gpu/vaapi/vaapi_video_encode_accelerator.cc chromium-80.0.3987.162/media/gpu/vaapi/vaapi_video_encode_accelerator.cc --- chromium-80.0.3987.149/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2020-03-17 21:56:31.000000000 +0000 +++ chromium-80.0.3987.162/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2020-03-31 18:59:58.000000000 +0000 @@ -463,11 +463,14 @@ NOTIFY_ERROR(kPlatformFailureError, "Failed to execute encode"); } -void VaapiVideoEncodeAccelerator::UploadFrame(scoped_refptr frame, - VASurfaceID va_surface_id) { +void VaapiVideoEncodeAccelerator::UploadFrame( + scoped_refptr frame, + VASurfaceID va_surface_id, + const gfx::Size& va_surface_size) { DCHECK(encoder_thread_task_runner_->BelongsToCurrentThread()); DVLOGF(4) << "frame is uploading: " << va_surface_id; - if (!vaapi_wrapper_->UploadVideoFrameToSurface(*frame, va_surface_id)) + if (!vaapi_wrapper_->UploadVideoFrameToSurface(*frame, va_surface_id, + va_surface_size)) NOTIFY_ERROR(kPlatformFailureError, "Failed to upload frame"); } @@ -686,9 +689,9 @@ input_surface, std::move(reconstructed_surface), coded_buffer_id); if (!native_input_mode_) { - job->AddSetupCallback( - base::BindOnce(&VaapiVideoEncodeAccelerator::UploadFrame, - base::Unretained(this), frame, input_surface->id())); + job->AddSetupCallback(base::BindOnce( + &VaapiVideoEncodeAccelerator::UploadFrame, base::Unretained(this), frame, + input_surface->id(), input_surface->size())); } return job; diff -Nru chromium-80.0.3987.149/media/gpu/vaapi/vaapi_video_encode_accelerator.h chromium-80.0.3987.162/media/gpu/vaapi/vaapi_video_encode_accelerator.h --- chromium-80.0.3987.149/media/gpu/vaapi/vaapi_video_encode_accelerator.h 2020-03-17 21:56:31.000000000 +0000 +++ chromium-80.0.3987.162/media/gpu/vaapi/vaapi_video_encode_accelerator.h 2020-03-31 18:59:58.000000000 +0000 @@ -103,7 +103,9 @@ void EncodePendingInputs(); // Uploads image data from |frame| to |va_surface_id|. - void UploadFrame(scoped_refptr frame, VASurfaceID va_surface_id); + void UploadFrame(scoped_refptr frame, + VASurfaceID va_surface_id, + const gfx::Size& va_surface_size); // Executes encode in hardware. This does not block and may return before // the job is finished. diff -Nru chromium-80.0.3987.149/media/gpu/vaapi/vaapi_wrapper.cc chromium-80.0.3987.162/media/gpu/vaapi/vaapi_wrapper.cc --- chromium-80.0.3987.149/media/gpu/vaapi/vaapi_wrapper.cc 2020-03-17 21:56:31.000000000 +0000 +++ chromium-80.0.3987.162/media/gpu/vaapi/vaapi_wrapper.cc 2020-03-31 18:59:58.000000000 +0000 @@ -19,6 +19,7 @@ #include "base/bind.h" #include "base/bind_helpers.h" +#include "base/bits.h" #include "base/callback_helpers.h" #include "base/environment.h" #include "base/files/scoped_file.h" @@ -141,6 +142,69 @@ namespace { +bool GetNV12VisibleWidthBytes(int visible_width, + uint32_t plane, + size_t* bytes) { + if (plane == 0) { + *bytes = base::checked_cast(visible_width); + return true; + } + + *bytes = base::checked_cast(visible_width); + return visible_width % 2 == 0 || + base::CheckAdd(visible_width, 1).AssignIfValid(bytes); +} + +// Fill 0 on VAImage's non visible area. +bool ClearNV12Padding(const VAImage& image, + const gfx::Size& visible_size, + uint8_t* data) { + DCHECK_EQ(2u, image.num_planes); + DCHECK_EQ(image.format.fourcc, static_cast(VA_FOURCC_NV12)); + + size_t visible_width_bytes[2] = {}; + if (!GetNV12VisibleWidthBytes(visible_size.width(), 0u, + &visible_width_bytes[0]) || + !GetNV12VisibleWidthBytes(visible_size.width(), 1u, + &visible_width_bytes[1])) { + return false; + } + + for (uint32_t plane = 0; plane < image.num_planes; plane++) { + size_t row_bytes = base::strict_cast(image.pitches[plane]); + if (row_bytes == visible_width_bytes[plane]) + continue; + + CHECK_GT(row_bytes, visible_width_bytes[plane]); + int visible_height = visible_size.height(); + if (plane == 1 && !(base::CheckAdd(visible_size.height(), 1) / 2) + .AssignIfValid(&visible_height)) { + return false; + } + + const size_t padding_bytes = row_bytes - visible_width_bytes[plane]; + uint8_t* plane_data = data + image.offsets[plane]; + for (int row = 0; row < visible_height; row++, plane_data += row_bytes) + memset(plane_data + visible_width_bytes[plane], 0, padding_bytes); + + CHECK_GE(base::strict_cast(image.height), visible_height); + size_t image_height = base::strict_cast(image.height); + if (plane == 1 && !(base::CheckAdd(image.height, 1) / 2) + .AssignIfValid(&image_height)) { + return false; + } + + base::CheckedNumeric remaining_area(image_height); + remaining_area -= base::checked_cast(visible_height); + remaining_area *= row_bytes; + if (!remaining_area.IsValid()) + return false; + memset(plane_data, 0, remaining_area.ValueOrDie()); + } + + return true; +} + // Maximum framerate of encoded profile. This value is an arbitary limit // and not taken from HW documentation. constexpr int kMaxEncoderFramerate = 30; @@ -1745,12 +1809,20 @@ } bool VaapiWrapper::UploadVideoFrameToSurface(const VideoFrame& frame, - VASurfaceID va_surface_id) { + VASurfaceID va_surface_id, + const gfx::Size& va_surface_size) { TRACE_EVENT0("media,gpu", "VaapiWrapper::UploadVideoFrameToSurface"); base::AutoLock auto_lock(*va_lock_); TRACE_EVENT0("media,gpu", "VaapiWrapper::UploadVideoFrameToSurfaceLocked"); - const gfx::Size size = frame.coded_size(); + if (frame.visible_rect().origin() != gfx::Point(0, 0)) { + LOG(ERROR) << "The origin of the frame's visible rectangle is not (0, 0), " + << "frame.visible_rect().origin()=" + << frame.visible_rect().origin().ToString(); + return false; + } + + const gfx::Size visible_size = frame.visible_rect().size(); bool va_create_put_fallback = false; VAImage image; VAStatus va_res = vaDeriveImage(va_display_, va_surface_id, &image); @@ -1762,8 +1834,8 @@ .bits_per_pixel = 12}; VAImageFormat image_format = kImageFormatNV12; - va_res = vaCreateImage(va_display_, &image_format, size.width(), - size.height(), &image); + va_res = vaCreateImage(va_display_, &image_format, va_surface_size.width(), + va_surface_size.height(), &image); VA_SUCCESS_OR_RETURN(va_res, "vaCreateImage failed", false); } base::ScopedClosureRunner vaimage_deleter( @@ -1774,7 +1846,13 @@ return false; } - if (gfx::Rect(image.width, image.height) < gfx::Rect(size)) { + if (image.width % 2 != 0 || image.height % 2 != 0) { + LOG(ERROR) << "Buffer's width and height are not even, " + << "width=" << image.width << ", height=" << image.height; + return false; + } + + if (!gfx::Rect(image.width, image.height).Contains(gfx::Rect(visible_size))) { LOG(ERROR) << "Buffer too small to fit the frame."; return false; } @@ -1784,6 +1862,11 @@ return false; uint8_t* image_ptr = static_cast(mapping.data()); + if (!ClearNV12Padding(image, visible_size, image_ptr)) { + LOG(ERROR) << "Failed to clear non visible area of VAImage"; + return false; + } + int ret = 0; { base::AutoUnlock auto_unlock(*va_lock_); @@ -1794,19 +1877,32 @@ frame.data(VideoFrame::kUPlane), frame.stride(VideoFrame::kUPlane), frame.data(VideoFrame::kVPlane), frame.stride(VideoFrame::kVPlane), image_ptr + image.offsets[0], image.pitches[0], - image_ptr + image.offsets[1], image.pitches[1], image.width, - image.height); + image_ptr + image.offsets[1], image.pitches[1], + visible_size.width(), visible_size.height()); break; - case PIXEL_FORMAT_NV12: + case PIXEL_FORMAT_NV12: { + int uv_width = visible_size.width(); + if (visible_size.width() % 2 != 0 && + !base::CheckAdd(visible_size.width(), 1) + .AssignIfValid(&uv_width)) { + return false; + } + + int uv_height = 0; + if (!(base::CheckAdd(visible_size.height(), 1) / 2) + .AssignIfValid(&uv_height)) { + return false; + } + libyuv::CopyPlane(frame.data(VideoFrame::kYPlane), frame.stride(VideoFrame::kYPlane), image_ptr + image.offsets[0], image.pitches[0], - image.width, image.height); + visible_size.width(), visible_size.height()); libyuv::CopyPlane(frame.data(VideoFrame::kUVPlane), frame.stride(VideoFrame::kUVPlane), image_ptr + image.offsets[1], image.pitches[1], - image.width, image.height / 2); - break; + uv_width, uv_height); + } break; default: LOG(ERROR) << "Unsupported pixel format: " << frame.format(); return false; @@ -1814,8 +1910,8 @@ } if (va_create_put_fallback) { va_res = vaPutImage(va_display_, va_surface_id, image.image_id, 0, 0, - size.width(), size.height(), 0, 0, size.width(), - size.height()); + visible_size.width(), visible_size.height(), 0, 0, + visible_size.width(), visible_size.height()); VA_SUCCESS_OR_RETURN(va_res, "vaPutImage failed", false); } return ret == 0; diff -Nru chromium-80.0.3987.149/media/gpu/vaapi/vaapi_wrapper.h chromium-80.0.3987.162/media/gpu/vaapi/vaapi_wrapper.h --- chromium-80.0.3987.149/media/gpu/vaapi/vaapi_wrapper.h 2020-03-17 21:56:31.000000000 +0000 +++ chromium-80.0.3987.162/media/gpu/vaapi/vaapi_wrapper.h 2020-03-31 18:59:58.000000000 +0000 @@ -344,7 +344,8 @@ // Upload contents of |frame| into |va_surface_id| for encode. bool UploadVideoFrameToSurface(const VideoFrame& frame, - VASurfaceID va_surface_id); + VASurfaceID va_surface_id, + const gfx::Size& va_surface_size); // Create a buffer of |size| bytes to be used as encode output. bool CreateVABuffer(size_t size, VABufferID* buffer_id); diff -Nru chromium-80.0.3987.149/skia/ext/skia_commit_hash.h chromium-80.0.3987.162/skia/ext/skia_commit_hash.h --- chromium-80.0.3987.149/skia/ext/skia_commit_hash.h 2020-03-17 22:12:26.000000000 +0000 +++ chromium-80.0.3987.162/skia/ext/skia_commit_hash.h 2020-03-31 19:08:06.000000000 +0000 @@ -3,6 +3,6 @@ #ifndef SKIA_EXT_SKIA_COMMIT_HASH_H_ #define SKIA_EXT_SKIA_COMMIT_HASH_H_ -#define SKIA_COMMIT_HASH "ac0e515499dbbfd8de62ed1eb7b5d0f2ad6a7679" +#define SKIA_COMMIT_HASH "a91f9f612e5eeb93cf40a3c0ce7d7c6ddf838feb" #endif // SKIA_EXT_SKIA_COMMIT_HASH_H_ diff -Nru chromium-80.0.3987.149/third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom chromium-80.0.3987.162/third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom --- chromium-80.0.3987.149/third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom 2020-03-17 21:56:32.000000000 +0000 +++ chromium-80.0.3987.162/third_party/blink/public/mojom/worker/dedicated_worker_host_factory.mojom 2020-03-31 18:59:15.000000000 +0000 @@ -14,7 +14,6 @@ import "third_party/blink/public/mojom/worker/worker_main_script_load_params.mojom"; import "third_party/blink/public/mojom/service_worker/controller_service_worker.mojom"; import "third_party/blink/public/mojom/service_worker/service_worker_provider.mojom"; -import "url/mojom/origin.mojom"; import "url/mojom/url.mojom"; // The name of the InterfaceProviderSpec in service manifests used by the @@ -74,11 +73,7 @@ // // Creates a new DedicatedWorkerHost, and requests |browser_interface_broker| // to provide the worker access to mojo interfaces. - // |origin| must either be - // unique or match the origin of the creating context (Document or - // DedicatedWorkerGlobalScope). CreateWorkerHost( - url.mojom.Origin origin, pending_receiver browser_interface_broker, pending_receiver host); @@ -90,14 +85,11 @@ // Creates a new DedicatedWorkerHost, and requests to start top-level worker // script loading for |script_url| using |credentials_mode| and // |outside_fetch_client_settings_object|. - // |origin| must either be unique or match the origin of the creating context - // (Document or DedicatedWorkerGlobalScope). // |blob_url_token| should be non-null when |script_url| is a blob URL. // |client| is used for notifying the renderer process of results of worker // host creation and script loading. CreateWorkerHostAndStartScriptLoad( url.mojom.Url script_url, - url.mojom.Origin origin, network.mojom.CredentialsMode credentials_mode, blink.mojom.FetchClientSettingsObject outside_fetch_client_settings_object, diff -Nru chromium-80.0.3987.149/third_party/blink/public/platform/web_dedicated_worker_host_factory_client.h chromium-80.0.3987.162/third_party/blink/public/platform/web_dedicated_worker_host_factory_client.h --- chromium-80.0.3987.149/third_party/blink/public/platform/web_dedicated_worker_host_factory_client.h 2020-03-17 21:56:32.000000000 +0000 +++ chromium-80.0.3987.162/third_party/blink/public/platform/web_dedicated_worker_host_factory_client.h 2020-03-31 18:59:59.000000000 +0000 @@ -19,7 +19,6 @@ namespace blink { -class WebSecurityOrigin; class WebURL; class WebWorkerFetchContext; @@ -32,17 +31,11 @@ // Requests the creation of DedicatedWorkerHost in the browser process. // For non-PlzDedicatedWorker. This will be removed once PlzDedicatedWorker is // enabled by default. - virtual void CreateWorkerHostDeprecated( - const blink::WebSecurityOrigin& script_origin) = 0; + virtual void CreateWorkerHostDeprecated() = 0; // For PlzDedicatedWorker. - // |fetch_client_security_origin| is intentionally separated from - // |fetch_client_settings_object| as it shouldn't be passed from renderer - // process from the security perspective. virtual void CreateWorkerHost( const blink::WebURL& script_url, - const blink::WebSecurityOrigin& script_origin, network::mojom::CredentialsMode credentials_mode, - const blink::WebSecurityOrigin& fetch_client_security_origin, const blink::WebFetchClientSettingsObject& fetch_client_settings_object, mojo::ScopedMessagePipeHandle blob_url_token) = 0; diff -Nru chromium-80.0.3987.149/third_party/blink/renderer/core/workers/dedicated_worker.cc chromium-80.0.3987.162/third_party/blink/renderer/core/workers/dedicated_worker.cc --- chromium-80.0.3987.149/third_party/blink/renderer/core/workers/dedicated_worker.cc 2020-03-17 21:56:32.000000000 +0000 +++ chromium-80.0.3987.162/third_party/blink/renderer/core/workers/dedicated_worker.cc 2020-03-31 19:00:00.000000000 +0000 @@ -246,18 +246,14 @@ factory_client_->CreateWorkerHost( script_request_url_, - WebSecurityOrigin(GetExecutionContext()->GetSecurityOrigin()), credentials_mode, - WebSecurityOrigin( - outside_fetch_client_settings_object_->GetSecurityOrigin()), WebFetchClientSettingsObject(*outside_fetch_client_settings_object_), blob_url_token.PassPipe()); // Continue in OnScriptLoadStarted() or OnScriptLoadStartFailed(). return; } - factory_client_->CreateWorkerHostDeprecated( - WebSecurityOrigin(GetExecutionContext()->GetSecurityOrigin())); + factory_client_->CreateWorkerHostDeprecated(); if (options_->type() == "classic") { // Legacy code path (to be deprecated, see https://crbug.com/835717): diff -Nru chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/base_audio_context.cc chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/base_audio_context.cc --- chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/base_audio_context.cc 2020-03-17 21:56:33.000000000 +0000 +++ chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/base_audio_context.cc 2020-03-31 19:00:00.000000000 +0000 @@ -181,6 +181,12 @@ DCHECK_EQ(resume_resolvers_.size(), 0u); } +void BaseAudioContext::Dispose() { + // BaseAudioContext is going away, so remove the context from the orphan + // handlers. + GetDeferredTaskHandler().ClearContextFromOrphanHandlers(); +} + void BaseAudioContext::ContextLifecycleStateChanged( mojom::FrameLifecycleState state) { // Don't need to do anything for an offline context. diff -Nru chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/base_audio_context.h chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/base_audio_context.h --- chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/base_audio_context.h 2020-03-17 21:56:33.000000000 +0000 +++ chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/base_audio_context.h 2020-03-31 19:00:00.000000000 +0000 @@ -96,6 +96,7 @@ public InspectorHelperMixin { USING_GARBAGE_COLLECTED_MIXIN(BaseAudioContext); DEFINE_WRAPPERTYPEINFO(); + USING_PRE_FINALIZER(BaseAudioContext, Dispose); public: // The state of an audio context. On creation, the state is Suspended. The @@ -115,6 +116,8 @@ return dest ? dest->GetAudioDestinationHandler().IsInitialized() : false; } + void Dispose(); + // Document notification void ContextLifecycleStateChanged(mojom::FrameLifecycleState) override; void ContextDestroyed(ExecutionContext*) override; diff -Nru chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc --- chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc 2020-03-17 21:56:33.000000000 +0000 +++ chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/deferred_task_handler.cc 2020-03-31 19:00:00.000000000 +0000 @@ -132,6 +132,7 @@ void DeferredTaskHandler::AddAutomaticPullNode( scoped_refptr node) { + DCHECK(IsAudioThread()); AssertGraphOwner(); if (!automatic_pull_handlers_.Contains(node)) { @@ -151,11 +152,16 @@ } void DeferredTaskHandler::UpdateAutomaticPullNodes() { + DCHECK(IsAudioThread()); AssertGraphOwner(); if (automatic_pull_handlers_need_updating_) { - CopyToVector(automatic_pull_handlers_, rendering_automatic_pull_handlers_); - automatic_pull_handlers_need_updating_ = false; + MutexTryLocker try_locker(automatic_pull_handlers_lock_); + if (try_locker.Locked()) { + CopyToVector(automatic_pull_handlers_, + rendering_automatic_pull_handlers_); + automatic_pull_handlers_need_updating_ = false; + } } } @@ -163,9 +169,12 @@ uint32_t frames_to_process) { DCHECK(IsAudioThread()); - for (unsigned i = 0; i < rendering_automatic_pull_handlers_.size(); ++i) { - rendering_automatic_pull_handlers_[i]->ProcessIfNecessary( - frames_to_process); + MutexTryLocker try_locker(automatic_pull_handlers_lock_); + if (try_locker.Locked()) { + for (auto& rendering_automatic_pull_handler : + rendering_automatic_pull_handlers_) { + rendering_automatic_pull_handler->ProcessIfNecessary(frames_to_process); + } } } @@ -293,10 +302,7 @@ } void DeferredTaskHandler::ContextWillBeDestroyed() { - for (auto& handler : rendering_orphan_handlers_) - handler->ClearContext(); - for (auto& handler : deletable_orphan_handlers_) - handler->ClearContext(); + ClearContextFromOrphanHandlers(); ClearHandlersToBeDeleted(); // Some handlers might live because of their cross thread tasks. } @@ -350,16 +356,34 @@ void DeferredTaskHandler::ClearHandlersToBeDeleted() { DCHECK(IsMainThread()); + + { + MutexLocker locker(automatic_pull_handlers_lock_); + rendering_automatic_pull_handlers_.clear(); + } + GraphAutoLocker locker(*this); tail_processing_handlers_.clear(); rendering_orphan_handlers_.clear(); deletable_orphan_handlers_.clear(); automatic_pull_handlers_.clear(); - rendering_automatic_pull_handlers_.clear(); finished_source_handlers_.clear(); active_source_handlers_.clear(); } +void DeferredTaskHandler::ClearContextFromOrphanHandlers() { + DCHECK(IsMainThread()); + + // |rendering_orphan_handlers_| and |deletable_orphan_handlers_| can + // be modified on the audio thread. + GraphAutoLocker locker(*this); + + for (auto& handler : rendering_orphan_handlers_) + handler->ClearContext(); + for (auto& handler : deletable_orphan_handlers_) + handler->ClearContext(); +} + void DeferredTaskHandler::SetAudioThreadToCurrentThread() { DCHECK(!IsMainThread()); audio_thread_.store(CurrentThread(), std::memory_order_relaxed); diff -Nru chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h --- chromium-80.0.3987.149/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h 2020-03-17 21:56:33.000000000 +0000 +++ chromium-80.0.3987.162/third_party/blink/renderer/modules/webaudio/deferred_task_handler.h 2020-03-31 19:00:00.000000000 +0000 @@ -109,6 +109,9 @@ void RequestToDeleteHandlersOnMainThread(); void ClearHandlersToBeDeleted(); + // Clear the context from the rendering and deletable orphan handlers. + void ClearContextFromOrphanHandlers(); + bool AcceptsTailProcessing() const { return accepts_tail_processing_; } void StopAcceptingTailProcessing() { accepts_tail_processing_ = false; } @@ -263,6 +266,11 @@ // Graph locking. RecursiveMutex context_graph_mutex_; + + // Protects |rendering_automatic_pull_handlers| when updating, processing, and + // clearing. (See crbug.com/1061018) + mutable Mutex automatic_pull_handlers_lock_; + std::atomic audio_thread_; }; diff -Nru chromium-80.0.3987.149/third_party/google_android_play_core/README.chromium chromium-80.0.3987.162/third_party/google_android_play_core/README.chromium --- chromium-80.0.3987.149/third_party/google_android_play_core/README.chromium 2020-03-17 21:56:07.000000000 +0000 +++ chromium-80.0.3987.162/third_party/google_android_play_core/README.chromium 2020-03-31 18:59:32.000000000 +0000 @@ -7,8 +7,11 @@ Security Critical: yes Description: -- Built from @272011728 +- Built from @272011728. Local Modifications: -- Unproguarded verification API. -- Unproguarded inline update API. +- Patched with @303759131 and a local fix (cl/303790354). +- Ran: + g4 patch -c 303759131 + g4 patch -c 303790354 +- Built using commands from: https://crbug.com/996212#c6 diff -Nru chromium-80.0.3987.149/third_party/google_android_play_core/cipd.yaml chromium-80.0.3987.162/third_party/google_android_play_core/cipd.yaml --- chromium-80.0.3987.149/third_party/google_android_play_core/cipd.yaml 2020-03-17 21:56:07.000000000 +0000 +++ chromium-80.0.3987.162/third_party/google_android_play_core/cipd.yaml 2020-03-31 18:59:32.000000000 +0000 @@ -3,7 +3,7 @@ # found in the LICENSE file. # To create CIPD package run the following command. -# cipd create --pkg-def cipd.yaml -tag version:1.6.2-cr0 +# cipd create --pkg-def cipd.yaml package: chromium/third_party/android_deps/libs/com_google_android_play_core_verification description: "" data: diff -Nru chromium-80.0.3987.149/third_party/skia/PRESUBMIT.py chromium-80.0.3987.162/third_party/skia/PRESUBMIT.py --- chromium-80.0.3987.149/third_party/skia/PRESUBMIT.py 2020-03-17 22:05:53.000000000 +0000 +++ chromium-80.0.3987.162/third_party/skia/PRESUBMIT.py 2020-03-31 19:01:35.000000000 +0000 @@ -21,11 +21,8 @@ REVERT_CL_SUBJECT_PREFIX = 'Revert ' -SKIA_TREE_STATUS_URL = 'http://skia-tree-status.appspot.com' - # Please add the complete email address here (and not just 'xyz@' or 'xyz'). PUBLIC_API_OWNERS = ( - 'mtklein@chromium.org', 'mtklein@google.com', 'reed@chromium.org', 'reed@google.com', @@ -40,7 +37,7 @@ AUTHORS_FILE_NAME = 'AUTHORS' RELEASE_NOTES_FILE_NAME = 'RELEASE_NOTES.txt' -DOCS_PREVIEW_URL = 'https://skia.org/?cl=' +DOCS_PREVIEW_URL = 'https://skia.org/?cl={issue}' GOLD_TRYBOT_URL = 'https://gold.skia.org/search?issue=' SERVICE_ACCOUNT_SUFFIX = [ @@ -50,11 +47,11 @@ def _CheckChangeHasEol(input_api, output_api, source_file_filter=None): - """Checks that files end with atleast one \n (LF).""" + """Checks that files end with at least one \n (LF).""" eof_files = [] for f in input_api.AffectedSourceFiles(source_file_filter): contents = input_api.ReadFile(f, 'rb') - # Check that the file ends in atleast one newline character. + # Check that the file ends in at least one newline character. if len(contents) > 1 and contents[-1:] != '\n': eof_files.append(f.LocalPath()) @@ -147,17 +144,6 @@ return results -def _ToolFlags(input_api, output_api): - """Make sure `{dm,nanobench}_flags.py test` passes if modified.""" - results = [] - sources = lambda x: ('dm_flags.py' in x.LocalPath() or - 'nanobench_flags.py' in x.LocalPath()) - for f in input_api.AffectedSourceFiles(sources): - if 0 != subprocess.call(['python', f.LocalPath(), 'test']): - results.append(output_api.PresubmitError('`python %s test` failed' % f)) - return results - - def _InfraTests(input_api, output_api): """Run the infra tests.""" results = [] @@ -176,18 +162,30 @@ def _CheckGNFormatted(input_api, output_api): """Make sure any .gn files we're changing have been formatted.""" - results = [] + files = [] for f in input_api.AffectedFiles(): - if (not f.LocalPath().endswith('.gn') and - not f.LocalPath().endswith('.gni')): - continue + if (f.LocalPath().endswith('.gn') or + f.LocalPath().endswith('.gni')): + files.append(f) + if not files: + return [] - gn = 'gn.bat' if 'win32' in sys.platform else 'gn' + cmd = ['python', os.path.join('bin', 'fetch-gn')] + try: + subprocess.check_output(cmd) + except subprocess.CalledProcessError as e: + return [output_api.PresubmitError( + '`%s` failed:\n%s' % (' '.join(cmd), e.output))] + + results = [] + for f in files: + gn = 'gn.exe' if 'win32' in sys.platform else 'gn' + gn = os.path.join(input_api.PresubmitLocalPath(), 'bin', gn) cmd = [gn, 'format', '--dry-run', f.LocalPath()] try: subprocess.check_output(cmd) except subprocess.CalledProcessError: - fix = 'gn format ' + f.LocalPath() + fix = 'bin/gn format ' + f.LocalPath() results.append(output_api.PresubmitError( '`%s` failed, try\n\t%s' % (' '.join(cmd), fix))) return results @@ -277,7 +275,6 @@ results.extend(_IfDefChecks(input_api, output_api)) results.extend(_CopyrightChecks(input_api, output_api, source_file_filter=sources)) - results.extend(_ToolFlags(input_api, output_api)) results.extend(_CheckCompileIsolate(input_api, output_api)) results.extend(_CheckDEPSValid(input_api, output_api)) results.extend(_CheckIncludesFormatted(input_api, output_api)) @@ -285,11 +282,7 @@ def CheckChangeOnUpload(input_api, output_api): - """Presubmit checks for the change on upload. - - The following are the presubmit checks: - * Check change has one and only one EOL. - """ + """Presubmit checks for the change on upload.""" results = [] results.extend(_CommonChecks(input_api, output_api)) # Run on upload, not commit, since the presubmit bot apparently doesn't have @@ -301,44 +294,6 @@ return results -def _CheckTreeStatus(input_api, output_api, json_url): - """Check whether to allow commit. - - Args: - input_api: input related apis. - output_api: output related apis. - json_url: url to download json style status. - """ - tree_status_results = input_api.canned_checks.CheckTreeIsOpen( - input_api, output_api, json_url=json_url) - if not tree_status_results: - # Check for caution state only if tree is not closed. - connection = input_api.urllib_request.urlopen(json_url) - status = input_api.json.loads(connection.read()) - connection.close() - if ('caution' in status['message'].lower() and - os.isatty(sys.stdout.fileno())): - # Display a prompt only if we are in an interactive shell. Without this - # check the commit queue behaves incorrectly because it considers - # prompts to be failures. - short_text = 'Tree state is: ' + status['general_state'] - long_text = status['message'] + '\n' + json_url - tree_status_results.append( - output_api.PresubmitPromptWarning( - message=short_text, long_text=long_text)) - else: - # Tree status is closed. Put in message about contacting sheriff. - connection = input_api.urllib_request.urlopen( - SKIA_TREE_STATUS_URL + '/current-sheriff') - sheriff_details = input_api.json.loads(connection.read()) - if sheriff_details: - tree_status_results[0]._message += ( - '\n\nPlease contact the current Skia sheriff (%s) if you are trying ' - 'to submit a build fix\nand do not know how to submit because the ' - 'tree is closed') % sheriff_details['username'] - return tree_status_results - - class CodeReview(object): """Abstracts which codereview tool is used for the specified issue.""" @@ -355,10 +310,6 @@ def GetDescription(self): return self._gerrit.GetChangeDescription(self._issue) - def IsDryRun(self): - return self._gerrit.GetChangeInfo( - self._issue)['labels']['Commit-Queue'].get('value', 0) == 1 - def GetReviewers(self): code_review_label = ( self._gerrit.GetChangeInfo(self._issue)['labels']['Code-Review']) @@ -465,11 +416,6 @@ # It is a revert CL, ignore the public api owners check. return results - if cr.IsDryRun(): - # Ignore public api owners check for dry run CLs since they are not - # going to be committed. - return results - if input_api.gerrit: for reviewer in cr.GetReviewers(): if reviewer in PUBLIC_API_OWNERS: @@ -509,91 +455,74 @@ return results -def _FooterExists(footers, key, value): - for k, v in footers: - if k == key and v == value: - return True - return False - - -def PostUploadHook(cl, change, output_api): +def PostUploadHook(gerrit, change, output_api): """git cl upload will call this hook after the issue is created/modified. This hook does the following: * Adds a link to preview docs changes if there are any docs changes in the CL. * Adds 'No-Try: true' if the CL contains only docs changes. """ + if not change.issue: + return [] + + # Skip PostUploadHooks for all auto-commit service account bots. New + # patchsets (caused due to PostUploadHooks) invalidates the CQ+2 vote from + # the "--use-commit-queue" flag to "git cl upload". + for suffix in SERVICE_ACCOUNT_SUFFIX: + if change.author_email.endswith(suffix): + return [] results = [] - atleast_one_docs_change = False + at_least_one_docs_change = False all_docs_changes = True for affected_file in change.AffectedFiles(): affected_file_path = affected_file.LocalPath() file_path, _ = os.path.splitext(affected_file_path) if 'site' == file_path.split(os.path.sep)[0]: - atleast_one_docs_change = True + at_least_one_docs_change = True else: all_docs_changes = False - if atleast_one_docs_change and not all_docs_changes: + if at_least_one_docs_change and not all_docs_changes: break - issue = cl.issue - if issue: - # Skip PostUploadHooks for all auto-commit service account bots. New - # patchsets (caused due to PostUploadHooks) invalidates the CQ+2 vote from - # the "--use-commit-queue" flag to "git cl upload". - for suffix in SERVICE_ACCOUNT_SUFFIX: - if cl.GetIssueOwner().endswith(suffix): - return results - - original_description_lines, footers = cl.GetDescriptionFooters() - new_description_lines = list(original_description_lines) + footers = change.GitFootersFromDescription() + description_changed = False - # If the change includes only doc changes then add No-Try: true in the - # CL's description if it does not exist yet. - if all_docs_changes and not _FooterExists(footers, 'No-Try', 'true'): - new_description_lines.append('No-Try: true') - results.append( - output_api.PresubmitNotifyResult( - 'This change has only doc changes. Automatically added ' - '\'No-Try: true\' to the CL\'s description')) - - # If there is atleast one docs change then add preview link in the CL's - # description if it does not already exist there. - docs_preview_link = '%s%s' % (DOCS_PREVIEW_URL, issue) - docs_preview_line = 'Docs-Preview: %s' % docs_preview_link - if (atleast_one_docs_change and - not _FooterExists(footers, 'Docs-Preview', docs_preview_link)): - # Automatically add a link to where the docs can be previewed. - new_description_lines.append(docs_preview_line) - results.append( - output_api.PresubmitNotifyResult( - 'Automatically added a link to preview the docs changes to the ' - 'CL\'s description')) - - # If the description has changed update it. - if new_description_lines != original_description_lines: - # Add a new line separating the new contents from the old contents. - new_description_lines.insert(len(original_description_lines), '') - cl.UpdateDescriptionFooters(new_description_lines, footers) + # If the change includes only doc changes then add No-Try: true in the + # CL's description if it does not exist yet. + if all_docs_changes and 'true' not in footers.get('No-Try', []): + description_changed = True + change.AddDescriptionFooter('No-Try', 'true') + results.append( + output_api.PresubmitNotifyResult( + 'This change has only doc changes. Automatically added ' + '\'No-Try: true\' to the CL\'s description')) + + # If there is at least one docs change then add preview link in the CL's + # description if it does not already exist there. + docs_preview_link = DOCS_PREVIEW_URL.format(issue=change.issue) + if (at_least_one_docs_change + and docs_preview_link not in footers.get('Docs-Preview', [])): + # Automatically add a link to where the docs can be previewed. + description_changed = True + change.AddDescriptionFooter('Docs-Preview', docs_preview_link) + results.append( + output_api.PresubmitNotifyResult( + 'Automatically added a link to preview the docs changes to the ' + 'CL\'s description')) + + # If the description has changed update it. + if description_changed: + gerrit.UpdateDescription( + change.FullDescriptionText(), change.issue) - return results + return results def CheckChangeOnCommit(input_api, output_api): - """Presubmit checks for the change on commit. - - The following are the presubmit checks: - * Check change has one and only one EOL. - * Ensures that the Skia tree is open in - http://skia-tree-status.appspot.com/. Shows a warning if it is in 'Caution' - state and an error if it is in 'Closed' state. - """ + """Presubmit checks for the change on commit.""" results = [] results.extend(_CommonChecks(input_api, output_api)) - results.extend( - _CheckTreeStatus(input_api, output_api, json_url=( - SKIA_TREE_STATUS_URL + '/banner-status?format=json'))) results.extend(_CheckLGTMsForPublicAPI(input_api, output_api)) results.extend(_CheckOwnerIsInAuthorsFile(input_api, output_api)) # Checks for the presence of 'DO NOT''SUBMIT' in CL description and in diff -Nru chromium-80.0.3987.149/third_party/webrtc/modules/audio_coding/acm2/audio_coding_module.cc chromium-80.0.3987.162/third_party/webrtc/modules/audio_coding/acm2/audio_coding_module.cc --- chromium-80.0.3987.149/third_party/webrtc/modules/audio_coding/acm2/audio_coding_module.cc 2020-03-17 22:05:55.000000000 +0000 +++ chromium-80.0.3987.162/third_party/webrtc/modules/audio_coding/acm2/audio_coding_module.cc 2020-03-31 19:01:37.000000000 +0000 @@ -38,6 +38,8 @@ // 48 kHz data. constexpr size_t kInitialInputDataBufferSize = 6 * 480; +constexpr int32_t kMaxInputSampleRateHz = 192000; + class AudioCodingModuleImpl final : public AudioCodingModule { public: explicit AudioCodingModuleImpl(const AudioCodingModule::Config& config); @@ -348,7 +350,7 @@ return -1; } - if (audio_frame.sample_rate_hz_ > 192000) { + if (audio_frame.sample_rate_hz_ > kMaxInputSampleRateHz) { assert(false); RTC_LOG(LS_ERROR) << "Cannot Add 10 ms audio, input frequency not valid"; return -1; @@ -465,20 +467,25 @@ *ptr_out = &preprocess_frame_; preprocess_frame_.num_channels_ = in_frame.num_channels_; preprocess_frame_.samples_per_channel_ = in_frame.samples_per_channel_; - std::array audio; - const int16_t* src_ptr_audio = in_frame.data(); + std::array audio; + const int16_t* src_ptr_audio; if (down_mix) { - // If a resampling is required the output of a down-mix is written into a + // If a resampling is required, the output of a down-mix is written into a // local buffer, otherwise, it will be written to the output frame. int16_t* dest_ptr_audio = resample ? audio.data() : preprocess_frame_.mutable_data(); + RTC_DCHECK_GE(audio.size(), preprocess_frame_.samples_per_channel_); RTC_DCHECK_GE(audio.size(), in_frame.samples_per_channel_); DownMixFrame(in_frame, rtc::ArrayView( dest_ptr_audio, preprocess_frame_.samples_per_channel_)); preprocess_frame_.num_channels_ = 1; - // Set the input of the resampler is the down-mixed signal. + + // Set the input of the resampler to the down-mixed signal. src_ptr_audio = audio.data(); + } else { + // Set the input of the resampler to the original data. + src_ptr_audio = in_frame.data(); } preprocess_frame_.timestamp_ = expected_codec_ts_; diff -Nru chromium-80.0.3987.149/third_party/webrtc/modules/audio_coding/include/audio_coding_module.h chromium-80.0.3987.162/third_party/webrtc/modules/audio_coding/include/audio_coding_module.h --- chromium-80.0.3987.149/third_party/webrtc/modules/audio_coding/include/audio_coding_module.h 2020-03-17 22:05:55.000000000 +0000 +++ chromium-80.0.3987.162/third_party/webrtc/modules/audio_coding/include/audio_coding_module.h 2020-03-31 19:01:37.000000000 +0000 @@ -33,8 +33,6 @@ class AudioFrame; struct RTPHeader; -#define WEBRTC_10MS_PCM_AUDIO 960 // 16 bits super wideband 48 kHz - // Callback class used for sending data ready to be packetized class AudioPacketizationCallback { public: diff -Nru chromium-80.0.3987.149/third_party/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc chromium-80.0.3987.162/third_party/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc --- chromium-80.0.3987.149/third_party/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc 2020-03-17 22:05:55.000000000 +0000 +++ chromium-80.0.3987.162/third_party/webrtc/modules/audio_coding/test/EncodeDecodeTest.cc 2020-03-31 19:01:37.000000000 +0000 @@ -24,6 +24,12 @@ namespace webrtc { +namespace { +// Buffer size for stereo 48 kHz audio. +constexpr size_t kWebRtc10MsPcmAudio = 960; + +} // namespace + TestPacketization::TestPacketization(RTPStream* rtpStream, uint16_t frequency) : _rtpStream(rtpStream), _frequency(frequency), _seqNo(0) {} @@ -91,7 +97,7 @@ } Receiver::Receiver() - : _playoutLengthSmpls(WEBRTC_10MS_PCM_AUDIO), + : _playoutLengthSmpls(kWebRtc10MsPcmAudio), _payloadSizeBytes(MAX_INCOMING_PAYLOAD) {} void Receiver::Setup(AudioCodingModule* acm, @@ -138,7 +144,7 @@ _pcmFile.Open(file_name, 32000, "wb+"); _realPayloadSizeBytes = 0; - _playoutBuffer = new int16_t[WEBRTC_10MS_PCM_AUDIO]; + _playoutBuffer = new int16_t[kWebRtc10MsPcmAudio]; _frequency = playSampFreq; _acm = acm; _firstTime = true; diff -Nru chromium-80.0.3987.149/third_party/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc chromium-80.0.3987.162/third_party/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc --- chromium-80.0.3987.149/third_party/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc 2020-03-17 22:05:55.000000000 +0000 +++ chromium-80.0.3987.162/third_party/webrtc/modules/desktop_capture/win/dxgi_output_duplicator.cc 2020-03-31 19:01:37.000000000 +0000 @@ -275,7 +275,7 @@ if (metadata_.capacity() < frame_info.TotalMetadataBufferSize) { metadata_.clear(); // Avoid data copy - metadata_.reserve(frame_info.TotalMetadataBufferSize); + metadata_.resize(frame_info.TotalMetadataBufferSize); } UINT buff_size = 0; diff -Nru chromium-80.0.3987.149/v8/include/v8-version.h chromium-80.0.3987.162/v8/include/v8-version.h --- chromium-80.0.3987.149/v8/include/v8-version.h 2020-03-17 22:05:58.000000000 +0000 +++ chromium-80.0.3987.162/v8/include/v8-version.h 2020-03-31 19:01:40.000000000 +0000 @@ -11,7 +11,7 @@ #define V8_MAJOR_VERSION 8 #define V8_MINOR_VERSION 0 #define V8_BUILD_NUMBER 426 -#define V8_PATCH_LEVEL 27 +#define V8_PATCH_LEVEL 29 // Use 1 for candidates and 0 otherwise. // (Boolean macro values are not supported by all preprocessors.) diff -Nru chromium-80.0.3987.149/v8/infra/mb/mb_config.pyl chromium-80.0.3987.162/v8/infra/mb/mb_config.pyl --- chromium-80.0.3987.149/v8/infra/mb/mb_config.pyl 2020-03-17 22:05:58.000000000 +0000 +++ chromium-80.0.3987.162/v8/infra/mb/mb_config.pyl 2020-03-31 19:01:40.000000000 +0000 @@ -164,24 +164,34 @@ 'V8 Linux - s390x - sim': 'release_simulate_s390x', }, 'client.v8.branches': { + 'V8 Linux - previous branch': 'release_x86', + 'V8 Linux - previous branch - debug': 'debug_x86', 'V8 Linux - beta branch': 'release_x86', 'V8 Linux - beta branch - debug': 'debug_x86', 'V8 Linux - stable branch': 'release_x86', 'V8 Linux - stable branch - debug': 'debug_x86', + 'V8 Linux64 - previous branch': 'release_x64', + 'V8 Linux64 - previous branch - debug': 'debug_x64', 'V8 Linux64 - beta branch': 'release_x64', 'V8 Linux64 - beta branch - debug': 'debug_x64', 'V8 Linux64 - stable branch': 'release_x64', 'V8 Linux64 - stable branch - debug': 'debug_x64', + 'V8 arm - sim - previous branch': 'release_simulate_arm', + 'V8 arm - sim - previous branch - debug': 'debug_simulate_arm', 'V8 arm - sim - beta branch': 'release_simulate_arm', 'V8 arm - sim - beta branch - debug': 'debug_simulate_arm', 'V8 arm - sim - stable branch': 'release_simulate_arm', 'V8 arm - sim - stable branch - debug': 'debug_simulate_arm', + 'V8 mips64el - sim - previous branch': 'release_simulate_mips64el', 'V8 mips64el - sim - beta branch': 'release_simulate_mips64el', 'V8 mips64el - sim - stable branch': 'release_simulate_mips64el', + 'V8 mipsel - sim - previous branch': 'release_simulate_mipsel', 'V8 mipsel - sim - beta branch': 'release_simulate_mipsel', 'V8 mipsel - sim - stable branch': 'release_simulate_mipsel', + 'V8 ppc64 - sim - previous branch': 'release_simulate_ppc64', 'V8 ppc64 - sim - beta branch': 'release_simulate_ppc64', 'V8 ppc64 - sim - stable branch': 'release_simulate_ppc64', + 'V8 s390x - sim - previous branch': 'release_simulate_s390x', 'V8 s390x - sim - beta branch': 'release_simulate_s390x', 'V8 s390x - sim - stable branch': 'release_simulate_s390x', }, diff -Nru chromium-80.0.3987.149/v8/infra/testing/builders.pyl chromium-80.0.3987.162/v8/infra/testing/builders.pyl --- chromium-80.0.3987.149/v8/infra/testing/builders.pyl 2020-03-17 22:05:58.000000000 +0000 +++ chromium-80.0.3987.162/v8/infra/testing/builders.pyl 2020-03-31 19:01:40.000000000 +0000 @@ -1686,6 +1686,26 @@ {'name': 'v8testing', 'shards': 3}, ], }, + 'V8 Linux - previous branch': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'mozilla'}, + {'name': 'test262', 'variant': 'default'}, + {'name': 'v8testing'}, + ], + }, + 'V8 Linux - previous branch - debug': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'mozilla'}, + {'name': 'test262', 'variant': 'default'}, + {'name': 'v8testing', 'shards': 3}, + ], + }, 'V8 Linux64 - beta branch': { 'swarming_dimensions': { 'os': 'Ubuntu-16.04', @@ -1726,6 +1746,26 @@ {'name': 'v8testing', 'shards': 3}, ], }, + 'V8 Linux64 - previous branch': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'mozilla'}, + {'name': 'test262', 'variant': 'default'}, + {'name': 'v8testing'}, + ], + }, + 'V8 Linux64 - previous branch - debug': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'mozilla'}, + {'name': 'test262', 'variant': 'default'}, + {'name': 'v8testing', 'shards': 3}, + ], + }, 'V8 arm - sim - beta branch': { 'swarming_dimensions': { 'os': 'Ubuntu-16.04', @@ -1766,6 +1806,26 @@ {'name': 'v8testing', 'shards': 10}, ], }, + 'V8 arm - sim - previous branch': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'mozilla'}, + {'name': 'test262', 'variant': 'default'}, + {'name': 'v8testing', 'shards': 4}, + ], + }, + 'V8 arm - sim - previous branch - debug': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'mozilla', 'shards': 2}, + {'name': 'test262', 'variant': 'default', 'shards': 2}, + {'name': 'v8testing', 'shards': 10}, + ], + }, 'V8 mips64el - sim - beta branch': { 'swarming_dimensions': { 'os': 'Ubuntu-16.04', @@ -1782,6 +1842,14 @@ {'name': 'unittests'}, ], }, + 'V8 mips64el - sim - previous branch': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'unittests'}, + ], + }, 'V8 mipsel - sim - beta branch': { 'swarming_dimensions': { 'os': 'Ubuntu-16.04', @@ -1798,6 +1866,14 @@ {'name': 'v8testing', 'shards': 4}, ], }, + 'V8 mipsel - sim - previous branch': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'v8testing', 'shards': 4}, + ], + }, 'V8 ppc64 - sim - beta branch': { 'swarming_dimensions': { 'os': 'Ubuntu-16.04', @@ -1814,6 +1890,14 @@ {'name': 'unittests'}, ], }, + 'V8 ppc64 - sim - previous branch': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, + 'tests': [ + {'name': 'unittests'}, + ], + }, 'V8 s390x - sim - beta branch': { 'swarming_dimensions': { 'os': 'Ubuntu-16.04', @@ -1826,6 +1910,14 @@ 'swarming_dimensions': { 'os': 'Ubuntu-16.04', }, + 'tests': [ + {'name': 'unittests'}, + ], + }, + 'V8 s390x - sim - previous branch': { + 'swarming_dimensions': { + 'os': 'Ubuntu-16.04', + }, 'tests': [ {'name': 'unittests'}, ], diff -Nru chromium-80.0.3987.149/v8/src/builtins/builtins-function.cc chromium-80.0.3987.162/v8/src/builtins/builtins-function.cc --- chromium-80.0.3987.149/v8/src/builtins/builtins-function.cc 2020-03-17 22:05:58.000000000 +0000 +++ chromium-80.0.3987.162/v8/src/builtins/builtins-function.cc 2020-03-31 19:01:40.000000000 +0000 @@ -31,7 +31,7 @@ if (!Builtins::AllowDynamicFunction(isolate, target, target_global_proxy)) { isolate->CountUsage(v8::Isolate::kFunctionConstructorReturnedUndefined); - return isolate->factory()->undefined_value(); + THROW_NEW_ERROR(isolate, NewTypeError(MessageTemplate::kNoAccess), Object); } // Build the source string.