Browse Source

build: fail for out of date patches on forks (#46125)

* build: fail for out of date patches on forks

Co-authored-by: Shelley Vohr <[email protected]>

* chore: update patches

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: John Kleinschmidt <[email protected]>
trop[bot] 4 weeks ago
parent
commit
165ea64314

+ 1 - 1
.github/actions/checkout/action.yml

@@ -99,7 +99,7 @@ runs:
       fi
 
       ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
-      if [[ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]]; then
+      if [[ "${{ inputs.is-release }}" != "true" ]]; then
         # Re-export all the patches to check if there were changes.
         python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
         cd src/electron

+ 5 - 6
patches/chromium/cherry-pick-521faebc8a7c.patch

@@ -1,7 +1,7 @@
-From 521faebc8a7cffe23177c6600bfcfb3c0b9ab1dc Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Geoff Lang <[email protected]>
-Date: Thu, 06 Mar 2025 19:39:37 -0800
-Subject: [PATCH] Disable setting primtive restart for WebGL in the cmd decoder.
+Date: Thu, 6 Mar 2025 19:39:37 -0800
+Subject: Disable setting primtive restart for WebGL in the cmd decoder.
 
 Until it's blocked in ANGLE for WebGL contexts, disable it in the
 command decoder on the service side.
@@ -13,13 +13,12 @@ Reviewed-by: Shahbaz Youssefi <[email protected]>
 Reviewed-by: Kenneth Russell <[email protected]>
 Commit-Queue: Kenneth Russell <[email protected]>
 Cr-Commit-Position: refs/heads/main@{#1429307}
----
 
 diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
-index ad23480..733c553 100644
+index 54310b8878fa7aeca45e6001cb884a794272138c..2cb2a3b4913a54373b84cebf9326ee09a98f6bcc 100644
 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
 +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
-@@ -2170,6 +2170,11 @@
+@@ -2160,6 +2160,11 @@ bool GLES2DecoderPassthroughImpl::IsIgnoredCap(GLenum cap) const {
      case GL_DEBUG_OUTPUT:
        return true;
  

+ 1 - 1
patches/chromium/cherry-pick-9dacf5694dfd.patch

@@ -36,7 +36,7 @@ index 03a26a5f81dee1cd1bba28621c1ecd30ea709df8..60447a8e71e056db01515db8bc6c5604
        feature_info_->feature_flags().khr_debug) {
      InitializeGLDebugLogging(true, GLDebugMessageCallback, &logger_);
 diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
-index 54310b8878fa7aeca45e6001cb884a794272138c..e7abe4cb8542aa767ca150db3163f860f9a04b59 100644
+index 2cb2a3b4913a54373b84cebf9326ee09a98f6bcc..ee9ad4fa2838a22bc8b24185267a29687129f721 100644
 --- a/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
 +++ b/gpu/command_buffer/service/gles2_cmd_decoder_passthrough.cc
 @@ -1065,6 +1065,17 @@ gpu::ContextResult GLES2DecoderPassthroughImpl::Initialize(

+ 2 - 2
patches/chromium/fix_harden_blink_scriptstate_maybefrom.patch

@@ -40,7 +40,7 @@ accessing uninitialized lower indexes can return garbage values that cannot be n
 Refer to v8::EmbedderDataSlot::store_aligned_pointer for context.
 
 diff --git a/gin/public/gin_embedders.h b/gin/public/gin_embedders.h
-index 8d7c5631fd8f1499c67384286f0e3c4037673b32..99b2e2f63be8a46c5546dd53bc9b05e8c54e857c 100644
+index 8d7c5631fd8f1499c67384286f0e3c4037673b32..2b7bdfbac06a42e6bc51eb65e023c3673e6eb885 100644
 --- a/gin/public/gin_embedders.h
 +++ b/gin/public/gin_embedders.h
 @@ -20,6 +20,8 @@ enum GinEmbedder : uint16_t {
@@ -86,7 +86,7 @@ index e4a27a24c83dd1a478b2ada8b6c8220076790791..c76dc818f38a62fff63852dbecbc85e3
  
    // Cut the reference from ScriptState to V8 context.
 diff --git a/third_party/blink/renderer/platform/bindings/script_state.h b/third_party/blink/renderer/platform/bindings/script_state.h
-index b3cc8d819b06108386aed9465cab4f27a28b675f..a1757901e52360a9c2ec3c573adb20d03cd6ecae 100644
+index b3cc8d819b06108386aed9465cab4f27a28b675f..9c8818f10de59fdd2a3fd44d9cd23d40a93b53a7 100644
 --- a/third_party/blink/renderer/platform/bindings/script_state.h
 +++ b/third_party/blink/renderer/platform/bindings/script_state.h
 @@ -185,7 +185,12 @@ class PLATFORM_EXPORT ScriptState : public GarbageCollected<ScriptState> {

+ 4 - 4
patches/chromium/fix_take_snapped_status_into_account_when_showing_a_window.patch

@@ -19,10 +19,10 @@ would be removed from its snapped state when re-shown. This fixes that.
 Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/6330848.
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 22ed43bdf4dbaccc598135807abc8383c52db50e..c5457e3e58b53ca04697b22a885da654c6c0655f 100644
+index a949e73dabad71d2550e38b09dbcf45160b3a853..c188a0bc20f2adff2c2e85879c790e3ebae33a39 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -676,7 +676,8 @@ void HWNDMessageHandler::Show(ui::mojom::WindowShowState show_state,
+@@ -656,7 +656,8 @@ void HWNDMessageHandler::Show(ui::mojom::WindowShowState show_state,
      SetWindowPlacement(hwnd(), &placement);
      native_show_state = SW_SHOWMAXIMIZED;
    } else {
@@ -32,7 +32,7 @@ index 22ed43bdf4dbaccc598135807abc8383c52db50e..c5457e3e58b53ca04697b22a885da654
  
      // Use SW_SHOW/SW_SHOWNA instead of SW_SHOWNORMAL/SW_SHOWNOACTIVATE so that
      // the window is not restored to its original position if it is maximized.
-@@ -686,7 +687,8 @@ void HWNDMessageHandler::Show(ui::mojom::WindowShowState show_state,
+@@ -666,7 +667,8 @@ void HWNDMessageHandler::Show(ui::mojom::WindowShowState show_state,
      // position, some do not. See crbug.com/1296710
      switch (show_state) {
        case ui::mojom::WindowShowState::kInactive:
@@ -42,7 +42,7 @@ index 22ed43bdf4dbaccc598135807abc8383c52db50e..c5457e3e58b53ca04697b22a885da654
          break;
        case ui::mojom::WindowShowState::kMaximized:
          native_show_state = SW_SHOWMAXIMIZED;
-@@ -697,9 +699,11 @@ void HWNDMessageHandler::Show(ui::mojom::WindowShowState show_state,
+@@ -677,9 +679,11 @@ void HWNDMessageHandler::Show(ui::mojom::WindowShowState show_state,
        case ui::mojom::WindowShowState::kNormal:
          if ((GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_TRANSPARENT) ||
              (GetWindowLong(hwnd(), GWL_EXSTYLE) & WS_EX_NOACTIVATE)) {

+ 115 - 118
patches/chromium/reland_lzma_sdk_update_to_24_09.patch

@@ -657,7 +657,7 @@ index 116153b69e56f519fad9a117ecc1402e8d3ef64f..a07930287a6d3612badf2a6db2fd12cc
  align 16
  Reverse_Endian_Mask db 3,2,1,0, 7,6,5,4, 11,10,9,8, 15,14,13,12
 diff --git a/third_party/lzma_sdk/Asm/x86/XzCrc64Opt.asm b/third_party/lzma_sdk/Asm/x86/XzCrc64Opt.asm
-index 1c67037ba8a20bdb30f6521a841e7b72c6394282..de023f9f490bafbf8637e4fc116b8326a07c40d8 100644
+index 1c67037ba8a20bdb30f6521a841e7b72c6394282..f9e95746d3ab6b7e556a6a427ba1fabf917106e5 100644
 --- a/third_party/lzma_sdk/Asm/x86/XzCrc64Opt.asm
 +++ b/third_party/lzma_sdk/Asm/x86/XzCrc64Opt.asm
 @@ -1,113 +1,231 @@
@@ -694,10 +694,9 @@ index 1c67037ba8a20bdb30f6521a841e7b72c6394282..de023f9f490bafbf8637e4fc116b8326
  rN      equ  r10
 -rT      equ  r5
 -num_VAR equ  r8
--
--SRCDAT4 equ  dword ptr [rD + rN * 1]
 +rT      equ  r9
-+
+ 
+-SRCDAT4 equ  dword ptr [rD + rN * 1]
 +CRC_OP macro op:req, dest:req, src:req, t:req
 +        op      dest, QWORD PTR [rT + @CatStr(src, _R) * 8 + 0800h * (t)]
 +endm
@@ -776,6 +775,22 @@ index 1c67037ba8a20bdb30f6521a841e7b72c6394282..de023f9f490bafbf8637e4fc116b8326
 +        shr     r0, 8
 +        CRC_XOR r0, x6, 0
 +        dec     rN
++endm
++
++
++; ALIGN_MASK is 3 or 7 bytes alignment:
++ALIGN_MASK      equ  (7 - (NUM_WORDS and 1) * 4)
++
++if NUM_WORDS eq 1
++
++src_rN_offset   equ  4
++; + 4 for prefetching next 4-bytes after current iteration
++NUM_BYTES_LIMIT equ  (NUM_WORDS * 4 + 4)
++SRCDAT4         equ  DWORD PTR [rN + rD * 1]
++
++XOR_NEXT macro
++        mov     x1, [rD]
++        xor     r0, r1
  endm
  
 -MY_PROC XzCrc64UpdateT4, 4
@@ -799,22 +814,6 @@ index 1c67037ba8a20bdb30f6521a841e7b72c6394282..de023f9f490bafbf8637e4fc116b8326
 -    jnz     main_loop_4
 -
 -    MY_EPILOG crc_end_4
-+
-+; ALIGN_MASK is 3 or 7 bytes alignment:
-+ALIGN_MASK      equ  (7 - (NUM_WORDS and 1) * 4)
-+
-+if NUM_WORDS eq 1
-+
-+src_rN_offset   equ  4
-+; + 4 for prefetching next 4-bytes after current iteration
-+NUM_BYTES_LIMIT equ  (NUM_WORDS * 4 + 4)
-+SRCDAT4         equ  DWORD PTR [rN + rD * 1]
-+
-+XOR_NEXT macro
-+        mov     x1, [rD]
-+        xor     r0, r1
-+endm
-+
 +else ; NUM_WORDS > 1
 +
 +src_rN_offset   equ 8
@@ -3847,7 +3846,7 @@ index 69fad9ca2b476ed8589f6bee8a08de37be47297e..9408017ed4fc1cda88c7e5e4ce6b7a61
 +#undef Z7_CRC_NUM_TABLES_USE
  #endif
 diff --git a/third_party/lzma_sdk/C/7zDec.c b/third_party/lzma_sdk/C/7zDec.c
-index fbfd016e1e6a11bd976f39fe90de619166910e0e..520cbfd833be22e29a248eb05aca7e81d55d2ac4 100644
+index fbfd016e1e6a11bd976f39fe90de619166910e0e..341fbce3c3cf923305a47120ef41f752fbf0e5c7 100644
 --- a/third_party/lzma_sdk/C/7zDec.c
 +++ b/third_party/lzma_sdk/C/7zDec.c
 @@ -1,11 +1,11 @@
@@ -5932,7 +5931,7 @@ index 3be2041eb75502c36faf8064e0edd6679d7abdbb..01bf6b7dd6b1c7fabbd8c2797738b6f5
  #endif
  
 diff --git a/third_party/lzma_sdk/C/Bcj2.c b/third_party/lzma_sdk/C/Bcj2.c
-index c7b956708f6e82641623bcaa9e9abcecf1635750..7cb57ad62dcf0aef9f5cb77078897d17400266be 100644
+index c7b956708f6e82641623bcaa9e9abcecf1635750..4ec5ea924598db2167887abd3483cd9c1f002882 100644
 --- a/third_party/lzma_sdk/C/Bcj2.c
 +++ b/third_party/lzma_sdk/C/Bcj2.c
 @@ -1,29 +1,24 @@
@@ -6367,7 +6366,7 @@ index c7b956708f6e82641623bcaa9e9abcecf1635750..7cb57ad62dcf0aef9f5cb77078897d17
 +#undef kBitModelTotal
 +#undef kNumMoveBits
 diff --git a/third_party/lzma_sdk/C/Bcj2.h b/third_party/lzma_sdk/C/Bcj2.h
-index 8824080acfbcf767ee4aa127fd56354723f20bb6..4575545b62c06dd4a26646104e26a5a39685aa10 100644
+index 8824080acfbcf767ee4aa127fd56354723f20bb6..4e9ec45e30b7665905a70dd28102c4fc6015c2db 100644
 --- a/third_party/lzma_sdk/C/Bcj2.h
 +++ b/third_party/lzma_sdk/C/Bcj2.h
 @@ -1,8 +1,8 @@
@@ -6504,13 +6503,13 @@ index 8824080acfbcf767ee4aa127fd56354723f20bb6..4575545b62c06dd4a26646104e26a5a3
 +   following condition is met for stream sizes:
 +     ( size(ORIG) == size(MAIN) + size(CALL) + size(JUMP) )
 +*/
- 
++
 +/* (state == BCJ2_STREAM_MAIN) means that decoder is ready for
 +      additional input data in BCJ2_STREAM_MAIN stream.
 +   Note that (state == BCJ2_STREAM_MAIN) is allowed for non-finished decoding.
 +*/
 +#define Bcj2Dec_IsMaybeFinished_state_MAIN(_p_) ((_p_)->state == BCJ2_STREAM_MAIN)
- 
++
 +/* if the stream decoding was finished correctly, then range decoder
 +   part of CBcj2Dec also was finished, and then (CBcj2Dec::code == 0).
 +   Note that (CBcj2Dec::code == 0) is allowed for non-finished decoding.
@@ -6526,8 +6525,8 @@ index 8824080acfbcf767ee4aa127fd56354723f20bb6..4575545b62c06dd4a26646104e26a5a3
 +        Bcj2Dec_IsMaybeFinished_state_MAIN(_p_) && \
 +        Bcj2Dec_IsMaybeFinished_code(_p_))
 +
-+
-+
+ 
+ 
 +/* ---------- BCJ2 Encoder ---------- */
  
  typedef enum
@@ -6637,11 +6636,10 @@ index 8824080acfbcf767ee4aa127fd56354723f20bb6..4575545b62c06dd4a26646104e26a5a3
    UInt32 range;
    UInt64 low;
    UInt64 cacheSize;
-+
-+  // UInt32 context;  // for marker version, it can include marker flag.
  
 -  UInt32 ip;
--
++  // UInt32 context;  // for marker version, it can include marker flag.
+ 
 -  /* 32-bit ralative offset in JUMP/CALL commands is
 -       - (mod 4 GB)   in 32-bit mode
 -       - signed Int32 in 64-bit mode
@@ -6687,9 +6685,7 @@ index 8824080acfbcf767ee4aa127fd56354723f20bb6..4575545b62c06dd4a26646104e26a5a3
 +  p->State == BCJ2_ENC_STATE_FINISHED : after fully encoded stream
 +*/
 +void Bcj2Enc_Encode(CBcj2Enc *p);
- 
--#define BCJ2_RELAT_LIMIT_NUM_BITS 26
--#define BCJ2_RELAT_LIMIT ((UInt32)1 << BCJ2_RELAT_LIMIT_NUM_BITS)
++
 +/* Bcj2Enc encoder can look ahead for up 4 bytes of source stream.
 +   CBcj2Enc::tempPos : is the number of bytes that were copied from input stream to temp[] buffer.
 +   (CBcj2Enc::src) after Bcj2Enc_Encode() is starting position after
@@ -6704,10 +6700,12 @@ index 8824080acfbcf767ee4aa127fd56354723f20bb6..4575545b62c06dd4a26646104e26a5a3
 +/* get the size of input data that was stored in temp[] buffer: */
 +#define Bcj2Enc_Get_AvailInputSize_in_Temp(p) ((p)->tempPos)
  
+-#define BCJ2_RELAT_LIMIT_NUM_BITS 26
+-#define BCJ2_RELAT_LIMIT ((UInt32)1 << BCJ2_RELAT_LIMIT_NUM_BITS)
++#define Bcj2Enc_IsFinished(p) ((p)->flushRem == 0)
+ 
 -/* limit for CBcj2Enc::fileSize variable */
 -#define BCJ2_FileSize_MAX ((UInt32)1 << 31)
-+#define Bcj2Enc_IsFinished(p) ((p)->flushRem == 0)
-+
 +/* Note : the decoder supports overlapping of marker (0f 80).
 +   But we can eliminate such overlapping cases by setting
 +   the limit for relative offset conversion as
@@ -6721,7 +6719,7 @@ index 8824080acfbcf767ee4aa127fd56354723f20bb6..4575545b62c06dd4a26646104e26a5a3
  EXTERN_C_END
  
 diff --git a/third_party/lzma_sdk/C/Bra.c b/third_party/lzma_sdk/C/Bra.c
-index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5ded259280f 100644
+index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..49156bafce30b351d386c53af0723282b33dba5a 100644
 --- a/third_party/lzma_sdk/C/Bra.c
 +++ b/third_party/lzma_sdk/C/Bra.c
 @@ -1,230 +1,709 @@
@@ -6819,7 +6817,8 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 +  lim = p + size;
 +  BR_PC_INIT
 +  pc -= 4;  // because (p) will point to next instruction
-+
+ 
+-  if (encoding)
 +  BR_EXTERNAL_FOR
 +  {
 +    // Z7_PRAGMA_OPT_DISABLE_LOOP_UNROLL_VECTORIZE
@@ -6858,9 +6857,8 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 +  }
 +}
 +Z7_BRANCH_FUNCS_IMP(BranchConv_ARM64)
- 
--  if (encoding)
- 
++
++
 +Z7_BRANCH_FUNC_MAIN(BranchConv_ARM)
 +{
 +  // Byte *p = data;
@@ -6871,7 +6869,7 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 +  /* in ARM: branch offset is relative to the +2 instructions from current instruction.
 +     (p) will point to next instruction */
 +  pc += 8 - 4;
-+
+ 
    for (;;)
    {
      for (;;)
@@ -6902,7 +6900,7 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
    }
 +}
 +Z7_BRANCH_FUNCS_IMP(BranchConv_ARM)
- 
++
 +
 +Z7_BRANCH_FUNC_MAIN(BranchConv_PPC)
 +{
@@ -6912,7 +6910,7 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 +  lim = p + size;
 +  BR_PC_INIT
 +  pc -= 4;  // because (p) will point to next instruction
-+
+ 
    for (;;)
    {
 +    UInt32 v;
@@ -6953,13 +6951,13 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
    }
  }
 +Z7_BRANCH_FUNCS_IMP(BranchConv_PPC)
-+
  
+ 
+-SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
 +#ifdef Z7_CPU_FAST_ROTATE_SUPPORTED
 +#define BR_SPARC_USE_ROTATE
 +#endif
- 
--SizeT ARMT_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
++
 +Z7_BRANCH_FUNC_MAIN(BranchConv_SPARC)
  {
 -  Byte *p;
@@ -7104,12 +7102,12 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
      {
 +      /* we can adjust pc for (0xf800) to rid of (& 0x7FF) operation.
 +         But gcc/clang for arm64 can use bfi instruction for full code here */
-       UInt32 v =
--             ((UInt32)b1 << 19)
++      UInt32 v =
 +          ((UInt32)GetUi16a(p - 2) << 11) |
 +          ((UInt32)GetUi16a(p) & 0x7FF);
 +      /*
-+      UInt32 v =
+       UInt32 v =
+-             ((UInt32)b1 << 19)
 +            ((UInt32)p[1 - 2] << 19)
            + (((UInt32)p[1] & 0x7) << 8)
            + (((UInt32)p[-2] << 11))
@@ -7149,11 +7147,11 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 +  // return (Byte *)(lim + 2 - (((((unsigned)lim[1] ^ 8) + 8) >> 7) & 2));
  }
 +Z7_BRANCH_FUNCS_IMP(BranchConv_ARMT)
++
  
++// #define BR_IA64_NO_INLINE
  
 -SizeT PPC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
-+// #define BR_IA64_NO_INLINE
-+
 +Z7_BRANCH_FUNC_MAIN(BranchConv_IA64)
  {
 -  Byte *p;
@@ -7163,13 +7161,12 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 -  ip -= 4;
 -  p = data;
 -  lim = data + size;
--
 +  size &= ~(SizeT)15;
 +  lim = p + size;
 +  pc -= 1 << 4;
 +  pc >>= 4 - 1;
 +  // pc -= 1 << 1;
-+
+ 
    for (;;)
    {
 +    unsigned m;
@@ -7255,12 +7252,11 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 +
 +#define BR_CONVERT_VAL_ENC(v)  v += BR_PC_GET;
 +#define BR_CONVERT_VAL_DEC(v)  v -= BR_PC_GET;
- 
++
 +#if 1 && defined(MY_CPU_LE_UNALIGN)
 +  #define RISCV_USE_UNALIGNED_LOAD
 +#endif
  
--SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
 +#ifdef RISCV_USE_UNALIGNED_LOAD
 +  #define RISCV_GET_UI32(p)      GetUi32(p)
 +  #define RISCV_SET_UI32(p, v)   { SetUi32(p, v) }
@@ -7272,7 +7268,8 @@ index 3b854d9cad7fba3cd7986cde50d17b23f5d7d24f..e61edf8f12e1a7710d1e108923bdc5de
 +    SetUi16a(p, (UInt16)(v)) \
 +    SetUi16a((p) + 2, (UInt16)(v >> 16)) }
 +#endif
-+
+ 
+-SizeT SPARC_Convert(Byte *data, SizeT size, UInt32 ip, int encoding)
 +#if 1 && defined(MY_CPU_LE)
 +  #define RISCV_USE_16BIT_LOAD
 +#endif
@@ -7728,7 +7725,7 @@ index 855e37a6b5018e07b5e049b014401069d2158747..b47112cedc3dbe14079af262dd17aa59
  
  #endif
 diff --git a/third_party/lzma_sdk/C/Bra86.c b/third_party/lzma_sdk/C/Bra86.c
-index 10a0fbd161cb78f8778c4fee5df1461310df337e..d81f392ae040469faf1a3514d1f88c5677b03aae 100644
+index 10a0fbd161cb78f8778c4fee5df1461310df337e..6bb1e49329d38d05d2dc8ee4efa5b2bbc07a1e2a 100644
 --- a/third_party/lzma_sdk/C/Bra86.c
 +++ b/third_party/lzma_sdk/C/Bra86.c
 @@ -1,82 +1,187 @@
@@ -7847,8 +7844,7 @@ index 10a0fbd161cb78f8778c4fee5df1461310df337e..d81f392ae040469faf1a3514d1f88c56
 +      if (BR86_IS_BCJ_BYTE(3))  { goto a3; }
      }
 +    goto main_loop;
- 
--    if (Test86MSByte(p[4]))
++
 +  m0: p--;
 +  m1: p--;
 +  m2: p--;
@@ -7856,7 +7852,8 @@ index 10a0fbd161cb78f8778c4fee5df1461310df337e..d81f392ae040469faf1a3514d1f88c56
 +      goto a3;
 +    if (p > lim)
 +      goto fin_p;
-+
+ 
+-    if (Test86MSByte(p[4]))
 +    // if (((0x17u >> mask) & 1) == 0)
 +    if (mask > 4 || mask == 3)
 +    {
@@ -7910,16 +7907,13 @@ index 10a0fbd161cb78f8778c4fee5df1461310df337e..d81f392ae040469faf1a3514d1f88c56
 +      SetUi32(p, v)
 +      p += 4;
 +      goto main_loop;
-     }
--    else
++    }
 +
 +  main_loop:
 +    if (p >= lim)
 +      goto fin;
 +    for (;;)
-     {
--      mask = (mask >> 1) | 4;
--      pos++;
++    {
 +      BR86_PREPARE_BCJ_SCAN
 +      p += 4;
 +      if (BR86_IS_BCJ_BYTE(0))  { goto a0; }
@@ -7928,7 +7922,8 @@ index 10a0fbd161cb78f8778c4fee5df1461310df337e..d81f392ae040469faf1a3514d1f88c56
 +      if (BR86_IS_BCJ_BYTE(3))  { goto a3; }
 +      if (p >= lim)
 +        goto fin;
-+    }
+     }
+-    else
 +
 +  a0: p--;
 +  a1: p--;
@@ -7937,7 +7932,9 @@ index 10a0fbd161cb78f8778c4fee5df1461310df337e..d81f392ae040469faf1a3514d1f88c56
 +    if (p > lim)
 +      goto fin_p;
 +    // if (!BR86_NEED_CONV_FOR_MS_BYTE(p[3])) continue; // goto cont;
-+    {
+     {
+-      mask = (mask >> 1) | 4;
+-      pos++;
 +      UInt32 v = GetUi32(p);
 +      UInt32 c;
 +      v += (1 << 24);  if (v & 0xfe000000) continue; // goto cont;
@@ -8045,7 +8042,7 @@ index d1dbc62c55bebd5ff5d4d53b51f28aabecab6179..9dfe3e289589d6288227ee819835941b
 +#pragma GCC diagnostic ignored "-Wempty-translation-unit"
 +#endif
 diff --git a/third_party/lzma_sdk/C/Compiler.h b/third_party/lzma_sdk/C/Compiler.h
-index a9816fa5ad014863211aa19723f8a87b312e4bfa..2a9c2b7a0896c847d65b9aae4b5c1f2cbf29297b 100644
+index a9816fa5ad014863211aa19723f8a87b312e4bfa..e83e37d11981bd9f54e63a32c546497a914a1906 100644
 --- a/third_party/lzma_sdk/C/Compiler.h
 +++ b/third_party/lzma_sdk/C/Compiler.h
 @@ -1,12 +1,105 @@
@@ -8302,7 +8299,7 @@ index a9816fa5ad014863211aa19723f8a87b312e4bfa..2a9c2b7a0896c847d65b9aae4b5c1f2c
  
  #define UNUSED_VAR(x) (void)x;
 diff --git a/third_party/lzma_sdk/C/CpuArch.c b/third_party/lzma_sdk/C/CpuArch.c
-index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f9ce6fc95 100644
+index 30451fba9b97b34669186865dcf72d8792334423..8ba93446e854ddfca2b252c241aca1e91673acd6 100644
 --- a/third_party/lzma_sdk/C/CpuArch.c
 +++ b/third_party/lzma_sdk/C/CpuArch.c
 @@ -1,187 +1,357 @@
@@ -8518,8 +8515,7 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +// for gcc/clang and other: we can try to use __cpuid macro:
 +#include <cpuid.h>
 +void Z7_FASTCALL z7_x86_cpuid(UInt32 p[4], UInt32 func)
- {
--  #ifdef USE_ASM
++{
 +  __cpuid(func, p[0], p[1], p[2], p[3]);
 +}
 +UInt32 Z7_FASTCALL z7_x86_cpuid_GetMaxFunc(void)
@@ -8534,7 +8530,8 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +  p[0] = p[1] = p[2] = p[3] = 0;
 +}
 +UInt32 Z7_FASTCALL z7_x86_cpuid_GetMaxFunc(void)
-+{
+ {
+-  #ifdef USE_ASM
 +  return 0;
 +}
  
@@ -8686,7 +8683,8 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 + where ECX value is first parameter for FASTCALL / NO_INLINE func.
 + So the caller of MY_cpuidex_HACK() sets ECX as subFunction, and
 + old MSVC for __cpuid() doesn't change ECX and cpuid instruction gets (subFunction) value.
-+
+ 
+-  #endif
 +DON'T remove Z7_NO_INLINE and Z7_FASTCALL for MY_cpuidex_HACK(): !!!
 +*/
 +static
@@ -8694,7 +8692,7 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +{
 +  UNUSED_VAR(subFunction)
 +  __cpuid(CPUInfo, func);
-+}
+ }
 +      #define MY_cpuidex(info, func, func2)  MY_cpuidex_HACK(func2, func, info)
 +      #pragma message("======== MY_cpuidex_HACK WAS USED ========")
 +static
@@ -8703,8 +8701,7 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +  MY_cpuidex_HACK(subFunc, func, (Int32 *)p);
 +}
 +    #endif // _MSC_VER >= 1600
- 
--  #endif
++
 +#if !defined(MY_CPU_AMD64)
 +/* inlining for __cpuid() in MSVC x86 (32-bit) produces big ineffective code,
 +   so we disable inlining here */
@@ -8713,9 +8710,8 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +void Z7_FASTCALL z7_x86_cpuid(UInt32 p[4], UInt32 func)
 +{
 +  MY_cpuidex((Int32 *)p, (Int32)func, 0);
- }
- 
--BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p)
++}
++
 +Z7_NO_INLINE
 +UInt32 Z7_FASTCALL z7_x86_cpuid_GetMaxFunc(void)
 +{
@@ -8734,7 +8730,8 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +#endif
 +#undef NEED_CHECK_FOR_CPUID
 +
-+
+ 
+-BoolInt x86cpuid_CheckAndRead(Cx86cpuid *p)
 +static
 +BoolInt x86cpuid_Func_1(UInt32 *p)
  {
@@ -8895,27 +8892,29 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
    CHECK_SYS_SSE_SUPPORT
 -  if (!x86cpuid_CheckAndRead(&p))
 +  if (!x86cpuid_Func_1(&a[0]))
-+    return 0;
+     return 0;
+-  return p.c;
 +  return (BoolInt)(a[3] >> 25) & 1;
-+}
-+
+ }
+ 
+-BoolInt CPU_IsSupported_AES()
 +BoolInt CPU_IsSupported_SSE2(void)
-+{
+ {
+-  return (X86_CPUID_ECX_Get_Flags() >> 25) & 1;
 +  UInt32 a[4];
 +  CHECK_SYS_SSE_SUPPORT
 +  if (!x86cpuid_Func_1(&a[0]))
-     return 0;
--  return p.c;
++    return 0;
 +  return (BoolInt)(a[3] >> 26) & 1;
  }
  
--BoolInt CPU_IsSupported_AES()
+-BoolInt CPU_IsSupported_SSSE3()
 +#endif
 +
 +
 +static UInt32 x86cpuid_Func_1_ECX(void)
  {
--  return (X86_CPUID_ECX_Get_Flags() >> 25) & 1;
+-  return (X86_CPUID_ECX_Get_Flags() >> 9) & 1;
 +  UInt32 a[4];
 +  CHECK_SYS_SSE_SUPPORT
 +  if (!x86cpuid_Func_1(&a[0]))
@@ -8923,21 +8922,19 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +  return a[2];
  }
  
--BoolInt CPU_IsSupported_SSSE3()
+-BoolInt CPU_IsSupported_SSE41()
 +BoolInt CPU_IsSupported_AES(void)
  {
--  return (X86_CPUID_ECX_Get_Flags() >> 9) & 1;
+-  return (X86_CPUID_ECX_Get_Flags() >> 19) & 1;
 +  return (BoolInt)(x86cpuid_Func_1_ECX() >> 25) & 1;
  }
  
--BoolInt CPU_IsSupported_SSE41()
+-BoolInt CPU_IsSupported_SHA()
 +BoolInt CPU_IsSupported_SSSE3(void)
- {
--  return (X86_CPUID_ECX_Get_Flags() >> 19) & 1;
++{
 +  return (BoolInt)(x86cpuid_Func_1_ECX() >> 9) & 1;
- }
- 
--BoolInt CPU_IsSupported_SHA()
++}
++
 +BoolInt CPU_IsSupported_SSE41(void)
 +{
 +  return (BoolInt)(x86cpuid_Func_1_ECX() >> 19) & 1;
@@ -8957,9 +8954,9 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +    return (BoolInt)(d[1] >> 29) & 1;
 +  }
 +}
-+
  
 -  if (p.maxFunc < 7)
++
 +BoolInt CPU_IsSupported_SHA512(void)
 +{
 +  if (!CPU_IsSupported_AVX2()) return False; // maybe CPU_IsSupported_AVX() is enough here
@@ -9018,15 +9015,15 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +// #define ATTRIB_XGETBV __attribute__((__target__("xsave")))
 +#else
 +#define ATTRIB_XGETBV
- #endif
 +#endif
-+
+ #endif
+ 
+-BoolInt CPU_IsSupported_AVX2()
 +#if defined(ATTRIB_XGETBV)
 +#include <immintrin.h>
 +#endif
 +
- 
--BoolInt CPU_IsSupported_AVX2()
++
 +// XFEATURE_ENABLED_MASK/XCR0
 +#define MY_XCR_XFEATURE_ENABLED_MASK 0
 +
@@ -9105,7 +9102,7 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +
 +#endif
 +}
- 
++
 +#ifdef _WIN32
 +/*
 +  Windows versions do not know about new ISA extensions that
@@ -9126,7 +9123,7 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +// #define MY_PF_AVX2_INSTRUCTIONS_AVAILABLE              40
 +// #define MY_PF_AVX512F_INSTRUCTIONS_AVAILABLE           41
 +#endif
-+
+ 
 +BoolInt CPU_IsSupported_AVX(void)
 +{
    #ifdef _WIN32
@@ -9309,7 +9306,7 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
  
  #else
  
-@@ -378,29 +809,40 @@ static void Print_sysctlbyname(const char *name)
+@@ -378,30 +809,41 @@ static void Print_sysctlbyname(const char *name)
    }
  }
  */
@@ -9343,8 +9340,8 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
  {
 -  return My_sysctlbyname_Get_BoolInt("hw.optional.neon");
 +  return z7_sysctlbyname_Get_BoolInt("hw.optional.neon");
-+}
-+
+ }
+ 
 +BoolInt CPU_IsSupported_SHA512(void)
 +{
 +  return z7_sysctlbyname_Get_BoolInt("hw.optional.armv8_2_sha512");
@@ -9354,11 +9351,12 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
 +BoolInt CPU_IsSupported_SHA3(void)
 +{
 +  return z7_sysctlbyname_Get_BoolInt("hw.optional.armv8_2_sha3");
- }
++}
 +*/
- 
++
  #ifdef MY_CPU_ARM64
  #define APPLE_CRYPTO_SUPPORT_VAL 1
+ #else
 @@ -415,35 +857,70 @@ BoolInt CPU_IsSupported_AES (void) { return APPLE_CRYPTO_SUPPORT_VAL; }
  
  #else // __APPLE__
@@ -9476,7 +9474,7 @@ index 30451fba9b97b34669186865dcf72d8792334423..6e02551e2dca2d98db76fa4a31f23a1f
      return EFAULT;
    return res;
 diff --git a/third_party/lzma_sdk/C/CpuArch.h b/third_party/lzma_sdk/C/CpuArch.h
-index 8cd55bea48dc6ffa4d7b8be52e7baf3fd47e7ad9..2843b4562c2bd9b06aabfc5c13300d14639bedc9 100644
+index 8cd55bea48dc6ffa4d7b8be52e7baf3fd47e7ad9..483a4d797f9014309cd2baca1549e8d7d450443e 100644
 --- a/third_party/lzma_sdk/C/CpuArch.h
 +++ b/third_party/lzma_sdk/C/CpuArch.h
 @@ -1,8 +1,8 @@
@@ -10242,7 +10240,7 @@ index 64ff26cd93aa741a39a2c11300e85e2a02eac19a..9fa41538265ac26c09123747b7806dab
  #include "7zTypes.h"
  
 diff --git a/third_party/lzma_sdk/C/LzFind.c b/third_party/lzma_sdk/C/LzFind.c
-index 36f7330911435779e4d213f340c33c93c9df20cb..5941582e7977685a981afa0a0b2589479d2a9f7b 100644
+index 36f7330911435779e4d213f340c33c93c9df20cb..8c30c2039c149f77211626443ef7eb7787959058 100644
 --- a/third_party/lzma_sdk/C/LzFind.c
 +++ b/third_party/lzma_sdk/C/LzFind.c
 @@ -1,5 +1,5 @@
@@ -11498,7 +11496,7 @@ index 36f7330911435779e4d213f340c33c93c9df20cb..5941582e7977685a981afa0a0b258947
 +#undef MOVE_POS_RET
 +#undef PRF
 diff --git a/third_party/lzma_sdk/C/LzFind.h b/third_party/lzma_sdk/C/LzFind.h
-index eea873ff61ede1bee4c75f85e451c51333d76d56..67e8a6e0286ee0877043601039c5fbdae8588148 100644
+index eea873ff61ede1bee4c75f85e451c51333d76d56..7e1be1d68479f597f410974da499b477858b5ca5 100644
 --- a/third_party/lzma_sdk/C/LzFind.h
 +++ b/third_party/lzma_sdk/C/LzFind.h
 @@ -1,8 +1,8 @@
@@ -11636,7 +11634,7 @@ index 77b898cfab57c7df241b767b21390e26cc23ec57..2b6290b64c08f7eb44568a67e90abcf4
  /*
    (kHash2Size >= (1 <<  8)) : Required
 diff --git a/third_party/lzma_sdk/C/Lzma2Dec.c b/third_party/lzma_sdk/C/Lzma2Dec.c
-index ac970a843d9fabcd6337577648524b0b8e990791..8bf54e499edf73a88df3a89ac04377201e5127f3 100644
+index ac970a843d9fabcd6337577648524b0b8e990791..31581afd5941461967696d27d5b737f4cb80a56d 100644
 --- a/third_party/lzma_sdk/C/Lzma2Dec.c
 +++ b/third_party/lzma_sdk/C/Lzma2Dec.c
 @@ -1,5 +1,5 @@
@@ -14393,7 +14391,7 @@ index aa38501e57948196761aec76c9475fcbe67fc677..75329cdf02267d32eb0a20358608fc08
  /*
  call Sha256Prepare() once at program start.
 diff --git a/third_party/lzma_sdk/C/Sha256Opt.c b/third_party/lzma_sdk/C/Sha256Opt.c
-index decc1382cd6ee9c7cb6e6ac27e3ee6e2cdb46b88..1c6b50f8d336e63be89462f15d48c7ed3ca625e9 100644
+index decc1382cd6ee9c7cb6e6ac27e3ee6e2cdb46b88..42dfac837dc6de8e09bf1725f9824ac89c8e845c 100644
 --- a/third_party/lzma_sdk/C/Sha256Opt.c
 +++ b/third_party/lzma_sdk/C/Sha256Opt.c
 @@ -1,71 +1,53 @@
@@ -14622,11 +14620,10 @@ index decc1382cd6ee9c7cb6e6ac27e3ee6e2cdb46b88..1c6b50f8d336e63be89462f15d48c7ed
  #endif // USE_HW_SHA
  
 -#elif defined(MY_CPU_ARM_OR_ARM64)
--
++#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE)
+ 
 -  #if defined(__clang__)
 -    #if (__clang_major__ >= 8) // fix that check
-+#elif defined(MY_CPU_ARM_OR_ARM64) && defined(MY_CPU_LE)
-+
 +  #if   defined(__ARM_FEATURE_SHA2) \
 +     || defined(__ARM_FEATURE_CRYPTO)
 +    #define USE_HW_SHA
@@ -15940,7 +15937,7 @@ index 93a9ffff5f8113b885ef2963725e620d6eede939..0c1fc2ffecb89ebe834823eeda226a9a
 +#undef Z7_CRC64_NUM_TABLES_USE
  #endif
 diff --git a/third_party/lzma_sdk/C/XzDec.c b/third_party/lzma_sdk/C/XzDec.c
-index 3f96a37f94fc751ed98c31e5d2e731b6526d1957..3d1c98e63194f088ce7907d61f376b5416be341b 100644
+index 3f96a37f94fc751ed98c31e5d2e731b6526d1957..4b6b8c2887249bd18879ff65a94947b28107c710 100644
 --- a/third_party/lzma_sdk/C/XzDec.c
 +++ b/third_party/lzma_sdk/C/XzDec.c
 @@ -1,5 +1,5 @@
@@ -17203,7 +17200,7 @@ index 7458450739601b3a8236e421241bb9ed73f3a014..a07824208330eec265a88310e42c3803
 +4. Remove files irrelevant to Chromium use.
 +5. Remove AVX and SSE41 code in LzFind.
 diff --git a/third_party/lzma_sdk/chromium.patch b/third_party/lzma_sdk/chromium.patch
-index 85b8089a6a0d31113f1570483fe07fb905f5b825..168ca263574d83a27d4afebc8857545254ebe79a 100644
+index 85b8089a6a0d31113f1570483fe07fb905f5b825..c712da067c0a88941e31e3f6de6c06208d1a83ea 100644
 --- a/third_party/lzma_sdk/chromium.patch
 +++ b/third_party/lzma_sdk/chromium.patch
 @@ -1,138 +1,46 @@

+ 8 - 6
patches/v8/cherry-pick-2b4812d502b2.patch

@@ -1,7 +1,10 @@
-From 2b4812d502b2bbd2eeace4d383dd1bb3252702ba Mon Sep 17 00:00:00 2001
-From: Olivier Flückiger <[email protected]>
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Olivier=20Fl=C3=BCckiger?= <[email protected]>
 Date: Thu, 27 Feb 2025 09:19:22 +0100
-Subject: [PATCH] merged: [maglev] Add missing ClearAllocationBlock
+Subject: merged: [maglev] Add missing ClearAllocationBlock
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Fixed: 398065918
 (cherry picked from commit eb9b25970b0ad4a3f8ce23d8de3583c62e5d6b87)
@@ -15,13 +18,12 @@ Commit-Queue: Victor Gomes <[email protected]>
 Cr-Commit-Position: refs/branch-heads/13.4@{#29}
 Cr-Branched-From: 0f87a54dade4353b6ece1d7591ca8c66f90c1c93-refs/heads/13.4.114@{#1}
 Cr-Branched-From: 27af2e9363b2701abc5f3feb701b1dad7d1a9fe8-refs/heads/main@{#98459}
----
 
 diff --git a/src/maglev/maglev-graph-builder.cc b/src/maglev/maglev-graph-builder.cc
-index bf6a86f..1535afc 100644
+index 28032bb9d9202e0649adaf8d8120e76a5ac10f68..f0ea889c4ce81846ac4f44cb0f50cb65749f0fe8 100644
 --- a/src/maglev/maglev-graph-builder.cc
 +++ b/src/maglev/maglev-graph-builder.cc
-@@ -12487,7 +12487,13 @@
+@@ -12171,7 +12171,13 @@ ValueNode* MaglevGraphBuilder::BuildInlinedAllocation(
            CreateHeapNumber(node->Cast<Float64Constant>()->value()),
            allocation_type);
      } else {

+ 4 - 5
patches/v8/cherry-pick-91343bb45c78.patch

@@ -1,7 +1,7 @@
-From 91343bb45c78ac5cf3d214f68161d8150d81fa8c Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Darius Mercadier <[email protected]>
 Date: Tue, 18 Feb 2025 09:32:04 +0100
-Subject: [PATCH] [M132-LTS][turbofan] Disable escape analysis for TrustedHeapConstant
+Subject: Disable escape analysis for TrustedHeapConstant
 
 More precisely: prevent eliding objects that contain
 TrustedHeapConstant, because it can lead to this constant flowing into
@@ -23,13 +23,12 @@ Commit-Queue: Gyuyoung Kim (xWF) <[email protected]>
 Cr-Commit-Position: refs/branch-heads/13.2@{#82}
 Cr-Branched-From: 24068c59cedad9ee976ddc05431f5f497b1ebd71-refs/heads/13.2.152@{#1}
 Cr-Branched-From: 6054ba94db0969220be4f94dc1677fc4696bdc4f-refs/heads/main@{#97085}
----
 
 diff --git a/src/compiler/escape-analysis.cc b/src/compiler/escape-analysis.cc
-index eb223bc..c9a7bc9 100644
+index eb223bc9113b0af22a61c81c879c1ef5a9ec9ba8..c9a7bc999a7163d4b034c9a3b9ab610766f39ea6 100644
 --- a/src/compiler/escape-analysis.cc
 +++ b/src/compiler/escape-analysis.cc
-@@ -622,6 +622,16 @@
+@@ -622,6 +622,16 @@ void ReduceNode(const Operator* op, EscapeAnalysisTracker::Scope* current,
        Node* value = current->ValueInput(1);
        const VirtualObject* vobject = current->GetVirtualObject(object);
        Variable var;

+ 11 - 3
script/push-patch.js

@@ -2,23 +2,31 @@ const { appCredentialsFromString, getTokenForRepo } = require('@electron/github-
 
 const cp = require('node:child_process');
 
+const { PATCH_UP_APP_CREDS } = process.env;
+
 async function main () {
+  if (!PATCH_UP_APP_CREDS) {
+    throw new Error('PATCH_UP_APP_CREDS environment variable not set');
+  }
+
   const token = await getTokenForRepo(
     {
       name: 'electron',
       owner: 'electron'
     },
-    appCredentialsFromString(process.env.PATCH_UP_APP_CREDS)
+    appCredentialsFromString(PATCH_UP_APP_CREDS)
   );
+
   const remoteURL = `https://x-access-token:${token}@github.com/electron/electron.git`;
+
   // NEVER LOG THE OUTPUT OF THIS COMMAND
   // GIT LEAKS THE ACCESS CREDENTIALS IN CONSOLE LOGS
   const { status } = cp.spawnSync('git', ['push', '--set-upstream', remoteURL], {
     stdio: 'ignore'
   });
+
   if (status !== 0) {
-    console.error('Failed to push to target branch');
-    process.exit(1);
+    throw new Error('Failed to push to target branch');
   }
 }