commit
db6710570b
@ -1,13 +0,0 @@
|
|||||||
diff -up chromium-117.0.5938.62/content/browser/interest_group/header_direct_from_seller_signals.cc.me chromium-117.0.5938.62/content/browser/interest_group/header_direct_from_seller_signals.cc
|
|
||||||
--- chromium-117.0.5938.62/content/browser/interest_group/header_direct_from_seller_signals.cc.me 2023-09-16 09:43:41.717545215 +0200
|
|
||||||
+++ chromium-117.0.5938.62/content/browser/interest_group/header_direct_from_seller_signals.cc 2023-09-16 09:48:07.319539585 +0200
|
|
||||||
@@ -187,7 +187,8 @@ void OnJsonDecoded(std::unique_ptr<const
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
-HeaderDirectFromSellerSignals::HeaderDirectFromSellerSignals() = default;
|
|
||||||
+HeaderDirectFromSellerSignals::HeaderDirectFromSellerSignals() :
|
|
||||||
+ seller_signals_(absl::nullopt), auction_signals_(absl::nullopt) { }
|
|
||||||
|
|
||||||
HeaderDirectFromSellerSignals::~HeaderDirectFromSellerSignals() = default;
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn.me chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn
|
|
||||||
--- chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn.me 2023-09-10 16:54:00.804385139 +0200
|
|
||||||
+++ chromium-117.0.5938.48/third_party/blink/renderer/core/BUILD.gn 2023-09-10 16:54:13.540625077 +0200
|
|
||||||
@@ -1694,8 +1694,6 @@ action_foreach("element_locator_test_pro
|
|
||||||
python_path_root = "${root_out_dir}/pyproto"
|
|
||||||
python_path_proto = "${python_path_root}/third_party/blink/renderer/core/lcp_critical_path_predictor"
|
|
||||||
|
|
||||||
- mnemonic = "ELOC_PROTO"
|
|
||||||
-
|
|
||||||
source_dir = "lcp_critical_path_predictor/test_proto"
|
|
||||||
sources = rebase_path([ "lcp_image_id.asciipb" ], "", source_dir)
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
|||||||
--- chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.than 2023-11-26 13:50:07.005519877 +0100
|
|
||||||
+++ chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h 2023-11-26 13:50:49.727267240 +0100
|
|
||||||
@@ -152,10 +152,7 @@
|
|
||||||
(!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \
|
|
||||||
defined(ARCH_CPU_LITTLE_ENDIAN))
|
|
||||||
|
|
||||||
-#define PA_CONFIG_HAS_MEMORY_TAGGING() \
|
|
||||||
- (defined(ARCH_CPU_ARM64) && defined(__clang__) && \
|
|
||||||
- !defined(ADDRESS_SANITIZER) && \
|
|
||||||
- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)))
|
|
||||||
+#define PA_CONFIG_HAS_MEMORY_TAGGING() 0
|
|
||||||
|
|
||||||
#if PA_CONFIG(HAS_MEMORY_TAGGING)
|
|
||||||
static_assert(sizeof(void*) == 8);
|
|
@ -1,16 +0,0 @@
|
|||||||
diff -up chromium-120.0.6099.56/third_party/libc++/src/include/__config.me chromium-120.0.6099.56/third_party/libc++/src/include/__config
|
|
||||||
--- chromium-120.0.6099.56/third_party/libc++/src/include/__config.me 2023-12-03 00:05:51.254483474 +0100
|
|
||||||
+++ chromium-120.0.6099.56/third_party/libc++/src/include/__config 2023-12-03 00:06:05.872863168 +0100
|
|
||||||
@@ -32,11 +32,7 @@
|
|
||||||
|
|
||||||
// Warn if a compiler version is used that is not supported anymore
|
|
||||||
// LLVM RELEASE Update the minimum compiler versions
|
|
||||||
-# if defined(_LIBCPP_CLANG_VER)
|
|
||||||
-# if _LIBCPP_CLANG_VER < 1500
|
|
||||||
-# warning "Libc++ only supports Clang 15 and later"
|
|
||||||
-# endif
|
|
||||||
-# elif defined(_LIBCPP_APPLE_CLANG_VER)
|
|
||||||
+# if defined(_LIBCPP_APPLE_CLANG_VER)
|
|
||||||
# if _LIBCPP_APPLE_CLANG_VER < 1500
|
|
||||||
# warning "Libc++ only supports AppleClang 15 and later"
|
|
||||||
# endif
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -up chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn.me chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn
|
|
||||||
--- chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn.me 2023-11-26 16:14:15.364064126 +0100
|
|
||||||
+++ chromium-120.0.6099.35/build/config/linux/atspi2/BUILD.gn 2023-11-26 16:41:16.877321990 +0100
|
|
||||||
@@ -21,6 +21,9 @@ if (use_atk) {
|
|
||||||
minor = atspi_version[1]
|
|
||||||
micro = atspi_version[2]
|
|
||||||
|
|
||||||
+ # gn workaround for the error: Assignment had no effect
|
|
||||||
+ print("ATSPI Version: $major.$minor.$micro")
|
|
||||||
+
|
|
||||||
# ATSPI 2.49.90 now defines these for us and it's an error for us to
|
|
||||||
# redefine them on the compiler command line.
|
|
||||||
# See ATSPI 927344a34cd5bf81fc64da4968241735ecb4f03b
|
|
@ -1,24 +0,0 @@
|
|||||||
diff -up chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h.than chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h
|
|
||||||
--- chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h.than 2023-11-26 18:19:11.355117176 +0100
|
|
||||||
+++ chromium-120.0.6099.35/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_base/strings/safe_sprintf.h 2023-11-26 18:20:21.090366036 +0100
|
|
||||||
@@ -184,7 +184,7 @@ struct Arg {
|
|
||||||
//
|
|
||||||
// Warning: don't just do Arg(NULL) here because in some libcs, NULL is an
|
|
||||||
// alias for nullptr!
|
|
||||||
- Arg(nullptr_t p) : type(INT) {
|
|
||||||
+ Arg(std::nullptr_t p) : type(INT) {
|
|
||||||
integer.i = 0;
|
|
||||||
// Internally, SafeSprintf expects to represent nulls as integers whose
|
|
||||||
// width is equal to sizeof(NULL), which is not necessarily equal to
|
|
||||||
diff -up chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h.than chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h
|
|
||||||
--- chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h.than 2023-12-04 10:20:45.350540897 +0100
|
|
||||||
+++ chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h 2023-12-04 10:23:17.335339670 +0100
|
|
||||||
@@ -21,7 +21,7 @@ class FragmentDataIteratorBase {
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit FragmentDataIteratorBase(Head& head) : fragment_head_(head) {}
|
|
||||||
- explicit FragmentDataIteratorBase(nullptr_t) {}
|
|
||||||
+ explicit FragmentDataIteratorBase(std::nullptr_t) {}
|
|
||||||
|
|
||||||
Data* GetFragmentData() const {
|
|
||||||
return !IsDone() ? &fragment_head_.at(idx_) : nullptr;
|
|
@ -0,0 +1,13 @@
|
|||||||
|
diff -up chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.me chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h
|
||||||
|
--- chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h.me 2024-01-16 14:20:52.401890657 +0100
|
||||||
|
+++ chromium-121.0.6167.57/base/allocator/partition_allocator/src/partition_alloc/partition_alloc_config.h 2024-01-16 15:08:04.070156474 +0100
|
||||||
|
@@ -162,7 +162,8 @@ static_assert(sizeof(void*) != 8, "");
|
||||||
|
|
||||||
|
#if defined(ARCH_CPU_ARM64) && defined(__clang__) && \
|
||||||
|
!defined(ADDRESS_SANITIZER) && \
|
||||||
|
- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID))
|
||||||
|
+ (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)) && \
|
||||||
|
+ __GLIBC_PREREQ(2, 29)
|
||||||
|
#define PA_CONFIG_HAS_MEMORY_TAGGING() 1
|
||||||
|
#else
|
||||||
|
#define PA_CONFIG_HAS_MEMORY_TAGGING() 0
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -up chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h.me chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h
|
||||||
|
--- chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h.me 2024-01-18 17:00:24.791582422 +0100
|
||||||
|
+++ chromium-121.0.6167.57/components/performance_manager/resource_attribution/query_params.h 2024-01-18 17:22:21.521682845 +0100
|
||||||
|
@@ -27,7 +27,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;
|
||||||
|
|
||||||
|
// Individual resource contexts to measure.
|
@ -0,0 +1,15 @@
|
|||||||
|
--- chromium-121.0.6167.57/third_party/libc++/src/include/__config.orig 2024-01-16 18:38:00.995930774 +0100
|
||||||
|
+++ chromium-121.0.6167.57/third_party/libc++/src/include/__config 2024-01-16 18:43:47.056517289 +0100
|
||||||
|
@@ -32,11 +32,7 @@
|
||||||
|
|
||||||
|
// Warn if a compiler version is used that is not supported anymore
|
||||||
|
// LLVM RELEASE Update the minimum compiler versions
|
||||||
|
-# if defined(_LIBCPP_CLANG_VER)
|
||||||
|
-# if _LIBCPP_CLANG_VER < 1600
|
||||||
|
-# warning "Libc++ only supports Clang 16 and later"
|
||||||
|
-# endif
|
||||||
|
-# elif defined(_LIBCPP_APPLE_CLANG_VER)
|
||||||
|
+# if defined(_LIBCPP_APPLE_CLANG_VER)
|
||||||
|
# if _LIBCPP_APPLE_CLANG_VER < 1500
|
||||||
|
# warning "Libc++ only supports AppleClang 15 and later"
|
||||||
|
# endif
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -up chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc.me chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc
|
||||||
|
--- chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc.me 2024-01-23 15:13:11.469104694 +0100
|
||||||
|
+++ chromium-121.0.6167.57/content/browser/interest_group/header_direct_from_seller_signals.cc 2024-01-23 15:11:40.117842015 +0100
|
||||||
|
@@ -46,7 +46,7 @@ size_t GetResultSizeBytes(const HeaderDi
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
|
-HeaderDirectFromSellerSignals::Result::Result() = default;
|
||||||
|
+HeaderDirectFromSellerSignals::Result::Result() {}
|
||||||
|
|
||||||
|
HeaderDirectFromSellerSignals::Result::Result(
|
||||||
|
absl::optional<std::string> seller_signals,
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -up chromium-121.0.6167.16/third_party/blink/renderer/core/BUILD.gn.mnemonic-error chromium-121.0.6167.16/third_party/blink/renderer/core/BUILD.gn
|
||||||
|
--- chromium-121.0.6167.16/third_party/blink/renderer/core/BUILD.gn.mnemonic-error 2023-12-19 18:14:43.027723832 +0100
|
||||||
|
+++ chromium-121.0.6167.16/third_party/blink/renderer/core/BUILD.gn 2023-12-19 18:39:47.492384620 +0100
|
||||||
|
@@ -1731,8 +1731,6 @@ action_foreach("element_locator_test_pro
|
||||||
|
python_path_root = "${root_out_dir}/pyproto"
|
||||||
|
python_path_proto = "${python_path_root}/third_party/blink/renderer/core/lcp_critical_path_predictor"
|
||||||
|
|
||||||
|
- mnemonic = "ELOC_PROTO"
|
||||||
|
-
|
||||||
|
source_dir = "lcp_critical_path_predictor/test_proto"
|
||||||
|
sources = rebase_path([ "lcp_image_id.asciipb" ], "", source_dir)
|
||||||
|
sources += rebase_path([ "lcp_image_id_b.asciipb" ], "", source_dir)
|
@ -0,0 +1,12 @@
|
|||||||
|
diff -up chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h.than chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h
|
||||||
|
--- chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h.than 2023-12-04 10:20:45.350540897 +0100
|
||||||
|
+++ chromium-120.0.6099.56/third_party/blink/renderer/core/paint/fragment_data_iterator.h 2023-12-04 10:23:17.335339670 +0100
|
||||||
|
@@ -21,7 +21,7 @@ class FragmentDataIteratorBase {
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit FragmentDataIteratorBase(Head& head) : fragment_head_(head) {}
|
||||||
|
- explicit FragmentDataIteratorBase(nullptr_t) {}
|
||||||
|
+ explicit FragmentDataIteratorBase(std::nullptr_t) {}
|
||||||
|
|
||||||
|
Data* GetFragmentData() const {
|
||||||
|
return !IsDone() ? &fragment_head_.at(idx_) : nullptr;
|
@ -0,0 +1,77 @@
|
|||||||
|
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py
|
||||||
|
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me 2024-01-15 20:48:28.177397102 +0100
|
||||||
|
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py 2024-01-15 20:48:46.427768328 +0100
|
||||||
|
@@ -18,7 +18,7 @@ class HTMLGenerationController(object):
|
||||||
|
|
||||||
|
def GetHTMLForInlineStylesheet(self, contents):
|
||||||
|
if self.current_module is None:
|
||||||
|
- if re.search('url\(.+\)', contents):
|
||||||
|
+ if re.search(r'url\(.+\)', contents):
|
||||||
|
raise Exception(
|
||||||
|
'Default HTMLGenerationController cannot handle inline style urls')
|
||||||
|
return contents
|
||||||
|
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py
|
||||||
|
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me 2024-01-15 20:49:39.363845083 +0100
|
||||||
|
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py 2024-01-15 20:49:57.407212098 +0100
|
||||||
|
@@ -4,4 +4,4 @@
|
||||||
|
|
||||||
|
|
||||||
|
def EscapeJSIfNeeded(js):
|
||||||
|
- return js.replace('</script>', '<\/script>')
|
||||||
|
+ return js.replace(r'</script>', r'<\/script>')
|
||||||
|
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py
|
||||||
|
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me 2024-01-15 20:50:11.819505254 +0100
|
||||||
|
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py 2024-01-15 20:50:38.611050213 +0100
|
||||||
|
@@ -293,6 +293,6 @@ class HTMLModuleParser():
|
||||||
|
html = ''
|
||||||
|
else:
|
||||||
|
if html.find('< /script>') != -1:
|
||||||
|
- raise Exception('Escape script tags with <\/script>')
|
||||||
|
+ raise Exception(r'Escape script tags with <\/script>')
|
||||||
|
|
||||||
|
return HTMLModuleParserResults(html)
|
||||||
|
diff -up chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py
|
||||||
|
--- chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me 2024-01-15 20:48:59.917042709 +0100
|
||||||
|
+++ chromium-121.0.6167.57/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py 2024-01-15 20:49:24.402540761 +0100
|
||||||
|
@@ -60,7 +60,7 @@ class ParsedStyleSheet(object):
|
||||||
|
return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8'))
|
||||||
|
|
||||||
|
# I'm assuming we only have url()'s associated with images
|
||||||
|
- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
|
||||||
|
+ return re.sub(r'url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
|
||||||
|
InlineUrl, self.contents)
|
||||||
|
|
||||||
|
def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
|
||||||
|
@@ -72,7 +72,7 @@ class ParsedStyleSheet(object):
|
||||||
|
raise Exception('@imports are not supported')
|
||||||
|
|
||||||
|
matches = re.findall(
|
||||||
|
- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
|
||||||
|
+ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
|
||||||
|
self.contents)
|
||||||
|
|
||||||
|
def resolve_url(url):
|
||||||
|
diff -up chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py.me chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py
|
||||||
|
--- chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py.me 2024-01-15 20:50:56.810420400 +0100
|
||||||
|
+++ chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-tools/src/scripts/gn/generate_vulkan_icd_json.py 2024-01-15 20:52:33.506387261 +0100
|
||||||
|
@@ -28,7 +28,7 @@ import platform
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def glob_slash(dirname):
|
||||||
|
- """Like regular glob but replaces \ with / in returned paths."""
|
||||||
|
+ """Like regular glob but replaces \\ with / in returned paths."""
|
||||||
|
return [s.replace('\\', '/') for s in glob.glob(dirname)]
|
||||||
|
|
||||||
|
def main():
|
||||||
|
diff -up chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py.me chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py
|
||||||
|
--- chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py.me 2024-01-15 20:52:38.016479000 +0100
|
||||||
|
+++ chromium-121.0.6167.57/third_party/vulkan-deps/vulkan-validation-layers/src/scripts/gn/generate_vulkan_layers_json.py 2024-01-15 20:52:48.863699640 +0100
|
||||||
|
@@ -28,7 +28,7 @@ import platform
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def glob_slash(dirname):
|
||||||
|
- """Like regular glob but replaces \ with / in returned paths."""
|
||||||
|
+ """Like regular glob but replaces \\ with / in returned paths."""
|
||||||
|
return [s.replace('\\', '/') for s in glob.glob(dirname)]
|
||||||
|
|
||||||
|
def main():
|
@ -0,0 +1,55 @@
|
|||||||
|
diff -up chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib chromium-121.0.6167.57/build/config/clang/BUILD.gn
|
||||||
|
--- chromium-121.0.6167.57/build/config/clang/BUILD.gn.rust-clang_lib 2024-01-10 16:43:01.000000000 +0100
|
||||||
|
+++ chromium-121.0.6167.57/build/config/clang/BUILD.gn 2024-01-20 19:51:38.481992799 +0100
|
||||||
|
@@ -112,6 +112,7 @@ template("clang_lib") {
|
||||||
|
_prefix = "lib"
|
||||||
|
_suffix = ""
|
||||||
|
_ext = "a"
|
||||||
|
+ _libprefix = ""
|
||||||
|
if (is_win) {
|
||||||
|
_dir = "windows"
|
||||||
|
_prefix = ""
|
||||||
|
@@ -127,7 +128,33 @@ template("clang_lib") {
|
||||||
|
}
|
||||||
|
} else if (is_apple) {
|
||||||
|
_dir = "darwin"
|
||||||
|
- } else if (is_linux || is_chromeos) {
|
||||||
|
+ } else if (is_linux) {
|
||||||
|
+ if (current_cpu == "x64") {
|
||||||
|
+ _dir = "x86_64-redhat-linux-gnu"
|
||||||
|
+ _suffix ="-x86_64"
|
||||||
|
+ } else if (current_cpu == "x86") {
|
||||||
|
+ _dir = "i386-redhat-linux-gnu"
|
||||||
|
+ _suffix = "-i386"
|
||||||
|
+ } else if (current_cpu == "arm64") {
|
||||||
|
+ _dir = "aarch64-redhat-linux-gnu"
|
||||||
|
+ _suffix = "-aarch64"
|
||||||
|
+ } else if (current_cpu == "arm") {
|
||||||
|
+ _dir = "armhf-redhat-linux-gnu"
|
||||||
|
+ _suffix = "-armhf"
|
||||||
|
+ } else if (current_cpu == "ppc64") {
|
||||||
|
+ _dir = "powerpc64le-redhat-linux-gnu"
|
||||||
|
+ _suffix = "-powerpc64le"
|
||||||
|
+ } else {
|
||||||
|
+ assert(false) # Unhandled cpu type
|
||||||
|
+ }
|
||||||
|
+ # different clang lib dir in fedora/epel
|
||||||
|
+ if (clang_version == "17") {
|
||||||
|
+ _suffix = ""
|
||||||
|
+ } else if (clang_version == "16" || clang_version == "14") {
|
||||||
|
+ _libprefix = "64"
|
||||||
|
+ _dir = ""
|
||||||
|
+ }
|
||||||
|
+ } else if (is_chromeos) {
|
||||||
|
if (current_cpu == "x64") {
|
||||||
|
_dir = "x86_64-unknown-linux-gnu"
|
||||||
|
} else if (current_cpu == "x86") {
|
||||||
|
@@ -166,7 +193,7 @@ template("clang_lib") {
|
||||||
|
assert(false) # Unhandled target platform
|
||||||
|
}
|
||||||
|
|
||||||
|
- _clang_lib_dir = "$clang_base_path/lib/clang/$clang_version/lib"
|
||||||
|
+ _clang_lib_dir = "$clang_base_path/lib${_libprefix}/clang/$clang_version/lib"
|
||||||
|
_lib_file = "${_prefix}clang_rt.${_libname}${_suffix}.${_ext}"
|
||||||
|
libs = [ "$_clang_lib_dir/$_dir/$_lib_file" ]
|
||||||
|
}
|
@ -0,0 +1,34 @@
|
|||||||
|
diff -up chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc
|
||||||
|
--- chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc.me 2024-01-16 10:54:38.994173911 +0100
|
||||||
|
+++ chromium-121.0.6167.57/media/ffmpeg/ffmpeg_common.cc 2024-01-16 11:06:20.974160612 +0100
|
||||||
|
@@ -710,8 +710,13 @@ bool AVStreamToVideoDecoderConfig(const
|
||||||
|
}
|
||||||
|
|
||||||
|
VideoTransformation video_transformation = VideoTransformation();
|
||||||
|
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
|
||||||
|
+ for (int i = 0; i < stream->nb_side_data; i++) {
|
||||||
|
+ const auto& side_data = stream->side_data[i];
|
||||||
|
+#else
|
||||||
|
for (int i = 0; i < stream->codecpar->nb_coded_side_data; ++i) {
|
||||||
|
const auto& side_data = stream->codecpar->coded_side_data[i];
|
||||||
|
+#endif
|
||||||
|
switch (side_data.type) {
|
||||||
|
case AV_PKT_DATA_DISPLAYMATRIX: {
|
||||||
|
CHECK_EQ(side_data.size, sizeof(int32_t) * 3 * 3);
|
||||||
|
diff -up chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc
|
||||||
|
--- chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc.me 2024-01-16 11:12:27.521534151 +0100
|
||||||
|
+++ chromium-121.0.6167.57/media/filters/audio_video_metadata_extractor.cc 2024-01-16 11:15:08.717337026 +0100
|
||||||
|
@@ -113,8 +113,13 @@ bool AudioVideoMetadataExtractor::Extrac
|
||||||
|
if (!stream)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(60, 31, 102)
|
||||||
|
+ for (int j = 0; j < stream->nb_side_data; j++) {
|
||||||
|
+ const AVPacketSideData& sd = stream->side_data[j];
|
||||||
|
+#else
|
||||||
|
for (int j = 0; j < stream->codecpar->nb_coded_side_data; j++) {
|
||||||
|
const AVPacketSideData& sd = stream->codecpar->coded_side_data[j];
|
||||||
|
+#endif
|
||||||
|
if (sd.type == AV_PKT_DATA_DISPLAYMATRIX) {
|
||||||
|
CHECK_EQ(sd.size, sizeof(int32_t) * 3 * 3);
|
||||||
|
rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
|
@ -0,0 +1,743 @@
|
|||||||
|
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
|
||||||
|
@@ -5,6 +5,9 @@
|
||||||
|
#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"
|
||||||
|
@@ -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;
|
||||||
|
|
Loading…
Reference in new issue