deps: V8: cherry-pick 19e7a57bce3e

Original commit message:

    [regexp] Reset flags after resetting state in Parser

    When restoring the previous state after parsing a closing parenthesis
    we also need to restore flags explicitly from the restored state.

    Fixed: 523687962
    Change-Id: I63a5bd9fec2f9b7f6fb43b6893027c3c3d0755f0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7950157
    Auto-Submit: Patrick Thier <pthier@chromium.org>
    Commit-Queue: Jakob Linke <jgruber@chromium.org>
    Reviewed-by: Jakob Linke <jgruber@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#108021}

Refs: https://github.com/v8/v8/commit/19e7a57bce3eaae13cfc4f9ddfaaaa2c0fcca78e
Refs: https://github.com/nodejs/node/issues/66277
PR-URL: https://github.com/nodejs/node/pull/67207
Reviewed-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
This commit is contained in:
pthier authored and Antoine du Hamel committed 2026-11-21 15:16:24 +01:00
1 parent 1b18d776ac
commit 1bb15f6cef
3 files changed
+4 -1

No files matched your search

+1 -1
View File
@@ -44,7 +44,7 @@
# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.44',
'v8_embedder_string': '-node.45',
##### V8 defaults for Node.js #####
+1
View File
@@ -988,6 +988,7 @@ RegExpTree* RegExpParserImpl<CharT>::ParseDisjunction() {
// Restore previous state.
state = state->previous_state();
builder = state->builder();
flags_ = builder->flags();
builder->AddAtom(body);
// For compatibility with JSC and ES3, we allow quantifiers after
+2
View File
@@ -73,3 +73,5 @@ test(
/(?m:^f(?si:.o)$)/, ['foo', '\nfoO', 'f\no\n', '\nf\rO\n'],
['Foo', 'F\no\n']);
test(/(?i:.oo)/, ['Foo', 'FOO', 'fOo', 'foO']);
test(/(?i:foo)[x-z]/v, ['Foox', 'fOoz'], ['fooX','FooZ']);