chore: bump chromium to 96.0.4647.0 (main) (#30814)

* chore: bump chromium in DEPS to 95.0.4630.0

* 3133701: Fix chrome root store codegen for cross-compile builds.

3133701

* 49125: Include SHA512-256 in EVP_get_digestbyname and EVP_MD_do_all.

https://boringssl-review.googlesource.com/c/boringssl/+/49125

* chore: fixup patch indices

* 3131662: [Code Health] Remove ListValue::Append(Integer|Boolean)

3131662

* chore: bump chromium in DEPS to 95.0.4631.0

* chore: update patches

* chore: bump chromium in DEPS to 95.0.4635.0

* chore: update patches

* chore: bump chromium in DEPS to 95.0.4636.0

* chore: bump chromium in DEPS to 95.0.4637.0

* chore: update patches

* refactor: move PlatformNotificationService into BrowserContext

Refs: 3137256

* refactor: ListValue::GetSize and ListValue::AppendString were removed

Refs: 3144540

* chore: bump chromium in DEPS to 95.0.4638.0

* chore: bump chromium in DEPS to 95.0.4638.4

* chore: bump chromium in DEPS to 96.0.4640.0

* chore: bump chromium in DEPS to 96.0.4641.0

* chore: bump chromium in DEPS to 96.0.4642.0

* chore: update patches

Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>

* 3134756: Move extensions/browser/value_store to components/value_store.

Ref: 3134756

* 3150092: [Autofill] Allow aligning Autofill suggestions to the field's center

Ref: 3150092

* chore: bump chromium in DEPS to 96.0.4643.0

* chore: update patches

* chore: bump chromium in DEPS to 96.0.4644.0

* chore: update patches

* chore: bump chromium in DEPS to 96.0.4645.0

* chore: update patches

* chore: bump chromium in DEPS to 96.0.4646.0

* chore: bump chromium in DEPS to 96.0.4647.0

* chore: update patches

Ref (for chromium): 3165772

* 3162087: Reland "Ensure Branch Target Identification is enabled for executable pages."

Ref: 3162087

* chore: update evert_add_inline_and_inline_origin_records_to_symbol_file.patch

Xref: 3166678

Xref: 3166674

* chore: update Allocator construction

Xref: 3135195

Change RefCount::kAllowed/Disallowed semantics into BackupRefPtr::kEnabled/Disabled

* chore: add UseConfigurablePool to v8::ArrayBuffer::Allocator invocation

Xref: 3090845

* chore: do not set network_context_params.context_name

Xref: 3155743

Remove name field from mojom::NetworkContext

* fix: use ForEachRenderFrameHost to iterate frames.

Xref: 3163336

New implementation partially cribbed from
https://source.chromium.org/chromium/chromium/src/+/main:extensions/browser/script_executor.cc;drc=f894f106c6d5fac8e0b75158f622256e0f34f593;l=109

* [Blink Cleanup] Remove WebLocalFrame::RequestExecuteScriptAndReturnValue()

Xref: 3149699

ExecuteJavaScript's RequestExecuteScript() new params are cribbed from
3149699/4/third_party/blink/renderer/core/frame/web_local_frame_impl.cc

* Remove IsDescendantOf API on RenderFrameHost.

Xref: 3165357

function is trivial to implement, so make a local copy in anon namespace

* Rewrite IsDescendantOf check to check GetParentOrOuterDocument.

3160061

* Remove GetFramesInSubtree from RenderFrameHost

3163336

* fix: dump_syms for macOS

* chore: update patches

* [Code Health] Remove ListValue::AppendString and ListValue::GetSize

3144540

* fix: gn check

3163890

* fix: crash with Isolate::GetHeapCodeAndMetadataStatistics

3175820

* chore: update patches

* chore: fix windows build

* Add kPrintWithPostScriptType42Fonts feature.

3150776

* chore: update patches

* chore: fix tests

* ozone/x11: fix VA-API.

3141878

* Revert "ozone/x11: fix VA-API."

This reverts commit 23e742acb1032bf4afc1a45e4bed38e42184fd01.

* Reland "Make Ozone/X11 default."

3114071

* fixup Reland "Make Ozone/X11 default."

* fixup Reland "Make Ozone/X11 default." for clipboard

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: VerteDinde <khammond@slack-corp.com>
Co-authored-by: Michaela Laurencin <mlaurencin@electronjs.org>
Co-authored-by: VerteDinde <keeleymhammond@gmail.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
This commit is contained in:
electron-roller[bot] 2021-10-05 19:21:00 -07:00 committed by GitHub
parent 959b657903
commit cc01272a8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
109 changed files with 629 additions and 2265 deletions

View file

@ -6,7 +6,6 @@ workaround_an_undefined_symbol_error.patch
do_not_export_private_v8_symbols_on_windows.patch
fix_build_deprecated_attirbute_for_older_msvc_versions.patch
fix_disable_implies_dcheck_for_node_stream_array_buffers.patch
cppgc-js_support_eager_traced_value_in_ephemeron_pairs.patch
regexp_add_a_currently_failing_cctest_for_irregexp_reentrancy.patch
regexp_allow_reentrant_irregexp_execution.patch
regexp_remove_the_stack_parameter_from_regexp_matchers.patch
baseline_skip_deoptimization_data_size.patch

View file

@ -0,0 +1,31 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Victor Gomes <victorgomes@chromium.org>
Date: Wed, 22 Sep 2021 17:57:25 +0200
Subject: Skip deoptimization data size
Sparkplug code does not contain deoptimization data.
Bug: v8:12258
Change-Id: Ieb9f7f1469e00677d9533c6f05b17c80ef06b9d6
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3175820
Commit-Queue: Victor Gomes <victorgomes@chromium.org>
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76997}
diff --git a/src/objects/code-inl.h b/src/objects/code-inl.h
index 48e5810f14f9f69b0cb245fb24353e4bb2120e0e..4cbb1595c964ae352a15350a640aa3be0778ac15 100644
--- a/src/objects/code-inl.h
+++ b/src/objects/code-inl.h
@@ -394,7 +394,9 @@ int Code::MetadataSize() const {
int Code::SizeIncludingMetadata() const {
int size = CodeSize();
size += relocation_info().Size();
- size += deoptimization_data().Size();
+ if (kind() != CodeKind::BASELINE) {
+ size += deoptimization_data().Size();
+ }
return size;
}

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 9be25bd786e5c48e420324a39633567e8a76f364..046caab35c77c5eb68d87f5eb7d30cacb670d4a4 100644
index 20d9b8e9afc033367b55409847bfad1356aabd42..f23ed7817bafcd84b941905a2a8852f79069aa2e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -565,7 +565,7 @@ config("internal_config") {
@@ -571,7 +571,7 @@ config("internal_config") {
":cppgc_header_features",
]
@ -21,7 +21,7 @@ index 9be25bd786e5c48e420324a39633567e8a76f364..046caab35c77c5eb68d87f5eb7d30cac
defines += [ "BUILDING_V8_SHARED" ]
}
@@ -5453,7 +5453,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5497,7 +5497,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@ -30,7 +30,7 @@ index 9be25bd786e5c48e420324a39633567e8a76f364..046caab35c77c5eb68d87f5eb7d30cac
deps = [
":v8_libbase",
@@ -5491,6 +5491,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -5535,6 +5535,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

View file

@ -1,208 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Michael Lippautz <mlippautz@chromium.org>
Date: Fri, 3 Sep 2021 14:17:59 +0200
Subject: cppgc-js: Support eager traced value in ephemeron pairs
Before this patch, both key and value of an ephemeron pair was always
considered to be GarbageCollected objects.
This patch adjusts the snapshotting mechanism to accomodate that
values may not be GarbageCollected objects and must thus be eagerly
traced for visibility and edge creation.
In practice this only shows up in Blink when associating an existing
wrappable with a wrapper in a non-main world, e.g., through an
extension. In this case, DOMWrapperMap keeps the wrapper value through
a TracedReference in the ephemeron map with the existing wrappable as
key. The semantics are intended to be general ephemeron semantics,
i.e., value needs to be kept alive when the key is alive. This is
visualized in DevTools as the main wrapper/wrappable pair (which is
merged into a single node for the snapshot) retaining the non-main
world wrapper.
Bug: chromium:1245894
Change-Id: Ibfa6722f20c76f94c310f9a040f0d3d4b9083bbb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3140601
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76658}
diff --git a/src/heap/cppgc-js/cpp-snapshot.cc b/src/heap/cppgc-js/cpp-snapshot.cc
index dc55753ff625a135b6e494344ee49105eb59121e..9b20b5c0a7831ea026819f90ea80c10eb2324282 100644
--- a/src/heap/cppgc-js/cpp-snapshot.cc
+++ b/src/heap/cppgc-js/cpp-snapshot.cc
@@ -264,6 +264,10 @@ class State final : public StateBase {
ephemeron_edges_.insert(&value);
}
+ void AddEagerEphemeronEdge(const void* value, cppgc::TraceCallback callback) {
+ eager_ephemeron_edges_.insert({value, callback});
+ }
+
template <typename Callback>
void ForAllEphemeronEdges(Callback callback) {
for (const HeapObjectHeader* value : ephemeron_edges_) {
@@ -271,10 +275,20 @@ class State final : public StateBase {
}
}
+ template <typename Callback>
+ void ForAllEagerEphemeronEdges(Callback callback) {
+ for (const auto& pair : eager_ephemeron_edges_) {
+ callback(pair.first, pair.second);
+ }
+ }
+
private:
bool is_weak_container_ = false;
// Values that are held alive through ephemerons by this particular key.
std::unordered_set<const HeapObjectHeader*> ephemeron_edges_;
+ // Values that are eagerly traced and held alive through ephemerons by this
+ // particular key.
+ std::unordered_map<const void*, cppgc::TraceCallback> eager_ephemeron_edges_;
};
// Root states are similar to regular states with the difference that they are
@@ -404,6 +418,9 @@ class CppGraphBuilderImpl final {
void VisitForVisibility(State& parent, const TracedReferenceBase&);
void VisitEphemeronForVisibility(const HeapObjectHeader& key,
const HeapObjectHeader& value);
+ void VisitEphemeronWithNonGarbageCollectedValueForVisibility(
+ const HeapObjectHeader& key, const void* value,
+ cppgc::TraceDescriptor value_desc);
void VisitWeakContainerForVisibility(const HeapObjectHeader&);
void VisitRootForGraphBuilding(RootState&, const HeapObjectHeader&,
const cppgc::SourceLocation&);
@@ -421,7 +438,7 @@ class CppGraphBuilderImpl final {
}
void AddEdge(State& parent, const HeapObjectHeader& header,
- const std::string& edge_name = {}) {
+ const std::string& edge_name) {
DCHECK(parent.IsVisibleNotDependent());
auto& current = states_.GetExistingState(header);
if (!current.IsVisibleNotDependent()) return;
@@ -443,7 +460,8 @@ class CppGraphBuilderImpl final {
}
}
- void AddEdge(State& parent, const TracedReferenceBase& ref) {
+ void AddEdge(State& parent, const TracedReferenceBase& ref,
+ const std::string& edge_name) {
DCHECK(parent.IsVisibleNotDependent());
v8::Local<v8::Value> v8_value = ref.Get(cpp_heap_.isolate());
if (!v8_value.IsEmpty()) {
@@ -451,12 +469,19 @@ class CppGraphBuilderImpl final {
parent.set_node(AddNode(*parent.header()));
}
auto* v8_node = graph_.V8Node(v8_value);
- graph_.AddEdge(parent.get_node(), v8_node);
+ if (!edge_name.empty()) {
+ graph_.AddEdge(parent.get_node(), v8_node,
+ parent.get_node()->InternalizeEdgeName(edge_name));
+ } else {
+ graph_.AddEdge(parent.get_node(), v8_node);
+ }
// References that have a class id set may have their internal fields
// pointing back to the object. Set up a wrapper node for the graph so
// that the snapshot generator can merge the nodes appropriately.
- if (!ref.WrapperClassId()) return;
+ // Even with a set class id, do not set up a wrapper node when the edge
+ // has a specific name.
+ if (!ref.WrapperClassId() || !edge_name.empty()) return;
void* back_reference_object = ExtractEmbedderDataBackref(
reinterpret_cast<v8::internal::Isolate*>(cpp_heap_.isolate()),
@@ -598,8 +623,18 @@ class WeakVisitor : public JSVisitor {
void VisitEphemeron(const void* key, const void* value,
cppgc::TraceDescriptor value_desc) final {
// For ephemerons, the key retains the value.
+ // Key always must be a GarbageCollected object.
+ auto& key_header = HeapObjectHeader::FromObject(key);
+ if (!value_desc.base_object_payload) {
+ // Value does not represent an actual GarbageCollected object but rather
+ // should be traced eagerly.
+ graph_builder_.VisitEphemeronWithNonGarbageCollectedValueForVisibility(
+ key_header, value, value_desc);
+ return;
+ }
+ // Regular path where both key and value are GarbageCollected objects.
graph_builder_.VisitEphemeronForVisibility(
- HeapObjectHeader::FromObject(key), HeapObjectHeader::FromObject(value));
+ key_header, HeapObjectHeader::FromObject(value));
}
protected:
@@ -645,7 +680,7 @@ class GraphBuildingVisitor final : public JSVisitor {
void Visit(const void*, cppgc::TraceDescriptor desc) final {
graph_builder_.AddEdge(
parent_scope_.ParentAsRegularState(),
- HeapObjectHeader::FromObject(desc.base_object_payload));
+ HeapObjectHeader::FromObject(desc.base_object_payload), edge_name_);
}
void VisitWeakContainer(const void* object,
cppgc::TraceDescriptor strong_desc,
@@ -655,7 +690,8 @@ class GraphBuildingVisitor final : public JSVisitor {
// container itself.
graph_builder_.AddEdge(
parent_scope_.ParentAsRegularState(),
- HeapObjectHeader::FromObject(strong_desc.base_object_payload));
+ HeapObjectHeader::FromObject(strong_desc.base_object_payload),
+ edge_name_);
}
void VisitRoot(const void*, cppgc::TraceDescriptor desc,
const cppgc::SourceLocation& loc) final {
@@ -667,12 +703,18 @@ class GraphBuildingVisitor final : public JSVisitor {
const void*, const cppgc::SourceLocation&) final {}
// JS handling.
void Visit(const TracedReferenceBase& ref) final {
- graph_builder_.AddEdge(parent_scope_.ParentAsRegularState(), ref);
+ graph_builder_.AddEdge(parent_scope_.ParentAsRegularState(), ref,
+ edge_name_);
+ }
+
+ void set_edge_name(std::string edge_name) {
+ edge_name_ = std::move(edge_name);
}
private:
CppGraphBuilderImpl& graph_builder_;
const ParentScope& parent_scope_;
+ std::string edge_name_;
};
// Base class for transforming recursion into iteration. Items are processed
@@ -765,6 +807,19 @@ void CppGraphBuilderImpl::VisitForVisibility(State* parent,
}
}
+void CppGraphBuilderImpl::
+ VisitEphemeronWithNonGarbageCollectedValueForVisibility(
+ const HeapObjectHeader& key, const void* value,
+ cppgc::TraceDescriptor value_desc) {
+ auto& key_state = states_.GetOrCreateState(key);
+ // Eagerly trace the value here, effectively marking key as visible and
+ // queuing processing for all reachable values.
+ ParentScope parent_scope(key_state);
+ VisiblityVisitor visitor(*this, parent_scope);
+ value_desc.callback(&visitor, value);
+ key_state.AddEagerEphemeronEdge(value, value_desc.callback);
+}
+
void CppGraphBuilderImpl::VisitEphemeronForVisibility(
const HeapObjectHeader& key, const HeapObjectHeader& value) {
auto& key_state = states_.GetOrCreateState(key);
@@ -820,6 +875,12 @@ void CppGraphBuilderImpl::Run() {
state.ForAllEphemeronEdges([this, &state](const HeapObjectHeader& value) {
AddEdge(state, value, "part of key -> value pair in ephemeron table");
});
+ object_visitor.set_edge_name(
+ "part of key -> value pair in ephemeron table");
+ state.ForAllEagerEphemeronEdges(
+ [&object_visitor](const void* value, cppgc::TraceCallback callback) {
+ callback(&object_visitor, value);
+ });
});
// Add roots.
{

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 dedbd5db66823761c40f24169881ffc5ac06e391..97b0804562c7cd60791901fa9a8d48ff07c1abbf 100644
index 59bd76c1540d569d3c1d93c2d3a526361c893b19..d09a84023ba633d3506ba0d49860da015b9104a6 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -8919,7 +8919,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -8928,7 +8928,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::PerformMicrotaskCheckpoint() {
@ -19,10 +19,10 @@ index dedbd5db66823761c40f24169881ffc5ac06e391..97b0804562c7cd60791901fa9a8d48ff
isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 338ba407a33e695b91f7daed114ecda336bddb02..3edefb22eb86954ea68465d817af37d81c06eb3a 100644
index 8920f054925aa1b212298b71ec2aa97a8a9de35a..76739cd66577d64cda8450d52231a3fa75e47ef7 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -6012,9 +6012,9 @@ void Heap::DeinitSharedSpaces() {
@@ -6011,9 +6011,9 @@ void Heap::DeinitSharedSpaces() {
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 18ee54f52ad13855b364fa5449dddd9c81d521d9..361b90f4718d00eb5c787e4578d354906c030f47 100644
index b7974da90497500764199a9c3416211f163a6e78..4ac65d5c727913ca34d6403b8527c1498a254d12 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -565,6 +565,10 @@ config("internal_config") {
@@ -571,6 +571,10 @@ config("internal_config") {
":cppgc_header_features",
]
@ -27,10 +27,10 @@ index 18ee54f52ad13855b364fa5449dddd9c81d521d9..361b90f4718d00eb5c787e4578d35490
defines += [ "BUILDING_V8_SHARED" ]
}
diff --git a/src/base/macros.h b/src/base/macros.h
index fca0b2ebb2ccda35ed308155f436820f5a76b9a2..0f8fab3ab75943d7fb3a93cd6e59092ea19804f6 100644
index 2c0ed9f790636b3376bdbba55cbcafcd2b882b50..fa287c9093e3a267b59a5eefc84d76205e19c7cc 100644
--- a/src/base/macros.h
+++ b/src/base/macros.h
@@ -381,13 +381,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,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 046caab35c77c5eb68d87f5eb7d30cacb670d4a4..18ee54f52ad13855b364fa5449dddd9c81d521d9 100644
index f23ed7817bafcd84b941905a2a8852f79069aa2e..b7974da90497500764199a9c3416211f163a6e78 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -5465,7 +5465,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -5509,7 +5509,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View file

@ -1,109 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jakob Gruber <jgruber@chromium.org>
Date: Mon, 6 Sep 2021 08:29:33 +0200
Subject: Add a (currently failing) cctest for irregexp reentrancy
The test should be enabled once reentrancy is supported.
Bug: v8:11382
Change-Id: Ifb90d8a6fd8bf9f05e9ca2405d4e04e013ce7ee3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3138201
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: Patrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76667}
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index 0a6626ce332ae3ad3e49cb99404646c22c866b71..9c28520ed56998173c105b9d8a2ca3c4489b916e 100644
--- a/test/cctest/cctest.status
+++ b/test/cctest/cctest.status
@@ -136,6 +136,9 @@
'test-strings/Traverse': [PASS, HEAVY],
'test-swiss-name-dictionary-csa/DeleteAtBoundaries': [PASS, HEAVY],
'test-swiss-name-dictionary-csa/SameH2': [PASS, HEAVY],
+
+ # TODO(v8:11382): Reenable once irregexp is reentrant.
+ 'test-regexp/RegExpInterruptReentrantExecution': [FAIL],
}], # ALWAYS
##############################################################################
@@ -670,6 +673,9 @@
# Instruction cache flushing is disabled in jitless mode.
'test-icache/*': [SKIP],
+
+ # Tests generated irregexp code.
+ 'test-regexp/RegExpInterruptReentrantExecution': [SKIP],
}], # lite_mode or variant == jitless
##############################################################################
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index dc5e2ea50898fbf684f5f4655d8b50982d4ebbbd..f7cbc54499464acf1a7de45251a6118340ec51fd 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -21734,10 +21734,6 @@ TEST(RegExpInterruptAndMakeSubjectTwoByteExternal) {
// experimental engine.
i::FLAG_enable_experimental_regexp_engine_on_excessive_backtracks = false;
RegExpInterruptTest test;
- // We want to be stuck regexp execution, so no fallback to linear-time
- // engine.
- // TODO(mbid,v8:10765): Find a way to test interrupt support of the
- // experimental engine.
test.RunTest(RegExpInterruptTest::MakeSubjectTwoByteExternal);
}
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index 27204f7f519229cc4c21a10dd0a44222d4b6edd6..2692748e623d3d52780ff89a97f4300bcd981cbd 100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -2346,6 +2346,50 @@ TEST(UnicodePropertyEscapeCodeSize) {
}
}
+namespace {
+
+struct RegExpExecData {
+ i::Isolate* isolate;
+ i::Handle<i::JSRegExp> regexp;
+ i::Handle<i::String> subject;
+};
+
+i::Handle<i::Object> RegExpExec(const RegExpExecData* d) {
+ return i::RegExp::Exec(d->isolate, d->regexp, d->subject, 0,
+ d->isolate->regexp_last_match_info())
+ .ToHandleChecked();
+}
+
+void ReenterRegExp(v8::Isolate* isolate, void* data) {
+ RegExpExecData* d = static_cast<RegExpExecData*>(data);
+ i::Handle<i::Object> result = RegExpExec(d);
+ CHECK(result->IsNull());
+}
+
+} // namespace
+
+// Tests reentrant irregexp calls.
+TEST(RegExpInterruptReentrantExecution) {
+ CHECK(!i::FLAG_jitless);
+ i::FLAG_regexp_tier_up = false; // Enter irregexp, not the interpreter.
+
+ LocalContext context;
+ v8::Isolate* isolate = context->GetIsolate();
+ v8::HandleScope scope(isolate);
+
+ RegExpExecData d;
+ d.isolate = reinterpret_cast<i::Isolate*>(isolate);
+ d.regexp = v8::Utils::OpenHandle(
+ *v8::RegExp::New(context.local(), v8_str("(a*)*x"), v8::RegExp::kNone)
+ .ToLocalChecked());
+ d.subject = v8::Utils::OpenHandle(*v8_str("aaaa"));
+
+ isolate->RequestInterrupt(&ReenterRegExp, &d);
+
+ i::Handle<i::Object> result = RegExpExec(&d);
+ CHECK(result->IsNull());
+}
+
#undef CHECK_PARSE_ERROR
#undef CHECK_SIMPLE
#undef CHECK_MIN_MAX

View file

@ -21,10 +21,10 @@ Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77013}
diff --git a/src/api/api.cc b/src/api/api.cc
index 97b0804562c7cd60791901fa9a8d48ff07c1abbf..f43dfaf5ef10f83416a915952439c0e97656904d 100644
index d09a84023ba633d3506ba0d49860da015b9104a6..882581b69ea0c46690e9971f73f76f014b3279f0 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -107,7 +107,6 @@
@@ -108,7 +108,6 @@
#include "src/profiler/heap-snapshot-generator-inl.h"
#include "src/profiler/profile-generator-inl.h"
#include "src/profiler/tick-sample.h"
@ -33,10 +33,10 @@ index 97b0804562c7cd60791901fa9a8d48ff07c1abbf..f43dfaf5ef10f83416a915952439c0e9
#include "src/runtime/runtime.h"
#include "src/snapshot/code-serializer.h"
diff --git a/src/codegen/external-reference.cc b/src/codegen/external-reference.cc
index 2c7748f223c9359079b2c35b55aeaa04810eff85..770653d50ce129452829c43ef5cee3648f2f52aa 100644
index b58157b16357040dd11fa4a4b8dbcd9d12244e81..b9a6cb6def990c8cc6c61b64f548964fa2483a37 100644
--- a/src/codegen/external-reference.cc
+++ b/src/codegen/external-reference.cc
@@ -740,6 +740,11 @@ ExternalReference ExternalReference::address_of_regexp_stack_memory_top_address(
@@ -761,6 +761,11 @@ ExternalReference ExternalReference::address_of_regexp_stack_memory_top_address(
isolate->regexp_stack()->memory_top_address_address());
}
@ -49,7 +49,7 @@ index 2c7748f223c9359079b2c35b55aeaa04810eff85..770653d50ce129452829c43ef5cee364
Isolate* isolate) {
return ExternalReference(isolate->javascript_execution_assert_address());
diff --git a/src/codegen/external-reference.h b/src/codegen/external-reference.h
index cbc3463841332fbd3a9d40f5a1b3d3d1c3d382f7..86deb275f8b179eef7784cb30139b3c9735b7db7 100644
index ca62ff9d7a32b6782e86b1b2bf24dddf69a0be6d..9f112240d215e3288a3dfb4051ae69d36dd340c1 100644
--- a/src/codegen/external-reference.h
+++ b/src/codegen/external-reference.h
@@ -72,6 +72,8 @@ class StatsCounter;
@ -62,7 +62,7 @@ index cbc3463841332fbd3a9d40f5a1b3d3d1c3d382f7..86deb275f8b179eef7784cb30139b3c9
V(thread_in_wasm_flag_address_address, \
"Isolate::thread_in_wasm_flag_address_address") \
diff --git a/src/debug/debug-interface.cc b/src/debug/debug-interface.cc
index 9c25064572112b649c108a89df3c83b29ac603a0..229e4ca8d8770a698dfb21606b29ac7ac0018dc2 100644
index add2b3dbb4dc2e71a6dec717c29d957809797abf..e6ae32f9d2c11152c5184775f26e48a6870091ab 100644
--- a/src/debug/debug-interface.cc
+++ b/src/debug/debug-interface.cc
@@ -17,7 +17,6 @@
@ -86,10 +86,10 @@ index 9c25064572112b649c108a89df3c83b29ac603a0..229e4ca8d8770a698dfb21606b29ac7a
Isolate* Script::GetIsolate() const {
diff --git a/src/execution/isolate.cc b/src/execution/isolate.cc
index eaf3096ac6bb05d61d93012d5b7abec503a3259e..051e58263cb66b1ad2dc1b59143d5826e0dfe376 100644
index 474ea612bda4bf44776b919fd20e86e85ba3e3ce..ffcf10e4d282b85f1a22fa656113709f09ef34f2 100644
--- a/src/execution/isolate.cc
+++ b/src/execution/isolate.cc
@@ -3591,7 +3591,6 @@ bool Isolate::Init(SnapshotData* startup_snapshot_data,
@@ -3596,7 +3596,6 @@ bool Isolate::Init(SnapshotData* startup_snapshot_data,
store_stub_cache_ = new StubCache(this);
materialized_object_store_ = new MaterializedObjectStore(this);
regexp_stack_ = new RegExpStack();
@ -1721,7 +1721,7 @@ index c3a3cb90f2a9d865057af80801e2a95bbb873140..74a3c95b06c771078ab03e6787e59123
// Labels used internally.
Label entry_label_;
diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status
index 9c28520ed56998173c105b9d8a2ca3c4489b916e..e092d3b74c79d5dfc2bbf056881164c16ebb7cda 100644
index e87644e89b7d87fb95917a58fef5f019d3ce7fc9..597ee4248bdd9e2dbb1ce05b322cd253dd403603 100644
--- a/test/cctest/cctest.status
+++ b/test/cctest/cctest.status
@@ -136,9 +136,6 @@