parent
af0f632a07
commit
df78db8131
@ -1,3 +1,3 @@
|
|||||||
d2e88897fba7702a6ac076290b5e3f6da0381da1 SOURCES/chromium-124.0.6367.201-clean.tar.xz
|
616b1a33cb3076c6f5ea3b082fbcd1a3c9148ffa SOURCES/chromium-125.0.6422.60-clean.tar.xz
|
||||||
7e5d2c7864c5c83ec789b59c77cd9c20d2594916 SOURCES/linux-arm64-0.19.2.tgz
|
7e5d2c7864c5c83ec789b59c77cd9c20d2594916 SOURCES/linux-arm64-0.19.2.tgz
|
||||||
dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
|
dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
SOURCES/chromium-124.0.6367.201-clean.tar.xz
|
SOURCES/chromium-125.0.6422.60-clean.tar.xz
|
||||||
SOURCES/linux-arm64-0.19.2.tgz
|
SOURCES/linux-arm64-0.19.2.tgz
|
||||||
SOURCES/linux-x64-0.19.2.tgz
|
SOURCES/linux-x64-0.19.2.tgz
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,13 @@
|
|||||||
Index: chromium-120.0.6099.71/third_party/skia/src/core/SkRasterPipeline.h
|
Index: chromium-125.0.6422.41/third_party/skia/src/core/SkRasterPipeline.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- chromium-120.0.6099.71.orig/third_party/skia/src/core/SkRasterPipeline.h
|
--- chromium-125.0.6422.41.orig/third_party/skia/src/core/SkRasterPipeline.h
|
||||||
+++ chromium-120.0.6099.71/third_party/skia/src/core/SkRasterPipeline.h
|
+++ chromium-125.0.6422.41/third_party/skia/src/core/SkRasterPipeline.h
|
||||||
@@ -24,7 +24,7 @@ enum SkColorType : int;
|
@@ -27,7 +27,7 @@ struct SkImageInfo;
|
||||||
struct SkImageInfo;
|
|
||||||
struct skcms_TransferFunction;
|
struct skcms_TransferFunction;
|
||||||
|
|
||||||
-#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32)
|
#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && \
|
||||||
+#if __has_cpp_attribute(clang::musttail) && !defined(__EMSCRIPTEN__) && !defined(SK_CPU_ARM32) && !defined(__powerpc64__)
|
- !defined(SK_CPU_LOONGARCH)
|
||||||
|
+ !defined(SK_CPU_LOONGARCH) && !defined(__powerpc64__)
|
||||||
#define SK_HAS_MUSTTAIL 1
|
#define SK_HAS_MUSTTAIL 1
|
||||||
#else
|
#else
|
||||||
#define SK_HAS_MUSTTAIL 0
|
#define SK_HAS_MUSTTAIL 0
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
diff -up chromium-116.0.5845.50/net/filter/brotli_source_stream.cc.system-brotli chromium-116.0.5845.50/net/filter/brotli_source_stream.cc
|
|
||||||
--- chromium-116.0.5845.50/net/filter/brotli_source_stream.cc.system-brotli 2023-07-30 13:06:06.284705823 +0200
|
|
||||||
+++ chromium-116.0.5845.50/net/filter/brotli_source_stream.cc 2023-07-30 13:08:43.398218141 +0200
|
|
||||||
@@ -12,8 +12,8 @@
|
|
||||||
#include "base/memory/raw_ptr.h"
|
|
||||||
#include "base/metrics/histogram_macros.h"
|
|
||||||
#include "net/base/io_buffer.h"
|
|
||||||
-#include "third_party/brotli/include/brotli/decode.h"
|
|
||||||
-#include "third_party/brotli/include/brotli/shared_dictionary.h"
|
|
||||||
+#include <brotli/decode.h>
|
|
||||||
+#include <brotli/shared_dictionary.h>
|
|
||||||
|
|
||||||
namespace net {
|
|
||||||
|
|
||||||
diff -up chromium-116.0.5845.50/net/ssl/cert_compression.cc.system-brotli chromium-116.0.5845.50/net/ssl/cert_compression.cc
|
|
||||||
--- chromium-116.0.5845.50/net/ssl/cert_compression.cc.system-brotli 2023-07-26 17:43:01.000000000 +0200
|
|
||||||
+++ chromium-116.0.5845.50/net/ssl/cert_compression.cc 2023-07-30 13:06:06.284705823 +0200
|
|
||||||
@@ -9,7 +9,7 @@
|
|
||||||
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
|
||||||
|
|
||||||
#if !defined(NET_DISABLE_BROTLI)
|
|
||||||
-#include "third_party/brotli/include/brotli/decode.h"
|
|
||||||
+#include <brotli/decode.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace net {
|
|
||||||
diff -up chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc.system-brotli chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc
|
|
||||||
--- chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc.system-brotli 2023-07-26 17:43:23.000000000 +0200
|
|
||||||
+++ chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc 2023-07-30 13:06:06.284705823 +0200
|
|
||||||
@@ -32,7 +32,7 @@
|
|
||||||
#include "net/filter/gzip_header.h"
|
|
||||||
#include "skia/ext/image_operations.h"
|
|
||||||
#include "third_party/abseil-cpp/absl/types/variant.h"
|
|
||||||
-#include "third_party/brotli/include/brotli/decode.h"
|
|
||||||
+#include <brotli/decode.h>
|
|
||||||
#include "third_party/skia/include/core/SkBitmap.h"
|
|
||||||
#include "third_party/skia/include/core/SkColor.h"
|
|
||||||
#include "third_party/zlib/google/compression_utils.h"
|
|
@ -1,171 +0,0 @@
|
|||||||
commit ce71348a09f6689dd01a68db64b172191d0182d8
|
|
||||||
Author: Andrey Kosyakov <caseq@chromium.org>
|
|
||||||
Date: Thu Dec 21 18:38:38 2023 +0000
|
|
||||||
|
|
||||||
[bindings] Use v8::Array::Iterate for converting script wrappables
|
|
||||||
|
|
||||||
|
|
||||||
This changes CreateIDLSequenceFromV8Array to use the new
|
|
||||||
v8::Array::Iterate() operation.
|
|
||||||
This speeds up the "execBundles" part of the microbenchmark
|
|
||||||
at crbug.com/dawn/1858 by around 3x.
|
|
||||||
This depends on crrev.com/c/4846594 landing (and rolling) first.
|
|
||||||
|
|
||||||
This is a slight re-work of https://crrev.com/c/4847447/3,
|
|
||||||
originally by jkummerow@chromium.org
|
|
||||||
|
|
||||||
Bug: v8:14218, dawn:1858, 1511239
|
|
||||||
Change-Id: Ia266556d05b4d53e6942e12609d1c08882b4ff0f
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5132129
|
|
||||||
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
|
|
||||||
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1240236}
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
|
||||||
index 1e5a0790df6da..a5c28b37e9454 100644
|
|
||||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
|
||||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
|
||||||
@@ -84,6 +84,12 @@ struct NativeValueTraitsBase {
|
|
||||||
std::is_pointer_v<ImplType> ||
|
|
||||||
requires(ImplType value) { value.IsNull(); };
|
|
||||||
|
|
||||||
+ // This should only be true for certain subclasses of ScriptWrappable
|
|
||||||
+ // that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with
|
|
||||||
+ // regards to how NativeValue() is implemented for the underlying type.
|
|
||||||
+ static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
|
|
||||||
+ false;
|
|
||||||
+
|
|
||||||
template <typename... ExtraArgs>
|
|
||||||
static decltype(auto) ArgumentValue(v8::Isolate* isolate,
|
|
||||||
int argument_index,
|
|
||||||
diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
|
||||||
index 5011503dcf1c0..f085b6e905161 100644
|
|
||||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
|
||||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
|
||||||
@@ -1037,10 +1037,86 @@ CreateIDLSequenceFromV8ArraySlow(v8::Isolate* isolate,
|
|
||||||
return {};
|
|
||||||
}
|
|
||||||
|
|
||||||
- typename NativeValueTraits<IDLSequence<T>>::ImplType result;
|
|
||||||
+ using ResultType = typename NativeValueTraits<IDLSequence<T>>::ImplType;
|
|
||||||
+ ResultType result;
|
|
||||||
result.ReserveInitialCapacity(length);
|
|
||||||
v8::Local<v8::Context> current_context = isolate->GetCurrentContext();
|
|
||||||
v8::TryCatch try_block(isolate);
|
|
||||||
+
|
|
||||||
+ // Fast path -- we're creating a sequence of script wrappables, which can be
|
|
||||||
+ // done by directly getting underlying object as long as array types are
|
|
||||||
+ // homogeneous. With ScriptWrappables, we don't expect to enter JS during
|
|
||||||
+ // iteration, so we can rely on v8::Array::Iterate() which is much faster than
|
|
||||||
+ // iterating an array on the client side of the v8. Additionally, for most
|
|
||||||
+ // subsptyes of ScriptWrappables, we can speed up type checks (see more on
|
|
||||||
+ // that below next to supports_scriptwrappable_specific_fast_array_iteration
|
|
||||||
+ // check.
|
|
||||||
+ if constexpr (std::is_base_of_v<ScriptWrappable, T>) {
|
|
||||||
+ struct CallbackData {
|
|
||||||
+ STACK_ALLOCATED();
|
|
||||||
+
|
|
||||||
+ public:
|
|
||||||
+ v8::Isolate* isolate;
|
|
||||||
+ v8::TypecheckWitness witness;
|
|
||||||
+ ResultType& result;
|
|
||||||
+ ExceptionState& exception_state;
|
|
||||||
+ CallbackData(v8::Isolate* isolate,
|
|
||||||
+ ResultType& result,
|
|
||||||
+ ExceptionState& exception_state)
|
|
||||||
+ : isolate(isolate),
|
|
||||||
+ witness(isolate),
|
|
||||||
+ result(result),
|
|
||||||
+ exception_state(exception_state) {}
|
|
||||||
+ };
|
|
||||||
+
|
|
||||||
+ CallbackData callback_data(isolate, result, exception_state);
|
|
||||||
+ v8::Array::IterationCallback callback = [](uint32_t index,
|
|
||||||
+ v8::Local<v8::Value> v8_element,
|
|
||||||
+ void* data) {
|
|
||||||
+ CallbackData* callback_data = reinterpret_cast<CallbackData*>(data);
|
|
||||||
+ // 3.4. Initialize Si to the result of converting nextItem to an IDL value
|
|
||||||
+ // of type T.
|
|
||||||
+ v8::TypecheckWitness& witness = callback_data->witness;
|
|
||||||
+ // We can speed up type check by taking advantage of V8's type witness,
|
|
||||||
+ // provided traits' NativeValue implementation doesn't have additional
|
|
||||||
+ // logic beyond checking the type and calling ToScriptWrappable().
|
|
||||||
+ if constexpr (
|
|
||||||
+ NativeValueTraits<
|
|
||||||
+ T>::supports_scriptwrappable_specific_fast_array_iteration) {
|
|
||||||
+ if (witness.Matches(v8_element)) {
|
|
||||||
+ auto&& value = ToScriptWrappable(v8_element.As<v8::Object>())
|
|
||||||
+ ->template ToImpl<T>();
|
|
||||||
+ callback_data->result.push_back(std::move(value));
|
|
||||||
+ return v8::Array::CallbackResult::kContinue;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ auto&& element = NativeValueTraits<T>::NativeValue(
|
|
||||||
+ callback_data->isolate, v8_element, callback_data->exception_state);
|
|
||||||
+ if (callback_data->exception_state.HadException()) {
|
|
||||||
+ // It doesn't matter whether we return `kException` or `kBreak` here,
|
|
||||||
+ // as that only affects the return value of `v8_array->Iterate()`,
|
|
||||||
+ // which we are ignoring.
|
|
||||||
+ return v8::Array::CallbackResult::kException;
|
|
||||||
+ }
|
|
||||||
+ if constexpr (
|
|
||||||
+ NativeValueTraits<
|
|
||||||
+ T>::supports_scriptwrappable_specific_fast_array_iteration) {
|
|
||||||
+ witness.Update(v8_element);
|
|
||||||
+ }
|
|
||||||
+ callback_data->result.push_back(std::move(element));
|
|
||||||
+ return v8::Array::CallbackResult::kContinue;
|
|
||||||
+ };
|
|
||||||
+ if (!v8_array->Iterate(current_context, callback, &callback_data)
|
|
||||||
+ .IsJust()) {
|
|
||||||
+ if (try_block.HasCaught()) {
|
|
||||||
+ exception_state.RethrowV8Exception(try_block.Exception());
|
|
||||||
+ }
|
|
||||||
+ DCHECK(exception_state.HadException());
|
|
||||||
+ return {};
|
|
||||||
+ }
|
|
||||||
+ return result;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
// Array length may change if array is mutated during iteration.
|
|
||||||
for (uint32_t i = 0; i < v8_array->Length(); ++i) {
|
|
||||||
v8::Local<v8::Value> v8_element;
|
|
||||||
@@ -1056,6 +1132,7 @@ CreateIDLSequenceFromV8ArraySlow(v8::Isolate* isolate,
|
|
||||||
return {};
|
|
||||||
result.push_back(std::move(element));
|
|
||||||
}
|
|
||||||
+
|
|
||||||
// 3.2. If next is false, then return an IDL sequence value of type
|
|
||||||
// sequence<T> of length i, where the value of the element at index j is Sj.
|
|
||||||
return result;
|
|
||||||
@@ -1398,6 +1475,7 @@ struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
+// Interface types
|
|
||||||
template <typename T>
|
|
||||||
requires std::derived_from<T, CallbackInterfaceBase>
|
|
||||||
struct NativeValueTraits<IDLNullable<T>>
|
|
||||||
@@ -1470,12 +1548,21 @@ struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
|
|
||||||
template <typename T>
|
|
||||||
requires std::derived_from<T, ScriptWrappable>
|
|
||||||
struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
|
||||||
+ // This signifies that CreateIDLSequenceFromV8ArraySlow() may apply
|
|
||||||
+ // certain optimization based on assumptions about `NativeValue()`
|
|
||||||
+ // implementation below. For subclasses of ScriptWrappable that have
|
|
||||||
+ // different implementation of NativeValue(), this should remain false.
|
|
||||||
+ static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
|
|
||||||
+ true;
|
|
||||||
+
|
|
||||||
static inline T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
const WrapperTypeInfo* wrapper_type_info = T::GetStaticWrapperTypeInfo();
|
|
||||||
- if (V8PerIsolateData::From(isolate)->HasInstance(wrapper_type_info, value))
|
|
||||||
+ if (V8PerIsolateData::From(isolate)->HasInstance(wrapper_type_info,
|
|
||||||
+ value)) {
|
|
||||||
return ToScriptWrappable(value.As<v8::Object>())->template ToImpl<T>();
|
|
||||||
+ }
|
|
||||||
|
|
||||||
bindings::NativeValueTraitsInterfaceNotOfType(wrapper_type_info,
|
|
||||||
exception_state);
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists chromium-122.0.6261.29/media/base/media_switches.cc
|
|
||||||
--- chromium-122.0.6261.29/media/base/media_switches.cc.disable-FFmpegAllowLists 2024-02-12 15:56:50.703196471 +0100
|
|
||||||
+++ chromium-122.0.6261.29/media/base/media_switches.cc 2024-02-12 17:08:42.266076401 +0100
|
|
||||||
@@ -1687,7 +1687,7 @@ BASE_FEATURE(kUseWindowBoundsForPip,
|
|
||||||
// Enables FFmpeg allow lists for supported codecs / containers.
|
|
||||||
BASE_FEATURE(kFFmpegAllowLists,
|
|
||||||
"FFmpegAllowLists",
|
|
||||||
- base::FEATURE_ENABLED_BY_DEFAULT);
|
|
||||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
|
||||||
|
|
||||||
// Enables sending MediaLog to the log stream, which is useful for easier
|
|
||||||
// development by ensuring logs can be seen without a remote desktop session.
|
|
@ -1,169 +0,0 @@
|
|||||||
diff -up chromium-122.0.6261.29/base/check_op.h.missing-header-files chromium-122.0.6261.29/base/check_op.h
|
|
||||||
--- chromium-122.0.6261.29/base/check_op.h.missing-header-files 2024-02-07 19:49:20.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/base/check_op.h 2024-02-12 14:59:48.136415060 +0100
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
#ifndef BASE_CHECK_OP_H_
|
|
||||||
#define BASE_CHECK_OP_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <cstddef>
|
|
||||||
#include <string>
|
|
||||||
#include <string_view>
|
|
||||||
diff -up chromium-122.0.6261.29/base/containers/flat_map.h.missing-header-files chromium-122.0.6261.29/base/containers/flat_map.h
|
|
||||||
--- chromium-122.0.6261.29/base/containers/flat_map.h.missing-header-files 2024-02-07 19:49:20.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/base/containers/flat_map.h 2024-02-12 14:59:48.136415060 +0100
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
|
|
||||||
#define BASE_CONTAINERS_FLAT_MAP_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <functional>
|
|
||||||
#include <tuple>
|
|
||||||
#include <type_traits>
|
|
||||||
diff -up chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h
|
|
||||||
--- chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h.missing-header-files 2024-02-12 14:59:48.137415079 +0100
|
|
||||||
+++ chromium-122.0.6261.29/chrome/browser/webauthn/authenticator_request_dialog_model.h 2024-02-12 15:28:17.168395787 +0100
|
|
||||||
@@ -9,6 +9,7 @@
|
|
||||||
#include <optional>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
+#include <variant>
|
|
||||||
|
|
||||||
#include "base/containers/span.h"
|
|
||||||
#include "base/functional/callback_forward.h"
|
|
||||||
diff -up chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc
|
|
||||||
--- chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc.missing-header-files 2024-02-07 19:49:27.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/chrome/test/chromedriver/chrome/web_view_impl.cc 2024-02-12 14:59:48.137415079 +0100
|
|
||||||
@@ -11,6 +11,7 @@
|
|
||||||
#include <queue>
|
|
||||||
#include <utility>
|
|
||||||
#include <vector>
|
|
||||||
+#include <cstring>
|
|
||||||
|
|
||||||
#include "base/check.h"
|
|
||||||
#include "base/files/file_path.h"
|
|
||||||
diff -up chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h
|
|
||||||
--- chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h.missing-header-files 2024-02-07 19:49:30.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/components/feature_engagement/internal/never_event_storage_validator.h 2024-02-12 14:59:48.138415097 +0100
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
|
||||||
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <string>
|
|
||||||
|
|
||||||
#include "components/feature_engagement/internal/event_storage_validator.h"
|
|
||||||
diff -up chromium-122.0.6261.29/gin/time_clamper.h.missing-header-files chromium-122.0.6261.29/gin/time_clamper.h
|
|
||||||
--- chromium-122.0.6261.29/gin/time_clamper.h.missing-header-files 2024-02-07 19:49:35.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/gin/time_clamper.h 2024-02-12 14:59:48.138415097 +0100
|
|
||||||
@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper {
|
|
||||||
const int64_t micros = now_micros % 1000;
|
|
||||||
// abs() is necessary for devices with times before unix-epoch (most likely
|
|
||||||
// configured incorrectly).
|
|
||||||
- if (abs(micros) + kResolutionMicros < 1000) {
|
|
||||||
+ if (std::abs(micros) + kResolutionMicros < 1000) {
|
|
||||||
return now_micros / 1000;
|
|
||||||
}
|
|
||||||
return ClampTimeResolution(now_micros) / 1000;
|
|
||||||
diff -up chromium-122.0.6261.29/net/base/net_export.h.missing-header-files chromium-122.0.6261.29/net/base/net_export.h
|
|
||||||
--- chromium-122.0.6261.29/net/base/net_export.h.missing-header-files 2024-02-07 19:49:38.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/net/base/net_export.h 2024-02-12 14:59:48.139415116 +0100
|
|
||||||
@@ -5,6 +5,8 @@
|
|
||||||
#ifndef NET_BASE_NET_EXPORT_H_
|
|
||||||
#define NET_BASE_NET_EXPORT_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
+
|
|
||||||
// Defines NET_EXPORT so that functionality implemented by the net module can
|
|
||||||
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
|
|
||||||
// access features not intended to be used directly by real consumers.
|
|
||||||
diff -up chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h
|
|
||||||
--- chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h.missing-header-files 2024-02-07 19:49:40.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/third_party/abseil-cpp/absl/strings/string_view.h 2024-02-12 14:59:48.142415172 +0100
|
|
||||||
@@ -27,6 +27,7 @@
|
|
||||||
#ifndef ABSL_STRINGS_STRING_VIEW_H_
|
|
||||||
#define ABSL_STRINGS_STRING_VIEW_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cassert>
|
|
||||||
#include <cstddef>
|
|
||||||
diff -up chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h
|
|
||||||
--- chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h.missing-header-files 2024-02-07 19:50:44.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/third_party/dawn/src/tint/lang/spirv/reader/ast_parser/namer.h 2024-02-12 14:59:48.142415172 +0100
|
|
||||||
@@ -28,6 +28,7 @@
|
|
||||||
#ifndef SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
|
|
||||||
#define SRC_TINT_LANG_SPIRV_READER_AST_PARSER_NAMER_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <string>
|
|
||||||
#include <unordered_map>
|
|
||||||
#include <vector>
|
|
||||||
diff -up chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
|
|
||||||
--- chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.missing-header-files 2024-02-07 19:54:45.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2024-02-12 14:59:48.143415190 +0100
|
|
||||||
@@ -45,6 +45,7 @@
|
|
||||||
#include "llvm/Support/SaveAndRestore.h"
|
|
||||||
#include "llvm/Support/raw_ostream.h"
|
|
||||||
#include <algorithm>
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <string>
|
|
||||||
#include <sysexits.h>
|
|
||||||
#ifdef HAVE_BACKTRACE
|
|
||||||
diff -up chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
|
|
||||||
--- chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.missing-header-files 2024-02-07 19:53:17.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2024-02-12 14:59:48.143415190 +0100
|
|
||||||
@@ -31,6 +31,7 @@ limitations under the License.
|
|
||||||
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
|
||||||
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <complex>
|
|
||||||
#include <deque>
|
|
||||||
#include <vector>
|
|
||||||
diff -up chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
|
|
||||||
--- chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.missing-header-files 2024-02-07 19:54:20.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2024-02-12 14:59:48.145415228 +0100
|
|
||||||
@@ -2884,6 +2884,7 @@ static void vma_aligned_free(void* VMA_N
|
|
||||||
|
|
||||||
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
|
|
||||||
#if VMA_STATS_STRING_ENABLED
|
|
||||||
+#include <stdio.h>
|
|
||||||
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
|
|
||||||
{
|
|
||||||
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
|
|
||||||
diff -up chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc
|
|
||||||
--- chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc.missing-header-files 2024-02-07 19:53:17.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/third_party/webrtc/audio/utility/channel_mixer.cc 2024-02-12 14:59:48.145415228 +0100
|
|
||||||
@@ -8,6 +8,8 @@
|
|
||||||
* be found in the AUTHORS file in the root of the source tree.
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#include <cstring>
|
|
||||||
+
|
|
||||||
#include "audio/utility/channel_mixer.h"
|
|
||||||
|
|
||||||
#include "audio/utility/channel_mixing_matrix.h"
|
|
||||||
diff -up chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h
|
|
||||||
--- chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h.missing-header-files 2024-02-07 19:53:17.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/third_party/webrtc/modules/include/module_common_types_public.h 2024-02-12 14:59:48.145415228 +0100
|
|
||||||
@@ -11,6 +11,7 @@
|
|
||||||
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
|
||||||
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
#include <limits>
|
|
||||||
|
|
||||||
#include "absl/types/optional.h"
|
|
||||||
diff -up chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h.missing-header-files chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h
|
|
||||||
--- chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h.missing-header-files 2024-02-07 19:50:05.000000000 +0100
|
|
||||||
+++ chromium-122.0.6261.29/ui/gfx/linux/drm_util_linux.h 2024-02-12 14:59:48.147415265 +0100
|
|
||||||
@@ -9,6 +9,8 @@
|
|
||||||
|
|
||||||
#include "ui/gfx/buffer_types.h"
|
|
||||||
|
|
||||||
+#include <cstdint>
|
|
||||||
+
|
|
||||||
namespace ui {
|
|
||||||
|
|
||||||
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
|
|
@ -1,733 +0,0 @@
|
|||||||
commit 940af9f2c87b436559b97c53763aa9eaaf1254eb
|
|
||||||
Author: Jeremy Roman <jbroman@chromium.org>
|
|
||||||
Date: Wed Nov 15 16:24:54 2023 +0000
|
|
||||||
|
|
||||||
Use C++20 features to simplify blink::NativeValueTraitsBase.
|
|
||||||
|
|
||||||
These allow some of the metaprogramming bits to be simplified a little.
|
|
||||||
|
|
||||||
Change-Id: I052b4397586d21348401616e1792afdb9662f975
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5030335
|
|
||||||
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
|
||||||
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#1224978}
|
|
||||||
|
|
||||||
diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
|
||||||
index 7fc91d14acc71..1e5a0790df6da 100644
|
|
||||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
|
||||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
|
|
||||||
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
|
|
||||||
|
|
||||||
+#include <concepts>
|
|
||||||
#include <type_traits>
|
|
||||||
|
|
||||||
#include "third_party/blink/renderer/bindings/core/v8/idl_types_base.h"
|
|
||||||
@@ -30,7 +31,7 @@ class ExceptionState;
|
|
||||||
// return toInt32(isolate, value, exceptionState, NormalConversion);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
-template <typename T, typename SFINAEHelper = void>
|
|
||||||
+template <typename T>
|
|
||||||
struct NativeValueTraits;
|
|
||||||
|
|
||||||
// This declaration serves only as a blueprint for specializations: the
|
|
||||||
@@ -45,22 +46,15 @@ struct NativeValueTraits;
|
|
||||||
|
|
||||||
namespace bindings {
|
|
||||||
|
|
||||||
-template <typename T, typename = void>
|
|
||||||
-struct NativeValueTraitsHasIsNull : std::false_type {};
|
|
||||||
-
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraitsHasIsNull<
|
|
||||||
- T,
|
|
||||||
- std::void_t<decltype(std::declval<T>().IsNull())>> : std::true_type {};
|
|
||||||
+struct ImplTypeFor {
|
|
||||||
+ using type = T;
|
|
||||||
+};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraitsHasNullValue {
|
|
||||||
- // true if |T| supports IDL null value.
|
|
||||||
- static constexpr bool value =
|
|
||||||
- // ScriptValue, String, and union types have IsNull member function.
|
|
||||||
- bindings::NativeValueTraitsHasIsNull<T>::value ||
|
|
||||||
- // Pointer types have nullptr as IDL null value.
|
|
||||||
- std::is_pointer<T>::value;
|
|
||||||
+ requires std::derived_from<T, IDLBase>
|
|
||||||
+struct ImplTypeFor<T> {
|
|
||||||
+ using type = typename T::ImplType;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace bindings
|
|
||||||
@@ -78,37 +72,17 @@ struct NativeValueTraitsHasNullValue {
|
|
||||||
// If present, |NullValue()| will be used when converting from the nullable type
|
|
||||||
// T?, and should be used if the impl type has an existing "null" state. If not
|
|
||||||
// present, WTF::Optional will be used to wrap the type.
|
|
||||||
-template <typename T, typename SFINAEHelper = void>
|
|
||||||
-struct NativeValueTraitsBase {
|
|
||||||
- STATIC_ONLY(NativeValueTraitsBase);
|
|
||||||
-
|
|
||||||
- using ImplType = T;
|
|
||||||
-
|
|
||||||
- static constexpr bool has_null_value =
|
|
||||||
- bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
|
||||||
-
|
|
||||||
- template <typename... ExtraArgs>
|
|
||||||
- static decltype(auto) ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state,
|
|
||||||
- ExtraArgs... extra_args) {
|
|
||||||
- return NativeValueTraits<std::remove_pointer_t<T>>::NativeValue(
|
|
||||||
- isolate, value, exception_state,
|
|
||||||
- std::forward<ExtraArgs>(extra_args)...);
|
|
||||||
- }
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraitsBase<
|
|
||||||
- T,
|
|
||||||
- std::enable_if_t<std::is_base_of<IDLBase, T>::value>> {
|
|
||||||
+struct NativeValueTraitsBase {
|
|
||||||
STATIC_ONLY(NativeValueTraitsBase);
|
|
||||||
|
|
||||||
- using ImplType = typename T::ImplType;
|
|
||||||
+ using ImplType = bindings::ImplTypeFor<T>::type;
|
|
||||||
|
|
||||||
+ // Pointer types have nullptr as IDL null value.
|
|
||||||
+ // ScriptValue, String, and union types have IsNull member function.
|
|
||||||
static constexpr bool has_null_value =
|
|
||||||
- bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
|
||||||
+ std::is_pointer_v<ImplType> ||
|
|
||||||
+ requires(ImplType value) { value.IsNull(); };
|
|
||||||
|
|
||||||
template <typename... ExtraArgs>
|
|
||||||
static decltype(auto) ArgumentValue(v8::Isolate* isolate,
|
|
||||||
diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc b/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
|
||||||
index 508ea6d8eea48..18de71d84023f 100644
|
|
||||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
|
||||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
#include "third_party/blink/renderer/core/core_export.h"
|
|
||||||
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
|
|
||||||
#include "third_party/blink/renderer/core/frame/web_feature.h"
|
|
||||||
+#include "third_party/blink/renderer/core/typed_arrays/flexible_array_buffer_view.h"
|
|
||||||
#include "third_party/blink/renderer/core/typed_arrays/typed_flexible_array_buffer_view.h"
|
|
||||||
|
|
||||||
namespace blink {
|
|
||||||
@@ -698,12 +699,11 @@ DOMArrayBufferBase* NativeValueTraits<
|
|
||||||
// ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-NotShared<T> NativeValueTraits<
|
|
||||||
- NotShared<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- NativeValue(v8::Isolate* isolate,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+NotShared<T> NativeValueTraits<NotShared<T>>::NativeValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return NativeValueImpl<
|
|
||||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
|
||||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -712,13 +712,12 @@ NotShared<T> NativeValueTraits<
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-NotShared<T> NativeValueTraits<
|
|
||||||
- NotShared<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+NotShared<T> NativeValueTraits<NotShared<T>>::ArgumentValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<
|
|
||||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
|
||||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -729,12 +728,11 @@ NotShared<T> NativeValueTraits<
|
|
||||||
// [AllowShared] ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-MaybeShared<T> NativeValueTraits<
|
|
||||||
- MaybeShared<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- NativeValue(v8::Isolate* isolate,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+MaybeShared<T> NativeValueTraits<MaybeShared<T>>::NativeValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
|
|
||||||
ToDOMViewType<T, kMaybeShared>,
|
|
||||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -743,13 +741,12 @@ MaybeShared<T> NativeValueTraits<
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-MaybeShared<T> NativeValueTraits<
|
|
||||||
- MaybeShared<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+MaybeShared<T> NativeValueTraits<MaybeShared<T>>::ArgumentValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
|
|
||||||
ToDOMViewType<T, kMaybeShared>,
|
|
||||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -760,12 +757,12 @@ MaybeShared<T> NativeValueTraits<
|
|
||||||
// [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-MaybeShared<T> NativeValueTraits<
|
|
||||||
- IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- NativeValue(v8::Isolate* isolate,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+MaybeShared<T>
|
|
||||||
+NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>::NativeValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return NativeValueImpl<
|
|
||||||
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
|
|
||||||
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
|
|
||||||
@@ -774,13 +771,12 @@ MaybeShared<T> NativeValueTraits<
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-MaybeShared<T> NativeValueTraits<
|
|
||||||
- IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+MaybeShared<T> NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<
|
|
||||||
+ MaybeShared<T>>>::ArgumentValue(v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<
|
|
||||||
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
|
|
||||||
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
|
|
||||||
@@ -791,12 +787,11 @@ MaybeShared<T> NativeValueTraits<
|
|
||||||
// Nullable ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-NotShared<T> NativeValueTraits<
|
|
||||||
- IDLNullable<NotShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- NativeValue(v8::Isolate* isolate,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::NativeValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return NativeValueImpl<
|
|
||||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
|
||||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -805,13 +800,12 @@ NotShared<T> NativeValueTraits<
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-NotShared<T> NativeValueTraits<
|
|
||||||
- IDLNullable<NotShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::ArgumentValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<
|
|
||||||
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
|
||||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -822,12 +816,11 @@ NotShared<T> NativeValueTraits<
|
|
||||||
// Nullable [AllowShared] ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-MaybeShared<T> NativeValueTraits<
|
|
||||||
- IDLNullable<MaybeShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- NativeValue(v8::Isolate* isolate,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::NativeValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
|
|
||||||
ToDOMViewType<T, kMaybeShared>,
|
|
||||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -836,13 +829,12 @@ MaybeShared<T> NativeValueTraits<
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-MaybeShared<T> NativeValueTraits<
|
|
||||||
- IDLNullable<MaybeShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::ArgumentValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
|
|
||||||
ToDOMViewType<T, kMaybeShared>,
|
|
||||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
|
||||||
@@ -853,9 +845,9 @@ MaybeShared<T> NativeValueTraits<
|
|
||||||
// Nullable [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-MaybeShared<T> NativeValueTraits<
|
|
||||||
- IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+MaybeShared<T>
|
|
||||||
+NativeValueTraits<IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>::
|
|
||||||
ArgumentValue(v8::Isolate* isolate,
|
|
||||||
int argument_index,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -870,13 +862,11 @@ MaybeShared<T> NativeValueTraits<
|
|
||||||
// [AllowShared, FlexibleArrayBufferView] ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-T NativeValueTraits<T,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, FlexibleArrayBufferView>
|
|
||||||
+T NativeValueTraits<T>::ArgumentValue(v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
|
|
||||||
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
|
||||||
ResizableAllowance::kDisallowResizable,
|
|
||||||
@@ -888,13 +878,12 @@ T NativeValueTraits<T,
|
|
||||||
// ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, FlexibleArrayBufferView>
|
|
||||||
+T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>::ArgumentValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<
|
|
||||||
RecipeTrait<T>, ToFlexibleArrayBufferView, Nullablity::kIsNotNullable,
|
|
||||||
BufferSizeCheck::kDoNotCheck, ResizableAllowance::kDisallowResizable,
|
|
||||||
@@ -905,13 +894,12 @@ T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>,
|
|
||||||
// Nullable [AllowShared, FlexibleArrayBufferView] ArrayBufferView
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-T NativeValueTraits<IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
|
||||||
- ArgumentValue(v8::Isolate* isolate,
|
|
||||||
- int argument_index,
|
|
||||||
- v8::Local<v8::Value> value,
|
|
||||||
- ExceptionState& exception_state) {
|
|
||||||
+ requires std::derived_from<T, FlexibleArrayBufferView>
|
|
||||||
+T NativeValueTraits<IDLNullable<T>>::ArgumentValue(
|
|
||||||
+ v8::Isolate* isolate,
|
|
||||||
+ int argument_index,
|
|
||||||
+ v8::Local<v8::Value> value,
|
|
||||||
+ ExceptionState& exception_state) {
|
|
||||||
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
|
|
||||||
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
|
||||||
ResizableAllowance::kDisallowResizable,
|
|
||||||
diff --git a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
|
||||||
index 899929dcf49f9..5011503dcf1c0 100644
|
|
||||||
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
|
||||||
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
|
||||||
@@ -715,9 +718,8 @@ struct CORE_EXPORT NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+struct NativeValueTraits<T> {
|
|
||||||
// NotShared<T> or MaybeShared<T> should be used instead.
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -729,9 +731,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+struct NativeValueTraits<IDLNullable<T>> {
|
|
||||||
// NotShared<T> or MaybeShared<T> should be used instead.
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -743,9 +744,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- NotShared<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+struct NativeValueTraits<NotShared<T>>
|
|
||||||
: public NativeValueTraitsBase<NotShared<T>> {
|
|
||||||
static NotShared<T> NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -758,9 +758,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<NotShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+struct NativeValueTraits<IDLNullable<NotShared<T>>>
|
|
||||||
: public NativeValueTraitsBase<NotShared<T>> {
|
|
||||||
static NotShared<T> NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -773,9 +772,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- MaybeShared<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+struct NativeValueTraits<MaybeShared<T>>
|
|
||||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
|
||||||
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -788,9 +786,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>
|
|
||||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
|
||||||
// FlexibleArrayBufferView uses this in its implementation, so we cannot
|
|
||||||
// delete it.
|
|
||||||
@@ -805,9 +802,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<MaybeShared<T>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
+struct NativeValueTraits<IDLNullable<MaybeShared<T>>>
|
|
||||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
|
||||||
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -820,9 +816,9 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
+ requires std::derived_from<T, DOMArrayBufferView>
|
|
||||||
struct NativeValueTraits<
|
|
||||||
- IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
|
||||||
+ IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>
|
|
||||||
: public NativeValueTraitsBase<MaybeShared<T>> {
|
|
||||||
// BufferSourceTypeNoSizeLimit must be used only as arguments.
|
|
||||||
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
|
||||||
@@ -836,11 +832,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T> {
|
|
||||||
+ requires std::derived_from<T, FlexibleArrayBufferView>
|
|
||||||
+struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
|
|
||||||
// FlexibleArrayBufferView must be used only as arguments.
|
|
||||||
static T NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -853,10 +846,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLBufferSourceTypeNoSizeLimit<T>,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
|
||||||
+ requires std::derived_from<T, FlexibleArrayBufferView>
|
|
||||||
+struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>
|
|
||||||
: public NativeValueTraitsBase<T> {
|
|
||||||
// BufferSourceTypeNoSizeLimit and FlexibleArrayBufferView must be used only
|
|
||||||
// as arguments.
|
|
||||||
@@ -871,11 +862,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T> {
|
|
||||||
+ requires std::derived_from<T, FlexibleArrayBufferView>
|
|
||||||
+struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T> {
|
|
||||||
// FlexibleArrayBufferView must be used only as arguments.
|
|
||||||
static T NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -1134,9 +1122,8 @@ NativeValueTraits<IDLSequence<T>>::NativeValue(
|
|
||||||
}
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<IDLNullable<IDLSequence<T>>,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- NativeValueTraits<IDLSequence<T>>::has_null_value>>
|
|
||||||
+ requires NativeValueTraits<IDLSequence<T>>::has_null_value
|
|
||||||
+struct NativeValueTraits<IDLNullable<IDLSequence<T>>>
|
|
||||||
: public NativeValueTraitsBase<HeapVector<AddMemberIfNeeded<T>>*> {
|
|
||||||
using ImplType = typename NativeValueTraits<IDLSequence<T>>::ImplType*;
|
|
||||||
|
|
||||||
@@ -1203,9 +1190,8 @@ struct NativeValueTraits<IDLArray<T>>
|
|
||||||
: public NativeValueTraits<IDLSequence<T>> {};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<IDLNullable<IDLArray<T>>,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- NativeValueTraits<IDLSequence<T>>::has_null_value>>
|
|
||||||
+ requires NativeValueTraits<IDLSequence<T>>::has_null_value
|
|
||||||
+struct NativeValueTraits<IDLNullable<IDLArray<T>>>
|
|
||||||
: public NativeValueTraits<IDLNullable<IDLSequence<T>>> {};
|
|
||||||
|
|
||||||
// Record types
|
|
||||||
@@ -1335,10 +1321,8 @@ struct NativeValueTraits<IDLRecord<K, V>>
|
|
||||||
|
|
||||||
// Callback function types
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T*> {
|
|
||||||
+ requires std::derived_from<T, CallbackFunctionBase>
|
|
||||||
+struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1361,9 +1345,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
|
|
||||||
+ requires std::derived_from<T, CallbackFunctionBase>
|
|
||||||
+struct NativeValueTraits<IDLNullable<T>>
|
|
||||||
: public NativeValueTraitsBase<IDLNullable<T>> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -1392,10 +1375,8 @@ struct NativeValueTraits<
|
|
||||||
|
|
||||||
// Callback interface types
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T*> {
|
|
||||||
+ requires std::derived_from<T, CallbackInterfaceBase>
|
|
||||||
+struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1418,9 +1399,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
|
|
||||||
+ requires std::derived_from<T, CallbackInterfaceBase>
|
|
||||||
+struct NativeValueTraits<IDLNullable<T>>
|
|
||||||
: public NativeValueTraitsBase<IDLNullable<T>> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -1449,11 +1429,8 @@ struct NativeValueTraits<
|
|
||||||
|
|
||||||
// Dictionary types
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<bindings::DictionaryBase, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T*> {
|
|
||||||
+ requires std::derived_from<T, bindings::DictionaryBase>
|
|
||||||
+struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1464,14 +1441,11 @@ struct NativeValueTraits<
|
|
||||||
// We don't support nullable dictionary types in general since it's quite
|
|
||||||
// confusing and often misused.
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<bindings::DictionaryBase, T>::value &&
|
|
||||||
- (std::is_same<T, GPUColorTargetState>::value ||
|
|
||||||
- std::is_same<T, GPURenderPassColorAttachment>::value ||
|
|
||||||
- std::is_same<T, GPUVertexBufferLayout>::value)>>
|
|
||||||
- : public NativeValueTraitsBase<T*> {
|
|
||||||
+ requires std::derived_from<T, bindings::DictionaryBase> &&
|
|
||||||
+ (std::same_as<T, GPUColorTargetState> ||
|
|
||||||
+ std::same_as<T, GPURenderPassColorAttachment> ||
|
|
||||||
+ std::same_as<T, GPUVertexBufferLayout>)
|
|
||||||
+struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1483,11 +1457,8 @@ struct NativeValueTraits<
|
|
||||||
|
|
||||||
// Enumeration types
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<
|
|
||||||
- std::is_base_of<bindings::EnumerationBase, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T> {
|
|
||||||
+ requires std::derived_from<T, bindings::EnumerationBase>
|
|
||||||
+struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
|
|
||||||
static T NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1497,10 +1468,8 @@ struct NativeValueTraits<
|
|
||||||
|
|
||||||
// Interface types
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T*> {
|
|
||||||
+ requires std::derived_from<T, ScriptWrappable>
|
|
||||||
+struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
|
||||||
static inline T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1528,9 +1497,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
|
||||||
+ requires std::derived_from<T, ScriptWrappable>
|
|
||||||
+struct NativeValueTraits<IDLNullable<T>>
|
|
||||||
: public NativeValueTraitsBase<IDLNullable<T>> {
|
|
||||||
static inline T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
@@ -1565,10 +1533,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- T,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T*> {
|
|
||||||
+ requires std::derived_from<T, bindings::UnionBase>
|
|
||||||
+struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1584,10 +1550,8 @@ struct NativeValueTraits<
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<T>,
|
|
||||||
- typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
|
|
||||||
- : public NativeValueTraitsBase<T*> {
|
|
||||||
+ requires std::derived_from<T, bindings::UnionBase>
|
|
||||||
+struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
|
|
||||||
static T* NativeValue(v8::Isolate* isolate,
|
|
||||||
v8::Local<v8::Value> value,
|
|
||||||
ExceptionState& exception_state) {
|
|
||||||
@@ -1608,9 +1572,8 @@ struct NativeValueTraits<
|
|
||||||
|
|
||||||
// Nullable types
|
|
||||||
template <typename InnerType>
|
|
||||||
-struct NativeValueTraits<
|
|
||||||
- IDLNullable<InnerType>,
|
|
||||||
- typename std::enable_if_t<!NativeValueTraits<InnerType>::has_null_value>>
|
|
||||||
+ requires(!NativeValueTraits<InnerType>::has_null_value)
|
|
||||||
+struct NativeValueTraits<IDLNullable<InnerType>>
|
|
||||||
: public NativeValueTraitsBase<IDLNullable<InnerType>> {
|
|
||||||
// https://webidl.spec.whatwg.org/#es-nullable-type
|
|
||||||
using ImplType =
|
|
||||||
@@ -1642,9 +1605,8 @@ struct NativeValueTraits<IDLNullable<IDLNullable<T>>>;
|
|
||||||
|
|
||||||
// Optional types
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<IDLOptional<T>,
|
|
||||||
- typename std::enable_if_t<std::is_arithmetic<
|
|
||||||
- typename NativeValueTraits<T>::ImplType>::value>>
|
|
||||||
+ requires std::is_arithmetic_v<typename NativeValueTraits<T>::ImplType>
|
|
||||||
+struct NativeValueTraits<IDLOptional<T>>
|
|
||||||
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
|
|
||||||
using ImplType = typename NativeValueTraits<T>::ImplType;
|
|
||||||
|
|
||||||
@@ -1666,9 +1628,8 @@ struct NativeValueTraits<IDLOptional<T>,
|
|
||||||
};
|
|
||||||
|
|
||||||
template <typename T>
|
|
||||||
-struct NativeValueTraits<IDLOptional<T>,
|
|
||||||
- typename std::enable_if_t<std::is_pointer<
|
|
||||||
- typename NativeValueTraits<T>::ImplType>::value>>
|
|
||||||
+ requires std::is_pointer_v<typename NativeValueTraits<T>::ImplType>
|
|
||||||
+struct NativeValueTraits<IDLOptional<T>>
|
|
||||||
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
|
|
||||||
using ImplType = typename NativeValueTraits<T>::ImplType;
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
|||||||
diff -up chromium-124.0.6367.118/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp.me chromium-124.0.6367.118/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp
|
|
||||||
--- chromium-124.0.6367.118/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp.me 2024-05-05 17:29:38.907559210 +0200
|
|
||||||
+++ chromium-124.0.6367.118/third_party/angle/src/libANGLE/renderer/vulkan/FramebufferVk.cpp 2024-05-05 17:51:26.665080742 +0200
|
|
||||||
@@ -1726,10 +1726,10 @@ angle::Result FramebufferVk::generateFra
|
|
||||||
for (uint32_t point = 0; point < activeFocalPoints.size(); point++)
|
|
||||||
{
|
|
||||||
float density =
|
|
||||||
- 1.0f / std::max(std::powf(activeFocalPoints[point].focalX - px, 2) *
|
|
||||||
- std::powf(activeFocalPoints[point].gainX, 2) +
|
|
||||||
- std::powf(activeFocalPoints[point].focalY - py, 2) *
|
|
||||||
- std::powf(activeFocalPoints[point].gainY, 2) -
|
|
||||||
+ 1.0f / std::max(powf(activeFocalPoints[point].focalX - px, 2) *
|
|
||||||
+ powf(activeFocalPoints[point].gainX, 2) +
|
|
||||||
+ powf(activeFocalPoints[point].focalY - py, 2) *
|
|
||||||
+ powf(activeFocalPoints[point].gainY, 2) -
|
|
||||||
activeFocalPoints[point].foveaArea,
|
|
||||||
1.0f);
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -up chromium-125.0.6422.41/media/base/media_switches.cc.disable-FFmpegAllowLists chromium-125.0.6422.41/media/base/media_switches.cc
|
||||||
|
--- chromium-125.0.6422.41/media/base/media_switches.cc.disable-FFmpegAllowLists 2024-05-12 21:28:43.694027396 +0200
|
||||||
|
+++ chromium-125.0.6422.41/media/base/media_switches.cc 2024-05-12 21:32:48.155063623 +0200
|
||||||
|
@@ -1753,7 +1753,7 @@ BASE_FEATURE(kUseWindowBoundsForPip,
|
||||||
|
// Enables FFmpeg allow lists for supported codecs / containers.
|
||||||
|
BASE_FEATURE(kFFmpegAllowLists,
|
||||||
|
"FFmpegAllowLists",
|
||||||
|
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||||
|
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||||
|
|
||||||
|
#if BUILDFLAG(IS_WIN)
|
||||||
|
// Enables audio offload when supported by endpoints.
|
@ -0,0 +1,739 @@
|
|||||||
|
revert as workaround for compiler error with old clang < 17
|
||||||
|
|
||||||
|
commit 940af9f2c87b436559b97c53763aa9eaaf1254eb
|
||||||
|
Author: Jeremy Roman <jbroman@chromium.org>
|
||||||
|
Date: Wed Nov 15 16:24:54 2023 +0000
|
||||||
|
|
||||||
|
Use C++20 features to simplify blink::NativeValueTraitsBase.
|
||||||
|
|
||||||
|
These allow some of the metaprogramming bits to be simplified a little.
|
||||||
|
|
||||||
|
Change-Id: I052b4397586d21348401616e1792afdb9662f975
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5030335
|
||||||
|
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
||||||
|
Commit-Queue: Jeremy Roman <jbroman@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1224978}
|
||||||
|
|
||||||
|
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
||||||
|
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
||||||
|
@@ -5,7 +5,6 @@
|
||||||
|
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
|
||||||
|
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_H_
|
||||||
|
|
||||||
|
-#include <concepts>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
|
#include "third_party/blink/renderer/bindings/core/v8/idl_types_base.h"
|
||||||
|
@@ -31,7 +30,7 @@ class ExceptionState;
|
||||||
|
// return toInt32(isolate, value, exceptionState, NormalConversion);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
-template <typename T>
|
||||||
|
+template <typename T, typename SFINAEHelper = void>
|
||||||
|
struct NativeValueTraits;
|
||||||
|
|
||||||
|
// This declaration serves only as a blueprint for specializations: the
|
||||||
|
@@ -46,15 +45,22 @@ struct NativeValueTraits;
|
||||||
|
|
||||||
|
namespace bindings {
|
||||||
|
|
||||||
|
+template <typename T, typename = void>
|
||||||
|
+struct NativeValueTraitsHasIsNull : std::false_type {};
|
||||||
|
+
|
||||||
|
template <typename T>
|
||||||
|
-struct ImplTypeFor {
|
||||||
|
- using type = T;
|
||||||
|
-};
|
||||||
|
+struct NativeValueTraitsHasIsNull<
|
||||||
|
+ T,
|
||||||
|
+ std::void_t<decltype(std::declval<T>().IsNull())>> : std::true_type {};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, IDLBase>
|
||||||
|
-struct ImplTypeFor<T> {
|
||||||
|
- using type = typename T::ImplType;
|
||||||
|
+struct NativeValueTraitsHasNullValue {
|
||||||
|
+ // true if |T| supports IDL null value.
|
||||||
|
+ static constexpr bool value =
|
||||||
|
+ // ScriptValue, String, and union types have IsNull member function.
|
||||||
|
+ bindings::NativeValueTraitsHasIsNull<T>::value ||
|
||||||
|
+ // Pointer types have nullptr as IDL null value.
|
||||||
|
+ std::is_pointer<T>::value;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace bindings
|
||||||
|
@@ -72,17 +78,37 @@ struct ImplTypeFor<T> {
|
||||||
|
// If present, |NullValue()| will be used when converting from the nullable type
|
||||||
|
// T?, and should be used if the impl type has an existing "null" state. If not
|
||||||
|
// present, WTF::Optional will be used to wrap the type.
|
||||||
|
-template <typename T>
|
||||||
|
+template <typename T, typename SFINAEHelper = void>
|
||||||
|
struct NativeValueTraitsBase {
|
||||||
|
STATIC_ONLY(NativeValueTraitsBase);
|
||||||
|
|
||||||
|
- using ImplType = bindings::ImplTypeFor<T>::type;
|
||||||
|
+ using ImplType = T;
|
||||||
|
+
|
||||||
|
+ static constexpr bool has_null_value =
|
||||||
|
+ bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
||||||
|
+
|
||||||
|
+ template <typename... ExtraArgs>
|
||||||
|
+ static decltype(auto) ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state,
|
||||||
|
+ ExtraArgs... extra_args) {
|
||||||
|
+ return NativeValueTraits<std::remove_pointer_t<T>>::NativeValue(
|
||||||
|
+ isolate, value, exception_state,
|
||||||
|
+ std::forward<ExtraArgs>(extra_args)...);
|
||||||
|
+ }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+template <typename T>
|
||||||
|
+struct NativeValueTraitsBase<
|
||||||
|
+ T,
|
||||||
|
+ std::enable_if_t<std::is_base_of<IDLBase, T>::value>> {
|
||||||
|
+ STATIC_ONLY(NativeValueTraitsBase);
|
||||||
|
+
|
||||||
|
+ using ImplType = typename T::ImplType;
|
||||||
|
|
||||||
|
- // Pointer types have nullptr as IDL null value.
|
||||||
|
- // ScriptValue, String, and union types have IsNull member function.
|
||||||
|
static constexpr bool has_null_value =
|
||||||
|
- std::is_pointer_v<ImplType> ||
|
||||||
|
- requires(ImplType value) { value.IsNull(); };
|
||||||
|
+ bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
||||||
|
|
||||||
|
// This should only be true for certain subclasses of ScriptWrappable
|
||||||
|
// that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with
|
||||||
|
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
||||||
|
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
||||||
|
@@ -7,7 +7,6 @@
|
||||||
|
#include "third_party/blink/renderer/core/core_export.h"
|
||||||
|
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
|
||||||
|
#include "third_party/blink/renderer/core/frame/web_feature.h"
|
||||||
|
-#include "third_party/blink/renderer/core/typed_arrays/flexible_array_buffer_view.h"
|
||||||
|
#include "third_party/blink/renderer/core/typed_arrays/typed_flexible_array_buffer_view.h"
|
||||||
|
|
||||||
|
namespace blink {
|
||||||
|
@@ -698,11 +697,12 @@ DOMArrayBufferBase* NativeValueTraits<
|
||||||
|
// ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-NotShared<T> NativeValueTraits<NotShared<T>>::NativeValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+NotShared<T> NativeValueTraits<
|
||||||
|
+ NotShared<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ NativeValue(v8::Isolate* isolate,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return NativeValueImpl<
|
||||||
|
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||||
|
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -711,12 +711,13 @@ NotShared<T> NativeValueTraits<NotShared
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-NotShared<T> NativeValueTraits<NotShared<T>>::ArgumentValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+NotShared<T> NativeValueTraits<
|
||||||
|
+ NotShared<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<
|
||||||
|
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||||
|
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -727,11 +728,12 @@ NotShared<T> NativeValueTraits<NotShared
|
||||||
|
// [AllowShared] ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-MaybeShared<T> NativeValueTraits<MaybeShared<T>>::NativeValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+MaybeShared<T> NativeValueTraits<
|
||||||
|
+ MaybeShared<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ NativeValue(v8::Isolate* isolate,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||||
|
ToDOMViewType<T, kMaybeShared>,
|
||||||
|
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -740,12 +742,13 @@ MaybeShared<T> NativeValueTraits<MaybeSh
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-MaybeShared<T> NativeValueTraits<MaybeShared<T>>::ArgumentValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+MaybeShared<T> NativeValueTraits<
|
||||||
|
+ MaybeShared<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||||
|
ToDOMViewType<T, kMaybeShared>,
|
||||||
|
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -756,12 +759,12 @@ MaybeShared<T> NativeValueTraits<MaybeSh
|
||||||
|
// [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-MaybeShared<T>
|
||||||
|
-NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>::NativeValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+MaybeShared<T> NativeValueTraits<
|
||||||
|
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ NativeValue(v8::Isolate* isolate,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return NativeValueImpl<
|
||||||
|
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
|
||||||
|
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
|
||||||
|
@@ -770,12 +773,13 @@ NativeValueTraits<IDLBufferSourceTypeNoS
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-MaybeShared<T> NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<
|
||||||
|
- MaybeShared<T>>>::ArgumentValue(v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+MaybeShared<T> NativeValueTraits<
|
||||||
|
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<
|
||||||
|
RecipeTrait<MaybeShared<T>>, ToDOMViewType<T, kMaybeShared>,
|
||||||
|
Nullablity::kIsNotNullable, BufferSizeCheck::kDoNotCheck,
|
||||||
|
@@ -786,11 +790,12 @@ MaybeShared<T> NativeValueTraits<IDLBuff
|
||||||
|
// Nullable ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::NativeValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+NotShared<T> NativeValueTraits<
|
||||||
|
+ IDLNullable<NotShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ NativeValue(v8::Isolate* isolate,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return NativeValueImpl<
|
||||||
|
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||||
|
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -799,12 +804,13 @@ NotShared<T> NativeValueTraits<IDLNullab
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-NotShared<T> NativeValueTraits<IDLNullable<NotShared<T>>>::ArgumentValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+NotShared<T> NativeValueTraits<
|
||||||
|
+ IDLNullable<NotShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<
|
||||||
|
RecipeTrait<NotShared<T>>, ToDOMViewType<T, kNotShared>,
|
||||||
|
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -815,11 +821,12 @@ NotShared<T> NativeValueTraits<IDLNullab
|
||||||
|
// Nullable [AllowShared] ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::NativeValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+MaybeShared<T> NativeValueTraits<
|
||||||
|
+ IDLNullable<MaybeShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ NativeValue(v8::Isolate* isolate,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return NativeValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||||
|
ToDOMViewType<T, kMaybeShared>,
|
||||||
|
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -828,12 +835,13 @@ MaybeShared<T> NativeValueTraits<IDLNull
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-MaybeShared<T> NativeValueTraits<IDLNullable<MaybeShared<T>>>::ArgumentValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+MaybeShared<T> NativeValueTraits<
|
||||||
|
+ IDLNullable<MaybeShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<RecipeTrait<MaybeShared<T>>,
|
||||||
|
ToDOMViewType<T, kMaybeShared>,
|
||||||
|
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||||
|
@@ -844,9 +852,9 @@ MaybeShared<T> NativeValueTraits<IDLNull
|
||||||
|
// Nullable [AllowShared, BufferSourceTypeNoSizeLimit] ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-MaybeShared<T>
|
||||||
|
-NativeValueTraits<IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>::
|
||||||
|
+MaybeShared<T> NativeValueTraits<
|
||||||
|
+ IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>::
|
||||||
|
ArgumentValue(v8::Isolate* isolate,
|
||||||
|
int argument_index,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -861,11 +869,13 @@ NativeValueTraits<IDLNullable<IDLBufferS
|
||||||
|
// [AllowShared, FlexibleArrayBufferView] ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||||
|
-T NativeValueTraits<T>::ArgumentValue(v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+T NativeValueTraits<T,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
|
||||||
|
Nullablity::kIsNotNullable, BufferSizeCheck::kCheck,
|
||||||
|
ResizableAllowance::kDisallowResizable,
|
||||||
|
@@ -877,12 +887,13 @@ T NativeValueTraits<T>::ArgumentValue(v8
|
||||||
|
// ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||||
|
-T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>::ArgumentValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+T NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<
|
||||||
|
RecipeTrait<T>, ToFlexibleArrayBufferView, Nullablity::kIsNotNullable,
|
||||||
|
BufferSizeCheck::kDoNotCheck, ResizableAllowance::kDisallowResizable,
|
||||||
|
@@ -893,12 +904,13 @@ T NativeValueTraits<IDLBufferSourceTypeN
|
||||||
|
// Nullable [AllowShared, FlexibleArrayBufferView] ArrayBufferView
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||||
|
-T NativeValueTraits<IDLNullable<T>>::ArgumentValue(
|
||||||
|
- v8::Isolate* isolate,
|
||||||
|
- int argument_index,
|
||||||
|
- v8::Local<v8::Value> value,
|
||||||
|
- ExceptionState& exception_state) {
|
||||||
|
+T NativeValueTraits<IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>::
|
||||||
|
+ ArgumentValue(v8::Isolate* isolate,
|
||||||
|
+ int argument_index,
|
||||||
|
+ v8::Local<v8::Value> value,
|
||||||
|
+ ExceptionState& exception_state) {
|
||||||
|
return ArgumentValueImpl<RecipeTrait<T>, ToFlexibleArrayBufferView,
|
||||||
|
Nullablity::kIsNullable, BufferSizeCheck::kCheck,
|
||||||
|
ResizableAllowance::kDisallowResizable,
|
||||||
|
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
||||||
|
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
||||||
|
@@ -5,9 +5,7 @@
|
||||||
|
#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
|
||||||
|
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_NATIVE_VALUE_TRAITS_IMPL_H_
|
||||||
|
|
||||||
|
-#include <concepts>
|
||||||
|
#include <optional>
|
||||||
|
-#include <type_traits>
|
||||||
|
|
||||||
|
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
|
||||||
|
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h"
|
||||||
|
@@ -718,8 +716,9 @@ struct CORE_EXPORT NativeValueTraits<
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-struct NativeValueTraits<T> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
|
||||||
|
// NotShared<T> or MaybeShared<T> should be used instead.
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -731,8 +730,9 @@ struct NativeValueTraits<T> {
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-struct NativeValueTraits<IDLNullable<T>> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>> {
|
||||||
|
// NotShared<T> or MaybeShared<T> should be used instead.
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -744,8 +744,9 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-struct NativeValueTraits<NotShared<T>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ NotShared<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<NotShared<T>> {
|
||||||
|
static NotShared<T> NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -758,8 +759,9 @@ struct NativeValueTraits<NotShared<T>>
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-struct NativeValueTraits<IDLNullable<NotShared<T>>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<NotShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<NotShared<T>> {
|
||||||
|
static NotShared<T> NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -772,8 +774,9 @@ struct NativeValueTraits<IDLNullable<Not
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-struct NativeValueTraits<MaybeShared<T>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ MaybeShared<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||||
|
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -786,8 +789,9 @@ struct NativeValueTraits<MaybeShared<T>>
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||||
|
// FlexibleArrayBufferView uses this in its implementation, so we cannot
|
||||||
|
// delete it.
|
||||||
|
@@ -802,8 +806,9 @@ struct NativeValueTraits<IDLBufferSource
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
-struct NativeValueTraits<IDLNullable<MaybeShared<T>>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<MaybeShared<T>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||||
|
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -816,9 +821,9 @@ struct NativeValueTraits<IDLNullable<May
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, DOMArrayBufferView>
|
||||||
|
struct NativeValueTraits<
|
||||||
|
- IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>>
|
||||||
|
+ IDLNullable<IDLBufferSourceTypeNoSizeLimit<MaybeShared<T>>>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<DOMArrayBufferView, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<MaybeShared<T>> {
|
||||||
|
// BufferSourceTypeNoSizeLimit must be used only as arguments.
|
||||||
|
static MaybeShared<T> NativeValue(v8::Isolate* isolate,
|
||||||
|
@@ -832,8 +837,11 @@ struct NativeValueTraits<
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||||
|
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T> {
|
||||||
|
// FlexibleArrayBufferView must be used only as arguments.
|
||||||
|
static T NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -846,8 +854,10 @@ struct NativeValueTraits<T> : public Nat
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||||
|
-struct NativeValueTraits<IDLBufferSourceTypeNoSizeLimit<T>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLBufferSourceTypeNoSizeLimit<T>,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<T> {
|
||||||
|
// BufferSourceTypeNoSizeLimit and FlexibleArrayBufferView must be used only
|
||||||
|
// as arguments.
|
||||||
|
@@ -862,8 +872,11 @@ struct NativeValueTraits<IDLBufferSource
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, FlexibleArrayBufferView>
|
||||||
|
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<FlexibleArrayBufferView, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T> {
|
||||||
|
// FlexibleArrayBufferView must be used only as arguments.
|
||||||
|
static T NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -1199,8 +1212,9 @@ NativeValueTraits<IDLSequence<T>>::Nativ
|
||||||
|
}
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires NativeValueTraits<IDLSequence<T>>::has_null_value
|
||||||
|
-struct NativeValueTraits<IDLNullable<IDLSequence<T>>>
|
||||||
|
+struct NativeValueTraits<IDLNullable<IDLSequence<T>>,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ NativeValueTraits<IDLSequence<T>>::has_null_value>>
|
||||||
|
: public NativeValueTraitsBase<HeapVector<AddMemberIfNeeded<T>>*> {
|
||||||
|
using ImplType = typename NativeValueTraits<IDLSequence<T>>::ImplType*;
|
||||||
|
|
||||||
|
@@ -1276,8 +1290,9 @@ struct NativeValueTraits<IDLArray<T>>
|
||||||
|
: public NativeValueTraits<IDLSequence<T>> {};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires NativeValueTraits<IDLSequence<T>>::has_null_value
|
||||||
|
-struct NativeValueTraits<IDLNullable<IDLArray<T>>>
|
||||||
|
+struct NativeValueTraits<IDLNullable<IDLArray<T>>,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ NativeValueTraits<IDLSequence<T>>::has_null_value>>
|
||||||
|
: public NativeValueTraits<IDLNullable<IDLSequence<T>>> {};
|
||||||
|
|
||||||
|
// Record types
|
||||||
|
@@ -1407,8 +1422,10 @@ struct NativeValueTraits<IDLRecord<K, V>
|
||||||
|
|
||||||
|
// Callback function types
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, CallbackFunctionBase>
|
||||||
|
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T*> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
ExceptionState& exception_state) {
|
||||||
|
@@ -1431,8 +1448,9 @@ struct NativeValueTraits<T> : public Nat
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, CallbackFunctionBase>
|
||||||
|
-struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<CallbackFunctionBase, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<IDLNullable<T>> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -1461,8 +1479,10 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
|
||||||
|
// Callback interface types
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, CallbackInterfaceBase>
|
||||||
|
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T*> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
ExceptionState& exception_state) {
|
||||||
|
@@ -1486,8 +1506,9 @@ struct NativeValueTraits<T> : public Nat
|
||||||
|
|
||||||
|
// Interface types
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, CallbackInterfaceBase>
|
||||||
|
-struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<CallbackInterfaceBase, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<IDLNullable<T>> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -1516,8 +1537,11 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
|
||||||
|
// Dictionary types
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, bindings::DictionaryBase>
|
||||||
|
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<bindings::DictionaryBase, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T*> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
ExceptionState& exception_state) {
|
||||||
|
@@ -1528,11 +1552,14 @@ struct NativeValueTraits<T> : public Nat
|
||||||
|
// We don't support nullable dictionary types in general since it's quite
|
||||||
|
// confusing and often misused.
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, bindings::DictionaryBase> &&
|
||||||
|
- (std::same_as<T, GPUColorTargetState> ||
|
||||||
|
- std::same_as<T, GPURenderPassColorAttachment> ||
|
||||||
|
- std::same_as<T, GPUVertexBufferLayout>)
|
||||||
|
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<bindings::DictionaryBase, T>::value &&
|
||||||
|
+ (std::is_same<T, GPUColorTargetState>::value ||
|
||||||
|
+ std::is_same<T, GPURenderPassColorAttachment>::value ||
|
||||||
|
+ std::is_same<T, GPUVertexBufferLayout>::value)>>
|
||||||
|
+ : public NativeValueTraitsBase<T*> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
ExceptionState& exception_state) {
|
||||||
|
@@ -1544,8 +1571,11 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
|
||||||
|
// Enumeration types
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, bindings::EnumerationBase>
|
||||||
|
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<
|
||||||
|
+ std::is_base_of<bindings::EnumerationBase, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T> {
|
||||||
|
static T NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
ExceptionState& exception_state) {
|
||||||
|
@@ -1555,8 +1585,10 @@ struct NativeValueTraits<T> : public Nat
|
||||||
|
|
||||||
|
// Interface types
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, ScriptWrappable>
|
||||||
|
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T*> {
|
||||||
|
// This signifies that CreateIDLSequenceFromV8ArraySlow() may apply
|
||||||
|
// certain optimization based on assumptions about `NativeValue()`
|
||||||
|
// implementation below. For subclasses of ScriptWrappable that have
|
||||||
|
@@ -1593,8 +1625,9 @@ struct NativeValueTraits<T> : public Nat
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, ScriptWrappable>
|
||||||
|
-struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<IDLNullable<T>> {
|
||||||
|
static inline T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
@@ -1629,8 +1662,10 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, bindings::UnionBase>
|
||||||
|
-struct NativeValueTraits<T> : public NativeValueTraitsBase<T*> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ T,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T*> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
ExceptionState& exception_state) {
|
||||||
|
@@ -1646,8 +1681,10 @@ struct NativeValueTraits<T> : public Nat
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::derived_from<T, bindings::UnionBase>
|
||||||
|
-struct NativeValueTraits<IDLNullable<T>> : public NativeValueTraitsBase<T*> {
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_base_of<bindings::UnionBase, T>::value>>
|
||||||
|
+ : public NativeValueTraitsBase<T*> {
|
||||||
|
static T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
||||||
|
ExceptionState& exception_state) {
|
||||||
|
@@ -1668,8 +1705,9 @@ struct NativeValueTraits<IDLNullable<T>>
|
||||||
|
|
||||||
|
// Nullable types
|
||||||
|
template <typename InnerType>
|
||||||
|
- requires(!NativeValueTraits<InnerType>::has_null_value)
|
||||||
|
-struct NativeValueTraits<IDLNullable<InnerType>>
|
||||||
|
+struct NativeValueTraits<
|
||||||
|
+ IDLNullable<InnerType>,
|
||||||
|
+ typename std::enable_if_t<!NativeValueTraits<InnerType>::has_null_value>>
|
||||||
|
: public NativeValueTraitsBase<IDLNullable<InnerType>> {
|
||||||
|
// https://webidl.spec.whatwg.org/#es-nullable-type
|
||||||
|
using ImplType =
|
||||||
|
@@ -1701,8 +1739,9 @@ struct NativeValueTraits<IDLNullable<IDL
|
||||||
|
|
||||||
|
// Optional types
|
||||||
|
template <typename T>
|
||||||
|
- requires std::is_arithmetic_v<typename NativeValueTraits<T>::ImplType>
|
||||||
|
-struct NativeValueTraits<IDLOptional<T>>
|
||||||
|
+struct NativeValueTraits<IDLOptional<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_arithmetic<
|
||||||
|
+ typename NativeValueTraits<T>::ImplType>::value>>
|
||||||
|
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
|
||||||
|
using ImplType = typename NativeValueTraits<T>::ImplType;
|
||||||
|
|
||||||
|
@@ -1724,8 +1763,9 @@ struct NativeValueTraits<IDLOptional<T>>
|
||||||
|
};
|
||||||
|
|
||||||
|
template <typename T>
|
||||||
|
- requires std::is_pointer_v<typename NativeValueTraits<T>::ImplType>
|
||||||
|
-struct NativeValueTraits<IDLOptional<T>>
|
||||||
|
+struct NativeValueTraits<IDLOptional<T>,
|
||||||
|
+ typename std::enable_if_t<std::is_pointer<
|
||||||
|
+ typename NativeValueTraits<T>::ImplType>::value>>
|
||||||
|
: public NativeValueTraitsBase<typename NativeValueTraits<T>::ImplType> {
|
||||||
|
using ImplType = typename NativeValueTraits<T>::ImplType;
|
||||||
|
|
@ -0,0 +1,144 @@
|
|||||||
|
revert as workaround for compiler error with old clang < 17
|
||||||
|
|
||||||
|
commit ce71348a09f6689dd01a68db64b172191d0182d8
|
||||||
|
Author: Andrey Kosyakov <caseq@chromium.org>
|
||||||
|
Date: Thu Dec 21 18:38:38 2023 +0000
|
||||||
|
|
||||||
|
[bindings] Use v8::Array::Iterate for converting script wrappables
|
||||||
|
|
||||||
|
|
||||||
|
This changes CreateIDLSequenceFromV8Array to use the new
|
||||||
|
v8::Array::Iterate() operation.
|
||||||
|
This speeds up the "execBundles" part of the microbenchmark
|
||||||
|
at crbug.com/dawn/1858 by around 3x.
|
||||||
|
This depends on crrev.com/c/4846594 landing (and rolling) first.
|
||||||
|
|
||||||
|
This is a slight re-work of https://crrev.com/c/4847447/3,
|
||||||
|
originally by jkummerow@chromium.org
|
||||||
|
|
||||||
|
Bug: v8:14218, dawn:1858, 1511239
|
||||||
|
Change-Id: Ia266556d05b4d53e6942e12609d1c08882b4ff0f
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5132129
|
||||||
|
Commit-Queue: Andrey Kosyakov <caseq@chromium.org>
|
||||||
|
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1240236}
|
||||||
|
|
||||||
|
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits.h 2024-05-13 20:23:41.165774029 +0200
|
||||||
|
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits.h 2024-05-13 20:27:58.994663485 +0200
|
||||||
|
@@ -110,12 +110,6 @@ struct NativeValueTraitsBase<
|
||||||
|
static constexpr bool has_null_value =
|
||||||
|
bindings::NativeValueTraitsHasNullValue<ImplType>::value;
|
||||||
|
|
||||||
|
- // This should only be true for certain subclasses of ScriptWrappable
|
||||||
|
- // that satisfy the assumptions of CreateIDLSequenceFromV8ArraySlow() with
|
||||||
|
- // regards to how NativeValue() is implemented for the underlying type.
|
||||||
|
- static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
|
||||||
|
- false;
|
||||||
|
-
|
||||||
|
template <typename... ExtraArgs>
|
||||||
|
static decltype(auto) ArgumentValue(v8::Isolate* isolate,
|
||||||
|
int argument_index,
|
||||||
|
--- a/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h 2024-05-13 20:23:47.295915837 +0200
|
||||||
|
+++ b/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h 2024-05-13 20:27:21.649808564 +0200
|
||||||
|
@@ -1050,87 +1050,11 @@ CreateIDLSequenceFromV8ArraySlow(v8::Iso
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
- using ResultType = typename NativeValueTraits<IDLSequence<T>>::ImplType;
|
||||||
|
- ResultType result;
|
||||||
|
+ typename NativeValueTraits<IDLSequence<T>>::ImplType result;
|
||||||
|
result.ReserveInitialCapacity(length);
|
||||||
|
v8::Local<v8::Context> current_context = isolate->GetCurrentContext();
|
||||||
|
v8::TryCatch try_block(isolate);
|
||||||
|
|
||||||
|
- // Fast path -- we're creating a sequence of script wrappables, which can be
|
||||||
|
- // done by directly getting underlying object as long as array types are
|
||||||
|
- // homogeneous. With ScriptWrappables, we don't expect to enter JS during
|
||||||
|
- // iteration, so we can rely on v8::Array::Iterate() which is much faster than
|
||||||
|
- // iterating an array on the client side of the v8. Additionally, for most
|
||||||
|
- // subsptyes of ScriptWrappables, we can speed up type checks (see more on
|
||||||
|
- // that below next to supports_scriptwrappable_specific_fast_array_iteration
|
||||||
|
- // check.
|
||||||
|
- if constexpr (std::is_base_of_v<ScriptWrappable, T>) {
|
||||||
|
- struct CallbackData {
|
||||||
|
- STACK_ALLOCATED();
|
||||||
|
-
|
||||||
|
- public:
|
||||||
|
- v8::Isolate* isolate;
|
||||||
|
- v8::TypecheckWitness witness;
|
||||||
|
- ResultType& result;
|
||||||
|
- ExceptionState& exception_state;
|
||||||
|
- CallbackData(v8::Isolate* isolate,
|
||||||
|
- ResultType& result,
|
||||||
|
- ExceptionState& exception_state)
|
||||||
|
- : isolate(isolate),
|
||||||
|
- witness(isolate),
|
||||||
|
- result(result),
|
||||||
|
- exception_state(exception_state) {}
|
||||||
|
- };
|
||||||
|
-
|
||||||
|
- CallbackData callback_data(isolate, result, exception_state);
|
||||||
|
- v8::Array::IterationCallback callback = [](uint32_t index,
|
||||||
|
- v8::Local<v8::Value> v8_element,
|
||||||
|
- void* data) {
|
||||||
|
- CallbackData* callback_data = reinterpret_cast<CallbackData*>(data);
|
||||||
|
- v8::Isolate* isolate = callback_data->isolate;
|
||||||
|
- // 3.4. Initialize Si to the result of converting nextItem to an IDL value
|
||||||
|
- // of type T.
|
||||||
|
- v8::TypecheckWitness& witness = callback_data->witness;
|
||||||
|
- // We can speed up type check by taking advantage of V8's type witness,
|
||||||
|
- // provided traits' NativeValue implementation doesn't have additional
|
||||||
|
- // logic beyond checking the type and calling ToScriptWrappable().
|
||||||
|
- if constexpr (
|
||||||
|
- NativeValueTraits<
|
||||||
|
- T>::supports_scriptwrappable_specific_fast_array_iteration) {
|
||||||
|
- if (witness.Matches(v8_element)) {
|
||||||
|
- auto&& value = ToScriptWrappable(isolate, v8_element.As<v8::Object>())
|
||||||
|
- ->template ToImpl<T>();
|
||||||
|
- callback_data->result.push_back(std::move(value));
|
||||||
|
- return v8::Array::CallbackResult::kContinue;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
- auto&& element = NativeValueTraits<T>::NativeValue(
|
||||||
|
- isolate, v8_element, callback_data->exception_state);
|
||||||
|
- if (callback_data->exception_state.HadException()) {
|
||||||
|
- // It doesn't matter whether we return `kException` or `kBreak` here,
|
||||||
|
- // as that only affects the return value of `v8_array->Iterate()`,
|
||||||
|
- // which we are ignoring.
|
||||||
|
- return v8::Array::CallbackResult::kException;
|
||||||
|
- }
|
||||||
|
- if constexpr (
|
||||||
|
- NativeValueTraits<
|
||||||
|
- T>::supports_scriptwrappable_specific_fast_array_iteration) {
|
||||||
|
- witness.Update(v8_element);
|
||||||
|
- }
|
||||||
|
- callback_data->result.push_back(std::move(element));
|
||||||
|
- return v8::Array::CallbackResult::kContinue;
|
||||||
|
- };
|
||||||
|
- if (!v8_array->Iterate(current_context, callback, &callback_data)
|
||||||
|
- .IsJust()) {
|
||||||
|
- if (try_block.HasCaught()) {
|
||||||
|
- exception_state.RethrowV8Exception(try_block.Exception());
|
||||||
|
- }
|
||||||
|
- DCHECK(exception_state.HadException());
|
||||||
|
- return {};
|
||||||
|
- }
|
||||||
|
- return result;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
// Array length may change if array is mutated during iteration.
|
||||||
|
for (uint32_t i = 0; i < v8_array->Length(); ++i) {
|
||||||
|
v8::Local<v8::Value> v8_element;
|
||||||
|
@@ -1590,12 +1514,6 @@ struct NativeValueTraits<
|
||||||
|
T,
|
||||||
|
typename std::enable_if_t<std::is_base_of<ScriptWrappable, T>::value>>
|
||||||
|
: public NativeValueTraitsBase<T*> {
|
||||||
|
- // This signifies that CreateIDLSequenceFromV8ArraySlow() may apply
|
||||||
|
- // certain optimization based on assumptions about `NativeValue()`
|
||||||
|
- // implementation below. For subclasses of ScriptWrappable that have
|
||||||
|
- // different implementation of NativeValue(), this should remain false.
|
||||||
|
- static constexpr bool supports_scriptwrappable_specific_fast_array_iteration =
|
||||||
|
- true;
|
||||||
|
|
||||||
|
static inline T* NativeValue(v8::Isolate* isolate,
|
||||||
|
v8::Local<v8::Value> value,
|
@ -0,0 +1,105 @@
|
|||||||
|
commit 62274859104bd828373ae406aa9309e610449ac5
|
||||||
|
Author: Ted Meyer <tmathmeyer@chromium.org>
|
||||||
|
Date: Fri Mar 22 19:56:55 2024 +0000
|
||||||
|
|
||||||
|
Replace deprecated use of AVCodecContext::reordered_opaque
|
||||||
|
|
||||||
|
We can use the AV_CODEC_FLAG_COPY_OPAQUE flag on the codec context
|
||||||
|
now to trigger timestamp propagation.
|
||||||
|
|
||||||
|
Bug: 330573128
|
||||||
|
Change-Id: I6bc57241a35ab5283742aad8d42acb4dc5e85858
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5384308
|
||||||
|
Commit-Queue: Ted (Chromium) Meyer <tmathmeyer@chromium.org>
|
||||||
|
Reviewed-by: Dan Sanders <sandersd@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1277051}
|
||||||
|
|
||||||
|
diff --git a/media/filters/ffmpeg_video_decoder.cc b/media/filters/ffmpeg_video_decoder.cc
|
||||||
|
index bd75477feeabb..8a658a58caac5 100644
|
||||||
|
--- a/media/filters/ffmpeg_video_decoder.cc
|
||||||
|
+++ b/media/filters/ffmpeg_video_decoder.cc
|
||||||
|
@@ -134,7 +134,7 @@ bool FFmpegVideoDecoder::IsCodecSupported(VideoCodec codec) {
|
||||||
|
}
|
||||||
|
|
||||||
|
FFmpegVideoDecoder::FFmpegVideoDecoder(MediaLog* media_log)
|
||||||
|
- : media_log_(media_log) {
|
||||||
|
+ : media_log_(media_log), timestamp_map_(128) {
|
||||||
|
DVLOG(1) << __func__;
|
||||||
|
DETACH_FROM_SEQUENCE(sequence_checker_);
|
||||||
|
}
|
||||||
|
@@ -363,8 +363,10 @@ bool FFmpegVideoDecoder::FFmpegDecode(const DecoderBuffer& buffer) {
|
||||||
|
DCHECK(packet->data);
|
||||||
|
DCHECK_GT(packet->size, 0);
|
||||||
|
|
||||||
|
- // Let FFmpeg handle presentation timestamp reordering.
|
||||||
|
- codec_context_->reordered_opaque = buffer.timestamp().InMicroseconds();
|
||||||
|
+ const int64_t timestamp = buffer.timestamp().InMicroseconds();
|
||||||
|
+ const TimestampId timestamp_id = timestamp_id_generator_.GenerateNextId();
|
||||||
|
+ timestamp_map_.Put(std::make_pair(timestamp_id, timestamp));
|
||||||
|
+ packet->opaque = reinterpret_cast<void*>(timestamp_id.GetUnsafeValue());
|
||||||
|
}
|
||||||
|
FFmpegDecodingLoop::DecodeStatus decode_status = decoding_loop_->DecodePacket(
|
||||||
|
packet, base::BindRepeating(&FFmpegVideoDecoder::OnNewFrame,
|
||||||
|
@@ -423,7 +425,12 @@ bool FFmpegVideoDecoder::OnNewFrame(AVFrame* frame) {
|
||||||
|
}
|
||||||
|
gfx::Size natural_size = aspect_ratio.GetNaturalSize(visible_rect);
|
||||||
|
|
||||||
|
- const auto pts = base::Microseconds(frame->reordered_opaque);
|
||||||
|
+ const auto ts_id = TimestampId(reinterpret_cast<size_t>(frame->opaque));
|
||||||
|
+ const auto ts_lookup = timestamp_map_.Get(ts_id);
|
||||||
|
+ if (ts_lookup == timestamp_map_.end()) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
+ const auto pts = base::Microseconds(std::get<1>(*ts_lookup));
|
||||||
|
auto video_frame = VideoFrame::WrapExternalDataWithLayout(
|
||||||
|
opaque->layout, visible_rect, natural_size, opaque->data, opaque->size,
|
||||||
|
pts);
|
||||||
|
@@ -498,8 +505,10 @@ bool FFmpegVideoDecoder::ConfigureDecoder(const VideoDecoderConfig& config,
|
||||||
|
codec_context_->thread_count = GetFFmpegVideoDecoderThreadCount(config);
|
||||||
|
codec_context_->thread_type =
|
||||||
|
FF_THREAD_SLICE | (low_delay ? 0 : FF_THREAD_FRAME);
|
||||||
|
+
|
||||||
|
codec_context_->opaque = this;
|
||||||
|
codec_context_->get_buffer2 = GetVideoBufferImpl;
|
||||||
|
+ codec_context_->flags |= AV_CODEC_FLAG_COPY_OPAQUE;
|
||||||
|
|
||||||
|
if (base::FeatureList::IsEnabled(kFFmpegAllowLists)) {
|
||||||
|
// Note: FFmpeg will try to free this string, so we must duplicate it.
|
||||||
|
diff --git a/media/filters/ffmpeg_video_decoder.h b/media/filters/ffmpeg_video_decoder.h
|
||||||
|
index d02cb89c3ddf7..0a2de1c623fff 100644
|
||||||
|
--- a/media/filters/ffmpeg_video_decoder.h
|
||||||
|
+++ b/media/filters/ffmpeg_video_decoder.h
|
||||||
|
@@ -7,10 +7,12 @@
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
+#include "base/containers/lru_cache.h"
|
||||||
|
#include "base/functional/callback.h"
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
|
#include "base/memory/scoped_refptr.h"
|
||||||
|
#include "base/sequence_checker.h"
|
||||||
|
+#include "base/types/id_type.h"
|
||||||
|
#include "media/base/frame_buffer_pool.h"
|
||||||
|
#include "media/base/supported_video_decoder_config.h"
|
||||||
|
#include "media/base/video_decoder.h"
|
||||||
|
@@ -87,6 +89,20 @@ class MEDIA_EXPORT FFmpegVideoDecoder : public VideoDecoder {
|
||||||
|
// FFmpeg structures owned by this object.
|
||||||
|
std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
|
||||||
|
|
||||||
|
+ // The gist here is that timestamps need to be 64 bits to store microsecond
|
||||||
|
+ // precision. A 32 bit integer would overflow at ~35 minutes at this level of
|
||||||
|
+ // precision. We can't cast the timestamp to the void ptr object used by the
|
||||||
|
+ // opaque field in ffmpeg then, because it would lose data on a 32 bit build.
|
||||||
|
+ // However, we don't actually have 2^31 timestamped frames in a single
|
||||||
|
+ // playback, so it's fine to use the 32 bit value as a key in a map which
|
||||||
|
+ // contains the actual timestamps. Additionally, we've in the past set 128
|
||||||
|
+ // outstanding frames for re-ordering as a limit for cross-thread decoding
|
||||||
|
+ // tasks, so we'll do that here too with the LRU cache.
|
||||||
|
+ using TimestampId = base::IdType<int64_t, size_t, 0>;
|
||||||
|
+
|
||||||
|
+ TimestampId::Generator timestamp_id_generator_;
|
||||||
|
+ base::LRUCache<TimestampId, int64_t> timestamp_map_;
|
||||||
|
+
|
||||||
|
VideoDecoderConfig config_;
|
||||||
|
|
||||||
|
scoped_refptr<FrameBufferPool> frame_pool_;
|
@ -0,0 +1,38 @@
|
|||||||
|
diff -up chromium-125.0.6422.41/net/filter/brotli_source_stream.cc.system-brotli chromium-125.0.6422.41/net/filter/brotli_source_stream.cc
|
||||||
|
--- chromium-125.0.6422.41/net/filter/brotli_source_stream.cc.system-brotli 2024-05-08 22:30:00.000000000 +0200
|
||||||
|
+++ chromium-125.0.6422.41/net/filter/brotli_source_stream.cc 2024-05-12 20:23:30.859178769 +0200
|
||||||
|
@@ -11,8 +11,8 @@
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
|
#include "base/metrics/histogram_macros.h"
|
||||||
|
#include "net/base/io_buffer.h"
|
||||||
|
-#include "third_party/brotli/include/brotli/decode.h"
|
||||||
|
-#include "third_party/brotli/include/brotli/shared_dictionary.h"
|
||||||
|
+#include <brotli/decode.h>
|
||||||
|
+#include <brotli/shared_dictionary.h>
|
||||||
|
|
||||||
|
namespace net {
|
||||||
|
|
||||||
|
diff -up chromium-125.0.6422.41/net/ssl/cert_compression.cc.system-brotli chromium-125.0.6422.41/net/ssl/cert_compression.cc
|
||||||
|
--- chromium-125.0.6422.41/net/ssl/cert_compression.cc.system-brotli 2024-05-08 22:30:00.000000000 +0200
|
||||||
|
+++ chromium-125.0.6422.41/net/ssl/cert_compression.cc 2024-05-12 20:23:30.860178793 +0200
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||||
|
|
||||||
|
#if !defined(NET_DISABLE_BROTLI)
|
||||||
|
-#include "third_party/brotli/include/brotli/decode.h"
|
||||||
|
+#include <brotli/decode.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace net {
|
||||||
|
diff -up chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc.system-brotli chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc
|
||||||
|
--- chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc.system-brotli 2024-05-12 20:23:30.861178816 +0200
|
||||||
|
+++ chromium-125.0.6422.41/ui/base/resource/resource_bundle.cc 2024-05-12 21:19:03.775332093 +0200
|
||||||
|
@@ -33,7 +33,7 @@
|
||||||
|
#include "net/filter/gzip_header.h"
|
||||||
|
#include "skia/ext/image_operations.h"
|
||||||
|
#include "third_party/abseil-cpp/absl/types/variant.h"
|
||||||
|
-#include "third_party/brotli/include/brotli/decode.h"
|
||||||
|
+#include "brotli/decode.h"
|
||||||
|
#include "third_party/skia/include/codec/SkPngDecoder.h"
|
||||||
|
#include "third_party/skia/include/core/SkBitmap.h"
|
||||||
|
#include "third_party/skia/include/core/SkColor.h"
|
Loading…
Reference in new issue