mirror of
https://github.com/electron/electron.git
synced 2026-01-10 07:58:08 -05:00
chore: bump chromium to 138.0.7160.0 (main) (#46915)
* chore: bump chromium in DEPS to 138.0.7158.0 * chore: bump chromium in DEPS to 138.0.7160.0 * 6509206: Move Keychain UI suppression code into apple_keychain.cc https://chromium-review.googlesource.com/c/chromium/src/+/6509206 * 6489036: Fix DesktopDataControlsDialog for Glic https://chromium-review.googlesource.com/c/chromium/src/+/6489036 * chore: fixup patch indices * 6506662: Reland "NavigationThrottleRunner2: content::NavigationThrottleRegistry" https://chromium-review.googlesource.com/c/chromium/src/+/6506662 * 6499811: [video pip] Add live caption dialog https://chromium-review.googlesource.com/c/chromium/src/+/6499811 * 6487926: Add GetMaxImageDimension function to ScreenAI service API for OCR. https://chromium-review.googlesource.com/c/chromium/src/+/6487926 * 6494942: [json] Activate stringify fast-path by default https://chromium-review.googlesource.com/c/v8/v8/+/6494942 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9460300506
commit
b90de7d07e
@@ -49,3 +49,4 @@ fix_cppgc_initializing_twice.patch
|
||||
fix_task_starvation_in_inspector_context_test.patch
|
||||
zlib_fix_pointer_alignment.patch
|
||||
fix_expose_readfilesync_override_for_modules.patch
|
||||
test_force_slow_json_stringify_path_for_overflow.patch
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Mon, 5 May 2025 13:04:14 +0000
|
||||
Subject: test: force slow JSON.stringify path for overflow
|
||||
|
||||
Refs https://chromium-review.googlesource.com/c/v8/v8/+/6011806
|
||||
|
||||
The V8 team just enabled the JSON.stringify fast path by default,
|
||||
which is iterative and won't throw. Pre-emptively preserve test
|
||||
functionality by forcing the slow path. See above linked PR for
|
||||
approach this is borrowed from.
|
||||
|
||||
Upstreamed in https://github.com/nodejs/node/pull/58181.
|
||||
|
||||
diff --git a/test/fixtures/console/stack_overflow.js b/test/fixtures/console/stack_overflow.js
|
||||
index 565692b6d6e4ba4c439a38250407004c5aa21df9..14bceef878b5cf27609b29c8cc7852cab4dd63ff 100644
|
||||
--- a/test/fixtures/console/stack_overflow.js
|
||||
+++ b/test/fixtures/console/stack_overflow.js
|
||||
@@ -26,11 +26,15 @@ Error.stackTraceLimit = 0;
|
||||
|
||||
console.error('before');
|
||||
|
||||
+// Invalidate elements protector to force slow-path.
|
||||
+// The fast-path of JSON.stringify is iterative and won't throw.
|
||||
+Array.prototype[2] = 'foo';
|
||||
+
|
||||
// Trigger stack overflow by stringifying a deeply nested array.
|
||||
-let array = [];
|
||||
-for (let i = 0; i < 100000; i++) {
|
||||
- array = [ array ];
|
||||
-}
|
||||
+// eslint-disable-next-line no-sparse-arrays
|
||||
+let array = [,];
|
||||
+for (let i = 0; i < 10000; i++)
|
||||
+ array = [array];
|
||||
|
||||
JSON.stringify(array);
|
||||
|
||||
Reference in New Issue
Block a user