forked from pool/nodejs-electron
Compare commits
295 Commits
Author | SHA256 | Date | |
---|---|---|---|
0f89da960d | |||
ec5006ea2e | |||
260ba0122d | |||
f6dde4469c | |||
e8dda073d6 | |||
85d8cae8fd | |||
fff53f3c2e | |||
9dda8dd120 | |||
d74ae9ab23 | |||
805ede6b84 | |||
26d96f1da7 | |||
b817b0df97 | |||
4c06b33c6b | |||
754f344fe0 | |||
a03e893c19 | |||
26d8b6ddb5 | |||
29251bbf34 | |||
73c6162442 | |||
94ec34be6b | |||
e95bf3c296 | |||
d83e41ea5c | |||
8fdf2bc55f | |||
8a7b712932 | |||
9d30973976 | |||
669e2448d0 | |||
b798aa04c9 | |||
c2c18aa4ea | |||
042a08719d | |||
82c926a786 | |||
ef5e272069 | |||
1a1f18fcee | |||
d2030dc315 | |||
406ba87a0f | |||
b751b12230 | |||
80bce23334 | |||
e635b1b78b | |||
542e43e0b8 | |||
75c9f1de89 | |||
aea5648173 | |||
cfa7ba0c34 | |||
1445e658ba | |||
be629b734d | |||
eb3b37261d | |||
70f067cacc | |||
2a429b3ee5 | |||
026fa6c008 | |||
5b61c80cd8 | |||
91bf85bb5c | |||
2440798081 | |||
65af71ce49 | |||
e8bc9d9f1b | |||
745a3d0d67 | |||
aacdf47b74 | |||
ee8e43b84d | |||
8109463bcc | |||
813e001eb6 | |||
29e8310f36 | |||
c1d2f1fc97 | |||
790e0d969d | |||
a86f6d501c | |||
bc83f3c133 | |||
7566a988dc | |||
13a7d58d32 | |||
e2f510b254 | |||
efd16e3d7c | |||
108b012e87 | |||
73e2d507c4 | |||
1ef9755d4e | |||
3849245283 | |||
3948c045e7 | |||
680ed95ecc | |||
d2352147a4 | |||
dccc537bdf | |||
49b83f55af | |||
eccff4a6fb | |||
7572262433 | |||
22f147201a | |||
c8d2bd2b98 | |||
eb54f04ac4 | |||
1115f8ef5b | |||
32e191bbca | |||
7a6c2ab836 | |||
42e6345ca8 | |||
a1e40c1b19 | |||
09f0b10444 | |||
95dd27cb71 | |||
daacca7243 | |||
3500c44eab | |||
90dc965674 | |||
65bda7d06e | |||
5f0c39625e | |||
4bb9075f6e | |||
b9226c4203 | |||
c5be2e53a3 | |||
9ba5597e83 | |||
81623b9fe4 | |||
70eadb9337 | |||
fd457c8222 | |||
5b6cc34f72 | |||
e0033247b8 | |||
12ee6c9f4b | |||
7edd73f22b | |||
3ab58995f0 | |||
c55d82c229 | |||
7aa978b464 | |||
c8db8b05cd | |||
b8de22e7d6 | |||
7d2ea15c69 | |||
3a09d484f7 | |||
7bfa69403a | |||
2c263b12ca | |||
1933231e97 | |||
267719b9ea | |||
5481d9819d | |||
cef1ee1e83 | |||
2a74265430 | |||
b74799856e | |||
755f0b9d0c | |||
fd9e2b5519 | |||
efb4960e0f | |||
3a6c804cdb | |||
e2678d3698 | |||
89a5337a99 | |||
ebe5ceaa3c | |||
186e1cbc0d | |||
f7afbac4ea | |||
ae7d830a89 | |||
4553380709 | |||
afe3489454 | |||
b3a99a75c7 | |||
4f8915679b | |||
46ead24b74 | |||
7b259750d2 | |||
df11a7ab2b | |||
225eb7cb74 | |||
0c2baa41b0 | |||
ad7c1f6ef8 | |||
0d8fe13690 | |||
feb0b011a6 | |||
3e923870ec | |||
c69a421668 | |||
37300b8b33 | |||
87b6cc8a4e | |||
4c5373e958 | |||
87e3ce1f0a | |||
c3cb083fac | |||
4e42e601e4 | |||
1f9dd53ca1 | |||
6f65188611 | |||
ba3df18479 | |||
c993a8a9c5 | |||
927e8f5953 | |||
a41f549df1 | |||
fa2f53afee | |||
e0e5abe1a7 | |||
7c283382da | |||
f0080a89d4 | |||
1096bbe706 | |||
0c99c13e61 | |||
67c50d89c5 | |||
c07c336240 | |||
7ea953712c | |||
83b865b88d | |||
54e7d0e8ce | |||
597027e7ca | |||
64170b0340 | |||
c49ea03c29 | |||
4005129651 | |||
c3b29f18a0 | |||
30c1f7518c | |||
c0c29ae089 | |||
efd35844fa | |||
820e507eaf | |||
e988b8f6a1 | |||
82bc3670f8 | |||
8dbe484b4b | |||
a9279f958b | |||
2b00d0feee | |||
f542cb4c47 | |||
9de9c110ff | |||
9c8e9fa36d | |||
23d036eca0 | |||
21f03c114f | |||
05c15db0db | |||
14942f1fd5 | |||
9eacfcb3e1 | |||
2a16fb7732 | |||
323add7636 | |||
ac21aa6231 | |||
f023bdd117 | |||
7f10e9ee96 | |||
0b61227024 | |||
27bbbd6d17 | |||
5816b4bacb | |||
17808cfb12 | |||
146c428ae0 | |||
1f3d84ef44 | |||
ed31429226 | |||
29abc82366 | |||
fba193030d | |||
83e3511436 | |||
a2ce5a1df1 | |||
64efbefb2c | |||
d9c4e81c5d | |||
56f0973865 | |||
1587d3bd0b | |||
3472ce9a18 | |||
bf88c724a1 | |||
ec046abfc3 | |||
393091b152 | |||
f14840cd6d | |||
7beda6c89c | |||
a511e89fff | |||
8dd9ce1537 | |||
136f8f9049 | |||
24a159f305 | |||
7c0d60fca1 | |||
02197119a7 | |||
d43d7ad921 | |||
a53de4fa08 | |||
e5ff004c6f | |||
6040cde70f | |||
afb8eb7cf7 | |||
f44dd6395d | |||
728e94feac | |||
1d849e57e6 | |||
51e10085b9 | |||
bc592fb532 | |||
bca00a8259 | |||
20c23b1b0e | |||
f72727c85e | |||
52df3eda55 | |||
b9fd1ba996 | |||
dbace1a89c | |||
08717d1bdc | |||
4d8761af4a | |||
f0f4ef8928 | |||
f9b667973e | |||
97cbe94070 | |||
4530eb8513 | |||
450e1b36b3 | |||
d0b66d92f1 | |||
7ff6c5973f | |||
4ac813e451 | |||
e44b0c7f29 | |||
3c6d26d688 | |||
b135887a5a | |||
d9dba2628c | |||
cc51990a5c | |||
12238d66dd | |||
6209b7ee56 | |||
0e00e8b94d | |||
19d45e1790 | |||
8565b90830 | |||
95d088d38f | |||
36fa6f0eaa | |||
8de0d2bd2a | |||
79fd34cb6c | |||
4d85197ca1 | |||
dd0c5d2145 | |||
a4f643f70c | |||
7bbec93be9 | |||
41790d0878 | |||
e083359149 | |||
6ff303675b | |||
d493b30806 | |||
71a8f1327e | |||
a662e74942 | |||
d1d531363b | |||
ab40df849c | |||
ed7f82d7da | |||
611d4b7c2f | |||
2e628127f2 | |||
55ec2537d0 | |||
63bd25a51d | |||
612fa607f8 | |||
6cccd06c3d | |||
921966cbcc | |||
714881bdba | |||
49ed28a0a7 | |||
d94dec1e89 | |||
21be061193 | |||
3c314764c1 | |||
06b9e5cfc5 | |||
37985423c5 | |||
d51b5b9a83 | |||
fd50b8872c | |||
a75aa8b925 | |||
69fef88324 | |||
f1c9037323 | |||
|
8456acadf2 | ||
5a2caf8e59 | |||
f43046211b | |||
14acc2eb19 | |||
4a7868ca52 |
@@ -1,25 +0,0 @@
|
||||
Manual backport of https://github.com/nodejs/undici/commit/6805746680d27a5369d7fb67bc05f95a28247d75
|
||||
|
||||
--- src/third_party/electron_node/deps/undici/src/lib/handler/RedirectHandler.js.old 2024-04-04 09:55:39.696980900 +0000
|
||||
+++ src/third_party/electron_node/deps/undici/src/lib/handler/RedirectHandler.js 2024-04-09 16:52:37.888616200 +0000
|
||||
@@ -188,7 +188,8 @@ function shouldRemoveHeader (header, rem
|
||||
(header.length === 4 && header.toString().toLowerCase() === 'host') ||
|
||||
(removeContent && header.toString().toLowerCase().indexOf('content-') === 0) ||
|
||||
(unknownOrigin && header.length === 13 && header.toString().toLowerCase() === 'authorization') ||
|
||||
- (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie')
|
||||
+ (unknownOrigin && header.length === 6 && header.toString().toLowerCase() === 'cookie') ||
|
||||
+ (unknownOrigin && header.length === 19 && header.toString().toLowerCase() === 'proxy-authorization')
|
||||
)
|
||||
}
|
||||
|
||||
--- src/third_party/electron_node/deps/undici/undici.js.old 2024-04-04 10:02:38.059765300 +0000
|
||||
+++ src/third_party/electron_node/deps/undici/undici.js 2024-04-09 16:51:15.754041100 +0000
|
||||
@@ -7902,7 +7902,7 @@ var require_RedirectHandler = __commonJS
|
||||
}
|
||||
__name(parseLocation, "parseLocation");
|
||||
function shouldRemoveHeader(header, removeContent, unknownOrigin) {
|
||||
- return header.length === 4 && header.toString().toLowerCase() === "host" || removeContent && header.toString().toLowerCase().indexOf("content-") === 0 || unknownOrigin && header.length === 13 && header.toString().toLowerCase() === "authorization" || unknownOrigin && header.length === 6 && header.toString().toLowerCase() === "cookie";
|
||||
+ return header.length === 4 && header.toString().toLowerCase() === "host" || removeContent && header.toString().toLowerCase().indexOf("content-") === 0 || unknownOrigin && header.length === 13 && header.toString().toLowerCase() === "authorization" || unknownOrigin && header.length === 6 && header.toString().toLowerCase() === "cookie" || unknownOrigin && header.length === 19 && header.toString().toLowerCase() === "proxy-authorization"
|
||||
}
|
||||
__name(shouldRemoveHeader, "shouldRemoveHeader");
|
||||
function cleanRequestHeaders(headers, removeContent, unknownOrigin) {
|
@@ -1,136 +0,0 @@
|
||||
Port https://github.com/nodejs/undici/commit/d542b8c to apply to amalgamated undici code in nodejs (the original copy in deps/undici/src is not used and i'm not bothering with patching it)
|
||||
|
||||
These chunks were manually cherry-picked from upstream nodejs commit https://github.com/nodejs/node/commit/60d24938 to match the undici changes.
|
||||
|
||||
|
||||
--- a/third_party/electron_node/deps/undici/undici.js
|
||||
+++ b/third_party/electron_node/deps/undici/undici.js
|
||||
@@ -992,9 +992,12 @@ var require_util2 = __commonJS({
|
||||
var { isBlobLike, toUSVString, ReadableStreamFrom } = require_util();
|
||||
var assert = require("assert");
|
||||
var { isUint8Array } = require("util/types");
|
||||
+ var supportedHashes = [];
|
||||
var crypto;
|
||||
try {
|
||||
crypto = require("crypto");
|
||||
+ const possibleRelevantHashes = ["sha256", "sha384", "sha512"];
|
||||
+ supportedHashes = crypto.getHashes().filter((hash) => possibleRelevantHashes.includes(hash));
|
||||
} catch {
|
||||
}
|
||||
function responseURL(response) {
|
||||
@@ -1277,46 +1280,38 @@ var require_util2 = __commonJS({
|
||||
if (parsedMetadata.length === 0) {
|
||||
return true;
|
||||
}
|
||||
- const list = parsedMetadata.sort((c, d) => d.algo.localeCompare(c.algo));
|
||||
- const strongest = list[0].algo;
|
||||
- const metadata = list.filter((item) => item.algo === strongest);
|
||||
+ const strongest = getStrongestMetadata(parsedMetadata);
|
||||
+ const metadata = filterMetadataListByAlgorithm(parsedMetadata, strongest);
|
||||
for (const item of metadata) {
|
||||
const algorithm = item.algo;
|
||||
- let expectedValue = item.hash;
|
||||
- if (expectedValue.endsWith("==")) {
|
||||
- expectedValue = expectedValue.slice(0, -2);
|
||||
- }
|
||||
+ const expectedValue = item.hash;
|
||||
let actualValue = crypto.createHash(algorithm).update(bytes).digest("base64");
|
||||
- if (actualValue.endsWith("==")) {
|
||||
- actualValue = actualValue.slice(0, -2);
|
||||
- }
|
||||
- if (actualValue === expectedValue) {
|
||||
- return true;
|
||||
- }
|
||||
- let actualBase64URL = crypto.createHash(algorithm).update(bytes).digest("base64url");
|
||||
- if (actualBase64URL.endsWith("==")) {
|
||||
- actualBase64URL = actualBase64URL.slice(0, -2);
|
||||
+ if (actualValue[actualValue.length - 1] === "=") {
|
||||
+ if (actualValue[actualValue.length - 2] === "=") {
|
||||
+ actualValue = actualValue.slice(0, -2);
|
||||
+ } else {
|
||||
+ actualValue = actualValue.slice(0, -1);
|
||||
+ }
|
||||
}
|
||||
- if (actualBase64URL === expectedValue) {
|
||||
+ if (compareBase64Mixed(actualValue, expectedValue)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
__name(bytesMatch, "bytesMatch");
|
||||
- var parseHashWithOptions = /((?<algo>sha256|sha384|sha512)-(?<hash>[A-z0-9+/]{1}.*={0,2}))( +[\x21-\x7e]?)?/i;
|
||||
+ var parseHashWithOptions = /(?<algo>sha256|sha384|sha512)-((?<hash>[A-Za-z0-9+/]+|[A-Za-z0-9_-]+)={0,2}(?:\s|$)( +[!-~]*)?)?/i;
|
||||
function parseMetadata(metadata) {
|
||||
const result = [];
|
||||
let empty = true;
|
||||
- const supportedHashes = crypto.getHashes();
|
||||
for (const token of metadata.split(" ")) {
|
||||
empty = false;
|
||||
const parsedToken = parseHashWithOptions.exec(token);
|
||||
- if (parsedToken === null || parsedToken.groups === void 0) {
|
||||
+ if (parsedToken === null || parsedToken.groups === void 0 || parsedToken.groups.algo === void 0) {
|
||||
continue;
|
||||
}
|
||||
- const algorithm = parsedToken.groups.algo;
|
||||
- if (supportedHashes.includes(algorithm.toLowerCase())) {
|
||||
+ const algorithm = parsedToken.groups.algo.toLowerCase();
|
||||
+ if (supportedHashes.includes(algorithm)) {
|
||||
result.push(parsedToken.groups);
|
||||
}
|
||||
}
|
||||
@@ -1326,6 +1321,54 @@ var require_util2 = __commonJS({
|
||||
return result;
|
||||
}
|
||||
__name(parseMetadata, "parseMetadata");
|
||||
+ function getStrongestMetadata(metadataList) {
|
||||
+ let algorithm = metadataList[0].algo;
|
||||
+ if (algorithm[3] === "5") {
|
||||
+ return algorithm;
|
||||
+ }
|
||||
+ for (let i = 1; i < metadataList.length; ++i) {
|
||||
+ const metadata = metadataList[i];
|
||||
+ if (metadata.algo[3] === "5") {
|
||||
+ algorithm = "sha512";
|
||||
+ break;
|
||||
+ } else if (algorithm[3] === "3") {
|
||||
+ continue;
|
||||
+ } else if (metadata.algo[3] === "3") {
|
||||
+ algorithm = "sha384";
|
||||
+ }
|
||||
+ }
|
||||
+ return algorithm;
|
||||
+ }
|
||||
+ __name(getStrongestMetadata, "getStrongestMetadata");
|
||||
+ function filterMetadataListByAlgorithm(metadataList, algorithm) {
|
||||
+ if (metadataList.length === 1) {
|
||||
+ return metadataList;
|
||||
+ }
|
||||
+ let pos = 0;
|
||||
+ for (let i = 0; i < metadataList.length; ++i) {
|
||||
+ if (metadataList[i].algo === algorithm) {
|
||||
+ metadataList[pos++] = metadataList[i];
|
||||
+ }
|
||||
+ }
|
||||
+ metadataList.length = pos;
|
||||
+ return metadataList;
|
||||
+ }
|
||||
+ __name(filterMetadataListByAlgorithm, "filterMetadataListByAlgorithm");
|
||||
+ function compareBase64Mixed(actualValue, expectedValue) {
|
||||
+ if (actualValue.length !== expectedValue.length) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ for (let i = 0; i < actualValue.length; ++i) {
|
||||
+ if (actualValue[i] !== expectedValue[i]) {
|
||||
+ if (actualValue[i] === "+" && expectedValue[i] === "-" || actualValue[i] === "/" && expectedValue[i] === "_") {
|
||||
+ continue;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+ __name(compareBase64Mixed, "compareBase64Mixed");
|
||||
function tryUpgradeRequestToAPotentiallyTrustworthyURL(request) {
|
||||
}
|
||||
__name(tryUpgradeRequestToAPotentiallyTrustworthyURL, "tryUpgradeRequestToAPotentiallyTrustworthyURL");
|
@@ -1,40 +0,0 @@
|
||||
From e9eda8f8456c98e3c3a438bfd2ff41d90f59a8ec Mon Sep 17 00:00:00 2001
|
||||
From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com>
|
||||
Date: Tue, 14 May 2024 21:26:51 +0000
|
||||
Subject: [PATCH] Fix cast in ElectronDesktopWindowTreeHostLinux
|
||||
|
||||
The frame view of the widget is an `ClientFrameViewLinux` instance only
|
||||
when both `frame` and `client_frame` booleans are set to `true`.
|
||||
Otherwise it is an instance of a different class and thus casting to
|
||||
`ClientFrameViewLinux` is incorrect and leads to crashes.
|
||||
|
||||
Fix: #41839
|
||||
|
||||
Co-authored-by: Fedor Indutny <indutny@signal.org>
|
||||
---
|
||||
.../ui/electron_desktop_window_tree_host_linux.cc | 12 +++++++++---
|
||||
1 file changed, 9 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/shell/browser/ui/electron_desktop_window_tree_host_linux.cc b/shell/browser/ui/electron_desktop_window_tree_host_linux.cc
|
||||
index cfc87f6fb7efd..17936ba352a1c 100644
|
||||
--- a/electron/shell/browser/ui/electron_desktop_window_tree_host_linux.cc
|
||||
+++ b/electron/shell/browser/ui/electron_desktop_window_tree_host_linux.cc
|
||||
@@ -71,9 +71,15 @@ void ElectronDesktopWindowTreeHostLinux::OnWindowStateChanged(
|
||||
|
||||
void ElectronDesktopWindowTreeHostLinux::OnWindowTiledStateChanged(
|
||||
ui::WindowTiledEdges new_tiled_edges) {
|
||||
- static_cast<ClientFrameViewLinux*>(
|
||||
- native_window_view_->widget()->non_client_view()->frame_view())
|
||||
- ->set_tiled_edges(new_tiled_edges);
|
||||
+ // CreateNonClientFrameView creates `ClientFrameViewLinux` only when both
|
||||
+ // frame and client_frame booleans are set, otherwise it is a different type
|
||||
+ // of view.
|
||||
+ if (native_window_view_->has_frame() &&
|
||||
+ native_window_view_->has_client_frame()) {
|
||||
+ static_cast<ClientFrameViewLinux*>(
|
||||
+ native_window_view_->widget()->non_client_view()->frame_view())
|
||||
+ ->set_tiled_edges(new_tiled_edges);
|
||||
+ }
|
||||
UpdateFrameHints();
|
||||
}
|
||||
|
@@ -1,55 +0,0 @@
|
||||
From ee6e6d3e45af1f7210e144a17f14fb21a7e86588 Mon Sep 17 00:00:00 2001
|
||||
From: mikt <mikt@google.com>
|
||||
Date: Tue, 30 Jan 2024 03:09:24 +0000
|
||||
Subject: [PATCH] [PA] Fix InternalAllocator for GCC builds
|
||||
|
||||
Internal Allocator has a few missing member functions, that are required
|
||||
as a part of named requirement Allocator.
|
||||
https://en.cppreference.com/w/cpp/named_req/Allocator
|
||||
|
||||
It broke builds on GCC, so adding these to fix.
|
||||
https://crrev.com/c/5196856/comments/0c4bbfd9_6433016b
|
||||
|
||||
Change-Id: Ifce5f3e47c94c7bb1e298ac4cd7d0d1e4c6de59c
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5231905
|
||||
Commit-Queue: Mikihito Matsuura <mikt@google.com>
|
||||
Reviewed-by: Kalvin Lee <kdlee@chromium.org>
|
||||
Reviewed-by: Takashi Sakamoto <tasak@google.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1253709}
|
||||
---
|
||||
.../internal_allocator_forward.h | 21 +++++++++++++++----
|
||||
1 file changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h
|
||||
index 45fec29f8cc93..b31a145ff6e99 100644
|
||||
--- a/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h
|
||||
+++ b/base/allocator/partition_allocator/src/partition_alloc/internal_allocator_forward.h
|
||||
@@ -27,11 +27,24 @@ PartitionRoot& InternalAllocatorRoot();
|
||||
template <typename T>
|
||||
class InternalAllocator {
|
||||
public:
|
||||
- // Member types required by allocator completeness requirements.
|
||||
using value_type = T;
|
||||
- using size_type = std::size_t;
|
||||
- using difference_type = std::ptrdiff_t;
|
||||
- using propagate_on_container_move_assignment = std::true_type;
|
||||
+ using is_always_equal = std::true_type;
|
||||
+
|
||||
+ InternalAllocator() = default;
|
||||
+
|
||||
+ template <typename U>
|
||||
+ InternalAllocator(const InternalAllocator<U>&) {} // NOLINT
|
||||
+
|
||||
+ template <typename U>
|
||||
+ InternalAllocator& operator=(const InternalAllocator<U>&) {
|
||||
+ return *this;
|
||||
+ }
|
||||
+
|
||||
+ template <typename U>
|
||||
+ bool operator==(const InternalAllocator<U>&) {
|
||||
+ // InternalAllocator<T> can free allocations made by InternalAllocator<U>.
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
value_type* allocate(std::size_t count);
|
||||
|
@@ -1,32 +0,0 @@
|
||||
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.
|
@@ -1,80 +0,0 @@
|
||||
diff --git a/base/types/to_address.h.new b/base/types/to_address.h.new
|
||||
new file mode 100644
|
||||
index 0000000..ac71b01
|
||||
--- /dev/null
|
||||
+++ b/base/types/to_address.h
|
||||
@@ -0,0 +1,40 @@
|
||||
+// Copyright 2024 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+#ifndef BASE_TYPES_TO_ADDRESS_H_
|
||||
+#define BASE_TYPES_TO_ADDRESS_H_
|
||||
+
|
||||
+#include <memory>
|
||||
+#include <type_traits>
|
||||
+
|
||||
+// SFINAE-compatible wrapper for `std::to_address()`.
|
||||
+//
|
||||
+// The standard does not require `std::to_address()` to be SFINAE-compatible
|
||||
+// when code attempts instantiation with non-pointer-like types, and libstdc++'s
|
||||
+// implementation hard errors. For the sake of templated code that wants simple,
|
||||
+// unified handling, Chromium instead uses this wrapper, which provides that
|
||||
+// guarantee. This allows code to use "`to_address()` would be valid here" as a
|
||||
+// constraint to detect pointer-like types.
|
||||
+namespace base {
|
||||
+
|
||||
+// Note that calling `std::to_address()` with a function pointer renders the
|
||||
+// program ill-formed.
|
||||
+template <typename T>
|
||||
+ requires(!std::is_function_v<T>)
|
||||
+constexpr T* to_address(T* p) noexcept {
|
||||
+ return p;
|
||||
+}
|
||||
+
|
||||
+// These constraints cover the cases where `std::to_address()`'s fancy pointer
|
||||
+// overload is well-specified.
|
||||
+template <typename P>
|
||||
+ requires requires(const P& p) { std::pointer_traits<P>::to_address(p); } ||
|
||||
+ requires(const P& p) { p.operator->(); }
|
||||
+constexpr auto to_address(const P& p) noexcept {
|
||||
+ return std::to_address(p);
|
||||
+}
|
||||
+
|
||||
+} // namespace base
|
||||
+
|
||||
+#endif // BASE_TYPES_TO_ADDRESS_H_
|
||||
diff --git a/mojo/public/cpp/bindings/type_converter.h b/mojo/public/cpp/bindings/type_converter.h.new
|
||||
index 2eddbb0..317245f 100644
|
||||
--- a/mojo/public/cpp/bindings/type_converter.h
|
||||
+++ b/mojo/public/cpp/bindings/type_converter.h
|
||||
@@ -11,6 +11,8 @@
|
||||
#include <memory>
|
||||
#include <type_traits>
|
||||
|
||||
+#include "base/types/to_address.h"
|
||||
+
|
||||
namespace mojo {
|
||||
|
||||
// NOTE: When possible, please consider using StructTraits / UnionTraits /
|
||||
@@ -99,16 +99,16 @@
|
||||
|
||||
template <typename T, typename U>
|
||||
requires requires(const U& obj) {
|
||||
- not std::is_pointer_v<U>;
|
||||
- { mojo::ConvertTo<T>(std::to_address(obj)) } -> std::same_as<T>;
|
||||
+ !std::is_pointer_v<U>;
|
||||
+ { mojo::ConvertTo<T>(base::to_address(obj)) } -> std::same_as<T>;
|
||||
}
|
||||
inline T ConvertTo(const U& obj) {
|
||||
- return mojo::ConvertTo<T>(std::to_address(obj));
|
||||
+ return mojo::ConvertTo<T>(base::to_address(obj));
|
||||
}
|
||||
|
||||
template <typename T, typename U>
|
||||
requires requires(const U& obj) {
|
||||
- not std::is_pointer_v<U>;
|
||||
+ !std::is_pointer_v<U>;
|
||||
TypeConverter<T, U>::Convert(obj);
|
||||
}
|
||||
inline T ConvertTo(const U& obj) {
|
@@ -1,76 +0,0 @@
|
||||
diff --git a/components/cast_channel/enum_table.h b/components/cast_channel/enum_table.h
|
||||
index 842553a..89de703 100644
|
||||
--- a/components/media_router/common/providers/cast/channel/enum_table.h
|
||||
+++ b/components/media_router/common/providers/cast/channel/enum_table.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <cstdint>
|
||||
#include <cstring>
|
||||
#include <ostream>
|
||||
+#include <vector>
|
||||
|
||||
#include "base/check_op.h"
|
||||
#include "base/notreached.h"
|
||||
@@ -187,7 +188,6 @@ class
|
||||
inline constexpr GenericEnumTableEntry(int32_t value);
|
||||
inline constexpr GenericEnumTableEntry(int32_t value, base::StringPiece str);
|
||||
|
||||
- GenericEnumTableEntry(const GenericEnumTableEntry&) = delete;
|
||||
GenericEnumTableEntry& operator=(const GenericEnumTableEntry&) = delete;
|
||||
|
||||
private:
|
||||
@@ -253,7 +253,6 @@ class EnumTable {
|
||||
constexpr Entry(E value, base::StringPiece str)
|
||||
: GenericEnumTableEntry(static_cast<int32_t>(value), str) {}
|
||||
|
||||
- Entry(const Entry&) = delete;
|
||||
Entry& operator=(const Entry&) = delete;
|
||||
};
|
||||
|
||||
@@ -312,15 +311,14 @@ class EnumTable {
|
||||
if (is_sorted_) {
|
||||
const std::size_t index = static_cast<std::size_t>(value);
|
||||
if (ANALYZER_ASSUME_TRUE(index < data_.size())) {
|
||||
- const auto& entry = data_.begin()[index];
|
||||
+ const auto& entry = data_[index];
|
||||
if (ANALYZER_ASSUME_TRUE(entry.has_str()))
|
||||
return entry.str();
|
||||
}
|
||||
return absl::nullopt;
|
||||
}
|
||||
return GenericEnumTableEntry::FindByValue(
|
||||
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
|
||||
- data_.size(), static_cast<int32_t>(value));
|
||||
+ &data_[0], data_.size(), static_cast<int32_t>(value));
|
||||
}
|
||||
|
||||
// This overload of GetString is designed for cases where the argument is a
|
||||
@@ -348,8 +346,7 @@ class EnumTable {
|
||||
// enum value directly.
|
||||
absl::optional<E> GetEnum(base::StringPiece str) const {
|
||||
auto* entry = GenericEnumTableEntry::FindByString(
|
||||
- reinterpret_cast<const GenericEnumTableEntry*>(data_.begin()),
|
||||
- data_.size(), str);
|
||||
+ &data_[0], data_.size(), str);
|
||||
return entry ? static_cast<E>(entry->value) : absl::optional<E>();
|
||||
}
|
||||
|
||||
@@ -364,7 +361,7 @@ class EnumTable {
|
||||
// Align the data on a cache line boundary.
|
||||
alignas(64)
|
||||
#endif
|
||||
- std::initializer_list<Entry> data_;
|
||||
+ const std::vector<Entry> data_;
|
||||
bool is_sorted_;
|
||||
|
||||
constexpr EnumTable(std::initializer_list<Entry> data, bool is_sorted)
|
||||
@@ -376,8 +373,8 @@ class EnumTable {
|
||||
|
||||
for (std::size_t i = 0; i < data.size(); i++) {
|
||||
for (std::size_t j = i + 1; j < data.size(); j++) {
|
||||
- const Entry& ei = data.begin()[i];
|
||||
- const Entry& ej = data.begin()[j];
|
||||
+ const Entry& ei = data[i];
|
||||
+ const Entry& ej = data[j];
|
||||
DCHECK(ei.value != ej.value)
|
||||
<< "Found duplicate enum values at indices " << i << " and " << j;
|
||||
DCHECK(!(ei.has_str() && ej.has_str() && ei.str() == ej.str()))
|
@@ -1,37 +0,0 @@
|
||||
Index: electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc
|
||||
===================================================================
|
||||
--- electron-17.1.0.orig/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-07 17:28:24.814737660 +0100
|
||||
+++ electron-17.1.0/third_party/perfetto/src/trace_processor/db/column.cc 2022-03-09 08:25:10.346569313 +0100
|
||||
@@ -14,6 +14,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
+#include <limits>
|
||||
#include "src/trace_processor/db/column.h"
|
||||
|
||||
#include "perfetto/base/logging.h"
|
||||
Index: electron-17.1.0/ui/gtk/gtk_key_bindings_handler.cc
|
||||
===================================================================
|
||||
--- electron-17.1.0.orig/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-07 17:20:31.788817015 +0100
|
||||
+++ electron-17.1.0/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc 2022-03-09 08:25:10.346569313 +0100
|
||||
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include <cstddef>
|
||||
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
|
||||
|
||||
#include "base/observer_list.h"
|
||||
Index: electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc
|
||||
===================================================================
|
||||
--- electron-17.1.0.orig/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-07 17:20:33.308823187 +0100
|
||||
+++ electron-17.1.0/components/bookmarks/browser/base_bookmark_model_observer.cc 2022-03-09 08:25:10.346569313 +0100
|
||||
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
+#include <cstddef>
|
||||
+
|
||||
#include "components/bookmarks/browser/base_bookmark_model_observer.h"
|
||||
|
||||
namespace bookmarks {
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4f98d6f6f8f513591eb22f8afbc191b496059ce2c56b957fc50e769d6fbb0c84
|
||||
size 573606884
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ba3666e3a877784714ae41bb53e1d9eecaa29e3a6c13999ead81f26c47487083
|
||||
size 588501104
|
@@ -1,37 +0,0 @@
|
||||
From 05a74771fed5491740588ec7b39ba64a7b710013 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Thu, 1 Feb 2024 17:34:38 +0000
|
||||
Subject: [PATCH] GCC: avoid clash between getter and type in
|
||||
grid_sizing_tree.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Rename GridSubsizingTree::GridItems getter to GetGridItems to avoid
|
||||
type clash.
|
||||
|
||||
Bug: 819294
|
||||
Change-Id: I4112929d9f85dc4573002b429cc982d50085d3c9
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5224147
|
||||
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
|
||||
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1255116}
|
||||
---
|
||||
.../core/layout/grid/grid_layout_algorithm.cc | 13 +++++++------
|
||||
.../renderer/core/layout/grid/grid_sizing_tree.h | 2 +-
|
||||
2 files changed, 8 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h b/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h
|
||||
index 45d55e2b36da4..2148ea9ea0657 100644
|
||||
--- a/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h
|
||||
+++ b/third_party/blink/renderer/core/layout/grid/grid_sizing_tree.h
|
||||
@@ -188,7 +188,7 @@ class GridSizingSubtree
|
||||
/* subtree_root */ grid_tree_->LookupSubgridIndex(subgrid_data));
|
||||
}
|
||||
|
||||
- GridItems& GridItems() const {
|
||||
+ ::blink::GridItems& GridItems() const {
|
||||
DCHECK(grid_tree_);
|
||||
return grid_tree_->At(subtree_root_).grid_items;
|
||||
}
|
@@ -1,29 +0,0 @@
|
||||
From 3a75d7f8dc3a08a38dd893031f8996b91a00764b Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue, 23 Jan 2024 17:55:15 +0000
|
||||
Subject: [PATCH] IWYU: usage of std::optional in hit_test_request.h requires
|
||||
include
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: I1ec32af603720d13bfa4e22e20142459802284b4
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5227329
|
||||
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1250917}
|
||||
---
|
||||
third_party/blink/renderer/core/layout/hit_test_request.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/layout/hit_test_request.h b/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
index c33144dc975b6..38968126fe520 100644
|
||||
--- a/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
+++ b/third_party/blink/renderer/core/layout/hit_test_request.h
|
||||
@@ -23,6 +23,8 @@
|
||||
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_HIT_TEST_REQUEST_H_
|
||||
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_HIT_TEST_REQUEST_H_
|
||||
|
||||
+#include <optional>
|
||||
+
|
||||
#include "base/functional/callback.h"
|
||||
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
|
||||
#include "third_party/blink/renderer/platform/heap/member.h"
|
@@ -1,10 +0,0 @@
|
||||
--- src/third_party/material_color_utilities/src/cpp/palettes/tones.cc.old 2023-10-11 11:30:46.080385500 +0200
|
||||
+++ src/third_party/material_color_utilities/src/cpp/palettes/tones.cc 2023-10-11 21:04:10.234128500 +0200
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "cpp/palettes/tones.h"
|
||||
|
||||
+#include <cmath>
|
||||
#include "cpp/cam/cam.h"
|
||||
#include "cpp/cam/hct.h"
|
||||
|
@@ -1,44 +0,0 @@
|
||||
description: fix build error when building with clang & GNU libstdc++
|
||||
author: Stephan Hartmann <stha09@googlemail.com>
|
||||
|
||||
Apparently this doesn't happen with the embedded clang, but we get this:
|
||||
|
||||
In file included from ../../components/autofill/core/browser/form_parsing/regex_patterns.cc:5:
|
||||
In file included from ../../components/autofill/core/browser/form_parsing/regex_patterns.h:8:
|
||||
In file included from ../../base/containers/span.h:10:
|
||||
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/algorithm:74:
|
||||
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/pstl/glue_algorithm_defs.h:13:
|
||||
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/functional:54:
|
||||
In file included from /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/tuple:39:
|
||||
/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/array:268:52: fatal error: instantiating fold expression with 303 arguments exceeded expression nesting limit of 256
|
||||
-> array<enable_if_t<(is_same_v<_Tp, _Up> && ...), _Tp>,
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~^~~~
|
||||
gen/components/autofill/core/browser/form_parsing/regex_patterns_inl.h:77:22: note: while substituting deduced template arguments into function template '<deduction guide for array>' [with _Tp = autofill::MatchingPattern, _Up = <autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPattern, autofill::MatchingPatter[...]
|
||||
|
||||
|
||||
|
||||
|
||||
This is fixed upstream in chromium 103 with the following commit:
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/3613356
|
||||
|
||||
However, that depends on other stuff and we can't use it without a
|
||||
bunch more changes - so we'll just use this fix which I nabbed from
|
||||
Stephan Hartmann instead:
|
||||
https://github.com/stha09/chromium-patches/blob/master/chromium-102-regex_pattern-array.patch
|
||||
|
||||
|
||||
|
||||
--- a/components/autofill/core/browser/BUILD.gn
|
||||
+++ b/components/autofill/core/browser/BUILD.gn
|
||||
@@ -54,6 +54,11 @@ action("regex_patterns_inl_h") {
|
||||
}
|
||||
|
||||
static_library("browser") {
|
||||
+ if (is_clang) {
|
||||
+ cflags = [
|
||||
+ "-fbracket-depth=1000",
|
||||
+ ]
|
||||
+ }
|
||||
sources = [
|
||||
"address_normalization_manager.cc",
|
||||
"address_normalization_manager.h",
|
@@ -1,14 +0,0 @@
|
||||
Fix inconsistent type alias use
|
||||
On linux ix86, `double_t` evaluates to `long double`. This contradicts the `double` expected below.
|
||||
|
||||
--- src/third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc.old 2023-10-13 11:25:09.719946900 +0200
|
||||
+++ src/third_party/perfetto/src/trace_processor/db/column/numeric_storage.cc 2023-10-14 23:54:10.728423000 +0200
|
||||
@@ -39,7 +39,7 @@ namespace trace_processor {
|
||||
namespace column {
|
||||
namespace {
|
||||
|
||||
-using NumericValue = std::variant<uint32_t, int32_t, int64_t, double_t>;
|
||||
+using NumericValue = std::variant<uint32_t, int32_t, int64_t, double>;
|
||||
|
||||
// Using the fact that binary operators in std are operators() of classes, we
|
||||
// can wrap those classes in variants and use them for std::visit in
|
@@ -1,31 +0,0 @@
|
||||
From 8d253767f895b45053c39ea99a8f02bbe7071d3a Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Mon, 19 Feb 2024 19:00:26 +0000
|
||||
Subject: [PATCH] IWYU: usage of std::optional in plus_address_types.h requires
|
||||
include
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug: 41455655
|
||||
Change-Id: Ibfda146f5bf7485ad31828f1dc22eb39b57f83b5
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5306779
|
||||
Reviewed-by: Jan Keitel <jkeitel@google.com>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1262436}
|
||||
---
|
||||
components/plus_addresses/plus_address_types.h | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/components/plus_addresses/plus_address_types.h b/components/plus_addresses/plus_address_types.h
|
||||
index 7a7eaa2a818a9..77569d345011a 100644
|
||||
--- a/components/plus_addresses/plus_address_types.h
|
||||
+++ b/components/plus_addresses/plus_address_types.h
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_TYPES_H_
|
||||
#define COMPONENTS_PLUS_ADDRESSES_PLUS_ADDRESS_TYPES_H_
|
||||
|
||||
+#include <optional>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
@@ -1,32 +0,0 @@
|
||||
From 5b2d53797e5580cbfea00d732fe25a97c7048b5b Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Wed, 24 Jan 2024 06:46:33 +0000
|
||||
Subject: [PATCH] IWYU: missing include for std::optional usage in
|
||||
race_network_request_write_buffer_manager.h
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: Id3a6c3cc3c1273208bde43b70a2bd298695f7cc4
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5223947
|
||||
Reviewed-by: Shunya Shishido <sisidovski@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1251264}
|
||||
---
|
||||
.../service_worker/race_network_request_write_buffer_manager.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/content/common/service_worker/race_network_request_write_buffer_manager.h b/content/common/service_worker/race_network_request_write_buffer_manager.h
|
||||
index 0e7f17417dbd9..ad9ea1348a977 100644
|
||||
--- a/content/common/service_worker/race_network_request_write_buffer_manager.h
|
||||
+++ b/content/common/service_worker/race_network_request_write_buffer_manager.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef CONTENT_COMMON_SERVICE_WORKER_RACE_NETWORK_REQUEST_WRITE_BUFFER_MANAGER_H_
|
||||
#define CONTENT_COMMON_SERVICE_WORKER_RACE_NETWORK_REQUEST_WRITE_BUFFER_MANAGER_H_
|
||||
|
||||
+#include <optional>
|
||||
+
|
||||
#include "base/containers/span.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "mojo/public/cpp/system/data_pipe.h"
|
@@ -1,32 +0,0 @@
|
||||
From 214859e3567ea9def85305e4f021a5d407e1ccfe Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Tue, 23 Jan 2024 10:56:36 +0000
|
||||
Subject: [PATCH] IWYU: missing include for usage of std::bitset in
|
||||
resolution_monitor.cc
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: Ia538bbca63105397963632d2a145886e256efeb6
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5190545
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Reviewed-by: Henrik Boström <hbos@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1250732}
|
||||
---
|
||||
.../renderer/platform/peerconnection/resolution_monitor.cc | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc b/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
|
||||
index 5d6a6495045c4..33135a1b22473 100644
|
||||
--- a/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
|
||||
+++ b/third_party/blink/renderer/platform/peerconnection/resolution_monitor.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "third_party/blink/renderer/platform/peerconnection/resolution_monitor.h"
|
||||
|
||||
+#include <bitset>
|
||||
+
|
||||
#include "base/containers/span.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/memory/ptr_util.h"
|
@@ -1,115 +0,0 @@
|
||||
From 8b293359cafbc741e7742de824b98fbf87a51b51 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Thu, 8 Feb 2024 09:32:57 +0000
|
||||
Subject: [PATCH] Do not use templates for ScriptPromiseResolver::ToV8
|
||||
implementation
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The usage of templates for reusing the internal implementation of ToV8
|
||||
is not making the code simpler. So, inline the implementations.
|
||||
|
||||
This also fixes a GCC build issue because it was implemented with
|
||||
template specializations declared in the class scope, and that is
|
||||
hitting the GCC bug https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85282
|
||||
|
||||
Bug: 819294
|
||||
Change-Id: I51f5a9e0a6e80ac707b630f270179c29fd84b059
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5223626
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Reviewed-by: Yuki Shiino <yukishiino@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1257835}
|
||||
---
|
||||
.../core/v8/script_promise_resolver.h | 60 +++++--------------
|
||||
1 file changed, 14 insertions(+), 46 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
|
||||
index 93cecd06c2814..ae0081b735a67 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h
|
||||
@@ -316,70 +316,38 @@ class CORE_EXPORT ScriptPromiseResolver
|
||||
return V8String(isolate, value);
|
||||
}
|
||||
|
||||
- template <size_t sizeOfValue>
|
||||
- static v8::Local<v8::Value> ToV8SignedIntegerInternal(int64_t value,
|
||||
- v8::Isolate*);
|
||||
-
|
||||
- template <>
|
||||
- v8::Local<v8::Value> ToV8SignedIntegerInternal<4>(int64_t value,
|
||||
- v8::Isolate* isolate) {
|
||||
- return v8::Integer::New(isolate, static_cast<int32_t>(value));
|
||||
- }
|
||||
-
|
||||
- template <>
|
||||
- v8::Local<v8::Value> ToV8SignedIntegerInternal<8>(int64_t value,
|
||||
- v8::Isolate* isolate) {
|
||||
- int32_t value_in32_bit = static_cast<int32_t>(value);
|
||||
- if (value_in32_bit == value) {
|
||||
- return v8::Integer::New(isolate, value_in32_bit);
|
||||
- }
|
||||
- // V8 doesn't have a 64-bit integer implementation.
|
||||
- return v8::Number::New(isolate, value);
|
||||
- }
|
||||
-
|
||||
- template <size_t sizeOfValue>
|
||||
- static v8::Local<v8::Value> ToV8UnsignedIntegerInternal(uint64_t value,
|
||||
- v8::Isolate*);
|
||||
-
|
||||
- template <>
|
||||
- v8::Local<v8::Value> ToV8UnsignedIntegerInternal<4>(uint64_t value,
|
||||
- v8::Isolate* isolate) {
|
||||
- return v8::Integer::NewFromUnsigned(isolate, static_cast<uint32_t>(value));
|
||||
- }
|
||||
-
|
||||
- template <>
|
||||
- v8::Local<v8::Value> ToV8UnsignedIntegerInternal<8>(uint64_t value,
|
||||
- v8::Isolate* isolate) {
|
||||
- uint32_t value_in32_bit = static_cast<uint32_t>(value);
|
||||
- if (value_in32_bit == value) {
|
||||
- return v8::Integer::NewFromUnsigned(isolate, value_in32_bit);
|
||||
- }
|
||||
- // V8 doesn't have a 64-bit integer implementation.
|
||||
- return v8::Number::New(isolate, value);
|
||||
- }
|
||||
-
|
||||
static v8::Local<v8::Value> ToV8(int32_t value,
|
||||
v8::Local<v8::Object> creation_context,
|
||||
v8::Isolate* isolate) {
|
||||
- return ToV8SignedIntegerInternal<sizeof value>(value, isolate);
|
||||
+ return v8::Integer::New(isolate, value);
|
||||
}
|
||||
|
||||
static v8::Local<v8::Value> ToV8(int64_t value,
|
||||
v8::Local<v8::Object> creation_context,
|
||||
v8::Isolate* isolate) {
|
||||
- return ToV8SignedIntegerInternal<sizeof value>(value, isolate);
|
||||
+ int32_t value_in32_bit = static_cast<int32_t>(value);
|
||||
+ if (value_in32_bit == value) {
|
||||
+ return v8::Integer::New(isolate, value_in32_bit);
|
||||
+ }
|
||||
+ // V8 doesn't have a 64-bit integer implementation.
|
||||
+ return v8::Number::New(isolate, value);
|
||||
}
|
||||
|
||||
static v8::Local<v8::Value> ToV8(uint32_t value,
|
||||
v8::Local<v8::Object> creation_context,
|
||||
v8::Isolate* isolate) {
|
||||
- return ToV8UnsignedIntegerInternal<sizeof value>(value, isolate);
|
||||
+ return v8::Integer::NewFromUnsigned(isolate, value);
|
||||
}
|
||||
|
||||
static v8::Local<v8::Value> ToV8(uint64_t value,
|
||||
v8::Local<v8::Object> creation_context,
|
||||
v8::Isolate* isolate) {
|
||||
- return ToV8UnsignedIntegerInternal<sizeof value>(value, isolate);
|
||||
+ uint32_t value_in32_bit = static_cast<uint32_t>(value);
|
||||
+ if (value_in32_bit == value) {
|
||||
+ return v8::Integer::NewFromUnsigned(isolate, value_in32_bit);
|
||||
+ }
|
||||
+ // V8 doesn't have a 64-bit integer implementation.
|
||||
+ return v8::Number::New(isolate, value);
|
||||
}
|
||||
|
||||
static v8::Local<v8::Value> ToV8(bool value,
|
@@ -1,32 +0,0 @@
|
||||
From 4b48bc4dd6ce9c56d254e552a33a7b7c2d6fc226 Mon Sep 17 00:00:00 2001
|
||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
||||
Date: Thu, 1 Feb 2024 17:01:51 +0000
|
||||
Subject: [PATCH] IWYU: usage of std::optional in
|
||||
search_engine_choice_service.h requires include
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Bug: 957519
|
||||
Change-Id: If89767ae4cd261081efda97cde6a296209b68782
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5259337
|
||||
Reviewed-by: Colin Blundell <blundell@chromium.org>
|
||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/main@{#1255105}
|
||||
---
|
||||
.../search_engine_choice/search_engine_choice_service.h | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/components/search_engines/search_engine_choice/search_engine_choice_service.h b/components/search_engines/search_engine_choice/search_engine_choice_service.h
|
||||
index b84ea7ec5fc08..c9dcce4b7c833 100644
|
||||
--- a/components/search_engines/search_engine_choice/search_engine_choice_service.h
|
||||
+++ b/components/search_engines/search_engine_choice/search_engine_choice_service.h
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_SERVICE_H_
|
||||
#define COMPONENTS_SEARCH_ENGINES_SEARCH_ENGINE_CHOICE_SEARCH_ENGINE_CHOICE_SERVICE_H_
|
||||
|
||||
+#include <optional>
|
||||
+
|
||||
#include "base/memory/raw_ref.h"
|
||||
#include "base/memory/weak_ptr.h"
|
||||
#include "components/country_codes/country_codes.h"
|
@@ -1,148 +0,0 @@
|
||||
From f62990fb134b7e610502b6804945debaa51960a5 Mon Sep 17 00:00:00 2001
|
||||
From: Koji Ishii <kojii@chromium.org>
|
||||
Date: Fri, 9 Feb 2024 18:47:02 +0000
|
||||
Subject: [PATCH] Support ICU 74 in `LazyTextBreakIterator`
|
||||
|
||||
This patch extends the `kBreakAllLineBreakClassTable` table
|
||||
for 5 new LineBreak classes in ICU 74.
|
||||
|
||||
They are for Brahmic scripts, which "line breaks can occur at
|
||||
the boundaries of any orthographic syllable"[1]. The
|
||||
`break-all` has no additional break opportunities that all
|
||||
entries are `0`.
|
||||
|
||||
This patch also adds `0` for 3 classes added in ICU 58[2],
|
||||
instead of doing so in code, to make future additions
|
||||
possible.
|
||||
|
||||
[1] https://unicode.org/reports/tr14/#BreakOpportunities
|
||||
[2] https://chromiumcodereview.appspot.com/2440923002
|
||||
|
||||
Bug: 324419151
|
||||
Change-Id: I8002edb927280f63b5b668b09076cc71feaeac3e
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5279337
|
||||
Auto-Submit: Koji Ishii <kojii@chromium.org>
|
||||
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1258643}
|
||||
---
|
||||
.../platform/text/text_break_iterator.cc | 98 ++++++++++---------
|
||||
1 file changed, 53 insertions(+), 45 deletions(-)
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/text/text_break_iterator.cc b/third_party/blink/renderer/platform/text/text_break_iterator.cc
|
||||
index 703dc2399075469..38ab94a0a460b5c 100644
|
||||
--- a/third_party/blink/renderer/platform/text/text_break_iterator.cc
|
||||
+++ b/third_party/blink/renderer/platform/text/text_break_iterator.cc
|
||||
@@ -161,11 +161,7 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
-#if U_ICU_VERSION_MAJOR_NUM >= 58
|
||||
-#define BA_LB_COUNT (U_LB_COUNT - 3)
|
||||
-#else
|
||||
#define BA_LB_COUNT U_LB_COUNT
|
||||
-#endif
|
||||
// Line breaking table for CSS word-break: break-all. This table differs from
|
||||
// asciiLineBreakTable in:
|
||||
// - Indices are Line Breaking Classes defined in UAX#14 Unicode Line Breaking
|
||||
@@ -174,47 +170,59 @@ static const unsigned char kAsciiLineBreakTable[][(kAsciiLineBreakTableLastChar
|
||||
// normal line break, not "prohibit break."
|
||||
// clang-format off
|
||||
static const unsigned char kBreakAllLineBreakClassTable[][BA_LB_COUNT / 8 + 1] = {
|
||||
- // XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AI
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // AL
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // B2
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // BA
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BB
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BK
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CB
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // CL
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CM
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CR
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // EX
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // GL
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // HY
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ID
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // IN
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // IS
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // LF
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NS
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // NU
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // OP
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // PO
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // PR
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // QU
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // SA
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SG
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SP
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // SY
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZW
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NL
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // WJ
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H2
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H3
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JL
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JT
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JV
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // CP
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CJ
|
||||
- { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0) }, // HL
|
||||
- { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // RI
|
||||
+ // XX AI AL B2 BA BB BK CB CL CM CR EX GL HY ID IN IS LF NS NU OP PO PR QU SA SG SP SY ZW NL WJ H2 H3 JL JT JV CP CJ HL RI EB EM ZWJ AK AP AS VF VI
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // XX
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AI
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AL
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // B2
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BA
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BB
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // BK
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CB
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CL
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CM
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CR
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EX
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // GL
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // HY
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ID
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // IN
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // IS
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // LF
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NS
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NU
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // OP
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 1, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // PO
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // PR
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // QU
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SA
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SG
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SP
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // SY
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZW
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // NL
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // WJ
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H2
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // H3
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JL
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JT
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // JV
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 0, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CP
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // CJ
|
||||
+ { B(0, 1, 1, 0, 1, 0, 0, 0), B(0, 0, 0, 0, 0, 1, 0, 0), B(0, 0, 0, 1, 1, 0, 1, 0), B(1, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 1, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // HL
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // RI
|
||||
+ // Added in ICU 58.
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EB
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // EM
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // ZWJ
|
||||
+#if U_ICU_VERSION_MAJOR_NUM >= 74
|
||||
+ // Added in ICU 74. https://icu.unicode.org/download/74
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AK
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AP
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // AS
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // VF
|
||||
+ { B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0), B(0, 0, 0, 0, 0, 0, 0, 0) }, // VI
|
||||
+#endif // U_ICU_VERSION_MAJOR_NUM >= 74
|
||||
};
|
||||
// clang-format on
|
||||
|
@@ -1,45 +0,0 @@
|
||||
--- src/v8/src/objects/instance-type-inl.h.orig 2024-02-21 13:34:15.959879700 +0000
|
||||
+++ src/v8/src/objects/instance-type-inl.h 2024-02-25 13:47:34.748156000 +0000
|
||||
@@ -71,7 +71,9 @@ constexpr bool kHasUniqueMapOfInstanceTy
|
||||
|
||||
template <InstanceType type>
|
||||
constexpr RootIndex kUniqueMapOfInstanceType =
|
||||
- UniqueMapOfInstanceType(type).value_or(RootIndex::kRootListLength);
|
||||
+ kHasUniqueMapOfInstanceType<type>?
|
||||
+ *UniqueMapOfInstanceType(type):
|
||||
+ RootIndex::kRootListLength;
|
||||
|
||||
// Manually curated list of instance type ranges which are associated with a
|
||||
// unique range of map addresses on the read only heap. Both ranges are
|
||||
@@ -129,14 +131,17 @@ UniqueMapRangeOfInstanceTypeRange(Instan
|
||||
return {};
|
||||
}
|
||||
|
||||
+constexpr inline TaggedAddressRange NULL_ADDRESS_RANGE{kNullAddress, kNullAddress};
|
||||
+
|
||||
template <InstanceType first, InstanceType last>
|
||||
constexpr bool kHasUniqueMapRangeOfInstanceTypeRange =
|
||||
UniqueMapRangeOfInstanceTypeRange(first, last).has_value();
|
||||
|
||||
template <InstanceType first, InstanceType last>
|
||||
constexpr TaggedAddressRange kUniqueMapRangeOfInstanceTypeRange =
|
||||
- UniqueMapRangeOfInstanceTypeRange(first, last)
|
||||
- .value_or(TaggedAddressRange(kNullAddress, kNullAddress));
|
||||
+ kHasUniqueMapRangeOfInstanceTypeRange<first, last>?
|
||||
+ *UniqueMapRangeOfInstanceTypeRange(first, last):
|
||||
+ NULL_ADDRESS_RANGE;
|
||||
|
||||
inline constexpr base::Optional<TaggedAddressRange>
|
||||
UniqueMapRangeOfInstanceType(InstanceType type) {
|
||||
@@ -149,8 +154,9 @@ constexpr bool kHasUniqueMapRangeOfInsta
|
||||
|
||||
template <InstanceType type>
|
||||
constexpr TaggedAddressRange kUniqueMapRangeOfInstanceType =
|
||||
- UniqueMapRangeOfInstanceType(type).value_or(
|
||||
- TaggedAddressRange(kNullAddress, kNullAddress));
|
||||
+ kHasUniqueMapRangeOfInstanceType<type>?
|
||||
+ *UniqueMapRangeOfInstanceType(type):
|
||||
+ NULL_ADDRESS_RANGE;
|
||||
|
||||
inline bool MayHaveMapCheckFastCase(InstanceType type) {
|
||||
if (UniqueMapOfInstanceType(type)) return true;
|
Reference in New Issue
Block a user