electron/patches/node/chore_remove_--no-harmony-atomics_related_code.patch
electron-roller[bot] 653d0f009e
chore: bump node to v20.13.1 (main) (#42088)
* chore: bump node in DEPS to v20.13.0

* crypto: enable NODE_EXTRA_CA_CERTS with BoringSSL

https://github.com/nodejs/node/pull/52217

* test: skip test for dynamically linked OpenSSL

https://github.com/nodejs/node/pull/52542

* lib, url: add a `windows` option to path parsing

https://github.com/nodejs/node/pull/52509

* src: use dedicated routine to compile function for builtin CJS loader

https://github.com/nodejs/node/pull/52016

* test: mark test as flaky

https://github.com/nodejs/node/pull/52671

* build,tools: add test-ubsan ci

https://github.com/nodejs/node/pull/46297

* src: preload function for Environment

https://github.com/nodejs/node/pull/51539

* chore: fixup patch indices

* deps: update c-ares to 1.28.1

https://github.com/nodejs/node/pull/52285

* chore: handle updated filenames

- https://github.com/nodejs/node/pull/51999
- https://github.com/nodejs/node/pull/51927

* chore: bump node in DEPS to v20.13.1

* events: extract addAbortListener for safe internal use

https://github.com/nodejs/node/pull/52081

* module: print location of unsettled top-level await in entry points

https://github.com/nodejs/node/pull/51999

* fs: add stacktrace to fs/promises

https://github.com/nodejs/node/pull/49849

* chore: update patches

---------

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>
2024-05-13 11:43:14 -04:00

52 lines
2.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 19 Apr 2023 14:13:23 +0200
Subject: chore: remove --no-harmony-atomics related code
This was removed in https://chromium-review.googlesource.com/c/v8/v8/+/4416459.
This patch can be removed when Node.js upgrades to a version of V8 containing
the above CL.
diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml
index 0cf84a0da5ee9e63d7b01d0a27946fc29090e516..ee16099ddc9abe5c19b319c111d1319c33b17be4 100644
--- a/lib/.eslintrc.yaml
+++ b/lib/.eslintrc.yaml
@@ -30,10 +30,6 @@ rules:
message: Use `const { AbortController } = require('internal/abort_controller');` instead of the global.
- name: AbortSignal
message: Use `const { AbortSignal } = require('internal/abort_controller');` instead of the global.
- # Atomics is not available in primordials because it can be
- # disabled with --no-harmony-atomics CLI flag.
- - name: Atomics
- message: Use `const { Atomics } = globalThis;` instead of the global.
- name: Blob
message: Use `const { Blob } = require('buffer');` instead of the global.
- name: BroadcastChannel
diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js
index 30f7a5f79e50fdeb4e1775a0e56dafa4c6908898..f7250985277c4127425ef36dff566c1fe06603e2 100644
--- a/lib/internal/main/worker_thread.js
+++ b/lib/internal/main/worker_thread.js
@@ -112,7 +112,7 @@ port.on('message', (message) => {
require('internal/worker').assignEnvironmentData(environmentData);
- if (SharedArrayBuffer !== undefined && Atomics !== undefined) {
+ if (SharedArrayBuffer !== undefined) {
// The counter is only passed to the workers created by the main thread,
// not to workers created by other workers.
let cachedCwd = '';
diff --git a/lib/internal/worker.js b/lib/internal/worker.js
index 401bc43550ea7f19847dfd588e3fba0507243905..560f69c6c2de2bd976bcd62cd7ac9c770b838446 100644
--- a/lib/internal/worker.js
+++ b/lib/internal/worker.js
@@ -101,8 +101,7 @@ let cwdCounter;
const environmentData = new SafeMap();
// SharedArrayBuffers can be disabled with --no-harmony-sharedarraybuffer.
-// Atomics can be disabled with --no-harmony-atomics.
-if (isMainThread && SharedArrayBuffer !== undefined && Atomics !== undefined) {
+if (isMainThread && SharedArrayBuffer !== undefined) {
cwdCounter = new Uint32Array(new SharedArrayBuffer(4));
const originalChdir = process.chdir;
process.chdir = function(path) {