diff options
author | Daniel Playfair Cal | 2020-04-28 00:28:19 +1000 |
---|---|---|
committer | Daniel Playfair Cal | 2020-04-28 00:28:19 +1000 |
commit | f5a7f79e5b7cc11028a5c3e14b9f235d3f7602c5 (patch) | |
tree | 75fd21b7a9ef0958d7356631713fda6130abe165 | |
parent | 68351964753fbb3a7221b2e9f8b3c42b66e838dd (diff) | |
download | aur-f5a7f79e5b7cc11028a5c3e14b9f235d3f7602c5.tar.gz |
83.0.4103.23-1
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | 0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch | 515 | ||||
-rw-r--r-- | 0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch | 595 | ||||
-rw-r--r-- | 0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch | 28 | ||||
-rw-r--r-- | 0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch | 60 | ||||
-rw-r--r-- | 0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch | 199 | ||||
-rw-r--r-- | 0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch | 244 | ||||
-rw-r--r-- | 0007-Add-missing-memory-header-in-trust_token_attribute_p.patch | 26 | ||||
-rw-r--r-- | 0008-Revert-FragmentItem-Two-fixes-for-outline.patch | 84 | ||||
-rw-r--r-- | PKGBUILD | 38 |
10 files changed, 9 insertions, 1804 deletions
@@ -1,6 +1,6 @@ pkgbase = chromium-beta-ozone pkgdesc = Chromium built with patches for wayland support via Ozone (beta channel) - pkgver = 83.0.4103.14 + pkgver = 83.0.4103.23 pkgrel = 1 url = https://www.chromium.org/Home install = chromium.install @@ -35,11 +35,9 @@ pkgbase = chromium-beta-ozone depends = json-glib depends = desktop-file-utils depends = hicolor-icon-theme - depends = icu depends = libxml2 depends = fontconfig depends = libvpx - depends = re2 depends = snappy depends = ffmpeg depends = flac @@ -57,30 +55,14 @@ pkgbase = chromium-beta-ozone conflicts = chromium options = debug options = !strip - source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-83.0.4103.14.tar.xz + source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-83.0.4103.23.tar.xz source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz source = chromium-widevine.patch source = chromium-skia-harmony.patch - source = 0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch - source = 0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch - source = 0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch - source = 0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch - source = 0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch - source = 0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch - source = 0007-Add-missing-memory-header-in-trust_token_attribute_p.patch - source = 0008-Revert-FragmentItem-Two-fixes-for-outline.patch - sha256sums = 6e3d4853dcbd3c2375a1462a764102f6893c3b0505037e28c04bf90002e526e8 + sha256sums = 929a3d8c5da5066c496ddcc6147aa3c528976a61dca65c9010e625733fa46ee8 sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1 sha256sums = 709e2fddba3c1f2ed4deb3a239fc0479bfa50c46e054e7f32db4fb1365fed070 sha256sums = 771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1 - sha256sums = c53edc13ca335652608607e628284a79d91f5524d9b5e72a8f2d29b4d7618c75 - sha256sums = cf27aa2a98bc71686e3e0f482b720d7d25017158ab2c7d93b548b3578c4b53e2 - sha256sums = 9f2211edf347d54b8167a3b9d773e38aeabce5f98fb1932e7db1aeec845579f6 - sha256sums = 5db92d614aba64e9eb684f35e06f36786b74d5a1456308d4d40a65f12e32f62b - sha256sums = 52b0129ac7db760078087a2839e257183f10df8e9f831ec07e6cfc8f5ba455eb - sha256sums = 2b594ff5bc731897274027ddb79a77d247a52ef0990d574ec815b36082ac093a - sha256sums = 91cc1ac6cd6568de8c45a3fb3c6b57fa9ea6e6ae6f2a05f1ff82677d0cdbdedb - sha256sums = 771b862e16ff42e0d43d6f0f5fd49d65210732bb0ae19cc4ea18c2220b4cb041 pkgname = chromium-beta-ozone diff --git a/0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch b/0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch deleted file mode 100644 index 4f94b9cabbe8..000000000000 --- a/0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch +++ /dev/null @@ -1,515 +0,0 @@ -From 806760e32fbde130c2ddbdd81a1838e02f2e9d59 Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com> -Date: Fri, 17 Apr 2020 00:37:18 +1000 -Subject: [PATCH 1/8] Revert "[RTCInsertableStreams] Make RTCEncodedAudioFrame - serializable" - -This reverts commit 7415e4fb52b66c115395e0b08eb79c7d10326130. ---- - .../core/v8/serialization/serialization_tag.h | 1 - - ...8_script_value_deserializer_for_modules.cc | 28 -------- - ...v8_script_value_deserializer_for_modules.h | 2 - - .../v8_script_value_serializer_for_modules.cc | 28 -------- - .../v8_script_value_serializer_for_modules.h | 2 - - .../renderer/modules/peerconnection/BUILD.gn | 2 - - .../peerconnection/rtc_encoded_audio_frame.cc | 51 +++++-------- - .../peerconnection/rtc_encoded_audio_frame.h | 16 ++--- - .../rtc_encoded_audio_frame_delegate.cc | 68 ------------------ - .../rtc_encoded_audio_frame_delegate.h | 72 ------------------- - .../rtc_encoded_audio_underlying_sink.cc | 3 +- - 11 files changed, 24 insertions(+), 249 deletions(-) - delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc - delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h - -diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h -index a0eaa09214de..cce273938fc2 100644 ---- a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h -+++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h -@@ -102,7 +102,6 @@ enum SerializationTag { - // namedCurve:uint32_t - kRTCCertificateTag = 'k', // length:uint32_t, pemPrivateKey:WebCoreString, - // pemCertificate:WebCoreString -- kRTCEncodedAudioFrameTag = 'A', // uint32_t -> transferred audio frame ID - kRTCEncodedVideoFrameTag = 'V', // uint32_t -> transferred video frame ID - - // The following tags were used by the Shape Detection API implementation -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc -index 7b07f6283073..684d40f0cee8 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc -@@ -18,8 +18,6 @@ - #include "third_party/blink/renderer/modules/native_file_system/native_file_system_file_handle.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate_generator.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h" - -@@ -69,8 +67,6 @@ ScriptWrappable* V8ScriptValueDeserializerForModules::ReadDOMObject( - return nullptr; - return MakeGarbageCollected<RTCCertificate>(std::move(certificate)); - } -- case kRTCEncodedAudioFrameTag: -- return ReadRTCEncodedAudioFrame(); - case kRTCEncodedVideoFrameTag: - return ReadRTCEncodedVideoFrame(); - default: -@@ -377,30 +373,6 @@ V8ScriptValueDeserializerForModules::ReadNativeFileSystemHandle( - } - } - --RTCEncodedAudioFrame* --V8ScriptValueDeserializerForModules::ReadRTCEncodedAudioFrame() { -- if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled( -- ExecutionContext::From(GetScriptState()))) { -- return nullptr; -- } -- -- uint32_t index; -- if (!ReadUint32(&index)) -- return nullptr; -- -- const auto* attachment = -- GetSerializedScriptValue() -- ->GetAttachmentIfExists<RTCEncodedAudioFramesAttachment>(); -- if (!attachment) -- return nullptr; -- -- const auto& frames = attachment->EncodedAudioFrames(); -- if (index >= frames.size()) -- return nullptr; -- -- return MakeGarbageCollected<RTCEncodedAudioFrame>(frames[index]); --} -- - RTCEncodedVideoFrame* - V8ScriptValueDeserializerForModules::ReadRTCEncodedVideoFrame() { - if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled( -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h -index fd08855f9bea..410fe5098096 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h -@@ -12,7 +12,6 @@ namespace blink { - - class CryptoKey; - class NativeFileSystemHandle; --class RTCEncodedAudioFrame; - class RTCEncodedVideoFrame; - - // Extends V8ScriptValueSerializer with support for modules/ types. -@@ -46,7 +45,6 @@ class MODULES_EXPORT V8ScriptValueDeserializerForModules final - } - CryptoKey* ReadCryptoKey(); - NativeFileSystemHandle* ReadNativeFileSystemHandle(SerializationTag tag); -- RTCEncodedAudioFrame* ReadRTCEncodedAudioFrame(); - RTCEncodedVideoFrame* ReadRTCEncodedVideoFrame(); - }; - -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc -index 2e88d05de51c..6811770537b9 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc -@@ -18,10 +18,7 @@ - #include "third_party/blink/renderer/bindings/modules/v8/v8_landmark.h" - #include "third_party/blink/renderer/bindings/modules/v8/v8_point_2d.h" - #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_certificate.h" --#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_audio_frame.h" - #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_video_frame.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h" - #include "third_party/blink/renderer/platform/bindings/script_wrappable.h" -@@ -80,17 +77,6 @@ bool V8ScriptValueSerializerForModules::WriteDOMObject( - WriteUTF8String(pem.certificate().c_str()); - return true; - } -- if (wrapper_type_info == V8RTCEncodedAudioFrame::GetWrapperTypeInfo() && -- RuntimeEnabledFeatures::RTCInsertableStreamsEnabled( -- ExecutionContext::From(GetScriptState()))) { -- if (IsForStorage()) { -- exception_state.ThrowDOMException(DOMExceptionCode::kDataCloneError, -- "An RTCEncodedAudioFrame cannot be " -- "serialized for storage."); -- return false; -- } -- return WriteRTCEncodedAudioFrame(wrappable->ToImpl<RTCEncodedAudioFrame>()); -- } - if (wrapper_type_info == V8RTCEncodedVideoFrame::GetWrapperTypeInfo() && - RuntimeEnabledFeatures::RTCInsertableStreamsEnabled( - ExecutionContext::From(GetScriptState()))) { -@@ -300,20 +286,6 @@ bool V8ScriptValueSerializerForModules::WriteNativeFileSystemHandle( - return true; - } - --bool V8ScriptValueSerializerForModules::WriteRTCEncodedAudioFrame( -- RTCEncodedAudioFrame* audio_frame) { -- auto* attachment = -- GetSerializedScriptValue() -- ->GetOrCreateAttachment<RTCEncodedAudioFramesAttachment>(); -- auto& frames = attachment->EncodedAudioFrames(); -- frames.push_back(audio_frame->Delegate()); -- const uint32_t index = static_cast<uint32_t>(frames.size() - 1); -- -- WriteTag(kRTCEncodedAudioFrameTag); -- WriteUint32(index); -- return true; --} -- - bool V8ScriptValueSerializerForModules::WriteRTCEncodedVideoFrame( - RTCEncodedVideoFrame* video_frame) { - auto* attachment = -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h -index eda1434b359f..10ac32ca4f69 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h -@@ -12,7 +12,6 @@ - namespace blink { - - class NativeFileSystemHandle; --class RTCEncodedAudioFrame; - class RTCEncodedVideoFrame; - class WebCryptoKey; - -@@ -34,7 +33,6 @@ class MODULES_EXPORT V8ScriptValueSerializerForModules final - bool WriteNativeFileSystemHandle( - SerializationTag tag, - NativeFileSystemHandle* native_file_system_handle); -- bool WriteRTCEncodedAudioFrame(RTCEncodedAudioFrame*); - bool WriteRTCEncodedVideoFrame(RTCEncodedVideoFrame*); - }; - -diff --git a/third_party/blink/renderer/modules/peerconnection/BUILD.gn b/third_party/blink/renderer/modules/peerconnection/BUILD.gn -index 27fe410a7319..4f9144ed30e0 100644 ---- a/third_party/blink/renderer/modules/peerconnection/BUILD.gn -+++ b/third_party/blink/renderer/modules/peerconnection/BUILD.gn -@@ -78,8 +78,6 @@ blink_modules_sources("peerconnection") { - "rtc_dtmf_tone_change_event.h", - "rtc_encoded_audio_frame.cc", - "rtc_encoded_audio_frame.h", -- "rtc_encoded_audio_frame_delegate.cc", -- "rtc_encoded_audio_frame_delegate.h", - "rtc_encoded_audio_underlying_sink.cc", - "rtc_encoded_audio_underlying_sink.h", - "rtc_encoded_audio_underlying_source.cc", -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc -index 6dbaa7fedf78..208b4bff2eb2 100644 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc -+++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc -@@ -4,10 +4,7 @@ - - #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h" - --#include <utility> -- - #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h" - #include "third_party/blink/renderer/platform/wtf/text/string_builder.h" - #include "third_party/webrtc/api/frame_transformer_interface.h" - -@@ -15,37 +12,30 @@ namespace blink { - - RTCEncodedAudioFrame::RTCEncodedAudioFrame( - std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame) -- : delegate_(base::MakeRefCounted<RTCEncodedAudioFrameDelegate>( -- std::move(webrtc_frame), -- Vector<uint32_t>())) {} -+ : webrtc_frame_(std::move(webrtc_frame)) {} - - RTCEncodedAudioFrame::RTCEncodedAudioFrame( - std::unique_ptr<webrtc::TransformableAudioFrameInterface> - webrtc_audio_frame) { -- Vector<uint32_t> contributing_sources; - if (webrtc_audio_frame) { - wtf_size_t num_csrcs = webrtc_audio_frame->GetHeader().numCSRCs; -- contributing_sources.ReserveInitialCapacity(num_csrcs); -+ contributing_sources_.ReserveInitialCapacity(num_csrcs); - for (wtf_size_t i = 0; i < num_csrcs; i++) { -- contributing_sources.push_back( -+ contributing_sources_.push_back( - webrtc_audio_frame->GetHeader().arrOfCSRCs[i]); - } - } -- delegate_ = base::MakeRefCounted<RTCEncodedAudioFrameDelegate>( -- std::move(webrtc_audio_frame), std::move(contributing_sources)); -+ webrtc_frame_ = std::move(webrtc_audio_frame); - } - --RTCEncodedAudioFrame::RTCEncodedAudioFrame( -- scoped_refptr<RTCEncodedAudioFrameDelegate> delegate) -- : delegate_(std::move(delegate)) {} -- - uint64_t RTCEncodedAudioFrame::timestamp() const { -- return delegate_->Timestamp(); -+ return webrtc_frame_ ? webrtc_frame_->GetTimestamp() : 0; - } - - DOMArrayBuffer* RTCEncodedAudioFrame::data() const { -- if (!frame_data_) { -- frame_data_ = delegate_->CreateDataBuffer(); -+ if (webrtc_frame_ && !frame_data_) { -+ frame_data_ = DOMArrayBuffer::Create(webrtc_frame_->GetData().data(), -+ webrtc_frame_->GetData().size()); - } - return frame_data_; - } -@@ -59,11 +49,11 @@ void RTCEncodedAudioFrame::setData(DOMArrayBuffer* data) { - } - - uint32_t RTCEncodedAudioFrame::synchronizationSource() const { -- return delegate_->Ssrc(); -+ return webrtc_frame_ ? webrtc_frame_->GetSsrc() : 0; - } - - Vector<uint32_t> RTCEncodedAudioFrame::contributingSources() const { -- return delegate_->ContributingSources(); -+ return webrtc_frame_ ? contributing_sources_ : Vector<uint32_t>(); - } - - String RTCEncodedAudioFrame::toString() const { -@@ -76,20 +66,15 @@ String RTCEncodedAudioFrame::toString() const { - return sb.ToString(); - } - --void RTCEncodedAudioFrame::SyncDelegate() const { -- delegate_->SetData(frame_data_); --} -- --scoped_refptr<RTCEncodedAudioFrameDelegate> RTCEncodedAudioFrame::Delegate() -- const { -- SyncDelegate(); -- return delegate_; --} -- - std::unique_ptr<webrtc::TransformableFrameInterface> --RTCEncodedAudioFrame::PassWebRtcFrame() { -- SyncDelegate(); -- return delegate_->PassWebRtcFrame(); -+RTCEncodedAudioFrame::PassDelegate() { -+ // Sync the delegate data with |frame_data_| if necessary. -+ if (webrtc_frame_ && frame_data_) { -+ webrtc_frame_->SetData(rtc::ArrayView<const uint8_t>( -+ static_cast<const uint8_t*>(frame_data_->Data()), -+ frame_data_->ByteLengthAsSizeT())); -+ } -+ return std::move(webrtc_frame_); - } - - void RTCEncodedAudioFrame::Trace(Visitor* visitor) { -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h -index 1e11e9ed04ee..7565e4b1ebc8 100644 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h -+++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h -@@ -20,7 +20,6 @@ class TransformableFrameInterface; - namespace blink { - - class DOMArrayBuffer; --class RTCEncodedAudioFrameDelegate; - - class MODULES_EXPORT RTCEncodedAudioFrame final : public ScriptWrappable { - DEFINE_WRAPPERTYPEINFO(); -@@ -30,8 +29,6 @@ class MODULES_EXPORT RTCEncodedAudioFrame final : public ScriptWrappable { - std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame); - explicit RTCEncodedAudioFrame( - std::unique_ptr<webrtc::TransformableAudioFrameInterface> webrtc_frame); -- explicit RTCEncodedAudioFrame( -- scoped_refptr<RTCEncodedAudioFrameDelegate> delegate); - - // rtc_encoded_audio_frame.idl implementation. - uint64_t timestamp() const; -@@ -42,20 +39,17 @@ class MODULES_EXPORT RTCEncodedAudioFrame final : public ScriptWrappable { - Vector<uint32_t> contributingSources() const; - String toString() const; - -- scoped_refptr<RTCEncodedAudioFrameDelegate> Delegate() const; -- void SyncDelegate() const; -- - // Returns and transfers ownership of the internal WebRTC frame -- // backing this RTCEncodedAudioFrame, neutering all RTCEncodedAudioFrames -- // backed by that internal WebRTC frame. -- std::unique_ptr<webrtc::TransformableFrameInterface> PassWebRtcFrame(); -+ // backing this RTCEncodedVideoFrame, leaving the RTCEncodedVideoFrame -+ // without a delegate WebRTC frame. -+ std::unique_ptr<webrtc::TransformableFrameInterface> PassDelegate(); - - void Trace(Visitor*) override; - - private: -- scoped_refptr<RTCEncodedAudioFrameDelegate> delegate_; -- Vector<uint32_t> contributing_sources_; - mutable Member<DOMArrayBuffer> frame_data_; -+ Vector<uint32_t> contributing_sources_; -+ std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame_; - }; - - } // namespace blink -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc -deleted file mode 100644 -index 2c71c02c5223..000000000000 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc -+++ /dev/null -@@ -1,68 +0,0 @@ --// Copyright 2020 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h" -- --#include <utility> -- --#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h" -- --namespace blink { -- --const void* RTCEncodedAudioFramesAttachment::kAttachmentKey; -- --RTCEncodedAudioFrameDelegate::RTCEncodedAudioFrameDelegate( -- std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame, -- Vector<uint32_t> contributing_sources) -- : webrtc_frame_(std::move(webrtc_frame)), -- contributing_sources_(std::move(contributing_sources)) {} -- --uint64_t RTCEncodedAudioFrameDelegate::Timestamp() const { -- MutexLocker lock(mutex_); -- return webrtc_frame_ ? webrtc_frame_->GetTimestamp() : 0; --} -- --DOMArrayBuffer* RTCEncodedAudioFrameDelegate::CreateDataBuffer() const { -- ArrayBufferContents contents; -- { -- MutexLocker lock(mutex_); -- if (!webrtc_frame_) -- return nullptr; -- -- auto data = webrtc_frame_->GetData(); -- contents = -- ArrayBufferContents(data.size(), 1, ArrayBufferContents::kNotShared, -- ArrayBufferContents::kDontInitialize); -- if (UNLIKELY(!contents.Data())) -- OOM_CRASH(data.size()); -- memcpy(contents.Data(), data.data(), data.size()); -- } -- return DOMArrayBuffer::Create(std::move(contents)); --} -- --void RTCEncodedAudioFrameDelegate::SetData(const DOMArrayBuffer* data) { -- MutexLocker lock(mutex_); -- if (webrtc_frame_ && data) { -- webrtc_frame_->SetData(rtc::ArrayView<const uint8_t>( -- static_cast<const uint8_t*>(data->Data()), data->ByteLengthAsSizeT())); -- } --} -- --uint32_t RTCEncodedAudioFrameDelegate::Ssrc() const { -- MutexLocker lock(mutex_); -- return webrtc_frame_ ? webrtc_frame_->GetSsrc() : 0; --} -- --Vector<uint32_t> RTCEncodedAudioFrameDelegate::ContributingSources() const { -- MutexLocker lock(mutex_); -- return contributing_sources_; --} -- --std::unique_ptr<webrtc::TransformableFrameInterface> --RTCEncodedAudioFrameDelegate::PassWebRtcFrame() { -- MutexLocker lock(mutex_); -- return std::move(webrtc_frame_); --} -- --} // namespace blink -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h -deleted file mode 100644 -index 90853ecfa325..000000000000 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright 2020 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_AUDIO_FRAME_DELEGATE_H_ --#define THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_AUDIO_FRAME_DELEGATE_H_ -- --#include <stdint.h> -- --#include <memory> -- --#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h" --#include "third_party/blink/renderer/modules/modules_export.h" --#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h" --#include "third_party/blink/renderer/platform/wtf/threading_primitives.h" --#include "third_party/webrtc/api/frame_transformer_interface.h" -- --namespace blink { -- --class DOMArrayBuffer; -- --// This class wraps a WebRTC audio frame and allows making shallow --// copies. Its purpose is to support making RTCEncodedVideoFrames --// serializable in the same process. --class RTCEncodedAudioFrameDelegate -- : public WTF::ThreadSafeRefCounted<RTCEncodedAudioFrameDelegate> { -- public: -- explicit RTCEncodedAudioFrameDelegate( -- std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame, -- Vector<uint32_t> contributing_sources); -- -- uint64_t Timestamp() const; -- DOMArrayBuffer* CreateDataBuffer() const; -- void SetData(const DOMArrayBuffer* data); -- uint32_t Ssrc() const; -- Vector<uint32_t> ContributingSources() const; -- std::unique_ptr<webrtc::TransformableFrameInterface> PassWebRtcFrame(); -- -- private: -- mutable Mutex mutex_; -- std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame_ -- GUARDED_BY(mutex_); -- Vector<uint32_t> contributing_sources_; --}; -- --class MODULES_EXPORT RTCEncodedAudioFramesAttachment -- : public SerializedScriptValue::Attachment { -- public: -- static const void* kAttachmentKey; -- RTCEncodedAudioFramesAttachment() = default; -- ~RTCEncodedAudioFramesAttachment() override = default; -- -- bool IsLockedToAgentCluster() const override { -- return !encoded_audio_frames_.IsEmpty(); -- } -- -- Vector<scoped_refptr<RTCEncodedAudioFrameDelegate>>& EncodedAudioFrames() { -- return encoded_audio_frames_; -- } -- -- const Vector<scoped_refptr<RTCEncodedAudioFrameDelegate>>& -- EncodedAudioFrames() const { -- return encoded_audio_frames_; -- } -- -- private: -- Vector<scoped_refptr<RTCEncodedAudioFrameDelegate>> encoded_audio_frames_; --}; -- --} // namespace blink -- --#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_AUDIO_FRAME_DELEGATE_H_ -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc -index c0e5fa9c6f44..2635b6348029 100644 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc -+++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc -@@ -48,8 +48,7 @@ ScriptPromise RTCEncodedAudioUnderlyingSink::write( - return ScriptPromise(); - } - -- transformer_callback_.Run()->SendFrameToSink( -- encoded_frame->PassWebRtcFrame()); -+ transformer_callback_.Run()->SendFrameToSink(encoded_frame->PassDelegate()); - return ScriptPromise::CastUndefined(script_state); - } - --- -2.26.1 - diff --git a/0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch b/0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch deleted file mode 100644 index 18bff6ecd5f8..000000000000 --- a/0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch +++ /dev/null @@ -1,595 +0,0 @@ -From 23bf04c1127da00d17bfa72794602e59b484ae76 Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com> -Date: Fri, 17 Apr 2020 00:41:46 +1000 -Subject: [PATCH 2/8] Revert "[RTCInsertableStreams] Make RTCEncodedVideoFrame - serializable" - -This reverts commit 283079bc066cc19c0d0d186500697ca95ca03c3f. ---- - .../core/v8/serialization/serialization_tag.h | 1 - - .../serialization/serialized_script_value.h | 31 +------ - ...8_script_value_deserializer_for_modules.cc | 28 ------ - ...v8_script_value_deserializer_for_modules.h | 2 - - .../v8_script_value_serializer_for_modules.cc | 28 ------ - .../v8_script_value_serializer_for_modules.h | 2 - - .../renderer/modules/peerconnection/BUILD.gn | 2 - - .../peerconnection/rtc_encoded_video_frame.cc | 54 +++++------ - .../peerconnection/rtc_encoded_video_frame.h | 19 ++-- - .../rtc_encoded_video_frame_delegate.cc | 89 ------------------- - .../rtc_encoded_video_frame_delegate.h | 72 --------------- - .../rtc_encoded_video_underlying_sink.cc | 3 +- - .../rtc_encoded_video_underlying_sink_test.cc | 2 +- - 13 files changed, 34 insertions(+), 299 deletions(-) - delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc - delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h - -diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h -index cce273938fc2..05e37ce90847 100644 ---- a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h -+++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h -@@ -102,7 +102,6 @@ enum SerializationTag { - // namedCurve:uint32_t - kRTCCertificateTag = 'k', // length:uint32_t, pemPrivateKey:WebCoreString, - // pemCertificate:WebCoreString -- kRTCEncodedVideoFrameTag = 'V', // uint32_t -> transferred video frame ID - - // The following tags were used by the Shape Detection API implementation - // between M71 and M81. During these milestones, the API was always behind -diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h -index bbf10ef3135b..1a80aa3b2356 100644 ---- a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h -+++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h -@@ -269,41 +269,13 @@ class CORE_EXPORT SerializedScriptValue - - bool IsLockedToAgentCluster() const { - return !wasm_modules_.IsEmpty() || -- !shared_array_buffers_contents_.IsEmpty() || -- std::any_of(attachments_.begin(), attachments_.end(), -- [](const auto& entry) { -- return entry.value->IsLockedToAgentCluster(); -- }); -+ !shared_array_buffers_contents_.IsEmpty(); - } - - // Returns true after serializing script values that remote origins cannot - // access. - bool IsOriginCheckRequired() const; - -- // Derive from Attachments to define collections of objects to serialize in -- // modules. They can be registered using GetOrCreateAttachment(). -- class Attachment { -- public: -- virtual ~Attachment() = default; -- virtual bool IsLockedToAgentCluster() const = 0; -- }; -- -- template <typename T> -- T* GetOrCreateAttachment() { -- auto result = attachments_.insert(&T::kAttachmentKey, std::unique_ptr<T>()); -- if (!result.stored_value->value) -- result.stored_value->value = std::make_unique<T>(); -- return static_cast<T*>(result.stored_value->value.get()); -- } -- -- template <typename T> -- const T* GetAttachmentIfExists() const { -- auto it = attachments_.find(&T::kAttachmentKey); -- if (it == attachments_.end()) -- return nullptr; -- return static_cast<T*>(it->value.get()); -- } -- - private: - friend class ScriptValueSerializer; - friend class V8ScriptValueSerializer; -@@ -372,7 +344,6 @@ class CORE_EXPORT SerializedScriptValue - MojoScopedHandleArray mojo_handles_; - SharedArrayBufferContentsArray shared_array_buffers_contents_; - NativeFileSystemTokensArray native_file_system_tokens_; -- HashMap<const void* const*, std::unique_ptr<Attachment>> attachments_; - - bool has_registered_external_allocation_; - #if DCHECK_IS_ON() -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc -index 684d40f0cee8..b5f07e85b7b2 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc -@@ -18,8 +18,6 @@ - #include "third_party/blink/renderer/modules/native_file_system/native_file_system_file_handle.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate.h" - #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate_generator.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h" - - namespace blink { - -@@ -67,8 +65,6 @@ ScriptWrappable* V8ScriptValueDeserializerForModules::ReadDOMObject( - return nullptr; - return MakeGarbageCollected<RTCCertificate>(std::move(certificate)); - } -- case kRTCEncodedVideoFrameTag: -- return ReadRTCEncodedVideoFrame(); - default: - break; - } -@@ -373,28 +369,4 @@ V8ScriptValueDeserializerForModules::ReadNativeFileSystemHandle( - } - } - --RTCEncodedVideoFrame* --V8ScriptValueDeserializerForModules::ReadRTCEncodedVideoFrame() { -- if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled( -- ExecutionContext::From(GetScriptState()))) { -- return nullptr; -- } -- -- uint32_t index; -- if (!ReadUint32(&index)) -- return nullptr; -- -- const auto* attachment = -- GetSerializedScriptValue() -- ->GetAttachmentIfExists<RTCEncodedVideoFramesAttachment>(); -- if (!attachment) -- return nullptr; -- -- const auto& frames = attachment->EncodedVideoFrames(); -- if (index >= frames.size()) -- return nullptr; -- -- return MakeGarbageCollected<RTCEncodedVideoFrame>(frames[index]); --} -- - } // namespace blink -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h -index 410fe5098096..15e5d35547b6 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h -@@ -12,7 +12,6 @@ namespace blink { - - class CryptoKey; - class NativeFileSystemHandle; --class RTCEncodedVideoFrame; - - // Extends V8ScriptValueSerializer with support for modules/ types. - class MODULES_EXPORT V8ScriptValueDeserializerForModules final -@@ -45,7 +44,6 @@ class MODULES_EXPORT V8ScriptValueDeserializerForModules final - } - CryptoKey* ReadCryptoKey(); - NativeFileSystemHandle* ReadNativeFileSystemHandle(SerializationTag tag); -- RTCEncodedVideoFrame* ReadRTCEncodedVideoFrame(); - }; - - } // namespace blink -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc -index 6811770537b9..6f017cdd3eca 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc -@@ -18,9 +18,6 @@ - #include "third_party/blink/renderer/bindings/modules/v8/v8_landmark.h" - #include "third_party/blink/renderer/bindings/modules/v8/v8_point_2d.h" - #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_certificate.h" --#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_video_frame.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h" - #include "third_party/blink/renderer/platform/bindings/script_wrappable.h" - - namespace blink { -@@ -77,17 +74,6 @@ bool V8ScriptValueSerializerForModules::WriteDOMObject( - WriteUTF8String(pem.certificate().c_str()); - return true; - } -- if (wrapper_type_info == V8RTCEncodedVideoFrame::GetWrapperTypeInfo() && -- RuntimeEnabledFeatures::RTCInsertableStreamsEnabled( -- ExecutionContext::From(GetScriptState()))) { -- if (IsForStorage()) { -- exception_state.ThrowDOMException(DOMExceptionCode::kDataCloneError, -- "An RTCEncodedVideoFrame cannot be " -- "serialized for storage."); -- return false; -- } -- return WriteRTCEncodedVideoFrame(wrappable->ToImpl<RTCEncodedVideoFrame>()); -- } - return false; - } - -@@ -286,18 +272,4 @@ bool V8ScriptValueSerializerForModules::WriteNativeFileSystemHandle( - return true; - } - --bool V8ScriptValueSerializerForModules::WriteRTCEncodedVideoFrame( -- RTCEncodedVideoFrame* video_frame) { -- auto* attachment = -- GetSerializedScriptValue() -- ->GetOrCreateAttachment<RTCEncodedVideoFramesAttachment>(); -- auto& frames = attachment->EncodedVideoFrames(); -- frames.push_back(video_frame->Delegate()); -- const uint32_t index = static_cast<uint32_t>(frames.size() - 1); -- -- WriteTag(kRTCEncodedVideoFrameTag); -- WriteUint32(index); -- return true; --} -- - } // namespace blink -diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h -index 10ac32ca4f69..6405202e0cb0 100644 ---- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h -+++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h -@@ -12,7 +12,6 @@ - namespace blink { - - class NativeFileSystemHandle; --class RTCEncodedVideoFrame; - class WebCryptoKey; - - // Extends V8ScriptValueSerializer with support for modules/ types. -@@ -33,7 +32,6 @@ class MODULES_EXPORT V8ScriptValueSerializerForModules final - bool WriteNativeFileSystemHandle( - SerializationTag tag, - NativeFileSystemHandle* native_file_system_handle); -- bool WriteRTCEncodedVideoFrame(RTCEncodedVideoFrame*); - }; - - } // namespace blink -diff --git a/third_party/blink/renderer/modules/peerconnection/BUILD.gn b/third_party/blink/renderer/modules/peerconnection/BUILD.gn -index 4f9144ed30e0..5cf4876a3628 100644 ---- a/third_party/blink/renderer/modules/peerconnection/BUILD.gn -+++ b/third_party/blink/renderer/modules/peerconnection/BUILD.gn -@@ -84,8 +84,6 @@ blink_modules_sources("peerconnection") { - "rtc_encoded_audio_underlying_source.h", - "rtc_encoded_video_frame.cc", - "rtc_encoded_video_frame.h", -- "rtc_encoded_video_frame_delegate.cc", -- "rtc_encoded_video_frame_delegate.h", - "rtc_encoded_video_underlying_sink.cc", - "rtc_encoded_video_underlying_sink.h", - "rtc_encoded_video_underlying_source.cc", -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc -index 65593da51242..3f8676ddb290 100644 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc -+++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc -@@ -4,47 +4,46 @@ - - #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h" - --#include <utility> -- - #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h" --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h" - #include "third_party/blink/renderer/platform/wtf/text/string_builder.h" - #include "third_party/webrtc/api/frame_transformer_interface.h" - - namespace blink { - - RTCEncodedVideoFrame::RTCEncodedVideoFrame( -- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame) -- : delegate_(base::MakeRefCounted<RTCEncodedVideoFrameDelegate>( -- std::move(webrtc_frame))) {} -- --RTCEncodedVideoFrame::RTCEncodedVideoFrame( -- scoped_refptr<RTCEncodedVideoFrameDelegate> delegate) -+ std::unique_ptr<webrtc::TransformableVideoFrameInterface> delegate) - : delegate_(std::move(delegate)) {} - - String RTCEncodedVideoFrame::type() const { -- return delegate_->Type(); -+ if (!delegate_) -+ return "empty"; -+ -+ return delegate_->IsKeyFrame() ? "key" : "delta"; - } - - uint64_t RTCEncodedVideoFrame::timestamp() const { -- return delegate_->Timestamp(); -+ return delegate_ ? delegate_->GetTimestamp() : 0; - } - - DOMArrayBuffer* RTCEncodedVideoFrame::data() const { -- if (!frame_data_) -- frame_data_ = delegate_->CreateDataBuffer(); -+ if (delegate_ && !frame_data_) { -+ frame_data_ = DOMArrayBuffer::Create(delegate_->GetData().data(), -+ delegate_->GetData().size()); -+ } - return frame_data_; - } - - DOMArrayBuffer* RTCEncodedVideoFrame::additionalData() const { -- if (!additional_data_) -- additional_data_ = delegate_->CreateAdditionalDataBuffer(); -- -+ if (delegate_ && !additional_data_) { -+ auto additional_data = delegate_->GetAdditionalData(); -+ additional_data_ = -+ DOMArrayBuffer::Create(additional_data.data(), additional_data.size()); -+ } - return additional_data_; - } - - uint32_t RTCEncodedVideoFrame::synchronizationSource() const { -- return delegate_->Ssrc(); -+ return delegate_ ? delegate_->GetSsrc() : 0; - } - - void RTCEncodedVideoFrame::setData(DOMArrayBuffer* data) { -@@ -66,20 +65,15 @@ String RTCEncodedVideoFrame::toString() const { - return sb.ToString(); - } - --void RTCEncodedVideoFrame::SyncDelegate() const { -- delegate_->SetData(frame_data_); --} -- --scoped_refptr<RTCEncodedVideoFrameDelegate> RTCEncodedVideoFrame::Delegate() -- const { -- SyncDelegate(); -- return delegate_; --} -- - std::unique_ptr<webrtc::TransformableVideoFrameInterface> --RTCEncodedVideoFrame::PassWebRtcFrame() { -- SyncDelegate(); -- return delegate_->PassWebRtcFrame(); -+RTCEncodedVideoFrame::PassDelegate() { -+ // Sync the delegate data with |frame_data_| if necessary. -+ if (delegate_ && frame_data_) { -+ delegate_->SetData(rtc::ArrayView<const uint8_t>( -+ static_cast<const uint8_t*>(frame_data_->Data()), -+ frame_data_->ByteLengthAsSizeT())); -+ } -+ return std::move(delegate_); - } - - void RTCEncodedVideoFrame::Trace(Visitor* visitor) { -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h -index 5e13b07e9c14..67024c262e6e 100644 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h -+++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h -@@ -20,16 +20,13 @@ class TransformableVideoFrameInterface; - namespace blink { - - class DOMArrayBuffer; --class RTCEncodedVideoFrameDelegate; - - class MODULES_EXPORT RTCEncodedVideoFrame final : public ScriptWrappable { - DEFINE_WRAPPERTYPEINFO(); - - public: - explicit RTCEncodedVideoFrame( -- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame); -- explicit RTCEncodedVideoFrame( -- scoped_refptr<RTCEncodedVideoFrameDelegate> delegate); -+ std::unique_ptr<webrtc::TransformableVideoFrameInterface> delegate); - - // rtc_encoded_video_frame.idl implementation. - String type() const; -@@ -41,19 +38,17 @@ class MODULES_EXPORT RTCEncodedVideoFrame final : public ScriptWrappable { - uint32_t synchronizationSource() const; - String toString() const; - -- scoped_refptr<RTCEncodedVideoFrameDelegate> Delegate() const; -- void SyncDelegate() const; -- -+ // Internal API -+ bool HasDelegate() { return !!delegate_; } - // Returns and transfers ownership of the internal WebRTC frame -- // backing this RTCEncodedVideoFrame, neutering all RTCEncodedVideoFrames -- // backed by that internal WebRTC frame. -- std::unique_ptr<webrtc::TransformableVideoFrameInterface> PassWebRtcFrame(); -+ // backing this RTCEncodedVideoFrame, leaving the RTCEncodedVideoFrame -+ // without a delegate WebRTC frame. -+ std::unique_ptr<webrtc::TransformableVideoFrameInterface> PassDelegate(); - - void Trace(Visitor*) override; - - private: -- const scoped_refptr<RTCEncodedVideoFrameDelegate> delegate_; -- -+ std::unique_ptr<webrtc::TransformableVideoFrameInterface> delegate_; - // Exposes encoded frame data from |delegate_|. - mutable Member<DOMArrayBuffer> frame_data_; - // Exposes additional data from |delegate_|. -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc -deleted file mode 100644 -index 6d2de5b2b773..000000000000 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc -+++ /dev/null -@@ -1,89 +0,0 @@ --// Copyright 2020 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h" -- --#include <utility> -- --#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h" --#include "third_party/webrtc/api/frame_transformer_interface.h" -- --namespace blink { -- --const void* const RTCEncodedVideoFramesAttachment::kAttachmentKey = nullptr; -- --RTCEncodedVideoFrameDelegate::RTCEncodedVideoFrameDelegate( -- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame) -- : webrtc_frame_(std::move(webrtc_frame)) {} -- --String RTCEncodedVideoFrameDelegate::Type() const { -- MutexLocker lock(mutex_); -- if (!webrtc_frame_) -- return "empty"; -- -- return webrtc_frame_->IsKeyFrame() ? "key" : "delta"; --} -- --uint64_t RTCEncodedVideoFrameDelegate::Timestamp() const { -- MutexLocker lock(mutex_); -- return webrtc_frame_ ? webrtc_frame_->GetTimestamp() : 0; --} -- --DOMArrayBuffer* RTCEncodedVideoFrameDelegate::CreateDataBuffer() const { -- ArrayBufferContents contents; -- { -- MutexLocker lock(mutex_); -- if (!webrtc_frame_) -- return nullptr; -- -- auto data = webrtc_frame_->GetData(); -- contents = -- ArrayBufferContents(data.size(), 1, ArrayBufferContents::kNotShared, -- ArrayBufferContents::kDontInitialize); -- if (UNLIKELY(!contents.Data())) -- OOM_CRASH(data.size()); -- memcpy(contents.Data(), data.data(), data.size()); -- } -- return DOMArrayBuffer::Create(std::move(contents)); --} -- --void RTCEncodedVideoFrameDelegate::SetData(const DOMArrayBuffer* data) { -- MutexLocker lock(mutex_); -- if (webrtc_frame_ && data) { -- webrtc_frame_->SetData(rtc::ArrayView<const uint8_t>( -- static_cast<const uint8_t*>(data->Data()), data->ByteLengthAsSizeT())); -- } --} -- --DOMArrayBuffer* RTCEncodedVideoFrameDelegate::CreateAdditionalDataBuffer() -- const { -- ArrayBufferContents contents; -- { -- MutexLocker lock(mutex_); -- if (!webrtc_frame_) -- return nullptr; -- -- auto additional_data = webrtc_frame_->GetAdditionalData(); -- contents = ArrayBufferContents(additional_data.size(), 1, -- ArrayBufferContents::kNotShared, -- ArrayBufferContents::kDontInitialize); -- if (UNLIKELY(!contents.Data())) -- OOM_CRASH(additional_data.size()); -- memcpy(contents.Data(), additional_data.data(), additional_data.size()); -- } -- return DOMArrayBuffer::Create(std::move(contents)); --} -- --uint32_t RTCEncodedVideoFrameDelegate::Ssrc() const { -- MutexLocker lock(mutex_); -- return webrtc_frame_ ? webrtc_frame_->GetSsrc() : 0; --} -- --std::unique_ptr<webrtc::TransformableVideoFrameInterface> --RTCEncodedVideoFrameDelegate::PassWebRtcFrame() { -- MutexLocker lock(mutex_); -- return std::move(webrtc_frame_); --} -- --} // namespace blink -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h -deleted file mode 100644 -index 5bc300b6e82c..000000000000 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h -+++ /dev/null -@@ -1,72 +0,0 @@ --// Copyright 2020 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_VIDEO_FRAME_DELEGATE_H_ --#define THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_VIDEO_FRAME_DELEGATE_H_ -- --#include <stdint.h> -- --#include <memory> -- --#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h" --#include "third_party/blink/renderer/modules/modules_export.h" --#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h" --#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h" --#include "third_party/blink/renderer/platform/wtf/threading_primitives.h" --#include "third_party/webrtc/api/frame_transformer_interface.h" -- --namespace blink { -- --class DOMArrayBuffer; -- --// This class wraps a WebRTC video frame and allows making shallow --// copies. Its purpose is to support making RTCEncodedVideoFrames --// serializable in the same process. --class RTCEncodedVideoFrameDelegate -- : public WTF::ThreadSafeRefCounted<RTCEncodedVideoFrameDelegate> { -- public: -- explicit RTCEncodedVideoFrameDelegate( -- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame); -- -- String Type() const; -- uint64_t Timestamp() const; -- DOMArrayBuffer* CreateDataBuffer() const; -- void SetData(const DOMArrayBuffer* data); -- DOMArrayBuffer* CreateAdditionalDataBuffer() const; -- uint32_t Ssrc() const; -- std::unique_ptr<webrtc::TransformableVideoFrameInterface> PassWebRtcFrame(); -- -- private: -- mutable Mutex mutex_; -- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame_ -- GUARDED_BY(mutex_); --}; -- --class MODULES_EXPORT RTCEncodedVideoFramesAttachment -- : public SerializedScriptValue::Attachment { -- public: -- static const void* const kAttachmentKey; -- RTCEncodedVideoFramesAttachment() = default; -- ~RTCEncodedVideoFramesAttachment() override = default; -- -- bool IsLockedToAgentCluster() const override { -- return !encoded_video_frames_.IsEmpty(); -- } -- -- Vector<scoped_refptr<RTCEncodedVideoFrameDelegate>>& EncodedVideoFrames() { -- return encoded_video_frames_; -- } -- -- const Vector<scoped_refptr<RTCEncodedVideoFrameDelegate>>& -- EncodedVideoFrames() const { -- return encoded_video_frames_; -- } -- -- private: -- Vector<scoped_refptr<RTCEncodedVideoFrameDelegate>> encoded_video_frames_; --}; -- --} // namespace blink -- --#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_VIDEO_FRAME_DELEGATE_H_ -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc -index 4585483a1cb2..3762b10e6bc5 100644 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc -+++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc -@@ -48,8 +48,7 @@ ScriptPromise RTCEncodedVideoUnderlyingSink::write( - return ScriptPromise(); - } - -- transformer_callback_.Run()->SendFrameToSink( -- encoded_frame->PassWebRtcFrame()); -+ transformer_callback_.Run()->SendFrameToSink(encoded_frame->PassDelegate()); - return ScriptPromise::CastUndefined(script_state); - } - -diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc -index ea8a67a9cc5f..3d0dfbdbbe3e 100644 ---- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc -+++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc -@@ -68,7 +68,7 @@ class RTCEncodedVideoUnderlyingSinkTest : public testing::Test { - - ScriptValue CreateEncodedVideoFrameChunk(ScriptState* script_state) { - RTCEncodedVideoFrame* frame = MakeGarbageCollected<RTCEncodedVideoFrame>( -- std::unique_ptr<webrtc::TransformableVideoFrameInterface>()); -+ /*frame_delegate=*/nullptr); - return ScriptValue(script_state->GetIsolate(), - ToV8(frame, script_state->GetContext()->Global(), - script_state->GetIsolate())); --- -2.26.1 - diff --git a/0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch b/0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch deleted file mode 100644 index 9ee105ff31d4..000000000000 --- a/0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch +++ /dev/null @@ -1,28 +0,0 @@ -From dba2a4aa61c021a46fa688efc989320763d3c738 Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com> -Date: Thu, 16 Apr 2020 20:11:28 +1000 -Subject: [PATCH 3/8] Add missing algorithm header in crx_install_error.cc - -This is needed for the use of std::find. - -Change-Id: I2dc43b3887c467986c5346be5a9e27a987e1e5b3 ---- - extensions/browser/install/crx_install_error.cc | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/extensions/browser/install/crx_install_error.cc b/extensions/browser/install/crx_install_error.cc -index a9765bb0a5a4..bd0d3e35a167 100644 ---- a/extensions/browser/install/crx_install_error.cc -+++ b/extensions/browser/install/crx_install_error.cc -@@ -4,6 +4,8 @@ - - #include "extensions/browser/install/crx_install_error.h" - -+#include <algorithm> -+ - #include "base/logging.h" - #include "extensions/browser/install/sandboxed_unpacker_failure_reason.h" - --- -2.26.1 - diff --git a/0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch b/0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch deleted file mode 100644 index 7196e285c145..000000000000 --- a/0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch +++ /dev/null @@ -1,60 +0,0 @@ -From ffa47b54c9dbed28a8b1b2b9428049073937b3fe Mon Sep 17 00:00:00 2001 -From: Stephan Hartmann <stha09@googlemail.com> -Date: Sun, 5 Apr 2020 08:29:21 +0000 -Subject: [PATCH 4/8] libstdc++: fix incomplete-type in AXTree for - NodeSetSizePosInSetInfo - -std::unordered_map<T, U> requires U to be fully declared. ax_tree.h -has only forward declaration of NodeSetSizePosInSetInfo. Therefore, -move declaration from ax_tree.cc. -Bug: 957519 -Change-Id: Ic1f4bf3ebfea229ece84251e46d4461b31873868 ---- - ui/accessibility/ax_tree.cc | 10 ++-------- - ui/accessibility/ax_tree.h | 9 ++++++++- - 2 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc -index 7b8d9b1b1610..e9154028d664 100644 ---- a/ui/accessibility/ax_tree.cc -+++ b/ui/accessibility/ax_tree.cc -@@ -567,14 +567,8 @@ struct AXTreeUpdateState { - const AXTree& tree; - }; - --struct AXTree::NodeSetSizePosInSetInfo { -- NodeSetSizePosInSetInfo() = default; -- ~NodeSetSizePosInSetInfo() = default; -- -- int32_t pos_in_set = 0; -- int32_t set_size = 0; -- base::Optional<int> lowest_hierarchical_level; --}; -+AXTree::NodeSetSizePosInSetInfo::NodeSetSizePosInSetInfo() = default; -+AXTree::NodeSetSizePosInSetInfo::~NodeSetSizePosInSetInfo() = default; - - struct AXTree::OrderedSetContent { - explicit OrderedSetContent(const AXNode* ordered_set = nullptr) -diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h -index a51ca8de4c84..8c1c57517ac0 100644 ---- a/ui/accessibility/ax_tree.h -+++ b/ui/accessibility/ax_tree.h -@@ -328,7 +328,14 @@ class AX_EXPORT AXTree : public AXNode::OwnerTree { - bool enable_extra_mac_nodes_ = false; - - // Contains pos_in_set and set_size data for an AXNode. -- struct NodeSetSizePosInSetInfo; -+ struct NodeSetSizePosInSetInfo { -+ NodeSetSizePosInSetInfo(); -+ ~NodeSetSizePosInSetInfo(); -+ -+ int32_t pos_in_set = 0; -+ int32_t set_size = 0; -+ base::Optional<int> lowest_hierarchical_level; -+ }; - - // Represents the content of an ordered set which includes the ordered set - // items and the ordered set container if it exists. --- -2.26.1 - diff --git a/0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch b/0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch deleted file mode 100644 index bf89b54beefc..000000000000 --- a/0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch +++ /dev/null @@ -1,199 +0,0 @@ -From 9c5607e39aaf34f866ca2b815196953ec3818098 Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com> -Date: Sat, 11 Apr 2020 12:32:25 +1000 -Subject: [PATCH 5/8] Revert "Trace ICU object creation in "ICU.CreateInstance" - UMA histogram" - -This reverts commit 928bcad29884064f83bf05ecadf82369f8b4622f. ---- - DEPS | 2 +- - base/i18n/icu_util.cc | 150 +++++++----------------------------------- - 2 files changed, 25 insertions(+), 127 deletions(-) - -diff --git a/DEPS b/DEPS -index 95ff15cbf88c..fd23a935909f 100644 ---- a/DEPS -+++ b/DEPS -@@ -1014,7 +1014,7 @@ deps = { - Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + '6fdad5388130757e1efb58a14b8e7f9494625691', - - 'src/third_party/icu': -- Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '13cfcd5874f6c39c34ec57fa5295e7910ae90b8d', -+ Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd7aff76cf6bb0fbef3afa6c07718f78a80a70f8f', - - 'src/third_party/icu4j': { - 'packages': [ -diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc -index 82022d5f490e..425a0b2a6648 100644 ---- a/base/i18n/icu_util.cc -+++ b/base/i18n/icu_util.cc -@@ -350,134 +350,32 @@ void InitializeIcuTimeZone() { - } - - const char kICUDataFile[] = "ICU.DataFile"; --const char kICUCreateInstance[] = "ICU.CreateInstance"; -- --enum class ICUCreateInstance { -- kCharacterBreakIterator = 0, -- kWordBreakIterator = 1, -- kLineBreakIterator = 2, -- kLineBreakIteratorTypeLoose = 3, -- kLineBreakIteratorTypeNormal = 4, -- kLineBreakIteratorTypeStrict = 5, -- kSentenceBreakIterator = 6, -- kTitleBreakIterator = 7, -- kThaiBreakEngine = 8, -- kLaoBreakEngine = 9, -- kBurmeseBreakEngine = 10, -- kKhmerBreakEngine = 11, -- kChineseJapaneseBreakEngine = 12, -- -- kMaxValue = kChineseJapaneseBreakEngine --}; -- --// Callback functions to report the opening of ICU Data File, and creation of --// key objects to UMA. This help us to understand what built-in ICU data files --// are rarely used in the user's machines and the distribution of ICU usage. --static void U_CALLCONV TraceICUEntry(const void*, int32_t fn_number) { -- switch (fn_number) { -- case UTRACE_UBRK_CREATE_CHARACTER: -- base::UmaHistogramEnumeration(kICUCreateInstance, -- ICUCreateInstance::kCharacterBreakIterator); -- break; -- case UTRACE_UBRK_CREATE_SENTENCE: -- base::UmaHistogramEnumeration(kICUCreateInstance, -- ICUCreateInstance::kSentenceBreakIterator); -- break; -- case UTRACE_UBRK_CREATE_TITLE: -- base::UmaHistogramEnumeration(kICUCreateInstance, -- ICUCreateInstance::kTitleBreakIterator); -- break; -- case UTRACE_UBRK_CREATE_WORD: -- base::UmaHistogramEnumeration(kICUCreateInstance, -- ICUCreateInstance::kWordBreakIterator); -- break; -- default: -- return; -- } --} - --static void U_CALLCONV TraceICUData(const void* context, -- int32_t fn_number, -- int32_t level, -- const char* fmt, -- va_list args) { -- switch (fn_number) { -- case UTRACE_UDATA_DATA_FILE: { -- std::string icu_data_file_name(va_arg(args, const char*)); -- va_end(args); -- // Skip icu version specified prefix if exist. -- // path is prefixed with icu version prefix such as "icudt65l-". -- // Histogram only the part after the -. -- if (icu_data_file_name.find("icudt") == 0) { -- size_t dash = icu_data_file_name.find("-"); -- if (dash != std::string::npos) { -- icu_data_file_name = icu_data_file_name.substr(dash + 1); -- } -- } -- // UmaHistogramSparse should track less than 100 values. -- // We currently have about total 55 built-in data files inside ICU -- // so it fit the UmaHistogramSparse usage. -- int hash = base::HashMetricName(icu_data_file_name); -- base::UmaHistogramSparse(kICUDataFile, hash); -- return; -- } -- case UTRACE_UBRK_CREATE_LINE: { -- const char* lb_type = va_arg(args, const char*); -- va_end(args); -- ICUCreateInstance value; -- switch (lb_type[0]) { -- case '\0': -- value = ICUCreateInstance::kLineBreakIterator; -- break; -- case 'l': -- DCHECK(strcmp(lb_type, "loose") == 0); -- value = ICUCreateInstance::kLineBreakIteratorTypeLoose; -- break; -- case 'n': -- DCHECK(strcmp(lb_type, "normal") == 0); -- value = ICUCreateInstance::kLineBreakIteratorTypeNormal; -- break; -- case 's': -- DCHECK(strcmp(lb_type, "strict") == 0); -- value = ICUCreateInstance::kLineBreakIteratorTypeStrict; -- break; -- default: -- return; -- } -- base::UmaHistogramEnumeration(kICUCreateInstance, value); -- return; -- } -- case UTRACE_UBRK_CREATE_BREAK_ENGINE: { -- const char* script = va_arg(args, const char*); -- va_end(args); -- ICUCreateInstance value; -- switch (script[0]) { -- case 'H': -- DCHECK(strcmp(script, "Hani") == 0); -- value = ICUCreateInstance::kChineseJapaneseBreakEngine; -- break; -- case 'K': -- DCHECK(strcmp(script, "Khmr") == 0); -- value = ICUCreateInstance::kKhmerBreakEngine; -- break; -- case 'L': -- DCHECK(strcmp(script, "Laoo") == 0); -- value = ICUCreateInstance::kLaoBreakEngine; -- break; -- case 'M': -- DCHECK(strcmp(script, "Mymr") == 0); -- value = ICUCreateInstance::kBurmeseBreakEngine; -- break; -- case 'T': -- DCHECK(strcmp(script, "Thai") == 0); -- value = ICUCreateInstance::kThaiBreakEngine; -- break; -- default: -- return; -+// Callback function to report the opening of ICU Data File to UMA. -+// This help us to understand what built-in ICU data files are rarely used -+// in the user's machines. -+static void U_CALLCONV TraceICUDataFile(const void* context, -+ int32_t fn_number, -+ int32_t level, -+ const char* fmt, -+ va_list args) { -+ if (fn_number == UTRACE_UDATA_DATA_FILE) { -+ std::string icu_data_file_name(va_arg(args, const char*)); -+ va_end(args); -+ // Skip icu version specified prefix if exist. -+ // path is prefixed with icu version prefix such as "icudt65l-". -+ // Histogram only the part after the -. -+ if (icu_data_file_name.find("icudt") == 0) { -+ size_t dash = icu_data_file_name.find("-"); -+ if (dash != std::string::npos) { -+ icu_data_file_name = icu_data_file_name.substr(dash + 1); - } -- base::UmaHistogramEnumeration(kICUCreateInstance, value); -- return; - } -+ // UmaHistogramSparse should track less than 100 values. -+ // We currently have about total 55 built-in data files inside ICU -+ // so it fit the UmaHistogramSparse usage. -+ int hash = base::HashMetricName(icu_data_file_name); -+ base::UmaHistogramSparse(kICUDataFile, hash); - } - } - -@@ -491,7 +389,7 @@ bool DoCommonInitialization() { - InitializeIcuTimeZone(); - - const void* context = nullptr; -- utrace_setFunctions(context, TraceICUEntry, nullptr, TraceICUData); -+ utrace_setFunctions(context, nullptr, nullptr, TraceICUDataFile); - utrace_setLevel(UTRACE_VERBOSE); - return true; - } --- -2.26.1 - diff --git a/0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch b/0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch deleted file mode 100644 index 8901d446acb7..000000000000 --- a/0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch +++ /dev/null @@ -1,244 +0,0 @@ -From 5794a8df921586417f6ffd6e05214b0258df7a00 Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com> -Date: Sat, 11 Apr 2020 13:01:16 +1000 -Subject: [PATCH 6/8] Revert "[PM] Add calculation of maximum simultaneous - load" - -This reverts commit b759260ca14691c4ffc386a4c64aef6f4b404618. ---- - chrome/browser/BUILD.gn | 2 - - .../policies/background_tab_loading_policy.cc | 19 ------- - .../policies/background_tab_loading_policy.h | 4 -- - .../background_tab_loading_policy_helpers.cc | 39 -------------- - .../background_tab_loading_policy_helpers.h | 25 --------- - ...und_tab_loading_policy_helpers_unittest.cc | 54 ------------------- - chrome/test/BUILD.gn | 1 - - 7 files changed, 144 deletions(-) - delete mode 100644 chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc - delete mode 100644 chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h - delete mode 100644 chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc - -diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index 023024e81c99..61c2784bd4c7 100644 ---- a/chrome/browser/BUILD.gn -+++ b/chrome/browser/BUILD.gn -@@ -3376,8 +3376,6 @@ jumbo_static_library("browser") { - "page_load_metrics/observers/session_restore_page_load_metrics_observer.h", - "performance_manager/graph/policies/background_tab_loading_policy.cc", - "performance_manager/graph/policies/background_tab_loading_policy.h", -- "performance_manager/graph/policies/background_tab_loading_policy_helpers.cc", -- "performance_manager/graph/policies/background_tab_loading_policy_helpers.h", - "performance_manager/graph/policies/urgent_page_discarding_policy.cc", - "performance_manager/graph/policies/urgent_page_discarding_policy.h", - "performance_manager/mechanisms/page_discarder.cc", -diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc -index 7f68ad5c9c81..eb8c5a1ff489 100644 ---- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc -+++ b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc -@@ -4,8 +4,6 @@ - - #include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h" - --#include "base/system/sys_info.h" --#include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h" - #include "chrome/browser/performance_manager/mechanisms/page_loader.h" - #include "components/performance_manager/public/decorators/tab_properties_decorator.h" - #include "components/performance_manager/public/graph/policies/background_tab_loading_policy.h" -@@ -16,21 +14,7 @@ namespace performance_manager { - namespace policies { - - namespace { -- --// Pointer to the instance of itself. - BackgroundTabLoadingPolicy* g_background_tab_loading_policy = nullptr; -- --// Lower bound for the maximum number of tabs to load simultaneously. --uint32_t kMinSimultaneousTabLoads = 1; -- --// Upper bound for the maximum number of tabs to load simultaneously. --// Setting to zero means no upper bound is applied. --uint32_t kMaxSimultaneousTabLoads = 4; -- --// The number of CPU cores required per permitted simultaneous tab --// load. Setting to zero means no CPU core limit applies. --uint32_t kCoresPerSimultaneousTabLoad = 2; -- - } // namespace - - void ScheduleLoadForRestoredTabs( -@@ -64,9 +48,6 @@ BackgroundTabLoadingPolicy::BackgroundTabLoadingPolicy() - : page_loader_(std::make_unique<mechanism::PageLoader>()) { - DCHECK(!g_background_tab_loading_policy); - g_background_tab_loading_policy = this; -- simultaneous_tab_loads_ = CalculateMaxSimultaneousTabLoads( -- kMinSimultaneousTabLoads, kMaxSimultaneousTabLoads, -- kCoresPerSimultaneousTabLoad, base::SysInfo::NumberOfProcessors()); - } - - BackgroundTabLoadingPolicy::~BackgroundTabLoadingPolicy() { -diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h -index e9ea7180444a..b9187bfb2ae8 100644 ---- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h -+++ b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h -@@ -69,10 +69,6 @@ class BackgroundTabLoadingPolicy : public GraphOwned, - - // The set of PageNodes that are currently loading. - std::vector<const PageNode*> page_nodes_loading_; -- -- // The number of simultaneous tab loads that are permitted by policy. This -- // is computed based on the number of cores on the machine. -- size_t simultaneous_tab_loads_; - }; - - } // namespace policies -diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc -deleted file mode 100644 -index 6ab117bc44c8..000000000000 ---- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc -+++ /dev/null -@@ -1,39 +0,0 @@ --// Copyright 2020 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h" --#include "base/logging.h" -- --namespace performance_manager { -- --namespace policies { -- --size_t CalculateMaxSimultaneousTabLoads(size_t lower_bound, -- size_t upper_bound, -- size_t cores_per_load, -- size_t num_cores) { -- DCHECK(upper_bound == 0 || lower_bound <= upper_bound); -- DCHECK(num_cores > 0); -- -- size_t loads = 0; -- -- // Setting |cores_per_load| == 0 means that no per-core limit is applied. -- if (cores_per_load == 0) { -- loads = std::numeric_limits<size_t>::max(); -- } else { -- loads = num_cores / cores_per_load; -- } -- -- // If |upper_bound| isn't zero then apply the maximum that it implies. -- if (upper_bound != 0) -- loads = std::min(loads, upper_bound); -- -- loads = std::max(loads, lower_bound); -- -- return loads; --} -- --} // namespace policies -- --} // namespace performance_manager -diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h -deleted file mode 100644 -index fae53ab119bd..000000000000 ---- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h -+++ /dev/null -@@ -1,25 +0,0 @@ --// Copyright 2020 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_GRAPH_POLICIES_BACKGROUND_TAB_LOADING_POLICY_HELPERS_H_ --#define CHROME_BROWSER_PERFORMANCE_MANAGER_GRAPH_POLICIES_BACKGROUND_TAB_LOADING_POLICY_HELPERS_H_ -- --#include <stddef.h> -- --namespace performance_manager { -- --namespace policies { -- --// Helper function for BackgroundTabLoadingPolicy to compute the number of --// tabs that can load simultaneously. --size_t CalculateMaxSimultaneousTabLoads(size_t lower_bound, -- size_t upper_bound, -- size_t cores_per_load, -- size_t num_cores); -- --} // namespace policies -- --} // namespace performance_manager -- --#endif // CHROME_BROWSER_PERFORMANCE_MANAGER_GRAPH_POLICIES_BACKGROUND_TAB_LOADING_POLICY_HELPERS_H_ -diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc -deleted file mode 100644 -index 4429a0e982f9..000000000000 ---- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc -+++ /dev/null -@@ -1,54 +0,0 @@ --// Copyright 2020 The Chromium Authors. All rights reserved. --// Use of this source code is governed by a BSD-style license that can be --// found in the LICENSE file. -- --#include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h" -- --#include "testing/gtest/include/gtest/gtest.h" -- --namespace performance_manager { -- --namespace policies { -- --namespace { -- --class BackgroundTabLoadingPolicyHelpersTest : public ::testing::Test {}; -- --} // namespace -- --TEST_F(BackgroundTabLoadingPolicyHelpersTest, -- CalculateMaxSimultaneousTabLoads) { -- // Test the lower bound is enforced. -- EXPECT_EQ(10u, CalculateMaxSimultaneousTabLoads( -- 10 /* lower_bound */, 20 /* upper_bound */, -- 1 /* cores_per_load */, 1 /* cores */)); -- -- // Test the upper bound is enforced. -- EXPECT_EQ(20u, CalculateMaxSimultaneousTabLoads( -- 10 /* lower_bound */, 20 /* upper_bound */, -- 1 /* cores_per_load */, 30 /* cores */)); -- -- // Test the per-core calculation is correct. -- EXPECT_EQ(15u, CalculateMaxSimultaneousTabLoads( -- 10 /* lower_bound */, 20 /* upper_bound */, -- 1 /* cores_per_load */, 15 /* cores */)); -- EXPECT_EQ(15u, CalculateMaxSimultaneousTabLoads( -- 10 /* lower_bound */, 20 /* upper_bound */, -- 2 /* cores_per_load */, 30 /* cores */)); -- -- // If no per-core is specified then upper_bound is returned. -- EXPECT_EQ(5u, CalculateMaxSimultaneousTabLoads( -- 1 /* lower_bound */, 5 /* upper_bound */, -- 0 /* cores_per_load */, 10 /* cores */)); -- -- // If no per-core and no upper_bound is applied, then "upper_bound" is -- // returned. -- EXPECT_EQ( -- std::numeric_limits<size_t>::max(), -- CalculateMaxSimultaneousTabLoads(3 /* lower_bound */, 0 /* upper_bound */, -- 0 /* cores_per_load */, 4 /* cores */)); --} -- --} // namespace policies -- --} // namespace performance_manager -diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn -index 2bce2f66a1ec..f7886e10f3eb 100644 ---- a/chrome/test/BUILD.gn -+++ b/chrome/test/BUILD.gn -@@ -3991,7 +3991,6 @@ test("unit_tests") { - "../browser/performance_manager/graph/policies/urgent_page_discarding_policy_unittest.cc", - - # Background tab loading from performance_manager isn't supported on Android. -- "../browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc", - "../browser/performance_manager/graph/policies/background_tab_loading_policy_unittest.cc", - - # Android does not use the Message Center notification system. --- -2.26.1 - diff --git a/0007-Add-missing-memory-header-in-trust_token_attribute_p.patch b/0007-Add-missing-memory-header-in-trust_token_attribute_p.patch deleted file mode 100644 index 8e919df96f48..000000000000 --- a/0007-Add-missing-memory-header-in-trust_token_attribute_p.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 71b4b6b16053ee3b6d2fb47a80007ca248caa0d7 Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com> -Date: Fri, 17 Apr 2020 02:14:15 +1000 -Subject: [PATCH 7/8] Add missing memory header in - trust_token_attribute_parsing.h - ---- - .../blink/renderer/core/html/trust_token_attribute_parsing.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h -index f5a7ab03892b..ef19cfaf680f 100644 ---- a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h -+++ b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h -@@ -5,6 +5,8 @@ - #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_ - #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_ - -+#include <memory> -+ - #include "base/optional.h" - #include "services/network/public/mojom/trust_tokens.mojom-blink-forward.h" - #include "third_party/blink/renderer/core/core_export.h" --- -2.26.1 - diff --git a/0008-Revert-FragmentItem-Two-fixes-for-outline.patch b/0008-Revert-FragmentItem-Two-fixes-for-outline.patch deleted file mode 100644 index 66acc660bf4e..000000000000 --- a/0008-Revert-FragmentItem-Two-fixes-for-outline.patch +++ /dev/null @@ -1,84 +0,0 @@ -From bcac6dec62f192996a5bc061c140da211fc7e8bf Mon Sep 17 00:00:00 2001 -From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com> -Date: Fri, 17 Apr 2020 02:30:27 +1000 -Subject: [PATCH 8/8] Revert "[FragmentItem] Two fixes for outline" - -This reverts commit a340aadc092315215068045d847516f985b6a9f3. ---- - .../layout/ng/layout_ng_block_flow_mixin.cc | 13 ++----- - .../ng/ng_physical_container_fragment.cc | 34 ------------------- - 2 files changed, 2 insertions(+), 45 deletions(-) - -diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc -index ef990b7ce3fd..4beb7958545c 100644 ---- a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc -+++ b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc -@@ -110,18 +110,9 @@ void LayoutNGBlockFlowMixin<Base>::AddOutlineRects( - To<NGPhysicalBoxFragment>(PaintFragment()->PhysicalFragment()) - .AddSelfOutlineRects(additional_offset, include_block_overflows, - &rects); -- return; -- } -- -- if (const NGPhysicalBoxFragment* fragment = CurrentFragment()) { -- if (fragment->HasItems()) { -- fragment->AddSelfOutlineRects(additional_offset, include_block_overflows, -- &rects); -- return; -- } -+ } else { -+ Base::AddOutlineRects(rects, additional_offset, include_block_overflows); - } -- -- Base::AddOutlineRects(rects, additional_offset, include_block_overflows); - } - - // Retrieve NGBaseline from the current fragment. -diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc -index 82f57612ce45..a2f8092c791a 100644 ---- a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc -+++ b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc -@@ -90,40 +90,6 @@ void NGPhysicalContainerFragment::AddOutlineRectsForNormalChildren( - const PhysicalOffset& additional_offset, - NGOutlineType outline_type, - const LayoutBoxModelObject* containing_block) const { -- if (const auto* box = DynamicTo<NGPhysicalBoxFragment>(this)) { -- if (const NGFragmentItems* items = box->Items()) { -- for (NGInlineCursor cursor(*items); cursor; cursor.MoveToNext()) { -- DCHECK(cursor.Current().Item()); -- const NGFragmentItem& item = *cursor.Current().Item(); -- if (item.Type() == NGFragmentItem::kLine) { -- AddOutlineRectsForDescendant( -- {item.LineBoxFragment(), item.OffsetInContainerBlock()}, -- outline_rects, additional_offset, outline_type, containing_block); -- continue; -- } -- if (item.Type() == NGFragmentItem::kBox) { -- if (const NGPhysicalBoxFragment* child_box = item.BoxFragment()) { -- DCHECK(!child_box->IsOutOfFlowPositioned()); -- AddOutlineRectsForDescendant( -- {child_box, item.OffsetInContainerBlock()}, outline_rects, -- additional_offset, outline_type, containing_block); -- } -- continue; -- } -- DCHECK(item.IsText()); -- } -- // Don't add |Children()|. If |this| has |NGFragmentItems|, children are -- // either line box, which we already handled in items, or OOF, which we -- // should ignore. -- DCHECK(std::all_of(PostLayoutChildren().begin(), -- PostLayoutChildren().end(), [](const NGLink& child) { -- return child->IsLineBox() || -- child->IsOutOfFlowPositioned(); -- })); -- return; -- } -- } -- - for (const auto& child : PostLayoutChildren()) { - // Outlines of out-of-flow positioned descendants are handled in - // NGPhysicalBoxFragment::AddSelfOutlineRects(). --- -2.26.1 - @@ -5,7 +5,7 @@ # Contributor: Daniel J Griffiths <ghost1227@archlinux.us> pkgname=chromium-beta-ozone -pkgver=83.0.4103.14 +pkgver=83.0.4103.23 pkgrel=1 _launcher_ver=6 pkgdesc="Chromium built with patches for wayland support via Ozone (beta channel)" @@ -30,27 +30,11 @@ install=chromium.install source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz chromium-widevine.patch - chromium-skia-harmony.patch - 0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch - 0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch - 0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch - 0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch - 0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch - 0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch - 0007-Add-missing-memory-header-in-trust_token_attribute_p.patch - 0008-Revert-FragmentItem-Two-fixes-for-outline.patch) -sha256sums=('6e3d4853dcbd3c2375a1462a764102f6893c3b0505037e28c04bf90002e526e8' + chromium-skia-harmony.patch) +sha256sums=('929a3d8c5da5066c496ddcc6147aa3c528976a61dca65c9010e625733fa46ee8' '04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1' '709e2fddba3c1f2ed4deb3a239fc0479bfa50c46e054e7f32db4fb1365fed070' - '771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1' - 'c53edc13ca335652608607e628284a79d91f5524d9b5e72a8f2d29b4d7618c75' - 'cf27aa2a98bc71686e3e0f482b720d7d25017158ab2c7d93b548b3578c4b53e2' - '9f2211edf347d54b8167a3b9d773e38aeabce5f98fb1932e7db1aeec845579f6' - '5db92d614aba64e9eb684f35e06f36786b74d5a1456308d4d40a65f12e32f62b' - '52b0129ac7db760078087a2839e257183f10df8e9f831ec07e6cfc8f5ba455eb' - '2b594ff5bc731897274027ddb79a77d247a52ef0990d574ec815b36082ac093a' - '91cc1ac6cd6568de8c45a3fb3c6b57fa9ea6e6ae6f2a05f1ff82677d0cdbdedb' - '771b862e16ff42e0d43d6f0f5fd49d65210732bb0ae19cc4ea18c2220b4cb041') + '771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1') # Possible replacements are listed in build/linux/unbundle/replace_gn_files.py # Keys are the names in the above script; values are the dependencies in Arch @@ -60,7 +44,7 @@ declare -gA _system_libs=( [fontconfig]=fontconfig [freetype]=freetype2 # [harfbuzz-ng]=harfbuzz - [icu]=icu + #[icu]=icu [libdrm]= #[libjpeg]=libjpeg #[libpng]=libpng # https://crbug.com/752403#c10 @@ -69,7 +53,7 @@ declare -gA _system_libs=( [libxml]=libxml2 [libxslt]=libxslt [opus]=opus - [re2]=re2 + #[re2]=re2 [snappy]=snappy [yasm]= [zlib]=minizip @@ -115,15 +99,6 @@ prepare() { # https://crbug.com/skia/6663#c10 patch -Np0 -i ../chromium-skia-harmony.patch - patch -Np1 -i ../0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch - patch -Np1 -i ../0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch - patch -Np1 -i ../0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch - patch -Np1 -i ../0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch - patch -Np1 -i ../0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch - patch -Np1 -i ../0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch - patch -Np1 -i ../0007-Add-missing-memory-header-in-trust_token_attribute_p.patch - patch -Np1 -i ../0008-Revert-FragmentItem-Two-fixes-for-outline.patch - for PATCH in ${_bugfix_patches[@]} do echo "Applying $PATCH" @@ -171,7 +146,6 @@ build() { 'use_gnome_keyring=false' 'use_sysroot=false' 'linux_use_bundled_binutils=false' - 'use_custom_libcxx=false' 'enable_hangout_services_extension=true' 'enable_widevine=true' 'use_ozone=true' |