Skip to content

Commit 0a91b14

Browse files
authored
chromium-stable: bump to 137.0.7151.55 (#47)
[skip ci]
1 parent 3041615 commit 0a91b14

7 files changed

+289
-47
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
https://github.com/chromium/chromium/commit/4c736420952f355f18bdc4f4ea2d16e4514fa034
2+
3+
--- a/content/browser/tpcd_heuristics/opener_heuristic_utils.h
4+
+++ b/content/browser/tpcd_heuristics/opener_heuristic_utils.h
5+
@@ -6,6 +6,9 @@
6+
#define CONTENT_BROWSER_TPCD_HEURISTICS_OPENER_HEURISTIC_UTILS_H_
7+
8+
#include <map>
9+
+#include <set>
10+
+#include <string>
11+
+#include <utility>
12+
13+
#include "base/types/optional_ref.h"
14+
#include "content/common/content_export.h"
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
https://github.com/chromium/chromium/commit/48b64da89b3ecb7ccb576a334b19b3066dd2b793
2+
3+
--- a/chrome/browser/ui/safety_hub/disruptive_notification_permissions_manager.h
4+
+++ b/chrome/browser/ui/safety_hub/disruptive_notification_permissions_manager.h
5+
@@ -6,6 +6,7 @@
6+
#define CHROME_BROWSER_UI_SAFETY_HUB_DISRUPTIVE_NOTIFICATION_PERMISSIONS_MANAGER_H_
7+
8+
#include <memory>
9+
+#include <set>
10+
11+
#include "base/scoped_observation.h"
12+
#include "base/time/clock.h"

tur-chromium/chromium-stable/0007-remove-xorg-from-build-deps-2.patch

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 103 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
`atomic_ref` is not landed in NDK r27c
1+
`atomic_ref` is not landed in NDK r27c, and it is used in:
22

3-
--- a/base/__termux_header_only_atomic_ref_polyfill.h
4-
+++ b/base/__termux_header_only_atomic_ref_polyfill.h
3+
- //base/atomicops.cc
4+
- //third_party/simdutf/simdutf.cpp
5+
- //v8/src/objects/simd.cc
6+
7+
--- a/third_party/termux-polyfill/__termux_header_only_atomic_ref_polyfill.h
8+
+++ b/third_party/termux-polyfill/__termux_header_only_atomic_ref_polyfill.h
59
@@ -0,0 +1,607 @@
610
+// Origin: https://github.com/ORNL/cpp-proposals-pub
711
+// Origin Description: Collaborating on papers for the ISO C++ committee - public repo
@@ -617,7 +621,7 @@
617621
#include "base/memory/aligned_memory.h"
618622

619623
+#ifdef __TERMUX__
620-
+#include "base/__termux_header_only_atomic_ref_polyfill.h"
624+
+#include "third_party/termux-polyfill/__termux_header_only_atomic_ref_polyfill.h"
621625
+template <typename T>
622626
+using __my_atomic_ref = Foo::atomic_ref<T>;
623627
+#else
@@ -666,3 +670,98 @@
666670
.store(*src_byte_ptr, std::memory_order_relaxed);
667671
// SAFETY: We check above that `dst_byte_ptr` and `src_byte_ptr` point
668672
// to spans of sufficient size.
673+
674+
--- a/third_party/simdutf/simdutf.h
675+
+++ b/third_party/simdutf/simdutf.h
676+
@@ -82,7 +82,7 @@
677+
!defined(SIMDUTF_SPAN_DISABLED)
678+
#define SIMDUTF_SPAN 1
679+
#endif // __cpp_concepts >= 201907L && __cpp_lib_span >= 202002L
680+
- #if __cpp_lib_atomic_ref >= 201806L
681+
+ #if __cpp_lib_atomic_ref >= 201806L || defined(__TERMUX__)
682+
#define SIMDUTF_ATOMIC_REF 1
683+
#endif // __cpp_lib_atomic_ref
684+
#endif
685+
--- a/third_party/simdutf/simdutf.cpp
686+
+++ b/third_party/simdutf/simdutf.cpp
687+
@@ -2,6 +2,17 @@
688+
/* begin file src/simdutf.cpp */
689+
#include "simdutf.h"
690+
691+
+#ifdef SIMDUTF_ATOMIC_REF
692+
+#ifdef __TERMUX__
693+
+#include "third_party/termux-polyfill/__termux_header_only_atomic_ref_polyfill.h"
694+
+template <typename T>
695+
+using __my_atomic_ref = Foo::atomic_ref<T>;
696+
+#else
697+
+template <typename T>
698+
+using __my_atomic_ref = std::atomic_ref<T>;
699+
+#endif
700+
+#endif
701+
+
702+
#if SIMDUTF_FEATURE_BASE64
703+
// We include base64_tables once.
704+
/* begin file src/tables/base64_tables.h */
705+
@@ -18410,7 +18421,7 @@
706+
#if SIMDUTF_ATOMIC_REF
707+
size_t atomic_binary_to_base64(const char *input, size_t length, char *output,
708+
base64_options options) noexcept {
709+
- static_assert(std::atomic_ref<char>::required_alignment == 1);
710+
+ static_assert(__my_atomic_ref<char>::required_alignment == 1);
711+
size_t retval = 0;
712+
// Arbitrary block sizes: 3KB for input, 4KB for output. Total is 7KB.
713+
constexpr size_t input_block_size = 1024 * 3;
714+
@@ -18430,7 +18441,7 @@
715+
// Under x64, we could use 16-byte aligned loads.
716+
// Note that we warn users that the performance might be poor.
717+
for (size_t j = 0; j < current_block_size; ++j) {
718+
- inbuf[j] = std::atomic_ref<char>(mutable_input[i + j])
719+
+ inbuf[j] = __my_atomic_ref<char>(mutable_input[i + j])
720+
.load(std::memory_order_relaxed);
721+
}
722+
const size_t written = binary_to_base64(inbuf.data(), current_block_size,
723+
@@ -18438,7 +18449,7 @@
724+
// This copy is inefficient.
725+
// Under x64, we could use 16-byte aligned stores.
726+
for (size_t j = 0; j < written; ++j) {
727+
- std::atomic_ref<char>(output[retval + j])
728+
+ __my_atomic_ref<char>(output[retval + j])
729+
.store(outbuf[j], std::memory_order_relaxed);
730+
}
731+
retval += written;
732+
--- a/v8/src/objects/simd.cc
733+
+++ b/v8/src/objects/simd.cc
734+
@@ -32,6 +32,15 @@
735+
#include <arm_neon.h>
736+
#endif
737+
738+
+#ifdef __TERMUX__
739+
+#include "third_party/termux-polyfill/__termux_header_only_atomic_ref_polyfill.h"
740+
+template <typename T>
741+
+using __my_atomic_ref = Foo::atomic_ref<T>;
742+
+#else
743+
+template <typename T>
744+
+using __my_atomic_ref = std::atomic_ref<T>;
745+
+#endif
746+
+
747+
namespace v8 {
748+
namespace internal {
749+
750+
@@ -487,7 +496,7 @@
751+
char* mutable_bytes = const_cast<char*>(bytes);
752+
for (size_t i = 0; i < length; i++) {
753+
uint8_t byte =
754+
- std::atomic_ref<char>(mutable_bytes[i]).load(std::memory_order_relaxed);
755+
+ __my_atomic_ref<char>(mutable_bytes[i]).load(std::memory_order_relaxed);
756+
PerformNibbleToHexAndWriteIntoStringOutPut(byte, index, string_output);
757+
index += 2;
758+
}
759+
@@ -1082,7 +1091,7 @@
760+
result = HandleRemainingHexValues(input_vector, i);
761+
if (result.has_value()) {
762+
if (is_shared) {
763+
- std::atomic_ref<uint8_t>(buffer[index++])
764+
+ __my_atomic_ref<uint8_t>(buffer[index++])
765+
.store(result.value(), std::memory_order_relaxed);
766+
} else {
767+
buffer[index++] = result.value();
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
This reverts commit https://github.com/chromium/chromium/commit/4f6cc657b0953fb353111d581c130858e90aec08
2+
3+
diff --git a/base/containers/buffer_iterator.h b/base/containers/buffer_iterator.h
4+
index 61abd79721..e2d9528a24 100644
5+
--- a/base/containers/buffer_iterator.h
6+
+++ b/base/containers/buffer_iterator.h
7+
@@ -80,8 +80,8 @@ class BufferIterator {
8+
9+
// Copies out an object. As compared to using `Object`, this avoids potential
10+
// unaligned access which may be undefined behavior.
11+
- template <typename T>
12+
- requires(std::is_trivially_copyable_v<T>)
13+
+ template <typename T,
14+
+ typename = std::enable_if_t<std::is_trivially_copyable_v<T>>>
15+
std::optional<T> CopyObject() {
16+
std::optional<T> t;
17+
if (remaining_.size() >= sizeof(T)) {
18+
@@ -101,8 +101,8 @@ class BufferIterator {
19+
// `CopyObject` as it avoids this problem entirely.
20+
// TODO(danakj): We should probably CHECK this instead of allowing UB into
21+
// production.
22+
- template <typename T>
23+
- requires(std::is_trivially_copyable_v<T>)
24+
+ template <typename T,
25+
+ typename = std::enable_if_t<std::is_trivially_copyable_v<T>>>
26+
const T* Object() {
27+
return MutableObject<const T>();
28+
}
29+
@@ -117,8 +117,8 @@ class BufferIterator {
30+
// `CopyObject` as it avoids this problem entirely.
31+
// TODO(danakj): We should probably CHECK this instead of allowing UB into
32+
// production.
33+
- template <typename T>
34+
- requires(std::is_trivially_copyable_v<T>)
35+
+ template <typename T,
36+
+ typename = std::enable_if_t<std::is_trivially_copyable_v<T>>>
37+
T* MutableObject() {
38+
T* t = nullptr;
39+
if (remaining_.size() >= sizeof(T)) {
40+
@@ -142,8 +142,8 @@ class BufferIterator {
41+
// using the span will cause Undefined Behaviour.
42+
// TODO(danakj): We should probably CHECK this instead of allowing UB into
43+
// production.
44+
- template <typename T>
45+
- requires(std::is_trivially_copyable_v<T>)
46+
+ template <typename T,
47+
+ typename = std::enable_if_t<std::is_trivially_copyable_v<T>>>
48+
span<T> MutableSpan(size_t count) {
49+
size_t byte_size;
50+
if (!CheckMul(sizeof(T), count).AssignIfValid(&byte_size)) {
51+
@@ -165,9 +165,10 @@ class BufferIterator {
52+
53+
// An overload for when the size is known at compile time. The result will be
54+
// a fixed-size span.
55+
- template <typename T, size_t N>
56+
- requires(N <= std::numeric_limits<size_t>::max() / sizeof(T) &&
57+
- std::is_trivially_copyable_v<T>)
58+
+ template <typename T,
59+
+ size_t N,
60+
+ typename = std::enable_if_t<std::is_trivially_copyable_v<T>>>
61+
+ requires(N <= std::numeric_limits<size_t>::max() / sizeof(T))
62+
std::optional<span<T, N>> MutableSpan() {
63+
constexpr size_t byte_size =
64+
N * sizeof(T); // Overflow is checked by `requires`.
65+
@@ -193,17 +194,18 @@ class BufferIterator {
66+
// using the span will cause Undefined Behaviour.
67+
// TODO(danakj): We should probably CHECK this instead of allowing UB into
68+
// production.
69+
- template <typename T>
70+
- requires(std::is_trivially_copyable_v<T>)
71+
+ template <typename T,
72+
+ typename = std::enable_if_t<std::is_trivially_copyable_v<T>>>
73+
span<const T> Span(size_t count) {
74+
return MutableSpan<const T>(count);
75+
}
76+
77+
// An overload for when the size is known at compile time. The result will be
78+
// a fixed-size span.
79+
- template <typename T, size_t N>
80+
- requires(N <= std::numeric_limits<size_t>::max() / sizeof(T) &&
81+
- std::is_trivially_copyable_v<T>)
82+
+ template <typename T,
83+
+ size_t N,
84+
+ typename = std::enable_if_t<std::is_trivially_copyable_v<T>>>
85+
+ requires(N <= std::numeric_limits<size_t>::max() / sizeof(T))
86+
std::optional<span<const T, N>> Span() {
87+
return MutableSpan<const T, N>();
88+
}
89+
diff --git a/base/containers/flat_map.h b/base/containers/flat_map.h
90+
index 612e15f7ff..25158d4eb9 100644
91+
--- a/base/containers/flat_map.h
92+
+++ b/base/containers/flat_map.h
93+
@@ -234,12 +234,13 @@ class flat_map : public ::base::internal::
94+
iterator insert_or_assign(const_iterator hint, K&& key, M&& obj);
95+
96+
template <class K, class... Args>
97+
- requires(std::is_constructible_v<key_type, K &&>)
98+
- std::pair<iterator, bool> try_emplace(K&& key, Args&&... args);
99+
+ std::enable_if_t<std::is_constructible_v<key_type, K&&>,
100+
+ std::pair<iterator, bool>>
101+
+ try_emplace(K&& key, Args&&... args);
102+
103+
template <class K, class... Args>
104+
- requires(std::is_constructible_v<key_type, K &&>)
105+
- iterator try_emplace(const_iterator hint, K&& key, Args&&... args);
106+
+ std::enable_if_t<std::is_constructible_v<key_type, K&&>, iterator>
107+
+ try_emplace(const_iterator hint, K&& key, Args&&... args);
108+
109+
// --------------------------------------------------------------------------
110+
// General operations.
111+
@@ -324,12 +325,10 @@ auto flat_map<Key, Mapped, Compare, Container>::insert_or_assign(
112+
113+
template <class Key, class Mapped, class Compare, class Container>
114+
template <class K, class... Args>
115+
- requires(std::is_constructible_v<
116+
- typename flat_map<Key, Mapped, Compare, Container>::key_type,
117+
- K &&>)
118+
auto flat_map<Key, Mapped, Compare, Container>::try_emplace(K&& key,
119+
Args&&... args)
120+
- -> std::pair<iterator, bool> {
121+
+ -> std::enable_if_t<std::is_constructible_v<key_type, K&&>,
122+
+ std::pair<iterator, bool>> {
123+
return tree::emplace_key_args(
124+
key, std::piecewise_construct,
125+
std::forward_as_tuple(std::forward<K>(key)),
126+
@@ -338,13 +337,10 @@ auto flat_map<Key, Mapped, Compare, Container>::try_emplace(K&& key,
127+
128+
template <class Key, class Mapped, class Compare, class Container>
129+
template <class K, class... Args>
130+
- requires(std::is_constructible_v<
131+
- typename flat_map<Key, Mapped, Compare, Container>::key_type,
132+
- K &&>)
133+
auto flat_map<Key, Mapped, Compare, Container>::try_emplace(const_iterator hint,
134+
K&& key,
135+
Args&&... args)
136+
- -> iterator {
137+
+ -> std::enable_if_t<std::is_constructible_v<key_type, K&&>, iterator> {
138+
return tree::emplace_hint_key_args(
139+
hint, key, std::piecewise_construct,
140+
std::forward_as_tuple(std::forward<K>(key)),
141+
diff --git a/base/containers/intrusive_heap.h b/base/containers/intrusive_heap.h
142+
index d0a60ed748..70ecf19d91 100644
143+
--- a/base/containers/intrusive_heap.h
144+
+++ b/base/containers/intrusive_heap.h
145+
@@ -572,8 +572,7 @@ class IntrusiveHeap {
146+
private:
147+
// Templated version of ToIndex that lets insert/erase/Replace work with all
148+
// integral types.
149+
- template <typename I>
150+
- requires(std::is_integral_v<I>)
151+
+ template <typename I, typename = std::enable_if_t<std::is_integral_v<I>>>
152+
size_type ToIndex(I pos) {
153+
return static_cast<size_type>(pos);
154+
}

tur-chromium/chromium-stable/7008-xnnpack-clang-18.patch

Lines changed: 0 additions & 27 deletions
This file was deleted.

tur-chromium/chromium-stable/build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://www.chromium.org/Home
22
TERMUX_PKG_DESCRIPTION="Chromium web browser"
33
TERMUX_PKG_LICENSE="BSD 3-Clause"
44
TERMUX_PKG_MAINTAINER="Chongyun Lee <[email protected]>"
5-
TERMUX_PKG_VERSION=136.0.7103.113
5+
TERMUX_PKG_VERSION=137.0.7151.55
66
TERMUX_PKG_SRCURL=https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$TERMUX_PKG_VERSION.tar.xz
7-
TERMUX_PKG_SHA256=7c765bd13df842a28bb52279b8d711411ac6082151473e07bd70b9a482c0a0ac
7+
TERMUX_PKG_SHA256=b11e76fd82745db5602ce151ae931cc5e56c3ee2b6e08c2fbf788bf4b3ea84cb
88
TERMUX_PKG_DEPENDS="atk, cups, dbus, fontconfig, gtk3, krb5, libc++, libdrm, libevdev, libxkbcommon, libminizip, libnss, libwayland, libx11, mesa, openssl, pango, pulseaudio, zlib"
99
TERMUX_PKG_BUILD_DEPENDS="libffi-static"
1010
# Chromium doesn't support i686 on Linux.
@@ -158,7 +158,7 @@ treat_warnings_as_errors = false
158158
# Use system libraries as little as possible
159159
use_system_freetype = false
160160
# use_system_libdrm = true
161-
use_system_libffi = false
161+
# use_system_libffi = false
162162
use_custom_libcxx = false
163163
use_custom_libcxx_for_host = true
164164
use_allocator_shim = false
@@ -197,6 +197,9 @@ enable_nacl = false
197197
is_cfi = false
198198
use_cfi_icall = false
199199
use_thin_lto = false
200+
# OpenCL doesn't work out of box in Termux, use NNAPI instead
201+
build_tflite_with_opencl = false
202+
build_tflite_with_nnapi = true
200203
# Enable rust
201204
custom_target_rust_abi_target = \"$CARGO_TARGET_NAME\"
202205
llvm_android_mainline = true

0 commit comments

Comments
 (0)