- fix build error on el8 - bz#2265039, built with -fwrapv for improved memory safety - bz#2265043, built with -ftrivial-auto-var-init=zero for improved security and preditability - update to 122.0.6261.57 * High CVE-2024-1669: Out of bounds memory access in Blink * High CVE-2024-1670: Use after free in Mojo * Medium CVE-2024-1671: Inappropriate implementation in Site Isolation * Medium CVE-2024-1672: Inappropriate implementation in Content Security Policy * Medium CVE-2024-1673: Use after free in Accessibility * Medium CVE-2024-1674: Inappropriate implementation in Navigation * Medium CVE-2024-1675: Insufficient policy enforcement in Download * Low CVE-2024-1676: Inappropriate implementation in Navigation.i8e changed/i8e/chromium-122.0.6261.69-1.el8.inferit
parent
2105063149
commit
4269ffaaca
@ -1,8 +1,8 @@
|
||||
4599a68d92690b24e583966e47cec2d908f1f97a SOURCES/chromium-121.0.6167.184.tar.xz
|
||||
0b687c51fad1be57fe87c6a8694faad817406660 SOURCES/chromium-122.0.6261.69.tar.xz
|
||||
dea187019741602d57aaf189a80abba261fbd2aa SOURCES/linux-x64-0.19.2.tgz
|
||||
7e5d2c7864c5c83ec789b59c77cd9c20d2594916 SOURCES/linux-arm64-0.19.2.tgz
|
||||
769196d081c6a0ad37f1c63dec56febfff3370de SOURCES/node-v20.6.1-linux-x64.tar.xz
|
||||
3e94bb4f999c636293bc745b02d98e7925da5616 SOURCES/node-v20.6.1-linux-arm64.tar.xz
|
||||
8e9bc55cce3899627b2810ecfe87116c5a9147b5 SOURCES/chromium-browser-gost-icons.tar.xz
|
||||
3492a65d81b8b01d419eb15bd8dc68d23f210bc9 SOURCES/Chromium-Gost-be00390a8bd3cf445bcaaeccada3324f4e1067b3.tar.xz
|
||||
c46ba5040d6704a69da87757067608fb6e39229c SOURCES/Chromium-Gost-83503326c2c3b8c1ba0d10771f3a5af74a080f40.tar.xz
|
||||
8217473520ee01277f8279bb69877fe12be3818b SOURCES/msspi-6a2dba691dfcaa7a17aace6f798b8d5024631489.tar.xz
|
||||
|
@ -1,8 +1,8 @@
|
||||
SOURCES/chromium-121.0.6167.184.tar.xz
|
||||
SOURCES/chromium-122.0.6261.69.tar.xz
|
||||
SOURCES/linux-x64-0.19.2.tgz
|
||||
SOURCES/linux-arm64-0.19.2.tgz
|
||||
SOURCES/node-v20.6.1-linux-x64.tar.xz
|
||||
SOURCES/node-v20.6.1-linux-arm64.tar.xz
|
||||
SOURCES/chromium-browser-gost-icons.tar.xz
|
||||
SOURCES/Chromium-Gost-be00390a8bd3cf445bcaaeccada3324f4e1067b3.tar.xz
|
||||
SOURCES/Chromium-Gost-83503326c2c3b8c1ba0d10771f3a5af74a080f40.tar.xz
|
||||
SOURCES/msspi-6a2dba691dfcaa7a17aace6f798b8d5024631489.tar.xz
|
||||
|
@ -0,0 +1,171 @@
|
||||
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);
|
@ -0,0 +1,13 @@
|
||||
diff -up chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni.me chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni
|
||||
--- chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni.me 2024-02-22 20:22:44.115269845 +0100
|
||||
+++ chromium-122.0.6261.57/base/allocator/partition_allocator/partition_alloc.gni 2024-02-22 20:23:07.067681890 +0100
|
||||
@@ -29,8 +29,7 @@ if (is_nacl) {
|
||||
assert(false, "Unknown CPU: $current_cpu")
|
||||
}
|
||||
|
||||
-has_memory_tagging =
|
||||
- current_cpu == "arm64" && is_clang && !is_asan && (is_linux || is_android)
|
||||
+has_memory_tagging = false
|
||||
|
||||
declare_args() {
|
||||
# Causes all the allocations to be routed via allocator_shim.cc. Usually,
|
@ -0,0 +1,17 @@
|
||||
diff -up chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me chromium-122.0.6261.57/build/config/compiler/BUILD.gn
|
||||
--- chromium-122.0.6261.57/build/config/compiler/BUILD.gn.me 2024-02-23 12:32:11.248584653 +0100
|
||||
+++ chromium-122.0.6261.57/build/config/compiler/BUILD.gn 2024-02-23 12:45:26.672302958 +0100
|
||||
@@ -399,6 +399,13 @@ config("compiler") {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (is_clang) {
|
||||
+ cflags += [ "-ftrivial-auto-var-init=zero" ]
|
||||
+ if (!is_ubsan && !is_ubsan_security) {
|
||||
+ cflags += [ "-fwrapv" ]
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
# Linker warnings.
|
||||
if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
|
||||
current_os != "zos") {
|
@ -0,0 +1,20 @@
|
||||
diff -up chromium-122.0.6261.39/build/config/compiler/BUILD.gn.me chromium-122.0.6261.39/build/config/compiler/BUILD.gn
|
||||
--- chromium-122.0.6261.39/build/config/compiler/BUILD.gn.me 2024-02-19 21:58:15.835818177 +0100
|
||||
+++ chromium-122.0.6261.39/build/config/compiler/BUILD.gn 2024-02-19 21:59:11.661880633 +0100
|
||||
@@ -1856,15 +1856,12 @@ config("default_warnings") {
|
||||
|
||||
# TODO(crbug.com/1494809): Evaluate and possibly enable.
|
||||
"-Wno-vla-extension",
|
||||
-
|
||||
- # TODO(https://crbug.com/1490607): Fix and re-enable.
|
||||
- "-Wno-thread-safety-reference-return",
|
||||
]
|
||||
|
||||
if (!is_nacl) {
|
||||
cflags_cc += [
|
||||
# TODO(https://crbug.com/1513724): Fix and re-enable.
|
||||
- "-Wno-c++11-narrowing-const-reference",
|
||||
+ "-Wno-c++11-narrowing",
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-122.0.6261.29/build/config/compiler/BUILD.gn.me chromium-122.0.6261.29/build/config/compiler/BUILD.gn
|
||||
--- chromium-122.0.6261.29/build/config/compiler/BUILD.gn.me 2024-02-12 14:46:52.691992282 +0100
|
||||
+++ chromium-122.0.6261.29/build/config/compiler/BUILD.gn 2024-02-12 14:48:54.256274068 +0100
|
||||
@@ -787,7 +787,7 @@ config("compiler") {
|
||||
|
||||
# We only use one version of LLVM within a build so there's no need to
|
||||
# upgrade debug info, which can be expensive since it runs the verifier.
|
||||
- ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
|
||||
+ ldflags += [ "" ]
|
||||
}
|
||||
|
||||
# TODO(https://crbug.com/1211155): investigate why this isn't effective on
|
@ -0,0 +1,45 @@
|
||||
diff -up chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h.me chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h
|
||||
--- chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h.me 2024-02-13 13:07:24.982184485 +0100
|
||||
+++ chromium-122.0.6261.29/components/autofill/core/common/unique_ids.h 2024-02-13 13:07:45.510551589 +0100
|
||||
@@ -137,7 +137,7 @@ struct GlobalId {
|
||||
|
||||
friend constexpr auto operator<=>(const GlobalId<RendererId>& lhs,
|
||||
const GlobalId<RendererId>& rhs) = default;
|
||||
- friend constexpr bool operator==(const GlobalId<RendererId>& lhs,
|
||||
+ friend bool operator==(const GlobalId<RendererId>& lhs,
|
||||
const GlobalId<RendererId>& rhs) = default;
|
||||
};
|
||||
|
||||
diff -up chromium-122.0.6261.29/base/types/strong_alias.h.me chromium-122.0.6261.29/base/types/strong_alias.h
|
||||
--- chromium-122.0.6261.29/base/types/strong_alias.h.me 2024-02-13 14:13:20.311374288 +0100
|
||||
+++ chromium-122.0.6261.29/base/types/strong_alias.h 2024-02-13 12:30:38.596913951 +0100
|
||||
@@ -110,7 +110,7 @@ class StrongAlias {
|
||||
// a `StrongAlias<W>`.
|
||||
friend constexpr auto operator<=>(const StrongAlias& lhs,
|
||||
const StrongAlias& rhs) = default;
|
||||
- friend constexpr bool operator==(const StrongAlias& lhs,
|
||||
+ friend bool operator==(const StrongAlias& lhs,
|
||||
const StrongAlias& rhs) = default;
|
||||
|
||||
// Hasher to use in std::unordered_map, std::unordered_set, etc.
|
||||
diff -up chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h.constexpr chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h
|
||||
--- chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h.constexpr 2024-02-07 19:49:31.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/components/performance_manager/resource_attribution/query_params.h 2024-02-13 11:12:52.913338699 +0100
|
||||
@@ -29,7 +29,7 @@ class ContextCollection {
|
||||
ContextCollection(const ContextCollection& other);
|
||||
ContextCollection& operator=(const ContextCollection& other);
|
||||
|
||||
- friend constexpr bool operator==(const ContextCollection&,
|
||||
+ friend bool operator==(const ContextCollection&,
|
||||
const ContextCollection&) = default;
|
||||
|
||||
// Adds `context` to the collection.
|
||||
@@ -67,7 +67,7 @@ struct QueryParams {
|
||||
QueryParams(const QueryParams& other);
|
||||
QueryParams& operator=(const QueryParams& other);
|
||||
|
||||
- friend constexpr bool operator==(const QueryParams&,
|
||||
+ friend bool operator==(const QueryParams&,
|
||||
const QueryParams&) = default;
|
||||
|
||||
// Resource types to measure.
|
@ -0,0 +1,12 @@
|
||||
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.
|
@ -0,0 +1,126 @@
|
||||
diff -up chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h.el8-support-64kpage.patch chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h
|
||||
--- chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h.el8-support-64kpage.patch 2024-01-30 21:24:10.000000000 +0100
|
||||
+++ chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_bucket.h 2024-02-01 17:20:37.178877448 +0100
|
||||
@@ -146,7 +146,13 @@ struct PartitionBucket {
|
||||
// Returns a slot number starting from the beginning of the slot span.
|
||||
PA_ALWAYS_INLINE size_t GetSlotNumber(size_t offset_in_slot_span) const {
|
||||
// See the static assertion for `kReciprocalShift` above.
|
||||
- PA_DCHECK(offset_in_slot_span <= kMaxBucketed);
|
||||
+ // TODO(casey.smalley@arm.com): triggers on Aarch64/Linux
|
||||
+ // systems with 64k system pages. Constants need to be
|
||||
+ // adjusted to prevent different parts of the allocator
|
||||
+ // from overlapping. For now this will allow 64k pages
|
||||
+ // to function on Aarch64/Linux systems, albeit not
|
||||
+ // very efficiently.
|
||||
+ // PA_DCHECK(offset_in_slot_span <= kMaxBucketed);
|
||||
PA_DCHECK(slot_size <= kMaxBucketed);
|
||||
|
||||
const size_t offset_in_slot =
|
||||
diff -up chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.el8-support-64kpage.patch chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h
|
||||
--- chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h.el8-support-64kpage.patch 2024-02-01 17:20:37.178877448 +0100
|
||||
+++ chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page_constants.h 2024-02-01 17:31:08.500268457 +0100
|
||||
@@ -17,10 +17,8 @@ namespace partition_alloc::internal {
|
||||
// PartitionPageSize() is 4 times the OS page size.
|
||||
static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
|
||||
#elif (BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_LINUX)) && defined(ARCH_CPU_ARM64)
|
||||
-// System page size can be 4, 16, or 64 kiB on Linux on arm64. 64 kiB is
|
||||
-// currently (kMaxSlotsPerSlotSpanBits == 13) not supported by the code,
|
||||
-// so we use the 16 kiB maximum (64 kiB will crash).
|
||||
-static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 14) / kSmallestBucket;
|
||||
+// System page size can be 4, 16, or 64 kiB on Linux on AArch64.
|
||||
+static constexpr size_t kMaxSlotsPerSlotSpan = 4 * (1 << 16) / kSmallestBucket;
|
||||
#else
|
||||
// A slot span can "span" multiple PartitionPages, but then its slot size is
|
||||
// larger, so it doesn't have as many slots.
|
||||
diff -up chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page.h.el8-support-64kpage.patch chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page.h
|
||||
--- chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page.h.el8-support-64kpage.patch 2024-01-30 21:24:10.000000000 +0100
|
||||
+++ chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_page.h 2024-02-01 17:20:37.178877448 +0100
|
||||
@@ -95,26 +95,25 @@ struct SlotSpanMetadata {
|
||||
|
||||
// CHECK()ed in AllocNewSlotSpan().
|
||||
// The maximum number of bits needed to cover all currently supported OSes.
|
||||
- static constexpr size_t kMaxSlotsPerSlotSpanBits = 13;
|
||||
+ static constexpr size_t kMaxSlotsPerSlotSpanBits = 15;
|
||||
static_assert(kMaxSlotsPerSlotSpan < (1 << kMaxSlotsPerSlotSpanBits), "");
|
||||
|
||||
- // |marked_full| isn't equivalent to being full. Slot span is marked as full
|
||||
- // iff it isn't on the active slot span list (or any other list).
|
||||
- uint32_t marked_full : 1;
|
||||
// |num_allocated_slots| is 0 for empty or decommitted slot spans, which can
|
||||
// be further differentiated by checking existence of the freelist.
|
||||
- uint32_t num_allocated_slots : kMaxSlotsPerSlotSpanBits;
|
||||
- uint32_t num_unprovisioned_slots : kMaxSlotsPerSlotSpanBits;
|
||||
+ uint16_t num_allocated_slots : kMaxSlotsPerSlotSpanBits;
|
||||
+ uint16_t num_unprovisioned_slots : kMaxSlotsPerSlotSpanBits;
|
||||
+
|
||||
+ // |marked_full| isn't equivalent to being full. Slot span is marked as full
|
||||
+ // iff it isn't on the active slot span list (or any other list).
|
||||
+ bool marked_full : 1;
|
||||
|
||||
private:
|
||||
- const uint32_t can_store_raw_size_ : 1;
|
||||
- uint32_t freelist_is_sorted_ : 1;
|
||||
- uint32_t unused1_ : (32 - 1 - 2 * kMaxSlotsPerSlotSpanBits - 1 - 1);
|
||||
+ const uint8_t can_store_raw_size_ : 1;
|
||||
+ uint8_t freelist_is_sorted_ : 1;
|
||||
// If |in_empty_cache_|==1, |empty_cache_index| is undefined and mustn't be
|
||||
// used.
|
||||
- uint16_t in_empty_cache_ : 1;
|
||||
- uint16_t empty_cache_index_ : kEmptyCacheIndexBits; // < kMaxFreeableSpans.
|
||||
- uint16_t unused2_ : (16 - 1 - kEmptyCacheIndexBits);
|
||||
+ bool in_empty_cache_ : 1;
|
||||
+ uint8_t empty_cache_index_ : kEmptyCacheIndexBits; // < kMaxFreeableSpans.
|
||||
// Can use only 48 bits (6B) in this bitfield, as this structure is embedded
|
||||
// in PartitionPage which has 2B worth of fields and must fit in 32B.
|
||||
|
||||
@@ -279,18 +278,13 @@ static_assert(sizeof(SlotSpanMetadata) <
|
||||
"SlotSpanMetadata must fit into a Page Metadata slot.");
|
||||
|
||||
inline constexpr SlotSpanMetadata::SlotSpanMetadata() noexcept
|
||||
- : marked_full(0),
|
||||
- num_allocated_slots(0),
|
||||
+ : num_allocated_slots(0),
|
||||
num_unprovisioned_slots(0),
|
||||
+ marked_full(0),
|
||||
can_store_raw_size_(false),
|
||||
freelist_is_sorted_(true),
|
||||
- unused1_(0),
|
||||
in_empty_cache_(0),
|
||||
- empty_cache_index_(0),
|
||||
- unused2_(0) {
|
||||
- (void)unused1_;
|
||||
- (void)unused2_;
|
||||
-}
|
||||
+ empty_cache_index_(0) {}
|
||||
|
||||
inline SlotSpanMetadata::SlotSpanMetadata(const SlotSpanMetadata&) = default;
|
||||
|
||||
@@ -883,7 +877,7 @@ PA_ALWAYS_INLINE void SlotSpanMetadata::
|
||||
|
||||
size_t num_slots_per_span = bucket->get_slots_per_span();
|
||||
PA_DCHECK(num_slots_per_span <= kMaxSlotsPerSlotSpan);
|
||||
- num_unprovisioned_slots = static_cast<uint32_t>(num_slots_per_span);
|
||||
+ num_unprovisioned_slots = static_cast<uint16_t>(num_slots_per_span);
|
||||
PA_DCHECK(num_unprovisioned_slots);
|
||||
|
||||
ToSuperPageExtent()->IncrementNumberOfNonemptySlotSpans();
|
||||
diff -up chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.el8-support-64kpage.patch chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc
|
||||
--- chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc.el8-support-64kpage.patch 2024-01-30 21:24:10.000000000 +0100
|
||||
+++ chromium-121.0.6167.139/base/allocator/partition_allocator/src/partition_alloc/partition_root.cc 2024-02-01 17:20:37.178877448 +0100
|
||||
@@ -950,12 +950,11 @@ void PartitionRoot::Init(PartitionOption
|
||||
(internal::SystemPageSize() == (size_t{1} << 14)));
|
||||
#elif BUILDFLAG(IS_LINUX) && defined(ARCH_CPU_ARM64)
|
||||
// Check runtime pagesize. Though the code is currently the same, it is
|
||||
- // not merged with the IS_APPLE case above as a 1 << 16 case needs to be
|
||||
- // added here in the future, to allow 64 kiB pagesize. That is only
|
||||
- // supported on Linux on arm64, not on IS_APPLE, but not yet present here
|
||||
- // as the rest of the partition allocator does not currently support it.
|
||||
+ // not merged with the IS_APPLE case above as a 1 << 16 case is only
|
||||
+ // supported on Linux on AArch64.
|
||||
PA_CHECK((internal::SystemPageSize() == (size_t{1} << 12)) ||
|
||||
- (internal::SystemPageSize() == (size_t{1} << 14)));
|
||||
+ (internal::SystemPageSize() == (size_t{1} << 14)) ||
|
||||
+ (internal::SystemPageSize() == (size_t{1} << 16)));
|
||||
#endif
|
||||
|
||||
::partition_alloc::internal::ScopedGuard guard{lock_};
|
@ -0,0 +1,191 @@
|
||||
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/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files chromium-122.0.6261.29/third_party/material_color_utilities/src/cpp/palettes/tones.cc
|
||||
--- chromium-122.0.6261.29/third_party/material_color_utilities/src/cpp/palettes/tones.cc.missing-header-files 2024-02-07 19:52:34.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2024-02-12 14:59:48.143415190 +0100
|
||||
@@ -14,6 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
+#include <cmath>
|
||||
#include "cpp/palettes/tones.h"
|
||||
|
||||
#include "cpp/cam/cam.h"
|
||||
diff -up chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h
|
||||
--- chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h.missing-header-files 2024-02-07 19:52:59.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/third_party/ruy/src/ruy/profiler/instrumentation.h 2024-02-12 14:59:48.143415190 +0100
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
|
||||
|
||||
#ifdef RUY_PROFILER
|
||||
+#include <string>
|
||||
#include <cstdio>
|
||||
#include <mutex>
|
||||
#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);
|
@ -0,0 +1,63 @@
|
||||
diff -up chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||||
--- chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2024-02-07 19:49:25.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2024-02-11 18:55:29.964450604 +0100
|
||||
@@ -79,8 +79,6 @@ void FileAnalyzer::Start(const base::Fil
|
||||
|
||||
if (inspection_type == DownloadFileType::ZIP) {
|
||||
StartExtractZipFeatures();
|
||||
- } else if (inspection_type == DownloadFileType::RAR) {
|
||||
- StartExtractRarFeatures();
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
} else if (inspection_type == DownloadFileType::DMG) {
|
||||
StartExtractDmgFeatures();
|
||||
diff -up chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn
|
||||
--- chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn.nounrar 2024-02-07 19:49:27.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/common/safe_browsing/BUILD.gn 2024-02-11 18:55:29.965450629 +0100
|
||||
@@ -143,7 +143,6 @@ source_set("safe_browsing") {
|
||||
"//components/safe_browsing/content/common:file_type_policies",
|
||||
"//components/safe_browsing/core/common",
|
||||
"//third_party/lzma_sdk/google:seven_zip_reader",
|
||||
- "//third_party/unrar:unrar",
|
||||
]
|
||||
|
||||
public_deps = [
|
||||
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2024-02-07 19:49:27.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.cc 2024-02-11 23:49:25.061324007 +0100
|
||||
@@ -74,6 +74,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
const std::optional<std::string>& password,
|
||||
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
|
||||
AnalyzeRarFileCallback callback) {
|
||||
+#if 0
|
||||
DCHECK(rar_file.IsValid());
|
||||
temp_file_getter_.Bind(std::move(temp_file_getter));
|
||||
callback_ = std::move(callback);
|
||||
@@ -90,6 +91,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
/*password=*/password,
|
||||
std::move(analysis_finished_callback),
|
||||
std::move(temp_file_getter_callback), &results_);
|
||||
+#else
|
||||
+ NOTREACHED();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
|
||||
diff -up chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h
|
||||
--- chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2024-02-07 19:49:27.000000000 +0100
|
||||
+++ chromium-122.0.6261.29/chrome/services/file_util/safe_archive_analyzer.h 2024-02-11 18:55:29.966450653 +0100
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
|
||||
-#include "chrome/utility/safe_browsing/rar_analyzer.h"
|
||||
#include "chrome/utility/safe_browsing/seven_zip_analyzer.h"
|
||||
#include "chrome/utility/safe_browsing/zip_analyzer.h"
|
||||
#include "mojo/public/cpp/bindings/remote.h"
|
||||
@@ -67,7 +66,6 @@ class SafeArchiveAnalyzer : public chrom
|
||||
void Timeout();
|
||||
|
||||
safe_browsing::ZipAnalyzer zip_analyzer_;
|
||||
- safe_browsing::RarAnalyzer rar_analyzer_;
|
||||
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;
|
@ -0,0 +1,13 @@
|
||||
diff -up chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py.me chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py
|
||||
--- chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py.me 2024-02-23 12:04:45.451423995 +0100
|
||||
+++ chromium-122.0.6261.57/tools/json_to_struct/json_to_struct.py 2024-02-23 12:18:04.099824392 +0100
|
||||
@@ -124,7 +124,8 @@ def _GenerateH(basepath, fileroot, head,
|
||||
f.write(u'#include <cstddef>\n')
|
||||
f.write(u'\n')
|
||||
|
||||
- if system_headers := schema.get(u'system-headers', []):
|
||||
+ system_headers = schema.get(u'system-headers', [])
|
||||
+ if system_headers:
|
||||
for header in system_headers:
|
||||
f.write(u'#include <%s>\n' % header)
|
||||
f.write(u'\n')
|
@ -0,0 +1,98 @@
|
||||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me 2023-05-21 10:05:00.357860329 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2023-05-21 10:18:09.665432735 +0200
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "media/gpu/gpu_video_encode_accelerator_helpers.h"
|
||||
#include "media/gpu/h264_dpb.h"
|
||||
#include "media/gpu/macros.h"
|
||||
-#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/va_surface.h"
|
||||
#include "media/gpu/vaapi/vaapi_common.h"
|
||||
@@ -200,7 +199,7 @@ bool VaapiVideoEncodeAccelerator::Initia
|
||||
|
||||
const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile);
|
||||
if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 &&
|
||||
- codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) {
|
||||
+ codec != VideoCodec::kVP9) {
|
||||
MEDIA_LOG(ERROR, media_log.get())
|
||||
<< "Unsupported profile: " << GetProfileName(config.output_profile);
|
||||
return false;
|
||||
@@ -293,7 +292,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
break;
|
||||
case VideoCodec::kVP8:
|
||||
case VideoCodec::kVP9:
|
||||
- case VideoCodec::kAV1:
|
||||
mode = VaapiWrapper::kEncodeConstantQuantizationParameter;
|
||||
break;
|
||||
default:
|
||||
@@ -356,12 +354,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
vaapi_wrapper_, error_cb);
|
||||
}
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- if (!IsConfiguredForTesting()) {
|
||||
- encoder_ = std::make_unique<AV1VaapiVideoEncoderDelegate>(
|
||||
- vaapi_wrapper_, error_cb);
|
||||
- }
|
||||
- break;
|
||||
default:
|
||||
NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_);
|
||||
return;
|
||||
@@ -835,10 +827,6 @@ VaapiVideoEncodeAccelerator::CreateEncod
|
||||
case VideoCodec::kVP9:
|
||||
picture = new VaapiVP9Picture(std::move(reconstructed_surface));
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- picture = new VaapiAV1Picture(/*display_va_surface=*/nullptr,
|
||||
- std::move(reconstructed_surface));
|
||||
- break;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn 2023-05-20 13:14:10.756183626 +0200
|
||||
@@ -38,8 +38,6 @@ source_set("vaapi") {
|
||||
sources = [
|
||||
"av1_vaapi_video_decoder_delegate.cc",
|
||||
"av1_vaapi_video_decoder_delegate.h",
|
||||
- "av1_vaapi_video_encoder_delegate.cc",
|
||||
- "av1_vaapi_video_encoder_delegate.h",
|
||||
"h264_vaapi_video_decoder_delegate.cc",
|
||||
"h264_vaapi_video_decoder_delegate.h",
|
||||
"h264_vaapi_video_encoder_delegate.cc",
|
||||
diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc
|
||||
--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc.me 2023-11-02 15:08:30.921325747 +0100
|
||||
+++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.cc 2023-11-02 15:09:46.123692602 +0100
|
||||
@@ -3124,6 +3124,7 @@ bool VaapiWrapper::GetSupportedPackedHea
|
||||
return true;
|
||||
}
|
||||
|
||||
+#if 0 //disable AV1 due to old libva on epel9
|
||||
bool VaapiWrapper::GetMinAV1SegmentSize(VideoCodecProfile profile,
|
||||
uint32_t& min_seg_size) {
|
||||
CHECK(!enforce_sequence_affinity_ ||
|
||||
@@ -3141,6 +3142,7 @@ bool VaapiWrapper::GetMinAV1SegmentSize(
|
||||
|
||||
return true;
|
||||
}
|
||||
+#endif
|
||||
|
||||
bool VaapiWrapper::BlitSurface(const VASurface& va_surface_src,
|
||||
const VASurface& va_surface_dest,
|
||||
diff -up chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h
|
||||
--- chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h.me 2023-11-02 15:09:58.973928395 +0100
|
||||
+++ chromium-119.0.6045.105/media/gpu/vaapi/vaapi_wrapper.h 2023-11-02 15:10:45.990791114 +0100
|
||||
@@ -553,9 +553,11 @@ class MEDIA_GPU_EXPORT VaapiWrapper
|
||||
bool& packed_pps,
|
||||
bool& packed_slice);
|
||||
|
||||
+#if 0 //disable AV1 due to old libva on epel9
|
||||
// Gets the minimum segment block size supported for AV1 encoding.
|
||||
[[nodiscard]] bool GetMinAV1SegmentSize(VideoCodecProfile profile,
|
||||
uint32_t& min_seg_size);
|
||||
+#endif
|
||||
|
||||
// Blits a VASurface |va_surface_src| into another VASurface
|
||||
// |va_surface_dest| applying pixel format conversion, cropping
|
@ -0,0 +1,32 @@
|
||||
commit 04866680f4f9a8475ae3795ad6ed59649ba478d7
|
||||
Author: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue Jan 23 12:04:05 2024 +0000
|
||||
|
||||
libstdc++: fix static assertion in NodeUuidEquality
|
||||
|
||||
libstdc++ equality checks in static assertion that it is possible to
|
||||
compare for equality base::Uuid to BookmarkNode*. This was a missing
|
||||
operator in NodeUuidEquality that this changeset adds.
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: Icc9809cb43d321f0b3e3394ef27ab55672aec5e7
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227686
|
||||
Reviewed-by: Mikel Astiz <mastiz@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1250753}
|
||||
|
||||
diff --git a/components/bookmarks/browser/uuid_index.h b/components/bookmarks/browser/uuid_index.h
|
||||
index 77cb1a1a54dd9..639d6fefcd831 100644
|
||||
--- a/components/bookmarks/browser/uuid_index.h
|
||||
+++ b/components/bookmarks/browser/uuid_index.h
|
||||
@@ -23,6 +23,10 @@ class NodeUuidEquality {
|
||||
bool operator()(const BookmarkNode* n1, const base::Uuid& uuid2) const {
|
||||
return n1->uuid() == uuid2;
|
||||
}
|
||||
+
|
||||
+ bool operator()(const base::Uuid& uuid1, const BookmarkNode* n2) const {
|
||||
+ return uuid1 == n2->uuid();
|
||||
+ }
|
||||
};
|
||||
|
||||
// Used to hash BookmarkNode instances by UUID.
|
@ -0,0 +1,740 @@
|
||||
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 -up chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc.me chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc
|
||||
--- chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc.me 2024-02-21 01:20:53.138946500 +0100
|
||||
+++ chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_buffer_sources.cc 2024-02-21 12:33:53.226207103 +0100
|
||||
@@ -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 {
|
||||
@@ -699,11 +698,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,
|
||||
@@ -712,12 +712,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,
|
||||
@@ -728,11 +729,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,
|
||||
@@ -741,12 +743,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,
|
||||
@@ -757,12 +760,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,
|
||||
@@ -771,12 +774,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,
|
||||
@@ -787,11 +791,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,
|
||||
@@ -800,12 +805,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,
|
||||
@@ -816,11 +822,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,
|
||||
@@ -829,12 +836,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,
|
||||
@@ -845,9 +853,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,
|
||||
@@ -862,11 +870,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,
|
||||
@@ -878,12 +888,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,
|
||||
@@ -894,12 +905,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,
|
||||
diff -up chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits.h.me chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits.h
|
||||
--- chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits.h.me 2024-02-21 01:20:53.138946500 +0100
|
||||
+++ chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits.h 2024-02-21 12:33:53.225207075 +0100
|
||||
@@ -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
|
||||
diff -up chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h.me chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h
|
||||
--- chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h.me 2024-02-21 01:20:53.138946500 +0100
|
||||
+++ chromium-122.0.6261.57/third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h 2024-02-21 12:33:53.227207131 +0100
|
||||
@@ -5,9 +5,6 @@
|
||||
#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 <type_traits>
|
||||
-
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
|
||||
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits.h"
|
||||
@@ -736,8 +733,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,
|
||||
@@ -749,8 +747,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,
|
||||
@@ -762,8 +761,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,
|
||||
@@ -776,8 +776,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,
|
||||
@@ -790,8 +791,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,
|
||||
@@ -804,8 +806,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.
|
||||
@@ -820,8 +823,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,
|
||||
@@ -834,9 +838,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,
|
||||
@@ -850,8 +854,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,
|
||||
@@ -864,8 +871,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.
|
||||
@@ -880,8 +889,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,
|
||||
@@ -1217,8 +1229,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*;
|
||||
|
||||
@@ -1294,8 +1307,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
|
||||
@@ -1425,8 +1439,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) {
|
||||
@@ -1449,8 +1465,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,
|
||||
@@ -1479,8 +1496,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) {
|
||||
@@ -1504,8 +1523,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,
|
||||
@@ -1534,8 +1554,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) {
|
||||
@@ -1546,11 +1569,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) {
|
||||
@@ -1562,8 +1588,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) {
|
||||
@@ -1573,8 +1602,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
|
||||
@@ -1611,8 +1642,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,
|
||||
@@ -1647,8 +1679,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) {
|
||||
@@ -1664,8 +1698,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) {
|
||||
@@ -1686,8 +1722,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 =
|
||||
@@ -1719,8 +1756,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;
|
||||
|
||||
@@ -1742,8 +1780,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;
|
||||
|
Loading…
Reference in new issue