chore: bump chromium to 92.0.4475.0 (master) (#28462)

* chore: bump chromium in DEPS to 91.0.4464.0

* chore: rebuild chromium/dcheck.patch with import-patches -3

Mechanical only; no code changes

* chore: remove content_browser_main_loop.patch

Refs: 2725153

The function being patched (BrowserMainLoop::MainMessageLoopRun()) no
longer exists.

NB: if removing this introduces regressions the likely fix will be to
add a similar patch for ShellBrowserMainParts::WillRunMainMessageLoop()
which has similar code and was added at the same time this was removed.

* chore: rebuild chromium/put_back_deleted_colors_for_autofill.patch with import-patches -3

Mechanical only; no code changes

* chore: rebuild chromium/disable_color_correct_rendering.patch with import-patches -3

Mechanical only; no code changes

* chore: rebuild chromium/eat_allow_disabling_blink_scheduler_throttling_per_renderview.patch with patch

Mechanical only; no code changes

* chore: rebuild chromium/gpu_notify_when_dxdiag_request_fails.patch with import-patches -3

Mechanical only; no code changes

* chore: rebuild chromium/ui_gtk_public_header.patch manually

no code changes

* chore: rebuild chromium/web_contents.patch with import-patches -3

Mechanical only; no code changes

* chore: remove v8/skip_global_registration_of_shared_arraybuffer_backing_stores.patch

Refs: 2763874

This patch has been merged upstream

* chore: export patches

* chore: update add_trustedauthclient_to_urlloaderfactory.patch

Refs: 2757969

Sync with removal of render_frame_id_

* chore: sync chromium/put_back_deleted_colors_for_autofill.patch

Refs: 2785841

SkColorFromColorId() no longer takes theme, scheme args

* chore: sync chromium/put_back_deleted_colors_for_autofill.patch

Refs: 2772143

Change new calls to GetDarkSchemeColor to fit our patched call signature

* chore: update add_trustedauthclient_to_urlloaderfactory.patch

Refs: 2757969

Sync with removal of render_frame_id_ in our mojom

* chore: update chromium/frame_host_manager.patch

Refs: 2740008

UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool

* chore: update chromium/revert_remove_contentrendererclient_shouldfork.patch

Refs: 2755314

Upstream has removed `history_list_length_` which we were comparing to 0
to calculate our `is_initial_navigation` bool when calling ShouldFork().
ShouldFork() is ours and none of the code paths actually use that param,
so this commit removes it altogether.

* chore: update permissions_to_register

Refs: 2789074

Replace all uses of APIPermission::ID enum with Mojo type

* refactor: update return type of PreMainMessageLoopRun()

Refs: 2725153

Used to return void; now returns an int errorcode.

Note: 2725153 also has some nice doc updates about Browser's "stages"

* refactor: sync ElectronBrowserMainParts to MainParts changes

Refs: 2725153

RunMainMessageLoopParts has been replaced with WillRunMainMessageLoop
so `BrowserMainLoop::result_code_` is no longer available to us for our
exit_code_ pointer.

This variable held a dual role: (1) of course, hold the exit code, but
also (2) was a nullptr before the message loop was ready, indicating to
anyone calling SetExitCode() that we were still in startup and could
just exit() without any extra steps. exit_code_ still fulfills these two
roles but is now a base::Optional.

* chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun

Refs: 2725153

BrowserMainParts::BrowsePreDefaultMainMesssageLoopRun() has been
removed; move that work to the new WillRunMainMessageLoop().

* refactor: stop using CallbackList; it has been removed.

Refs: 2785973

* refactor: update use of threadpools.

Refs: 2773408

The upstream code is still in flux (e.g. reverts and re-lands) but the
tl;dr for this commit is (1) include thread_pool.h if you're using it
and (2) don't instantiate pools directly.

* refactor: remove routing_id from CreateLoaderAndStart

Refs: 2762858

NB: One logic branch in ProxyingURLLoaderFactory::CreateLoaderAndStart
calls std::make_unique<InProgressRequest>, which needs a routing_id.
This PR uses the member field `routing_id_` since there's no longer one
being passed into CreateLoaderAndStart.

* refactor: sync to upstream ParittionOptions churn

Refs: 2771318

PartitionOptions' enums have changed.

* refactor: update Manifest::Location usage

Refs: 2771320

tldr: s/Manifest::FOO/ManifestLocation::kFoo/

* chore: bump chromium in DEPS to 91.0.4465.0

* update patches

* refactor: update extensions::Manifest to upstream

Refs: 2771320

-  extensions::Manifest::COMPONENT
+  extensions::mojom::ManifestLocation::kExternalComponent

* refactor: sync with upstream UrlInfo ctor changes

Refs: 2740008

UrlInfo ctor now takes UrlInfo::OriginIsolationRequest instead of a bool

* chore: update invocation of convert_protocol_to_json.py

Refs: 2792623

python3 is being used in parts of the upstream build, but the copy of
convert_protocol_to_json.py invoked in v8/third_party/inspector_protocol
is not python3-friendly. Node has a py2+3-friendly version of it in its
tools directory, so call it instead.

* chore: use extensions::mojom::APIPermissionID

Refs: 2791122

tldr:
- extensions::APIPermission::kFoo
+ extensions::mojom::APIPermissionID::kFoo

* chore: Remove support for TLS1.0/1.1 in SSLVersionMin policy

Refs: 2765737

Remove TLS v1.0 & 1.1 from our SSLProtocolVersionFromString() function.
This is the same change made upstream at
2765737/8/chrome/browser/ssl/ssl_config_service_manager_pref.cc

* fixup! chore: update ElectronBrowserMainParts::PreDefaultMainMessageLoopRun

* chore: Use IDType for permission change subscriptions.

Refs: 2791431

tldr: {Subscribe,Unsubscribe}PermissionStatusChange's tag type used to
be an int; now it's the new SubscriptionId type (which is an IdType64).

* chore: sync PowerMonitor code to upstream refactor

Refs: 2752635

tldr: PowerMonitor has been split into PowerStateObserver,
PowerSuspendObserver, and PowerThermalObserver to reduce number of tasks
posted to consumers who only need notifications for one of those things
instead of all of them.

* chore: use PartitionOptions's new Cookies field

Refs: 2771318

* Revert "refactor: remove routing_id from CreateLoaderAndStart"

This reverts commit 8c9773b87a3c84f9073a47089eb2b6889d745245.

8c9773b was only a partial fix; reverting to start & try again.

* update patches

* chore: bump chromium in DEPS to 91.0.4466.0

* chore: update chromium/accelerator.patch

Refs: 2795472

tldr: sync patch with upstream renamed variable & macro names.

* chore: update chromium/gtk_visibility.patch

Refs: 2796200

tldr: no code changes; just updating the diff to apply cleanly.

note: ooh upstream Wayland hacking!

* chore: update chromium/picture-in-picture.patch

Refs: 2710023

tldr: no code changes; just updating the diff to apply cleanly.

* chore: update chromium/worker_feat_add_hook_to_notify_script_ready.patch

Refs: 2775573

tldr: no code changes; just updating the diff to apply cleanly.

* chore: export_all_patches

* chore: update chromium/feat_add_set_theme_source_to_allow_apps_to.patch

Refs: 2796511

tldr: NotifyObservers has been renamed to NotifyOnNativeThemeUpdated,
so update the invocation in our patch.

* chore: update ElectronBrowserClient w/upstream API

Refs: 2797454

tldr: GetDevToolsManagerDelegate() was returning an owned raw pointer.
Replaced it with CreateDevToolsManagerDelegate() which uses unique_ptr<>.

* chore: handle new content::PermissionType::FILE_HANDLING in toV8()

Refs: 2762201

`file-handling` string confirmed in 2762201/18/chrome/browser/ui/webui/settings/site_settings_helper.cc

* refactor: remove routing_id from CreateLoaderAndStart pt 1

Refs: 2762858

Part 1: the easiest ones

* 2796724: Support Python3

2796724

* chore: bump chromium in DEPS to 91.0.4468.0

* 2668974: WebShare: Implement SharingServicePicker

2668974

* 2802766: Apply modernize-make-unique to media/

2802766

* 2802823: Apply modernize-make-unique to gpu/

2802823

* 2803041: Apply modernize-make-unique to remaining files

2803041

* 2798873: Convert GtkKeyBindingsHandler build checks to runtime checks

2798873

* 2733595: [ch-r] Parse ACCEPT_CH H2/3 frame and restart with new headers if needed

2733595

* chore: update patch indices

* 2795107: Remove unused PermissionRequest IDs.

2795107

* chore: bump chromium in DEPS to 91.0.4469.0

* chore: fixup patch indices

* chore: bump chromium in DEPS to 91.0.4469.5

* PiP 1.5: Add microphone, camera, and hang up buttons to the PiP window

2710023

* fixup! refactor: remove routing_id from CreateLoaderAndStart

* refactor: use URLLoaderNetworkServiceObserver for auth requests from SimpleURLLoader

* fixup! chore: fixup patch indices

* 2724817: Expand scope of wasm-eval to all URLs

2724817

* Fixup patch after rebase

* chore: bump chromium in DEPS to 91.0.4472.0

* 2797341: [ozone/x11] Enabled the global shortcut listener.

2797341

* 2805553: Reland Add GTK ColorMixers to ColorPipeline P1

2805553

* 2804366: PiP 1.5: Label back to tab button with origin and center it

2804366

* 2784730: Fix crash on AX mode change in NativeViewHost without a Widget

2784730

* chore: update patch indices

* 2810174: Add PdfAnnotationsEnabled policy.

2810174

* 2807829: Allow capturers to indicate if they want a WakeLock or not.

2807829

* chore: bump chromium in DEPS to 92.0.4473.0

* chore: bump chromium in DEPS to 92.0.4474.0

* chore: bump chromium in DEPS to 92.0.4475.0

* chore: update patches

* chore: updates patches

* chore: update is_media_key patch to handle new ozone impl

Refs: 2797341

* fix: ExecuteJavascript requests now need to be flagged as non-bf-aware

Refs: 2787195

* chore: icon_util_x11 is now icon_util_linux

Refs: 2791362

* build: update sysroots

Refs: 2628496

* build: fix missing symbols on linux build

* use_ozone and use_x11 are not exclusive
* new button view to build for pip

Refs: 2797341
Refs: 2804366

* chore: fix broken gtk_util color patch

* chore: remove patch conflict

* build: update linux manifests

* chore: build bttlb on all platforms for pip

* chore: add thread_pool include for views delegate win

* chore: fix lint

* chore: add node patches for V8 changes

* build: add missing base include on windows

* fix: update frame host manager patch for new state transitions

Refs: 2714464

* chore: update windows zip manifests

* chore: update mac zip manifests

* chore: fix patch linting

* refactor: implement missing URLLoaderNetworkServiceObserver methods

It is against The Mojo Rules to leave hanging callbacks.  These always
have to be called.

Refs: 186528aab9

* spec: fix locale test on local linux

* fix: pass the exit code correctly in new PreMainMessageLoopRun

Refs: 2622e91c44

* fix: ensure we early-exit when request_handler_ is not provided

Refs: 93077afbfb

* fix: strongly set result_code in the BrowserMainLoop

* fix: invalid usage of non-targetted PostTask

You must always either use a host threadpool or specify a target
thread.  In this case we did neither after this refactor.

Refs: 4e33ee0ad3

* chore: fix gn check

* chore: remove stray .rej files in patch

* chore: add mojo error code to url loader failure

* build: ensure CI is truthy in arm test env

* fix: handle windowCaptureMacV2 being enabled when fetching media source id

Refs: 2709931

Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
This commit is contained in:
Electron Bot 2021-04-15 10:44:35 -07:00 committed by GitHub
parent 9236e56ddc
commit 22a70eb803
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
157 changed files with 1359 additions and 1271 deletions

View file

@ -6,4 +6,3 @@ export_symbols_needed_for_windows_build.patch
workaround_an_undefined_symbol_error.patch
do_not_export_private_v8_symbols_on_windows.patch
fix_build_deprecated_attirbute_for_older_msvc_versions.patch
skip_global_registration_of_shared_arraybuffer_backing_stores.patch

View file

@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side.
diff --git a/include/v8.h b/include/v8.h
index 2947cd8f5472cbc48d639ff4d93757fc77fde96b..5e2fe09afb714920fefefe5c51a62af82c4b27f7 100644
index 6b672ca750cec5e93dad948007af9b062ed66beb..3fbba577edd160184fa431cb796025c9038b25bb 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5373,6 +5373,13 @@ class V8_EXPORT ArrayBuffer : public Object {
@@ -5374,6 +5374,13 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
virtual void* AllocateUninitialized(size_t length) = 0;
@ -30,10 +30,10 @@ index 2947cd8f5472cbc48d639ff4d93757fc77fde96b..5e2fe09afb714920fefefe5c51a62af8
* Free the memory block of size |length|, pointed to by |data|.
* That memory is guaranteed to be previously allocated by |Allocate|.
diff --git a/src/api/api.cc b/src/api/api.cc
index acf8d69388c1e6ae6ed60d82bcc0b1f0ee5516cb..37a112d52ddf96dabd581a6053bc33082458a3fc 100644
index a5c658a799255f9fbc4a4030b5e16be324aac87f..50173de3f145b4febcc29c03080306c137918527 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -320,6 +320,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
@@ -324,6 +324,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
i::V8::SetSnapshotBlob(snapshot_blob);
}

View file

@ -9,10 +9,10 @@ necessary for native modules to load.
Also, some fixes relating to mksnapshot on ARM.
diff --git a/BUILD.gn b/BUILD.gn
index 82151b6d1fef24c02eaf6048908b3399c4442946..4be98113938ca2e688f5f1e69dc1bfdb94501059 100644
index 98ddc026c31f44fe4d307c9a255f470d8456f896..16f71c138d5fd06cf0ba184be321fe533b9d95a6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -453,7 +453,7 @@ config("internal_config") {
@@ -471,7 +471,7 @@ config("internal_config") {
":cppgc_header_features",
]
@ -21,7 +21,7 @@ index 82151b6d1fef24c02eaf6048908b3399c4442946..4be98113938ca2e688f5f1e69dc1bfdb
defines += [ "BUILDING_V8_SHARED" ]
}
}
@@ -5057,7 +5057,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5104,7 +5104,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -30,7 +30,7 @@ index 82151b6d1fef24c02eaf6048908b3399c4442946..4be98113938ca2e688f5f1e69dc1bfdb
deps = [
":v8_libbase",
@@ -5095,6 +5095,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -5142,6 +5142,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

View file

@ -6,10 +6,10 @@ Subject: dcheck.patch
https://github.com/auchenberg/volkswagen
diff --git a/src/api/api.cc b/src/api/api.cc
index 37a112d52ddf96dabd581a6053bc33082458a3fc..2c12f19b287cf5e3c5aaa04d339f2301e1e57c47 100644
index 50173de3f145b4febcc29c03080306c137918527..1ac347ede7e51559917f09442ac4824f138075de 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -8615,7 +8615,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -8629,7 +8629,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::PerformMicrotaskCheckpoint() {
@ -19,10 +19,10 @@ index 37a112d52ddf96dabd581a6053bc33082458a3fc..2c12f19b287cf5e3c5aaa04d339f2301
isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 2c1b6788f3b1648855aa1496eebfb679461de64f..b8a77816772593211cc015589c6ee17d06374c6f 100644
index 74cda0cf240e0d1998a3c90102284c32fb55fc33..e823d69c91200d243109378f52f76d4107981a3e 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5553,9 +5553,9 @@ void Heap::TearDown() {
@@ -5600,9 +5600,9 @@ void Heap::TearDown() {
void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
GCType gc_type, void* data) {
DCHECK_NOT_NULL(callback);

View file

@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index b1c9106a65eeb468a3cf5d11b0a88e50c7d1a6be..5eb0fd274fcc94af41abb5ad95856f98643c7bc1 100644
index 773aa1817eda15ed422c02d36369f8bdc5396e72..a0284cc37a5f21a39a2c6ec8794a824b27f5e1d4 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -453,6 +453,10 @@ config("internal_config") {
@@ -471,6 +471,10 @@ config("internal_config") {
":cppgc_header_features",
]
@ -27,10 +27,10 @@ index b1c9106a65eeb468a3cf5d11b0a88e50c7d1a6be..5eb0fd274fcc94af41abb5ad95856f98
defines += [ "BUILDING_V8_SHARED" ]
}
diff --git a/src/base/macros.h b/src/base/macros.h
index b370d8818b1fa23fb916e8be343a0f98fada0aba..dda0ada417544059f041609655c3d50a433d59db 100644
index 248a23a1f422c641db85f041095bbd51c9319f9b..f7d3ed36180c52cb17a115addb1124e99b7494d4 100644
--- a/src/base/macros.h
+++ b/src/base/macros.h
@@ -394,13 +394,17 @@ bool is_inbounds(float_t v) {
@@ -388,13 +388,17 @@ bool is_inbounds(float_t v) {
#ifdef V8_OS_WIN
// Setup for Windows shared library export.

View file

@ -6,7 +6,7 @@ Subject: Export symbols needed for Windows build
These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
diff --git a/src/objects/objects.h b/src/objects/objects.h
index c68445597f562d043953bd38baf25d818646de68..60f519ad45da2680d24ea2012446f5d62fd8e981 100644
index 6afb5d70155e87a1707a50baa3e16c12eee60eb9..9ae71ee7b9caa08c01d95a5305aabd3740e29058 100644
--- a/src/objects/objects.h
+++ b/src/objects/objects.h
@@ -824,7 +824,7 @@ enum class KeyCollectionMode {

View file

@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index 4be98113938ca2e688f5f1e69dc1bfdb94501059..b1c9106a65eeb468a3cf5d11b0a88e50c7d1a6be 100644
index 16f71c138d5fd06cf0ba184be321fe533b9d95a6..773aa1817eda15ed422c02d36369f8bdc5396e72 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -5069,7 +5069,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5116,7 +5116,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View file

@ -1,137 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ulan Degenbaev <ulan@chromium.org>
Date: Tue, 16 Mar 2021 12:18:36 +0100
Subject: Skip global registration of [Shared]ArrayBuffer backing stores
Previously we needed to register the backing stores globally because
the embedder could create them from a raw pointer. This is no longer
possible after the removal of the old API.
The global backing store registry now keeps track only of wasm memory
backing stores.
Bug: v8:9380
Change-Id: Iffefbf14dcafc1f9ce0dc3613335c754c9cb649a
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2763874
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73493}
diff --git a/src/api/api.cc b/src/api/api.cc
index 2c12f19b287cf5e3c5aaa04d339f2301e1e57c47..703720b2fea123b118a187f407e846781d62249f 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -3786,7 +3786,6 @@ std::shared_ptr<v8::BackingStore> v8::ArrayBuffer::GetBackingStore() {
backing_store =
i::BackingStore::EmptyBackingStore(i::SharedFlag::kNotShared);
}
- i::GlobalBackingStoreRegistry::Register(backing_store);
std::shared_ptr<i::BackingStoreBase> bs_base = backing_store;
return std::static_pointer_cast<v8::BackingStore>(bs_base);
}
@@ -3797,7 +3796,6 @@ std::shared_ptr<v8::BackingStore> v8::SharedArrayBuffer::GetBackingStore() {
if (!backing_store) {
backing_store = i::BackingStore::EmptyBackingStore(i::SharedFlag::kShared);
}
- i::GlobalBackingStoreRegistry::Register(backing_store);
std::shared_ptr<i::BackingStoreBase> bs_base = backing_store;
return std::static_pointer_cast<v8::BackingStore>(bs_base);
}
diff --git a/src/objects/backing-store.cc b/src/objects/backing-store.cc
index 7931fbf13ddecc49969e23c57a51513d2e605039..08288ef62c0b930483004a154967925e2ed14d8a 100644
--- a/src/objects/backing-store.cc
+++ b/src/objects/backing-store.cc
@@ -685,17 +685,8 @@ inline GlobalBackingStoreRegistryImpl* impl() {
void GlobalBackingStoreRegistry::Register(
std::shared_ptr<BackingStore> backing_store) {
if (!backing_store || !backing_store->buffer_start()) return;
-
- if (!backing_store->free_on_destruct()) {
- // If the backing store buffer is managed by the embedder,
- // then we don't have to guarantee that there is single unique
- // BackingStore per buffer_start() because the destructor of
- // of the BackingStore will be a no-op in that case.
-
- // All Wasm memory has to be registered.
- CHECK(!backing_store->is_wasm_memory());
- return;
- }
+ // Only wasm memory backing stores need to be registered globally.
+ CHECK(backing_store->is_wasm_memory());
base::MutexGuard scope_lock(&impl()->mutex_);
if (backing_store->globally_registered_) return;
@@ -711,6 +702,8 @@ void GlobalBackingStoreRegistry::Register(
void GlobalBackingStoreRegistry::Unregister(BackingStore* backing_store) {
if (!backing_store->globally_registered_) return;
+ CHECK(backing_store->is_wasm_memory());
+
DCHECK_NOT_NULL(backing_store->buffer_start());
base::MutexGuard scope_lock(&impl()->mutex_);
@@ -722,26 +715,6 @@ void GlobalBackingStoreRegistry::Unregister(BackingStore* backing_store) {
backing_store->globally_registered_ = false;
}
-std::shared_ptr<BackingStore> GlobalBackingStoreRegistry::Lookup(
- void* buffer_start, size_t length) {
- base::MutexGuard scope_lock(&impl()->mutex_);
- TRACE_BS("BS:lookup mem=%p (%zu bytes)\n", buffer_start, length);
- const auto& result = impl()->map_.find(buffer_start);
- if (result == impl()->map_.end()) {
- return std::shared_ptr<BackingStore>();
- }
- auto backing_store = result->second.lock();
- CHECK_EQ(buffer_start, backing_store->buffer_start());
- if (backing_store->is_wasm_memory()) {
- // Grow calls to shared WebAssembly threads can be triggered from different
- // workers, length equality cannot be guaranteed here.
- CHECK_LE(length, backing_store->byte_length());
- } else {
- CHECK_EQ(length, backing_store->byte_length());
- }
- return backing_store;
-}
-
void GlobalBackingStoreRegistry::Purge(Isolate* isolate) {
// We need to keep a reference to all backing stores that are inspected
// in the purging loop below. Otherwise, we might get a deadlock
@@ -755,7 +728,7 @@ void GlobalBackingStoreRegistry::Purge(Isolate* isolate) {
auto backing_store = entry.second.lock();
prevent_destruction_under_lock.emplace_back(backing_store);
if (!backing_store) continue; // skip entries where weak ptr is null
- if (!backing_store->is_wasm_memory()) continue; // skip non-wasm memory
+ CHECK(backing_store->is_wasm_memory());
if (!backing_store->is_shared()) continue; // skip non-shared memory
SharedWasmMemoryData* shared_data =
backing_store->get_shared_wasm_memory_data();
diff --git a/src/objects/backing-store.h b/src/objects/backing-store.h
index 4d20109676e8c955b2dfb40a882b5f27783a4ac6..eb879d5e8adf5a9a7d727dd571a77f01289f3be3 100644
--- a/src/objects/backing-store.h
+++ b/src/objects/backing-store.h
@@ -219,21 +219,16 @@ class V8_EXPORT_PRIVATE BackingStore : public BackingStoreBase {
#endif // V8_ENABLE_WEBASSEMBLY
};
-// A global, per-process mapping from buffer addresses to backing stores.
-// This is generally only used for dealing with an embedder that has not
-// migrated to the new API which should use proper pointers to manage
-// backing stores.
+// A global, per-process mapping from buffer addresses to backing stores
+// of wasm memory objects.
class GlobalBackingStoreRegistry {
public:
// Register a backing store in the global registry. A mapping from the
// {buffer_start} to the backing store object will be added. The backing
// store will automatically unregister itself upon destruction.
+ // Only wasm memory backing stores are supported.
static void Register(std::shared_ptr<BackingStore> backing_store);
- // Look up a backing store based on the {buffer_start} pointer.
- static std::shared_ptr<BackingStore> Lookup(void* buffer_start,
- size_t length);
-
private:
friend class BackingStore;
// Unregister a backing store in the global registry.

View file

@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file,
this error no longer seems to happen.
diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
index 72cac5bd603bb84d721e4f5cbadaecd7c0d2e89e..8b31f57f4897a70906a92654a4d41f4c5787f271 100644
index 0551877403175d71bc55553a630847334eab8516..6550a53f2660553d71a10ac103e1b724dcab3a20 100644
--- a/src/codegen/arm64/assembler-arm64.cc
+++ b/src/codegen/arm64/assembler-arm64.cc
@@ -3659,6 +3659,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
@@ -3629,6 +3629,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
ImmMoveWide(static_cast<int>(imm)) | ShiftMoveWide(shift));
}
@ -39,10 +39,10 @@ index 72cac5bd603bb84d721e4f5cbadaecd7c0d2e89e..8b31f57f4897a70906a92654a4d41f4c
const Operand& operand, FlagsUpdate S, AddSubOp op) {
DCHECK_EQ(rd.SizeInBits(), rn.SizeInBits());
diff --git a/src/codegen/arm64/assembler-arm64.h b/src/codegen/arm64/assembler-arm64.h
index 41bdb03b4f5a574eb86e69ba8e3edfe9ceea4ed8..84e9b2771decba32e86e90625e4f1b7551fc9f12 100644
index aa2ffb26cdfc24ef4282e34208575399ab3cb27a..6284ca4046e910362e1647c04b130de06cab163a 100644
--- a/src/codegen/arm64/assembler-arm64.h
+++ b/src/codegen/arm64/assembler-arm64.h
@@ -2120,11 +2120,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
@@ -2117,11 +2117,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
return rm.code() << Rm_offset;
}
@ -55,7 +55,7 @@ index 41bdb03b4f5a574eb86e69ba8e3edfe9ceea4ed8..84e9b2771decba32e86e90625e4f1b75
static Instr Ra(CPURegister ra) {
DCHECK_NE(ra.code(), kSPRegInternalCode);
@@ -2148,15 +2144,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
@@ -2145,15 +2141,8 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase {
// These encoding functions allow the stack pointer to be encoded, and
// disallow the zero register.