parent
df09afc114
commit
60d1f6c780
@ -1,77 +0,0 @@
|
|||||||
From 0fc6592cf8867f0cd6d8d41b43392fb52d359649 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jose Dapena Paz <jdapena@igalia.com>
|
|
||||||
Date: Tue, 7 Jun 2022 15:44:35 +0200
|
|
||||||
Subject: [PATCH] GCC: fix compilation of NEON64 extract_first_nonzero_index
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
GCC fails to compile extract_first_nonzero_index because of the
|
|
||||||
signedness type mismatch in the NEON intrinsics.
|
|
||||||
|
|
||||||
Bug: chromium:819294
|
|
||||||
Change-Id: I9b73e5fa1d5fbf161740ab1b5d77f5c494369dfa
|
|
||||||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3693709
|
|
||||||
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
|
|
||||||
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
|
|
||||||
Cr-Commit-Position: refs/heads/main@{#81063}
|
|
||||||
---
|
|
||||||
v8/src/objects/simd.cc | 27 ++++++++++++---------------
|
|
||||||
1 file changed, 12 insertions(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/v8/src/objects/simd.cc b/v8/rc/objects/simd.cc
|
|
||||||
index d3cedfe3302..0a73b9c686d 100644
|
|
||||||
--- a/v8/src/objects/simd.cc
|
|
||||||
+++ b/v8/src/objects/simd.cc
|
|
||||||
@@ -95,24 +95,21 @@ inline int extract_first_nonzero_index(T v) {
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
-inline int extract_first_nonzero_index(int32x4_t v) {
|
|
||||||
- int32x4_t mask = {4, 3, 2, 1};
|
|
||||||
+inline int extract_first_nonzero_index(uint32x4_t v) {
|
|
||||||
+ uint32x4_t mask = {4, 3, 2, 1};
|
|
||||||
mask = vandq_u32(mask, v);
|
|
||||||
return 4 - vmaxvq_u32(mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
template <>
|
|
||||||
-inline int extract_first_nonzero_index(int64x2_t v) {
|
|
||||||
- int32x4_t mask = {2, 0, 1, 0}; // Could also be {2,2,1,1} or {0,2,0,1}
|
|
||||||
- mask = vandq_u32(mask, vreinterpretq_s32_s64(v));
|
|
||||||
+inline int extract_first_nonzero_index(uint64x2_t v) {
|
|
||||||
+ uint32x4_t mask = {2, 0, 1, 0}; // Could also be {2,2,1,1} or {0,2,0,1}
|
|
||||||
+ mask = vandq_u32(mask, vreinterpretq_u32_u64(v));
|
|
||||||
return 2 - vmaxvq_u32(mask);
|
|
||||||
}
|
|
||||||
|
|
||||||
-template <>
|
|
||||||
-inline int extract_first_nonzero_index(float64x2_t v) {
|
|
||||||
- int32x4_t mask = {2, 0, 1, 0}; // Could also be {2,2,1,1} or {0,2,0,1}
|
|
||||||
- mask = vandq_u32(mask, vreinterpretq_s32_f64(v));
|
|
||||||
- return 2 - vmaxvq_u32(mask);
|
|
||||||
+inline int32_t reinterpret_vmaxvq_u64(uint64x2_t v) {
|
|
||||||
+ return vmaxvq_u32(vreinterpretq_u32_u64(v));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -204,14 +201,14 @@ inline uintptr_t fast_search_noavx(T* array, uintptr_t array_len,
|
|
||||||
}
|
|
||||||
#elif defined(NEON64)
|
|
||||||
if constexpr (std::is_same<T, uint32_t>::value) {
|
|
||||||
- VECTORIZED_LOOP_Neon(int32x4_t, int32x4_t, vdupq_n_u32, vceqq_u32,
|
|
||||||
+ VECTORIZED_LOOP_Neon(uint32x4_t, uint32x4_t, vdupq_n_u32, vceqq_u32,
|
|
||||||
vmaxvq_u32)
|
|
||||||
} else if constexpr (std::is_same<T, uint64_t>::value) {
|
|
||||||
- VECTORIZED_LOOP_Neon(int64x2_t, int64x2_t, vdupq_n_u64, vceqq_u64,
|
|
||||||
- vmaxvq_u32)
|
|
||||||
+ VECTORIZED_LOOP_Neon(uint64x2_t, uint64x2_t, vdupq_n_u64, vceqq_u64,
|
|
||||||
+ reinterpret_vmaxvq_u64)
|
|
||||||
} else if constexpr (std::is_same<T, double>::value) {
|
|
||||||
- VECTORIZED_LOOP_Neon(float64x2_t, float64x2_t, vdupq_n_f64, vceqq_f64,
|
|
||||||
- vmaxvq_f64)
|
|
||||||
+ VECTORIZED_LOOP_Neon(float64x2_t, uint64x2_t, vdupq_n_f64, vceqq_f64,
|
|
||||||
+ reinterpret_vmaxvq_u64)
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
UNREACHABLE();
|
|
@ -1,26 +0,0 @@
|
|||||||
diff -up chromium-102.0.5005.115/v8/src/execution/arm64/pointer-authentication-arm64.h.gcc-cfi-fix chromium-102.0.5005.115/v8/src/execution/arm64/pointer-authentication-arm64.h
|
|
||||||
--- chromium-102.0.5005.115/v8/src/execution/arm64/pointer-authentication-arm64.h.gcc-cfi-fix 2022-06-14 16:34:21.710049421 -0400
|
|
||||||
+++ chromium-102.0.5005.115/v8/src/execution/arm64/pointer-authentication-arm64.h 2022-06-14 16:35:17.650427761 -0400
|
|
||||||
@@ -47,15 +47,17 @@ V8_INLINE Address PointerAuthentication:
|
|
||||||
#ifdef USE_SIMULATOR
|
|
||||||
return Simulator::StripPAC(pc, Simulator::kInstructionPointer);
|
|
||||||
#else
|
|
||||||
+ // x30 == lr, but use 'x30' instead of 'lr' below, as GCC does not accept
|
|
||||||
+ // 'lr' in the clobbers list.
|
|
||||||
asm volatile(
|
|
||||||
- " mov x16, lr\n"
|
|
||||||
- " mov lr, %[pc]\n"
|
|
||||||
+ " mov x16, x30\n"
|
|
||||||
+ " mov x30, %[pc]\n"
|
|
||||||
" xpaclri\n"
|
|
||||||
- " mov %[pc], lr\n"
|
|
||||||
- " mov lr, x16\n"
|
|
||||||
+ " mov %[pc], x30\n"
|
|
||||||
+ " mov x30, x16\n"
|
|
||||||
: [pc] "+r"(pc)
|
|
||||||
:
|
|
||||||
- : "x16", "lr");
|
|
||||||
+ : "x16", "x30");
|
|
||||||
return pc;
|
|
||||||
#endif
|
|
||||||
}
|
|
@ -1,360 +0,0 @@
|
|||||||
diff -up chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py
|
|
||||||
--- chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 2022-07-05 13:31:29.434673638 +0000
|
|
||||||
+++ chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py 2022-07-05 21:52:01.884578748 +0000
|
|
||||||
@@ -29,7 +29,7 @@ import sys
|
|
||||||
import types
|
|
||||||
|
|
||||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
|
||||||
-__version__ = "1.15.0"
|
|
||||||
+__version__ = "1.16.0"
|
|
||||||
|
|
||||||
|
|
||||||
# Useful for very coarse version differentiation.
|
|
||||||
@@ -71,6 +71,11 @@ else:
|
|
||||||
MAXSIZE = int((1 << 63) - 1)
|
|
||||||
del X
|
|
||||||
|
|
||||||
+if PY34:
|
|
||||||
+ from importlib.util import spec_from_loader
|
|
||||||
+else:
|
|
||||||
+ spec_from_loader = None
|
|
||||||
+
|
|
||||||
|
|
||||||
def _add_doc(func, doc):
|
|
||||||
"""Add documentation to a function."""
|
|
||||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
|
||||||
return self
|
|
||||||
return None
|
|
||||||
|
|
||||||
+ def find_spec(self, fullname, path, target=None):
|
|
||||||
+ if fullname in self.known_modules:
|
|
||||||
+ return spec_from_loader(fullname, self)
|
|
||||||
+ return None
|
|
||||||
+
|
|
||||||
def __get_module(self, fullname):
|
|
||||||
try:
|
|
||||||
return self.known_modules[fullname]
|
|
||||||
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
|
||||||
return None
|
|
||||||
get_source = get_code # same as get_code
|
|
||||||
|
|
||||||
+ def create_module(self, spec):
|
|
||||||
+ return self.load_module(spec.name)
|
|
||||||
+
|
|
||||||
+ def exec_module(self, module):
|
|
||||||
+ pass
|
|
||||||
+
|
|
||||||
_importer = _SixMetaPathImporter(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
diff -up chromium-103.0.5060.53/third_party/protobuf/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/protobuf/third_party/six/six.py
|
|
||||||
--- chromium-103.0.5060.53/third_party/protobuf/third_party/six/six.py.116 2022-07-05 13:32:17.815058318 +0000
|
|
||||||
+++ chromium-103.0.5060.53/third_party/protobuf/third_party/six/six.py 2022-07-05 22:00:28.139721738 +0000
|
|
||||||
@@ -1,4 +1,4 @@
|
|
||||||
-# Copyright (c) 2010-2018 Benjamin Peterson
|
|
||||||
+# Copyright (c) 2010-2020 Benjamin Peterson
|
|
||||||
#
|
|
||||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
# of this software and associated documentation files (the "Software"), to deal
|
|
||||||
@@ -29,7 +29,7 @@ import sys
|
|
||||||
import types
|
|
||||||
|
|
||||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
|
||||||
-__version__ = "1.12.0"
|
|
||||||
+__version__ = "1.16.0"
|
|
||||||
|
|
||||||
|
|
||||||
# Useful for very coarse version differentiation.
|
|
||||||
@@ -71,6 +71,11 @@ else:
|
|
||||||
MAXSIZE = int((1 << 63) - 1)
|
|
||||||
del X
|
|
||||||
|
|
||||||
+if PY34:
|
|
||||||
+ from importlib.util import spec_from_loader
|
|
||||||
+else:
|
|
||||||
+ spec_from_loader = None
|
|
||||||
+
|
|
||||||
|
|
||||||
def _add_doc(func, doc):
|
|
||||||
"""Add documentation to a function."""
|
|
||||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
|
||||||
return self
|
|
||||||
return None
|
|
||||||
|
|
||||||
+ def find_spec(self, fullname, path, target=None):
|
|
||||||
+ if fullname in self.known_modules:
|
|
||||||
+ return spec_from_loader(fullname, self)
|
|
||||||
+ return None
|
|
||||||
+
|
|
||||||
def __get_module(self, fullname):
|
|
||||||
try:
|
|
||||||
return self.known_modules[fullname]
|
|
||||||
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
|
||||||
return None
|
|
||||||
get_source = get_code # same as get_code
|
|
||||||
|
|
||||||
+ def create_module(self, spec):
|
|
||||||
+ return self.load_module(spec.name)
|
|
||||||
+
|
|
||||||
+ def exec_module(self, module):
|
|
||||||
+ pass
|
|
||||||
+
|
|
||||||
_importer = _SixMetaPathImporter(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -255,9 +271,11 @@ _moved_attributes = [
|
|
||||||
MovedAttribute("zip_longest", "itertools", "itertools", "izip_longest", "zip_longest"),
|
|
||||||
MovedModule("builtins", "__builtin__"),
|
|
||||||
MovedModule("configparser", "ConfigParser"),
|
|
||||||
+ MovedModule("collections_abc", "collections", "collections.abc" if sys.version_info >= (3, 3) else "collections"),
|
|
||||||
MovedModule("copyreg", "copy_reg"),
|
|
||||||
MovedModule("dbm_gnu", "gdbm", "dbm.gnu"),
|
|
||||||
- MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread"),
|
|
||||||
+ MovedModule("dbm_ndbm", "dbm", "dbm.ndbm"),
|
|
||||||
+ MovedModule("_dummy_thread", "dummy_thread", "_dummy_thread" if sys.version_info < (3, 9) else "_thread"),
|
|
||||||
MovedModule("http_cookiejar", "cookielib", "http.cookiejar"),
|
|
||||||
MovedModule("http_cookies", "Cookie", "http.cookies"),
|
|
||||||
MovedModule("html_entities", "htmlentitydefs", "html.entities"),
|
|
||||||
@@ -637,13 +655,16 @@ if PY3:
|
|
||||||
import io
|
|
||||||
StringIO = io.StringIO
|
|
||||||
BytesIO = io.BytesIO
|
|
||||||
+ del io
|
|
||||||
_assertCountEqual = "assertCountEqual"
|
|
||||||
if sys.version_info[1] <= 1:
|
|
||||||
_assertRaisesRegex = "assertRaisesRegexp"
|
|
||||||
_assertRegex = "assertRegexpMatches"
|
|
||||||
+ _assertNotRegex = "assertNotRegexpMatches"
|
|
||||||
else:
|
|
||||||
_assertRaisesRegex = "assertRaisesRegex"
|
|
||||||
_assertRegex = "assertRegex"
|
|
||||||
+ _assertNotRegex = "assertNotRegex"
|
|
||||||
else:
|
|
||||||
def b(s):
|
|
||||||
return s
|
|
||||||
@@ -665,6 +686,7 @@ else:
|
|
||||||
_assertCountEqual = "assertItemsEqual"
|
|
||||||
_assertRaisesRegex = "assertRaisesRegexp"
|
|
||||||
_assertRegex = "assertRegexpMatches"
|
|
||||||
+ _assertNotRegex = "assertNotRegexpMatches"
|
|
||||||
_add_doc(b, """Byte literal""")
|
|
||||||
_add_doc(u, """Text literal""")
|
|
||||||
|
|
||||||
@@ -681,6 +703,10 @@ def assertRegex(self, *args, **kwargs):
|
|
||||||
return getattr(self, _assertRegex)(*args, **kwargs)
|
|
||||||
|
|
||||||
|
|
||||||
+def assertNotRegex(self, *args, **kwargs):
|
|
||||||
+ return getattr(self, _assertNotRegex)(*args, **kwargs)
|
|
||||||
+
|
|
||||||
+
|
|
||||||
if PY3:
|
|
||||||
exec_ = getattr(moves.builtins, "exec")
|
|
||||||
|
|
||||||
@@ -716,16 +742,7 @@ else:
|
|
||||||
""")
|
|
||||||
|
|
||||||
|
|
||||||
-if sys.version_info[:2] == (3, 2):
|
|
||||||
- exec_("""def raise_from(value, from_value):
|
|
||||||
- try:
|
|
||||||
- if from_value is None:
|
|
||||||
- raise value
|
|
||||||
- raise value from from_value
|
|
||||||
- finally:
|
|
||||||
- value = None
|
|
||||||
-""")
|
|
||||||
-elif sys.version_info[:2] > (3, 2):
|
|
||||||
+if sys.version_info[:2] > (3,):
|
|
||||||
exec_("""def raise_from(value, from_value):
|
|
||||||
try:
|
|
||||||
raise value from from_value
|
|
||||||
@@ -805,13 +822,33 @@ if sys.version_info[:2] < (3, 3):
|
|
||||||
_add_doc(reraise, """Reraise an exception.""")
|
|
||||||
|
|
||||||
if sys.version_info[0:2] < (3, 4):
|
|
||||||
+ # This does exactly the same what the :func:`py3:functools.update_wrapper`
|
|
||||||
+ # function does on Python versions after 3.2. It sets the ``__wrapped__``
|
|
||||||
+ # attribute on ``wrapper`` object and it doesn't raise an error if any of
|
|
||||||
+ # the attributes mentioned in ``assigned`` and ``updated`` are missing on
|
|
||||||
+ # ``wrapped`` object.
|
|
||||||
+ def _update_wrapper(wrapper, wrapped,
|
|
||||||
+ assigned=functools.WRAPPER_ASSIGNMENTS,
|
|
||||||
+ updated=functools.WRAPPER_UPDATES):
|
|
||||||
+ for attr in assigned:
|
|
||||||
+ try:
|
|
||||||
+ value = getattr(wrapped, attr)
|
|
||||||
+ except AttributeError:
|
|
||||||
+ continue
|
|
||||||
+ else:
|
|
||||||
+ setattr(wrapper, attr, value)
|
|
||||||
+ for attr in updated:
|
|
||||||
+ getattr(wrapper, attr).update(getattr(wrapped, attr, {}))
|
|
||||||
+ wrapper.__wrapped__ = wrapped
|
|
||||||
+ return wrapper
|
|
||||||
+ _update_wrapper.__doc__ = functools.update_wrapper.__doc__
|
|
||||||
+
|
|
||||||
def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
|
|
||||||
updated=functools.WRAPPER_UPDATES):
|
|
||||||
- def wrapper(f):
|
|
||||||
- f = functools.wraps(wrapped, assigned, updated)(f)
|
|
||||||
- f.__wrapped__ = wrapped
|
|
||||||
- return f
|
|
||||||
- return wrapper
|
|
||||||
+ return functools.partial(_update_wrapper, wrapped=wrapped,
|
|
||||||
+ assigned=assigned, updated=updated)
|
|
||||||
+ wraps.__doc__ = functools.wraps.__doc__
|
|
||||||
+
|
|
||||||
else:
|
|
||||||
wraps = functools.wraps
|
|
||||||
|
|
||||||
@@ -824,7 +861,15 @@ def with_metaclass(meta, *bases):
|
|
||||||
class metaclass(type):
|
|
||||||
|
|
||||||
def __new__(cls, name, this_bases, d):
|
|
||||||
- return meta(name, bases, d)
|
|
||||||
+ if sys.version_info[:2] >= (3, 7):
|
|
||||||
+ # This version introduced PEP 560 that requires a bit
|
|
||||||
+ # of extra care (we mimic what is done by __build_class__).
|
|
||||||
+ resolved_bases = types.resolve_bases(bases)
|
|
||||||
+ if resolved_bases is not bases:
|
|
||||||
+ d['__orig_bases__'] = bases
|
|
||||||
+ else:
|
|
||||||
+ resolved_bases = bases
|
|
||||||
+ return meta(name, resolved_bases, d)
|
|
||||||
|
|
||||||
@classmethod
|
|
||||||
def __prepare__(cls, name, this_bases):
|
|
||||||
@@ -861,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e
|
|
||||||
- `str` -> encoded to `bytes`
|
|
||||||
- `bytes` -> `bytes`
|
|
||||||
"""
|
|
||||||
+ if isinstance(s, binary_type):
|
|
||||||
+ return s
|
|
||||||
if isinstance(s, text_type):
|
|
||||||
return s.encode(encoding, errors)
|
|
||||||
- elif isinstance(s, binary_type):
|
|
||||||
- return s
|
|
||||||
- else:
|
|
||||||
- raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
|
|
||||||
|
|
||||||
def ensure_str(s, encoding='utf-8', errors='strict'):
|
|
||||||
@@ -880,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro
|
|
||||||
- `str` -> `str`
|
|
||||||
- `bytes` -> decoded to `str`
|
|
||||||
"""
|
|
||||||
- if not isinstance(s, (text_type, binary_type)):
|
|
||||||
- raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
+ # Optimization: Fast return for the common case.
|
|
||||||
+ if type(s) is str:
|
|
||||||
+ return s
|
|
||||||
if PY2 and isinstance(s, text_type):
|
|
||||||
- s = s.encode(encoding, errors)
|
|
||||||
+ return s.encode(encoding, errors)
|
|
||||||
elif PY3 and isinstance(s, binary_type):
|
|
||||||
- s = s.decode(encoding, errors)
|
|
||||||
+ return s.decode(encoding, errors)
|
|
||||||
+ elif not isinstance(s, (text_type, binary_type)):
|
|
||||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
return s
|
|
||||||
|
|
||||||
|
|
||||||
@@ -908,10 +955,9 @@ def ensure_text(s, encoding='utf-8', err
|
|
||||||
raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
|
|
||||||
|
|
||||||
-
|
|
||||||
def python_2_unicode_compatible(klass):
|
|
||||||
"""
|
|
||||||
- A decorator that defines __unicode__ and __str__ methods under Python 2.
|
|
||||||
+ A class decorator that defines __unicode__ and __str__ methods under Python 2.
|
|
||||||
Under Python 3 it does nothing.
|
|
||||||
|
|
||||||
To support Python 2 and 3 with a single code base, define a __str__ method
|
|
||||||
diff -up chromium-103.0.5060.53/third_party/six/src/six.py.116 chromium-103.0.5060.53/third_party/six/src/six.py
|
|
||||||
--- chromium-103.0.5060.53/third_party/six/src/six.py.116 2022-07-05 13:32:28.916687658 +0000
|
|
||||||
+++ chromium-103.0.5060.53/third_party/six/src/six.py 2022-07-05 21:59:42.561240407 +0000
|
|
||||||
@@ -29,7 +29,7 @@ import sys
|
|
||||||
import types
|
|
||||||
|
|
||||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
|
||||||
-__version__ = "1.14.0"
|
|
||||||
+__version__ = "1.16.0"
|
|
||||||
|
|
||||||
|
|
||||||
# Useful for very coarse version differentiation.
|
|
||||||
@@ -71,6 +71,11 @@ else:
|
|
||||||
MAXSIZE = int((1 << 63) - 1)
|
|
||||||
del X
|
|
||||||
|
|
||||||
+if PY34:
|
|
||||||
+ from importlib.util import spec_from_loader
|
|
||||||
+else:
|
|
||||||
+ spec_from_loader = None
|
|
||||||
+
|
|
||||||
|
|
||||||
def _add_doc(func, doc):
|
|
||||||
"""Add documentation to a function."""
|
|
||||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
|
||||||
return self
|
|
||||||
return None
|
|
||||||
|
|
||||||
+ def find_spec(self, fullname, path, target=None):
|
|
||||||
+ if fullname in self.known_modules:
|
|
||||||
+ return spec_from_loader(fullname, self)
|
|
||||||
+ return None
|
|
||||||
+
|
|
||||||
def __get_module(self, fullname):
|
|
||||||
try:
|
|
||||||
return self.known_modules[fullname]
|
|
||||||
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
|
||||||
return None
|
|
||||||
get_source = get_code # same as get_code
|
|
||||||
|
|
||||||
+ def create_module(self, spec):
|
|
||||||
+ return self.load_module(spec.name)
|
|
||||||
+
|
|
||||||
+ def exec_module(self, module):
|
|
||||||
+ pass
|
|
||||||
+
|
|
||||||
_importer = _SixMetaPathImporter(__name__)
|
|
||||||
|
|
||||||
|
|
||||||
@@ -890,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e
|
|
||||||
- `str` -> encoded to `bytes`
|
|
||||||
- `bytes` -> `bytes`
|
|
||||||
"""
|
|
||||||
+ if isinstance(s, binary_type):
|
|
||||||
+ return s
|
|
||||||
if isinstance(s, text_type):
|
|
||||||
return s.encode(encoding, errors)
|
|
||||||
- elif isinstance(s, binary_type):
|
|
||||||
- return s
|
|
||||||
- else:
|
|
||||||
- raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
|
|
||||||
|
|
||||||
def ensure_str(s, encoding='utf-8', errors='strict'):
|
|
||||||
@@ -909,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro
|
|
||||||
- `str` -> `str`
|
|
||||||
- `bytes` -> decoded to `str`
|
|
||||||
"""
|
|
||||||
- if not isinstance(s, (text_type, binary_type)):
|
|
||||||
- raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
+ # Optimization: Fast return for the common case.
|
|
||||||
+ if type(s) is str:
|
|
||||||
+ return s
|
|
||||||
if PY2 and isinstance(s, text_type):
|
|
||||||
- s = s.encode(encoding, errors)
|
|
||||||
+ return s.encode(encoding, errors)
|
|
||||||
elif PY3 and isinstance(s, binary_type):
|
|
||||||
- s = s.decode(encoding, errors)
|
|
||||||
+ return s.decode(encoding, errors)
|
|
||||||
+ elif not isinstance(s, (text_type, binary_type)):
|
|
||||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
|
||||||
return s
|
|
||||||
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
From a61a70605f9efc81fead5bf6984bc5ce39f1569d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Stephan Hartmann <stha09@googlemail.com>
|
|
||||||
Date: Fri, 27 May 2022 18:11:52 +0000
|
|
||||||
Subject: [PATCH] libstdc++: fix incomplete type of
|
|
||||||
content::ContentRendererClient
|
|
||||||
|
|
||||||
Destructor of std::unique_ptr in libstdc++ uses sizeof() which
|
|
||||||
requires full definition of media::AudioEncoder for return type of
|
|
||||||
cast_streaming::ResourceProvider.
|
|
||||||
---
|
|
||||||
content/public/renderer/content_renderer_client.cc | 1 +
|
|
||||||
1 file changed, 1 insertion(+)
|
|
||||||
|
|
||||||
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
|
|
||||||
index 63456aa..637a2a7 100644
|
|
||||||
--- a/content/public/renderer/content_renderer_client.cc
|
|
||||||
+++ b/content/public/renderer/content_renderer_client.cc
|
|
||||||
@@ -6,6 +6,7 @@
|
|
||||||
|
|
||||||
#include "base/command_line.h"
|
|
||||||
#include "build/build_config.h"
|
|
||||||
+#include "components/cast_streaming/renderer/public/resource_provider.h"
|
|
||||||
#include "content/public/common/content_switches.h"
|
|
||||||
#include "media/base/demuxer.h"
|
|
||||||
#include "media/base/renderer_factory.h"
|
|
||||||
--
|
|
||||||
2.35.1
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
From 385068e1eb1cde9629d18ceee1fd13255c70c806 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Date: Fri, 22 Jul 2022 18:29:24 +0000
|
||||||
|
Subject: [PATCH] libstdc++: use math.h in blink::AdjustMaskLayerGeometry
|
||||||
|
|
||||||
|
libstdc++ does not implement std::ceilf. Use ceilf from math.h
|
||||||
|
instead.
|
||||||
|
|
||||||
|
Bug: 957519
|
||||||
|
Change-Id: I03b5e0a1eb73fdeae34d5f3d2f2e9c8871c52543
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3782841
|
||||||
|
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Reviewed-by: Juanmi Huertas <juanmihd@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1027342}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc b/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc
|
||||||
|
index 4abe1d9..b5b43da 100644
|
||||||
|
--- a/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc
|
||||||
|
+++ b/third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.cc
|
||||||
|
@@ -4,8 +4,9 @@
|
||||||
|
|
||||||
|
#include "third_party/blink/renderer/platform/graphics/compositing/adjust_mask_layer_geometry.h"
|
||||||
|
|
||||||
|
+#include <math.h>
|
||||||
|
#include <algorithm>
|
||||||
|
-#include <cmath>
|
||||||
|
+
|
||||||
|
#include "third_party/blink/renderer/platform/graphics/paint/geometry_mapper.h"
|
||||||
|
#include "third_party/blink/renderer/platform/graphics/paint/transform_paint_property_node.h"
|
||||||
|
#include "ui/gfx/geometry/size.h"
|
||||||
|
@@ -29,8 +30,7 @@
|
||||||
|
// Map a screen pixel into the layer.
|
||||||
|
GeometryMapper::SourceToDestinationRect(TransformPaintPropertyNode::Root(),
|
||||||
|
transform, pixel_rect);
|
||||||
|
- int outset =
|
||||||
|
- std::ceilf(std::max(pixel_rect.width(), pixel_rect.height()) * 2);
|
||||||
|
+ int outset = ceilf(std::max(pixel_rect.width(), pixel_rect.height()) * 2);
|
||||||
|
// Don't expand too far in extreme cases.
|
||||||
|
constexpr int kMaxOutset = 1000;
|
||||||
|
outset = std::min(kMaxOutset, outset);
|
@ -0,0 +1,26 @@
|
|||||||
|
From 8959d9d1c6e4ed083c278ab9e8def20a409052b9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Date: Fri, 22 Jul 2022 16:51:28 +0000
|
||||||
|
Subject: [PATCH] IWYU: add memory for std::unique_ptr in disk_cache::Bitmap
|
||||||
|
|
||||||
|
Bug: 957519
|
||||||
|
Change-Id: I123198345e5f9062329b7eabe980f312525c268b
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3779530
|
||||||
|
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
|
||||||
|
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1027289}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/net/disk_cache/blockfile/bitmap.h b/net/disk_cache/blockfile/bitmap.h
|
||||||
|
index 07806cf..9ffa98b9 100644
|
||||||
|
--- a/net/disk_cache/blockfile/bitmap.h
|
||||||
|
+++ b/net/disk_cache/blockfile/bitmap.h
|
||||||
|
@@ -8,6 +8,8 @@
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
+#include <memory>
|
||||||
|
+
|
||||||
|
#include "base/memory/raw_ptr.h"
|
||||||
|
#include "net/base/net_export.h"
|
||||||
|
|
@ -0,0 +1,161 @@
|
|||||||
|
From 632aad0141fe0008fa9babba4f1f514222fa2cda Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matthew Denton <mpdenton@chromium.org>
|
||||||
|
Date: Mon, 01 Aug 2022 21:45:28 +0000
|
||||||
|
Subject: [PATCH] [Linux sandbox] cleanup TrapRegistry's "atomics"
|
||||||
|
|
||||||
|
TrapRegistry uses some hacky asm statements as compiler memory barriers
|
||||||
|
to prevent a signal handler from accessing a deleted array (in the case
|
||||||
|
that the store of the pointer to the new array is reordered after the
|
||||||
|
deletion of the old array and the signal handler grabs a pointer to the
|
||||||
|
old array after it's deleted).
|
||||||
|
|
||||||
|
We have std::atomic_signal_fence for this now, so this uses it.
|
||||||
|
|
||||||
|
This also changes the |trap_array_| pointer back to a raw pointer from
|
||||||
|
a raw_ptr. Usage of raw_ptr might be awkward as it is also accessed in
|
||||||
|
a signal handler, and in fact |trap_array_| is an owning pointer
|
||||||
|
anyway so raw_ptr is unnecessary.
|
||||||
|
|
||||||
|
This came up in https://crrev.com/c/3789266 in which the use of raw_ptr
|
||||||
|
with the hacky compiler barriers was not supported by GCC.
|
||||||
|
|
||||||
|
SMALL ADDITION: This also removes raw_ptr from the arch_sigsys struct; it was a raw pointer to a code instruction and likely would not have worked. It is also never dereferenced (only its value is used).
|
||||||
|
|
||||||
|
NOTE 1: In technicality, all non-local variables accessed by the signal
|
||||||
|
handler must be either lock-free std::atomics or volatile sig_atomic_t.
|
||||||
|
None of Chrome's code does this and in fact, glibc just typedefs
|
||||||
|
sig_atomic_t to int. The std::atomic_signal_fence is enough on any
|
||||||
|
architecture.
|
||||||
|
|
||||||
|
NOTE 2: This race condition is unlikely to ever happen even without
|
||||||
|
compiler barriers. The only time we might be modifying the
|
||||||
|
|trap_array_| and also accessing it from a signal handler, we must
|
||||||
|
have already applied a seccomp sandbox that uses traps, and now be
|
||||||
|
applying another one that uses traps. And to replace the deleted object,
|
||||||
|
the second sandbox must be getting applied in a multithreaded
|
||||||
|
environment, otherwise there would be no allocations after the free.
|
||||||
|
|
||||||
|
Bug: 819294
|
||||||
|
|
||||||
|
Change-Id: I9f1cd417446dd863805a303e9b111bc862cb9ae2
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3788911
|
||||||
|
Commit-Queue: Matthew Denton <mpdenton@chromium.org>
|
||||||
|
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1030277}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/sandbox/linux/seccomp-bpf/trap.cc b/sandbox/linux/seccomp-bpf/trap.cc
|
||||||
|
index cb71a9b..b0c0257 100644
|
||||||
|
--- a/sandbox/linux/seccomp-bpf/trap.cc
|
||||||
|
+++ b/sandbox/linux/seccomp-bpf/trap.cc
|
||||||
|
@@ -12,12 +12,13 @@
|
||||||
|
#include <sys/syscall.h>
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
|
+#include <atomic>
|
||||||
|
#include <limits>
|
||||||
|
#include <tuple>
|
||||||
|
|
||||||
|
#include "base/compiler_specific.h"
|
||||||
|
#include "base/logging.h"
|
||||||
|
-#include "base/memory/raw_ptr.h"
|
||||||
|
+#include "base/memory/raw_ptr_exclusion.h"
|
||||||
|
#include "build/build_config.h"
|
||||||
|
#include "sandbox/linux/bpf_dsl/seccomp_macros.h"
|
||||||
|
#include "sandbox/linux/seccomp-bpf/die.h"
|
||||||
|
@@ -29,7 +30,9 @@
|
||||||
|
namespace {
|
||||||
|
|
||||||
|
struct arch_sigsys {
|
||||||
|
- raw_ptr<void> ip;
|
||||||
|
+ // This is not raw_ptr because it is a pointer to a code address given to us
|
||||||
|
+ // by the kernel.
|
||||||
|
+ RAW_PTR_EXCLUSION void* ip;
|
||||||
|
int nr;
|
||||||
|
unsigned int arch;
|
||||||
|
};
|
||||||
|
@@ -77,11 +80,7 @@
|
||||||
|
|
||||||
|
namespace sandbox {
|
||||||
|
|
||||||
|
-Trap::Trap()
|
||||||
|
- : trap_array_(nullptr),
|
||||||
|
- trap_array_size_(0),
|
||||||
|
- trap_array_capacity_(0),
|
||||||
|
- has_unsafe_traps_(false) {
|
||||||
|
+Trap::Trap() {
|
||||||
|
// Set new SIGSYS handler
|
||||||
|
struct sigaction sa = {};
|
||||||
|
// In some toolchain, sa_sigaction is not declared in struct sigaction.
|
||||||
|
@@ -239,7 +238,7 @@
|
||||||
|
struct arch_seccomp_data data = {
|
||||||
|
static_cast<int>(SECCOMP_SYSCALL(ctx)),
|
||||||
|
SECCOMP_ARCH,
|
||||||
|
- reinterpret_cast<uint64_t>(sigsys.ip.get()),
|
||||||
|
+ reinterpret_cast<uint64_t>(sigsys.ip),
|
||||||
|
{static_cast<uint64_t>(SECCOMP_PARM1(ctx)),
|
||||||
|
static_cast<uint64_t>(SECCOMP_PARM2(ctx)),
|
||||||
|
static_cast<uint64_t>(SECCOMP_PARM3(ctx)),
|
||||||
|
@@ -333,24 +332,11 @@
|
||||||
|
TrapKey* new_trap_array = new TrapKey[trap_array_capacity_];
|
||||||
|
std::copy_n(old_trap_array, trap_array_size_, new_trap_array);
|
||||||
|
|
||||||
|
- // Language specs are unclear on whether the compiler is allowed to move
|
||||||
|
- // the "delete[]" above our preceding assignments and/or memory moves,
|
||||||
|
- // iff the compiler believes that "delete[]" doesn't have any other
|
||||||
|
- // global side-effects.
|
||||||
|
- // We insert optimization barriers to prevent this from happening.
|
||||||
|
- // The first barrier is probably not needed, but better be explicit in
|
||||||
|
- // what we want to tell the compiler.
|
||||||
|
- // The clang developer mailing list couldn't answer whether this is a
|
||||||
|
- // legitimate worry; but they at least thought that the barrier is
|
||||||
|
- // sufficient to prevent the (so far hypothetical) problem of re-ordering
|
||||||
|
- // of instructions by the compiler.
|
||||||
|
- //
|
||||||
|
- // TODO(mdempsky): Try to clean this up using base/atomicops or C++11
|
||||||
|
- // atomics; see crbug.com/414363.
|
||||||
|
- asm volatile("" : "=r"(new_trap_array) : "0"(new_trap_array) : "memory");
|
||||||
|
trap_array_ = new_trap_array;
|
||||||
|
- asm volatile("" : "=r"(trap_array_) : "0"(trap_array_) : "memory");
|
||||||
|
-
|
||||||
|
+ // Prevent the compiler from moving delete[] before the store of the
|
||||||
|
+ // |new_trap_array|, otherwise a concurrent SIGSYS may see a |trap_array_|
|
||||||
|
+ // that still points to |old_trap_array| after it has been deleted.
|
||||||
|
+ std::atomic_signal_fence(std::memory_order_release);
|
||||||
|
delete[] old_trap_array;
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/sandbox/linux/seccomp-bpf/trap.h b/sandbox/linux/seccomp-bpf/trap.h
|
||||||
|
index cc17d26..37d2029 100644
|
||||||
|
--- a/sandbox/linux/seccomp-bpf/trap.h
|
||||||
|
+++ b/sandbox/linux/seccomp-bpf/trap.h
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
|
||||||
|
#include <map>
|
||||||
|
|
||||||
|
-#include "base/memory/raw_ptr.h"
|
||||||
|
+#include "base/memory/raw_ptr_exclusion.h"
|
||||||
|
#include "sandbox/linux/bpf_dsl/trap_registry.h"
|
||||||
|
#include "sandbox/linux/system_headers/linux_signal.h"
|
||||||
|
#include "sandbox/sandbox_export.h"
|
||||||
|
@@ -75,11 +75,15 @@
|
||||||
|
// events.
|
||||||
|
static Trap* global_trap_;
|
||||||
|
|
||||||
|
- TrapIds trap_ids_; // Maps from TrapKeys to numeric ids
|
||||||
|
- raw_ptr<TrapKey> trap_array_; // Array of TrapKeys indexed by ids
|
||||||
|
- size_t trap_array_size_; // Currently used size of array
|
||||||
|
- size_t trap_array_capacity_; // Currently allocated capacity of array
|
||||||
|
- bool has_unsafe_traps_; // Whether unsafe traps have been enabled
|
||||||
|
+ TrapIds trap_ids_; // Maps from TrapKeys to numeric ids
|
||||||
|
+ // Array of TrapKeys indexed by ids.
|
||||||
|
+ //
|
||||||
|
+ // This is not a raw_ptr as it is an owning pointer anyway, and is meant to be
|
||||||
|
+ // used between normal code and signal handlers.
|
||||||
|
+ RAW_PTR_EXCLUSION TrapKey* trap_array_ = nullptr;
|
||||||
|
+ size_t trap_array_size_ = 0; // Currently used size of array
|
||||||
|
+ size_t trap_array_capacity_ = 0; // Currently allocated capacity of array
|
||||||
|
+ bool has_unsafe_traps_ = false; // Whether unsafe traps have been enabled
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace sandbox
|
@ -0,0 +1,24 @@
|
|||||||
|
From 41dca8bd0c5e8ac5197d7477c6f01556fb88fb43 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Date: Sun, 14 Aug 2022 08:41:11 +0000
|
||||||
|
Subject: [PATCH] IWYU: add vector for std::vector in browser_finder.h
|
||||||
|
|
||||||
|
---
|
||||||
|
chrome/browser/ui/browser_finder.h | 1 +
|
||||||
|
1 file changed, 1 insertion(+)
|
||||||
|
|
||||||
|
diff --git a/chrome/browser/ui/browser_finder.h b/chrome/browser/ui/browser_finder.h
|
||||||
|
index f885be0..ad7a184 100644
|
||||||
|
--- a/chrome/browser/ui/browser_finder.h
|
||||||
|
+++ b/chrome/browser/ui/browser_finder.h
|
||||||
|
@@ -6,6 +6,7 @@
|
||||||
|
#define CHROME_BROWSER_UI_BROWSER_FINDER_H_
|
||||||
|
|
||||||
|
#include <stddef.h>
|
||||||
|
+#include <vector>
|
||||||
|
|
||||||
|
#include "ui/display/types/display_constants.h"
|
||||||
|
#include "ui/gfx/native_widget_types.h"
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
@ -0,0 +1,30 @@
|
|||||||
|
From 72b19a6a725809f872a7e7525c9a83bcbda85ec7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Date: Mon, 25 Jul 2022 09:19:19 +0000
|
||||||
|
Subject: [PATCH] GCC: make raw_ptr move assignment operator noexcept
|
||||||
|
|
||||||
|
Required in content::LevelDBScopesOptions, because move assignment
|
||||||
|
operator is noexcept too.
|
||||||
|
|
||||||
|
Bug: 3762913
|
||||||
|
Change-Id: Ic55ade0e15457eb7349fe24203307972d9030a8e
|
||||||
|
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3782669
|
||||||
|
Reviewed-by: Keishi Hattori <keishi@chromium.org>
|
||||||
|
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
|
||||||
|
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
|
||||||
|
Cr-Commit-Position: refs/heads/main@{#1027669}
|
||||||
|
---
|
||||||
|
|
||||||
|
diff --git a/base/memory/raw_ptr.h b/base/memory/raw_ptr.h
|
||||||
|
index 5d8c1cfd..9a62f03 100644
|
||||||
|
--- a/base/memory/raw_ptr.h
|
||||||
|
+++ b/base/memory/raw_ptr.h
|
||||||
|
@@ -796,7 +796,7 @@
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
- ALWAYS_INLINE raw_ptr& operator=(raw_ptr&& p) {
|
||||||
|
+ ALWAYS_INLINE raw_ptr& operator=(raw_ptr&& p) noexcept {
|
||||||
|
if (LIKELY(this != &p)) {
|
||||||
|
Impl::ReleaseWrappedPtr(wrapped_ptr_);
|
||||||
|
wrapped_ptr_ = p.wrapped_ptr_;
|
@ -0,0 +1,134 @@
|
|||||||
|
diff -up chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py
|
||||||
|
--- chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 2022-07-05 13:31:29.434673638 +0000
|
||||||
|
+++ chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py 2022-07-05 21:52:01.884578748 +0000
|
||||||
|
@@ -29,7 +29,7 @@ import sys
|
||||||
|
import types
|
||||||
|
|
||||||
|
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||||
|
-__version__ = "1.15.0"
|
||||||
|
+__version__ = "1.16.0"
|
||||||
|
|
||||||
|
|
||||||
|
# Useful for very coarse version differentiation.
|
||||||
|
@@ -71,6 +71,11 @@ else:
|
||||||
|
MAXSIZE = int((1 << 63) - 1)
|
||||||
|
del X
|
||||||
|
|
||||||
|
+if PY34:
|
||||||
|
+ from importlib.util import spec_from_loader
|
||||||
|
+else:
|
||||||
|
+ spec_from_loader = None
|
||||||
|
+
|
||||||
|
|
||||||
|
def _add_doc(func, doc):
|
||||||
|
"""Add documentation to a function."""
|
||||||
|
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
||||||
|
return self
|
||||||
|
return None
|
||||||
|
|
||||||
|
+ def find_spec(self, fullname, path, target=None):
|
||||||
|
+ if fullname in self.known_modules:
|
||||||
|
+ return spec_from_loader(fullname, self)
|
||||||
|
+ return None
|
||||||
|
+
|
||||||
|
def __get_module(self, fullname):
|
||||||
|
try:
|
||||||
|
return self.known_modules[fullname]
|
||||||
|
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
||||||
|
return None
|
||||||
|
get_source = get_code # same as get_code
|
||||||
|
|
||||||
|
+ def create_module(self, spec):
|
||||||
|
+ return self.load_module(spec.name)
|
||||||
|
+
|
||||||
|
+ def exec_module(self, module):
|
||||||
|
+ pass
|
||||||
|
+
|
||||||
|
_importer = _SixMetaPathImporter(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
diff -up chromium-103.0.5060.53/third_party/six/src/six.py.116 chromium-103.0.5060.53/third_party/six/src/six.py
|
||||||
|
--- chromium-103.0.5060.53/third_party/six/src/six.py.116 2022-07-05 13:32:28.916687658 +0000
|
||||||
|
+++ chromium-103.0.5060.53/third_party/six/src/six.py 2022-07-05 21:59:42.561240407 +0000
|
||||||
|
@@ -29,7 +29,7 @@ import sys
|
||||||
|
import types
|
||||||
|
|
||||||
|
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||||
|
-__version__ = "1.14.0"
|
||||||
|
+__version__ = "1.16.0"
|
||||||
|
|
||||||
|
|
||||||
|
# Useful for very coarse version differentiation.
|
||||||
|
@@ -71,6 +71,11 @@ else:
|
||||||
|
MAXSIZE = int((1 << 63) - 1)
|
||||||
|
del X
|
||||||
|
|
||||||
|
+if PY34:
|
||||||
|
+ from importlib.util import spec_from_loader
|
||||||
|
+else:
|
||||||
|
+ spec_from_loader = None
|
||||||
|
+
|
||||||
|
|
||||||
|
def _add_doc(func, doc):
|
||||||
|
"""Add documentation to a function."""
|
||||||
|
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
||||||
|
return self
|
||||||
|
return None
|
||||||
|
|
||||||
|
+ def find_spec(self, fullname, path, target=None):
|
||||||
|
+ if fullname in self.known_modules:
|
||||||
|
+ return spec_from_loader(fullname, self)
|
||||||
|
+ return None
|
||||||
|
+
|
||||||
|
def __get_module(self, fullname):
|
||||||
|
try:
|
||||||
|
return self.known_modules[fullname]
|
||||||
|
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
||||||
|
return None
|
||||||
|
get_source = get_code # same as get_code
|
||||||
|
|
||||||
|
+ def create_module(self, spec):
|
||||||
|
+ return self.load_module(spec.name)
|
||||||
|
+
|
||||||
|
+ def exec_module(self, module):
|
||||||
|
+ pass
|
||||||
|
+
|
||||||
|
_importer = _SixMetaPathImporter(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -890,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e
|
||||||
|
- `str` -> encoded to `bytes`
|
||||||
|
- `bytes` -> `bytes`
|
||||||
|
"""
|
||||||
|
+ if isinstance(s, binary_type):
|
||||||
|
+ return s
|
||||||
|
if isinstance(s, text_type):
|
||||||
|
return s.encode(encoding, errors)
|
||||||
|
- elif isinstance(s, binary_type):
|
||||||
|
- return s
|
||||||
|
- else:
|
||||||
|
- raise TypeError("not expecting type '%s'" % type(s))
|
||||||
|
+ raise TypeError("not expecting type '%s'" % type(s))
|
||||||
|
|
||||||
|
|
||||||
|
def ensure_str(s, encoding='utf-8', errors='strict'):
|
||||||
|
@@ -909,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro
|
||||||
|
- `str` -> `str`
|
||||||
|
- `bytes` -> decoded to `str`
|
||||||
|
"""
|
||||||
|
- if not isinstance(s, (text_type, binary_type)):
|
||||||
|
- raise TypeError("not expecting type '%s'" % type(s))
|
||||||
|
+ # Optimization: Fast return for the common case.
|
||||||
|
+ if type(s) is str:
|
||||||
|
+ return s
|
||||||
|
if PY2 and isinstance(s, text_type):
|
||||||
|
- s = s.encode(encoding, errors)
|
||||||
|
+ return s.encode(encoding, errors)
|
||||||
|
elif PY3 and isinstance(s, binary_type):
|
||||||
|
- s = s.decode(encoding, errors)
|
||||||
|
+ return s.decode(encoding, errors)
|
||||||
|
+ elif not isinstance(s, (text_type, binary_type)):
|
||||||
|
+ raise TypeError("not expecting type '%s'" % type(s))
|
||||||
|
return s
|
||||||
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
|||||||
|
diff -up chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h.old-wayland chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h
|
||||||
|
--- chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h.old-wayland 2022-09-01 19:36:06.099483374 +0000
|
||||||
|
+++ chromium-105.0.5195.52/third_party/wayland/src/src/wayland-client-core.h 2022-09-01 22:09:56.523353619 +0000
|
||||||
|
@@ -119,9 +119,27 @@ struct wl_display;
|
||||||
|
*/
|
||||||
|
struct wl_event_queue;
|
||||||
|
|
||||||
|
+/** Destroy proxy after marshalling
|
||||||
|
+ * @ingroup wl_proxy
|
||||||
|
+ */
|
||||||
|
+#define WL_MARSHAL_FLAG_DESTROY (1 << 0)
|
||||||
|
+
|
||||||
|
void
|
||||||
|
wl_event_queue_destroy(struct wl_event_queue *queue);
|
||||||
|
|
||||||
|
+struct wl_proxy *
|
||||||
|
+wl_proxy_marshal_flags(struct wl_proxy *proxy, uint32_t opcode,
|
||||||
|
+ const struct wl_interface *interface,
|
||||||
|
+ uint32_t version,
|
||||||
|
+ uint32_t flags, ...);
|
||||||
|
+
|
||||||
|
+struct wl_proxy *
|
||||||
|
+wl_proxy_marshal_array_flags(struct wl_proxy *proxy, uint32_t opcode,
|
||||||
|
+ const struct wl_interface *interface,
|
||||||
|
+ uint32_t version,
|
||||||
|
+ uint32_t flags,
|
||||||
|
+ union wl_argument *args);
|
||||||
|
+
|
||||||
|
void
|
||||||
|
wl_proxy_marshal(struct wl_proxy *p, uint32_t opcode, ...);
|
||||||
|
|
Loading…
Reference in new issue