Skip to content

Commit

Permalink
chore: cherry-pick e42dbcdedb7a from v8 (#33831)
Browse files Browse the repository at this point in the history
* chore: cherry-pick e42dbcdedb7a from v8

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: Electron Bot <electron@github.com>
  • Loading branch information
3 people committed Apr 21, 2022
1 parent a31e722 commit d26d064
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions patches/v8/.patches
Expand Up @@ -24,4 +24,5 @@ cherry-pick-c46fb3a15ec2.patch
cherry-pick-a1427aad7cef.patch
cherry-pick-f599381978f2.patch
cherry-pick-f546ac11eec7.patch
cherry-pick-e42dbcdedb7a.patch
cherry-pick-b2d3ef69ef99.patch
37 changes: 37 additions & 0 deletions patches/v8/cherry-pick-e42dbcdedb7a.patch
@@ -0,0 +1,37 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brendon Tiszka <btiszka@gmail.com>
Date: Fri, 18 Mar 2022 01:32:54 -0400
Subject: Merged: Update write barrier when storing HeapNumber to last index.

(cherry picked from commit bdc4f54a50293507d9ef51573bab537883560cc8)

No-Try: true
No-Presubmit: true
No-Treechecks: true
Bug: chromium:1307610
Change-Id: I60aaa0e58e13b705b5eff4b57411a0ad4a2e9b3f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3534849
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#79538}
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3565716
Reviewed-by: Patrick Thier <pthier@chromium.org>
Commit-Queue: Jakob Linke <jgruber@chromium.org>
Cr-Commit-Position: refs/branch-heads/10.0@{#18}
Cr-Branched-From: 6ea73a738c467dc26abbbe84e27a36aac1c6e119-refs/heads/10.0.139@{#1}
Cr-Branched-From: ccc689011280419901e6ee42cae39980c0e96030-refs/heads/main@{#79131}

diff --git a/src/regexp/regexp-utils.cc b/src/regexp/regexp-utils.cc
index 1e72a124c95729ebf9c4a7caed52b5551408a525..9ddf82e95a7c07bbb7a529167bbf30058a1cbd14 100644
--- a/src/regexp/regexp-utils.cc
+++ b/src/regexp/regexp-utils.cc
@@ -49,7 +49,8 @@ MaybeHandle<Object> RegExpUtils::SetLastIndex(Isolate* isolate,
Handle<Object> value_as_object =
isolate->factory()->NewNumberFromInt64(value);
if (HasInitialRegExpMap(isolate, *recv)) {
- JSRegExp::cast(*recv).set_last_index(*value_as_object, SKIP_WRITE_BARRIER);
+ JSRegExp::cast(*recv).set_last_index(*value_as_object,
+ UPDATE_WRITE_BARRIER);
return recv;
} else {
return Object::SetProperty(

0 comments on commit d26d064

Please sign in to comment.