Compare commits

...

28 Commits

Author SHA1 Message Date
Sudowoodo Release Bot
b63c190fe6 Bump v18.0.0-nightly.20220104 2022-01-04 05:01:25 -08:00
Shubham Kumar
cbdb2e6ec2 fix: #32141 register wrong command for setAsDefaultProtocolClient for windows (#32220) 2022-01-04 10:47:28 +09:00
Maciej Krawczyk
84f1d78558 docs: correct webFrame description (#32205)
The current description incorrectly states that the webFrame export represents the top frame but it actually represents the current frame.
2022-01-04 10:12:55 +09:00
Darshan Sen
4600d7e7f6 fix: crash caused by app.getLocaleCountryCode() (#32256)
CFLocaleGetValue() returned null and crashed the process when
app.getLocaleCountryCode() was run on a CircleCI metal resource class
macOS instance with Xcode 12.5.1. This change fixes that logic and adds
further checks to make the code future-proof.

Here too people are complaining that the returned country code migth be
null: https://stackoverflow.com/questions/15202454/nslocalecountrycode-returns-nil

Signed-off-by: Darshan Sen <darshan.sen@postman.com>
2022-01-03 13:54:58 -08:00
Duncan Hewett
2c700da4de docs: add Bugsnag as a 3rd party crash server (#32053) 2022-01-03 14:48:15 -05:00
Oran C
195d2b5b3e [fix] Docs rendering issue with rendering on electronjs quick-start (#32293)
there is a issue with rendering on the bottom of page https://www.electronjs.org/docs/v14-x-y/tutorial/quick-start
which looks like this
![](https://dl3.pushbulletusercontent.com/MXsLhjaoKRj1bhu4R73E3WLiuKCBMkgh/image.png)

all id did is remove the spacing and it should fix the issue. sometimes having spaces before a "```" will cause issues

hope this helps!
2022-01-03 11:18:02 -08:00
Romain Pokrzywka
727453ef04 build: remove stale dependency for webrtc desktop capture module (#32304)
WebRTC has changed how they integrate into Chromium, they don't
expose their dependencies externally anymore. Instead, one must
now go through webrtc_overrides:
https://chromium.googlesource.com/chromium/src.git/+/cbc90fd093956

We're already including webrtc_overrides as a dependency which
includes the modules, so this extra deps isn't needed anymore.
2022-01-03 11:57:00 -05:00
Sudowoodo Release Bot
84451e7daf Bump v18.0.0-nightly.20220103 2022-01-03 05:04:24 -08:00
ganthern
f766bb483d docs: fix typo in bug report issue template (#32208) 2022-01-03 10:35:19 +01:00
Jack Nemitz
1d8612ad5d Fix typo in quick-start.md (#32282)
Resolve a grammar issue in the quick-start guide.
2022-01-03 09:59:55 +01:00
Sudowoodo Release Bot
ac39cb14e9 Bump v18.0.0-nightly.20211231 2021-12-31 05:01:03 -08:00
Sudowoodo Release Bot
f1b0d30d8d Bump v18.0.0-nightly.20211229 2021-12-29 05:01:36 -08:00
Sudowoodo Release Bot
d59a4a0771 Bump v18.0.0-nightly.20211228 2021-12-28 05:01:13 -08:00
Sudowoodo Release Bot
6b2adea867 Revert "Bump v18.0.0-nightly.20211227"
This reverts commit 66a55ba778.
2021-12-27 11:35:06 -08:00
Sudowoodo Release Bot
66a55ba778 Bump v18.0.0-nightly.20211227 2021-12-27 05:01:32 -08:00
Sudowoodo Release Bot
f17e8996ac Bump v18.0.0-nightly.20211223 2021-12-23 05:02:41 -08:00
Sudowoodo Release Bot
b433163d7a Bump v18.0.0-nightly.20211222 2021-12-22 05:04:57 -08:00
Sudowoodo Release Bot
79eaef4aab Bump v18.0.0-nightly.20211221 2021-12-21 05:01:15 -08:00
Sudowoodo Release Bot
2b25e737a7 Bump v18.0.0-nightly.20211220 2021-12-20 05:02:21 -08:00
Keeley Hammond
ffbaa1d83f fix: check for single bluetooth listener (#32240) 2021-12-17 16:55:43 -08:00
Sudowoodo Release Bot
909dbe6890 Bump v18.0.0-nightly.20211217 2021-12-17 05:01:12 -08:00
electron-roller[bot]
eaae6c1553 chore: bump node to v16.13.1 (main) (#32086)
* chore: bump node in DEPS to v16.13.1

* update patches

* update c-ares BUILD.gn

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: clavin <clavin@electronjs.org>
2021-12-16 14:41:25 -08:00
Micha Hanselmann
e9420982d2 fix: older systems crash when playing media files (#32046)
* fix: win7 crash when playing media

* reset

* chore: update patches

Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
2021-12-16 09:23:30 -08:00
Sudowoodo Release Bot
c1b3b3064b Bump v18.0.0-nightly.20211216 2021-12-16 05:00:36 -08:00
Samuel Attard
a11f5cbb27 fix: ensure bluetooth devices are not returned by default (#32178) 2021-12-15 11:46:48 -08:00
Sudowoodo Release Bot
1facbb4a09 Bump v18.0.0-nightly.20211215 2021-12-15 05:02:27 -08:00
Dennis
d5b6a2f800 Update discord url to electronjs (#32173)
The discord url in this page is discord.gg/electron, which refers to a (supposed) roblox scripting group.
2021-12-14 13:25:56 -08:00
Sudowoodo Release Bot
292409a301 Bump v18.0.0-nightly.20211214 2021-12-14 05:01:26 -08:00
28 changed files with 114 additions and 178 deletions

View File

@@ -12,7 +12,7 @@ body:
required: true
- label: I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
required: true
- label: I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a feature request that matches the one I want to file, without success.
- label: I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.
required: true
- type: input
attributes:

View File

@@ -632,12 +632,6 @@ source_set("electron_lib") {
}
if (enable_desktop_capturer) {
if (is_component_build && !is_linux) {
# On windows the implementation relies on unexported
# DxgiDuplicatorController class. On macOS the implementation
# relies on unexported webrtc::GetWindowOwnerPid method.
deps += [ "//third_party/webrtc/modules/desktop_capture" ]
}
sources += [
"shell/browser/api/electron_api_desktop_capturer.cc",
"shell/browser/api/electron_api_desktop_capturer.h",

2
DEPS
View File

@@ -17,7 +17,7 @@ vars = {
'chromium_version':
'98.0.4706.0',
'node_version':
'v16.13.0',
'v16.13.1',
'nan_version':
# The following commit hash of NAN is v2.14.2 with *only* changes to the
# test suite. This should be updated to a specific tag when one becomes

View File

@@ -1 +1 @@
18.0.0-nightly.20211213
18.0.0-nightly.20220104

View File

@@ -27,6 +27,7 @@ Or use a 3rd party hosted solution:
* [Backtrace](https://backtrace.io/electron/)
* [Sentry](https://docs.sentry.io/clients/electron)
* [BugSplat](https://www.bugsplat.com/docs/platforms/electron)
* [Bugsnag](https://docs.bugsnag.com/platforms/electron/)
Crash reports are stored temporarily before being uploaded in a directory
underneath the app's user data directory, called 'Crashpad'. You can override

View File

@@ -736,6 +736,8 @@ first available device will be selected. `callback` should be called with
`deviceId` to be selected, passing empty string to `callback` will
cancel the request.
If no event listener is added for this event, all bluetooth requests will be cancelled.
```javascript
const { app, BrowserWindow } = require('electron')

View File

@@ -5,8 +5,8 @@
Process: [Renderer](../glossary.md#renderer-process)
`webFrame` export of the Electron module is an instance of the `WebFrame`
class representing the top frame of the current `BrowserWindow`. Sub-frames can
be retrieved by certain properties and methods (e.g. `webFrame.firstChild`).
class representing the current frame. Sub-frames can be retrieved by
certain properties and methods (e.g. `webFrame.firstChild`).
An example of zooming current page to 200%.

View File

@@ -56,4 +56,4 @@ problem. If not, feel free to fill out our bug report template and submit a new
[comic]: https://www.google.com/googlebooks/chrome/
[fiddle]: https://electronjs.org/fiddle
[issue-tracker]: https://github.com/electron/electron/issues
[discord]: https://discord.gg/electron
[discord]: https://discord.gg/electronjs

View File

@@ -119,7 +119,7 @@ of your project.
Before we can create a window for our application, we need to create the content that
will be loaded into it. In Electron, each window displays web contents that can be loaded
from either from a local HTML file or a remote URL.
from either a local HTML file or a remote URL.
For this tutorial, you will be doing the former. Create an `index.html` file in the root
folder of your project:
@@ -463,46 +463,46 @@ The fastest way to distribute your newly created app is using
1. Add Electron Forge as a development dependency of your app, and use its `import` command to set up
Forge's scaffolding:
```sh npm2yarn
npm install --save-dev @electron-forge/cli
npx electron-forge import
```sh npm2yarn
npm install --save-dev @electron-forge/cli
npx electron-forge import
✔ Checking your system
✔ Initializing Git Repository
✔ Writing modified package.json file
✔ Installing dependencies
✔ Writing modified package.json file
✔ Fixing .gitignore
✔ Checking your system
✔ Initializing Git Repository
✔ Writing modified package.json file
✔ Installing dependencies
✔ Writing modified package.json file
✔ Fixing .gitignore
We have ATTEMPTED to convert your app to be in a format that electron-forge understands.
We have ATTEMPTED to convert your app to be in a format that electron-forge understands.
Thanks for using "electron-forge"!!!
```
Thanks for using "electron-forge"!!!
```
1. Create a distributable using Forge's `make` command:
```sh npm2yarn
npm run make
```sh npm2yarn
npm run make
> my-electron-app@1.0.0 make /my-electron-app
> electron-forge make
> my-electron-app@1.0.0 make /my-electron-app
> electron-forge make
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: zip
✔ Making for target: zip - On platform: darwin - For arch: x64
```
✔ Checking your system
✔ Resolving Forge Config
We need to package your application before we can make it
✔ Preparing to Package Application for arch: x64
✔ Preparing native dependencies
✔ Packaging Application
Making for the following targets: zip
✔ Making for target: zip - On platform: darwin - For arch: x64
```
Electron Forge creates the `out` folder where your package will be located:
Electron Forge creates the `out` folder where your package will be located:
```plain
// Example for macOS
out/
├── out/make/zip/darwin/x64/my-electron-app-darwin-x64-1.0.0.zip
├── ...
└── out/my-electron-app-darwin-x64/my-electron-app.app/Contents/MacOS/my-electron-app
```
```plain
// Example for macOS
out/
├── out/make/zip/darwin/x64/my-electron-app-darwin-x64-1.0.0.zip
├── ...
└── out/my-electron-app-darwin-x64/my-electron-app.app/Contents/MacOS/my-electron-app
```

View File

@@ -749,6 +749,14 @@ WebContents.prototype._init = function () {
}
});
this.on('select-bluetooth-device', (event, devices, callback) => {
if (this.listenerCount('select-bluetooth-device') === 1) {
// Cancel it if there are no handlers
event.preventDefault();
callback('');
}
});
const event = process._linkedBinding('electron_browser_event').createEmpty();
app.emit('web-contents-created', event, this);

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "18.0.0-nightly.20211213",
"version": "18.0.0-nightly.20220104",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {

View File

@@ -59,7 +59,7 @@ index ad366d0fd4c3a637d75a102ab56984f0d01bfc04..d63eb133fd4bab1ea309bb8c742acf88
// true if register successfully, or false if 1) the specificied |accelerator|
// has been registered by another caller or other native applications, or
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
index 5938f75742b793868638e693a9a8c8dc686dfc46..1137ea6c6b2b14f912b400e3cc43dc6fd0243407 100644
index 5938f75742b793868638e693a9a8c8dc686dfc46..7f30f3fdd2c63612232e31c331b26b17ad729efb 100644
--- a/content/browser/media/media_keys_listener_manager_impl.cc
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
@@ -55,7 +55,12 @@ bool MediaKeysListenerManagerImpl::StartWatchingMediaKey(
@@ -76,32 +76,28 @@ index 5938f75742b793868638e693a9a8c8dc686dfc46..1137ea6c6b2b14f912b400e3cc43dc6f
!media_keys_listener_->StartWatchingMediaKey(key_code)) {
return false;
}
@@ -231,18 +236,16 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
media::AudioManager::GetGlobalAppName());
@@ -232,18 +237,18 @@ void MediaKeysListenerManagerImpl::StartListeningForMediaKeysIfNecessary() {
#endif
- if (system_media_controls_) {
- system_media_controls_->AddObserver(this);
- system_media_controls_notifier_ =
- std::make_unique<SystemMediaControlsNotifier>(
- system_media_controls_.get());
if (system_media_controls_) {
+ // This is required for proper functioning of MediaMetadata.
system_media_controls_->AddObserver(this);
system_media_controls_notifier_ =
std::make_unique<SystemMediaControlsNotifier>(
system_media_controls_.get());
- } else {
- // If we can't access system media controls, then directly listen for media
- // key keypresses instead.
- media_keys_listener_ = ui::MediaKeysListener::Create(
- this, ui::MediaKeysListener::Scope::kGlobal);
- DCHECK(media_keys_listener_);
- }
+ // This is required for proper functioning of MediaMetadata.
+ system_media_controls_->AddObserver(this);
+ system_media_controls_notifier_ =
+ std::make_unique<SystemMediaControlsNotifier>(
+ system_media_controls_.get());
+
}
+ // Directly listen for media key keypresses when using GlobalShortcuts.
+ media_keys_listener_ = ui::MediaKeysListener::Create(
+ this, ui::MediaKeysListener::Scope::kGlobal);
+ DCHECK(media_keys_listener_);
+
EnsureAuxiliaryServices();
}

View File

@@ -23,8 +23,6 @@ add_should_read_node_options_from_env_option_to_disable_node_options.patch
repl_fix_crash_when_sharedarraybuffer_disabled.patch
fix_readbarrier_undefined_symbol_error_on_woa_arm64.patch
chore_fix_-wimplicit-fallthrough.patch
fix_event_with_invalid_timestamp_in_trace_log.patch
test_fix_test-datetime-change-notify_after_daylight_change.patch
test_add_fixture_trim_option.patch
fix_crash_caused_by_gethostnamew_on_windows_7.patch
fix_suppress_clang_-wdeprecated-declarations_in_libuv.patch

View File

@@ -7,7 +7,7 @@ Subject: add should_read_node_options_from_env option to disable NODE_OPTIONS
We can remove the NODE_OPTIONS environment variable but it in theory could be injected / re-inserted at runtime and be used for workers. In order to ensure the fuse is respected we need a hard runtime toggle for NODE_OPTION support.
diff --git a/src/env.cc b/src/env.cc
index 1cc7da1ce15f43905ce607adcc1a23ed9d92948a..16af6aec3791df1363682f1ed024c52208b9a8f6 100644
index 2cb2dccdf32ba4ad58972bb1d2b185996104b5ee..0abd61d6ddd1fb55afde40b38cf7c9400a8c3d41 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -329,6 +329,9 @@ std::string GetExecPath(const std::vector<std::string>& argv) {

View File

@@ -406,19 +406,16 @@ index 0000000000000000000000000000000000000000..d0641c5cbc3c527ce7a73d12118fb42d
+}
diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..8e0aa4b7a858ab432dca9da9ead9fcf44f6009f4
index 0000000000000000000000000000000000000000..71a37834f4e693c190eb7e7d04e3f5ce67c487ad
--- /dev/null
+++ b/deps/cares/BUILD.gn
@@ -0,0 +1,133 @@
@@ -0,0 +1,134 @@
+config("cares_config") {
+ include_dirs = [ "include", "src/lib" ]
+}
+static_library("cares") {
+ defines = [ "CARES_STATICLIB" ]
+ include_dirs = [
+ "include",
+ "src/lib",
+ ]
+ include_dirs = [ "include" ]
+ public_configs = [ ":cares_config" ]
+
+ libs = []
@@ -431,8 +428,11 @@ index 0000000000000000000000000000000000000000..8e0aa4b7a858ab432dca9da9ead9fcf4
+ sources = [
+ "include/ares.h",
+ "include/ares_dns.h",
+ "include/ares_nameser.h",
+ "include/ares_rules.h",
+ "include/ares_version.h",
+ "src/lib/ares__addrinfo2hostent.c",
+ "src/lib/ares__addrinfo_localhost.c",
+ "src/lib/ares_android.c",
+ "src/lib/ares_cancel.c",
+ "src/lib/ares__close_sockets.c",
@@ -475,6 +475,7 @@ index 0000000000000000000000000000000000000000..8e0aa4b7a858ab432dca9da9ead9fcf4
+ "src/lib/ares_parse_soa_reply.c",
+ "src/lib/ares_parse_srv_reply.c",
+ "src/lib/ares_parse_txt_reply.c",
+ "src/lib/ares_parse_uri_reply.c",
+ "src/lib/ares_platform.h",
+ "src/lib/ares_private.h",
+ "src/lib/ares_process.c",
@@ -1774,7 +1775,7 @@ index 0000000000000000000000000000000000000000..d1d6b51e8c0c5bc6a5d09e217eb30483
+ args = rebase_path(inputs + outputs, root_build_dir)
+}
diff --git a/src/node_version.h b/src/node_version.h
index 08e957472cfeca84af8cdc951af3c0de99c7b56c..330d77e868a50e1d0b71d773ab6b4b337ab20428 100644
index e46385fd509a4852e3e2ded064fd2b84d95921a4..fa098c7bf3aaa08c060ea014b7a96b719fea6abf 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -89,7 +89,10 @@

View File

@@ -35,7 +35,7 @@ index b45af42d12ff7df8a9e125e87f51af3456811c23..c84ff7feb07aebf656ada7e37d812d9d
async function* watch(filename, options = {}) {
const path = toNamespacedPath(getValidatedPath(filename));
diff --git a/src/node_native_module.cc b/src/node_native_module.cc
index c4fd96c75c1862289d9cabccfbc9bfc3a5ee523d..3c9e5498e6b9c62813ef93ca77558ead753ac797 100644
index 006a30903184d76d6c11849784e6c6b38fd39807..edde37f281c10a1cb69db642149cc300744499cb 100644
--- a/src/node_native_module.cc
+++ b/src/node_native_module.cc
@@ -20,6 +20,7 @@ NativeModuleLoader NativeModuleLoader::instance_;

View File

@@ -8,10 +8,10 @@ they use themselves as the entry point. We should try to upstream some form
of this.
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index 9d2799c3c9ac3b216c2289ae4e037dd228844d23..5b31df1207d4417a6f9b784574e3779650ba21d2 100644
index 4d4996e9868c35ac3e0babbf08c38d90a6857abc..419ffd9d5deb84eb94381259d3084411f6c3341b 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -105,10 +105,12 @@ function patchProcessObject(expandArgv1) {
@@ -104,10 +104,12 @@ function patchProcessObject(expandArgv1) {
if (expandArgv1 && process.argv[1] &&
!StringPrototypeStartsWith(process.argv[1], '-')) {
// Expand process.argv[1] into a full path.

View File

@@ -8,7 +8,7 @@ node modules will have different (wrong) ideas about how v8 structs are laid
out in memory on 64-bit machines, and will summarily fail to work.
diff --git a/common.gypi b/common.gypi
index 506d91edaa1dc1ffbcad7986d05c9e667c296a8e..caf0aa630892297b2751f44b44ae68974ece900e 100644
index 4b6a965f65b9ad711507e4dd7ade4d54d52277cc..9e4064b263819756f17fb712a54bd6f828c5be35 100644
--- a/common.gypi
+++ b/common.gypi
@@ -64,7 +64,7 @@
@@ -20,9 +20,9 @@ index 506d91edaa1dc1ffbcad7986d05c9e667c296a8e..caf0aa630892297b2751f44b44ae6897
# Disable V8 untrusted code mitigations.
# See https://github.com/v8/v8/wiki/Untrusted-code-mitigations
@@ -125,6 +125,9 @@
'obj_dir%': '<(PRODUCT_DIR)/obj.target',
'v8_base': '<(PRODUCT_DIR)/libv8_snapshot.a',
@@ -130,6 +130,9 @@
'v8_enable_pointer_compression': 0,
'v8_enable_31bit_smis_on_64bit_arch': 0,
}],
+ ['target_arch == "arm64" or target_arch == "x64"', {
+ 'v8_enable_pointer_compression': 1,

View File

@@ -6,10 +6,10 @@ Subject: feat: initialize asar support
This patch initializes asar support in Node.js.
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index a4c73cba5481b3005474742483a554c93358c4e1..9d2799c3c9ac3b216c2289ae4e037dd228844d23 100644
index f2a10641906e317270e7f27f4ee3ee1956802113..4d4996e9868c35ac3e0babbf08c38d90a6857abc 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -77,6 +77,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
@@ -76,6 +76,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {
assert(!CJSLoader.hasLoadedAnyUserCJSModule);
loadPreloadModules();
initializeFrozenIntrinsics();
@@ -17,7 +17,7 @@ index a4c73cba5481b3005474742483a554c93358c4e1..9d2799c3c9ac3b216c2289ae4e037dd2
}
function patchProcessObject(expandArgv1) {
@@ -485,6 +486,10 @@ function loadPreloadModules() {
@@ -484,6 +485,10 @@ function loadPreloadModules() {
}
}

View File

@@ -7,7 +7,7 @@ common.gypi is a file that's included in the node header bundle, despite
the fact that we do not build node with gyp.
diff --git a/common.gypi b/common.gypi
index 6862acc20b31c5bd819159911c0f3d4a2e42a0c1..506d91edaa1dc1ffbcad7986d05c9e667c296a8e 100644
index b8d61f0d32709f3476dd2fd870d3959ab8f16a60..4b6a965f65b9ad711507e4dd7ade4d54d52277cc 100644
--- a/common.gypi
+++ b/common.gypi
@@ -81,6 +81,23 @@

View File

@@ -6,7 +6,7 @@ Subject: fix: add v8_enable_reverse_jsargs defines in common.gypi
This can be removed once node upgrades V8 and inevitably has to do this exact same thing. Also hi node people if you are looking at this.
diff --git a/common.gypi b/common.gypi
index caf0aa630892297b2751f44b44ae68974ece900e..8a85c7c3d0ab0e2906c417f2cc2fc9ca584fd601 100644
index 9e4064b263819756f17fb712a54bd6f828c5be35..2e59efb38d95231fcbcbb5a7859a6cfad3cf232c 100644
--- a/common.gypi
+++ b/common.gypi
@@ -65,6 +65,7 @@
@@ -25,7 +25,7 @@ index caf0aa630892297b2751f44b44ae68974ece900e..8a85c7c3d0ab0e2906c417f2cc2fc9ca
##### end V8 defaults #####
# When building native modules using 'npm install' with the system npm,
@@ -385,6 +387,9 @@
@@ -390,6 +392,9 @@
['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', {
'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'],
}],

View File

@@ -391,7 +391,7 @@ index dd073274aef765e8f1e403aa2c8baf9694b521cb..fc6339e040debe61ecc61a3eb5b26823
}
diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
index cae9301517c37c7e90292d71fe5a6086cf55e0be..b9bc86e4d8b897cec583dea16f64f680252d2efa 100644
index 18721fcf289e5545408e309db050a2ff0f4b0140..e5235e0a5fbd68416b4a9480818901b411ed91bd 100644
--- a/test/parallel/test-crypto-dh.js
+++ b/test/parallel/test-crypto-dh.js
@@ -49,7 +49,7 @@ for (const bits of [-1, 0, 1]) {
@@ -421,7 +421,7 @@ index cae9301517c37c7e90292d71fe5a6086cf55e0be..b9bc86e4d8b897cec583dea16f64f680
};
assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
@@ -155,18 +155,17 @@ assert.strictEqual(secret1, secret4);
@@ -133,18 +133,17 @@ assert.strictEqual(secret1, secret4);
let wrongBlockLength;
if (common.hasOpenSSL3) {
wrongBlockLength = {

View File

@@ -1,28 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cezary Kulakowski <cezary@openfin.co>
Date: Fri, 8 Oct 2021 11:18:58 +0200
Subject: fix: event with invalid timestamp in trace log
When node is started within Electron's environment it doesn't
initialize v8 and time of v8's start is never set. As a result
we log v8's start time as 0 and it breaks timestamps in the
trace log. With this change we log v8's start time only when
it was initialized by node.
diff --git a/src/env.cc b/src/env.cc
index 16af6aec3791df1363682f1ed024c52208b9a8f6..ada0faa93bc223ffbea79a4308796df73ea8ae4e 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -461,8 +461,10 @@ void Environment::InitializeMainContext(Local<Context> context,
environment_start_time_);
performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_NODE_START,
per_process::node_start_time);
- performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START,
- performance::performance_v8_start);
+ if (per_process::v8_initialized) {
+ performance_state_->Mark(performance::NODE_PERFORMANCE_MILESTONE_V8_START,
+ performance::performance_v8_start);
+ }
}
Environment::~Environment() {

View File

@@ -86,10 +86,10 @@ index cc03fddd464b09dd3647e3f5183dc3c49affc94f..3aa6b40ab9b10cdd56002e9f020a6f6b
if (!Set(env->context(),
obj,
diff --git a/src/crypto/crypto_dh.cc b/src/crypto/crypto_dh.cc
index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e1609f519c89 100644
index 7e99759654e8b9272c48e0e6c0637f4327dc1615..612ed87ce396e285719a9efc8c346adb6d29b366 100644
--- a/src/crypto/crypto_dh.cc
+++ b/src/crypto/crypto_dh.cc
@@ -122,13 +122,11 @@ void DiffieHellman::MemoryInfo(MemoryTracker* tracker) const {
@@ -144,13 +144,11 @@ void DiffieHellman::MemoryInfo(MemoryTracker* tracker) const {
bool DiffieHellman::Init(const char* p, int p_len, int g) {
dh_.reset(DH_new());
if (p_len <= 0) {
@@ -105,7 +105,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160
return false;
}
BIGNUM* bn_p =
@@ -146,21 +144,18 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) {
@@ -168,21 +166,18 @@ bool DiffieHellman::Init(const char* p, int p_len, int g) {
bool DiffieHellman::Init(const char* p, int p_len, const char* g, int g_len) {
dh_.reset(DH_new());
if (p_len <= 0) {
@@ -130,7 +130,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160
return false;
}
BIGNUM* bn_p =
@@ -480,16 +475,20 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
@@ -502,16 +497,20 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
if (!BN_set_word(bn_g.get(), params->params.generator) ||
!DH_set0_pqg(dh.get(), prime, nullptr, bn_g.get()))
return EVPKeyCtxPointer();
@@ -152,7 +152,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160
if (!param_ctx ||
EVP_PKEY_paramgen_init(param_ctx.get()) <= 0 ||
EVP_PKEY_CTX_set_dh_paramgen_prime_len(
@@ -501,8 +500,10 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
@@ -523,8 +522,10 @@ EVPKeyCtxPointer DhKeyGenTraits::Setup(DhKeyPairGenConfig* params) {
EVP_PKEY_paramgen(param_ctx.get(), &raw_params) <= 0) {
return EVPKeyCtxPointer();
}
@@ -165,7 +165,7 @@ index 86475e3b1b1e017c7b81a858354632accf9618de..02fa7d27cecea61b4321b551c2f6e160
EVPKeyCtxPointer ctx(EVP_PKEY_CTX_new(key_params.get(), nullptr));
diff --git a/src/crypto/crypto_dsa.cc b/src/crypto/crypto_dsa.cc
index 271db427fa8539feb30c1712574976fb1f623e91..b2b6af1f9e6db54bdff0be7a567255f47da7b918 100644
index c7894baf00ee9ce4684f4c752f1c7c9b98163741..655895dbff8b88daa53c7b40a5feca42a461b689 100644
--- a/src/crypto/crypto_dsa.cc
+++ b/src/crypto/crypto_dsa.cc
@@ -29,7 +29,7 @@ namespace crypto {
@@ -211,7 +211,7 @@ index 0aa96ada47abe4b66fb616c665101278bbe0afb6..1e9a4863c5faea5f6b275483ca16f3a6
void HKDFConfig::MemoryInfo(MemoryTracker* tracker) const {
diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc
index 7cb4513f9ad0eaadd055b169520ae1e5073b7e2d..50a6663966cdb147a702df21240fa449850c3549 100644
index fc88deb460314c2620d842ec30141bcd13109d60..c097ccfcffb1158317ba09e7c4beb725ccbab74f 100644
--- a/src/crypto/crypto_random.cc
+++ b/src/crypto/crypto_random.cc
@@ -150,7 +150,7 @@ Maybe<bool> RandomPrimeTraits::AdditionalConfig(
@@ -224,7 +224,7 @@ index 7cb4513f9ad0eaadd055b169520ae1e5073b7e2d..50a6663966cdb147a702df21240fa449
THROW_ERR_CRYPTO_OPERATION_FAILED(env, "could not generate prime");
return Nothing<bool>();
diff --git a/src/crypto/crypto_rsa.cc b/src/crypto/crypto_rsa.cc
index d2307c33f5de8733b1343225a3fe6a700d1f51e4..0870657be060a58aa3337c0b9e4b8cabe4a31128 100644
index ae4550e9fde8120c35409e495d5b763a95546509..188a7efe76df2a1aa2eb2746f4d748361bba4fb4 100644
--- a/src/crypto/crypto_rsa.cc
+++ b/src/crypto/crypto_rsa.cc
@@ -621,10 +621,11 @@ Maybe<bool> GetRsaKeyDetail(
@@ -244,10 +244,10 @@ index d2307c33f5de8733b1343225a3fe6a700d1f51e4..0870657be060a58aa3337c0b9e4b8cab
if (target
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d28652c405e1 100644
index fec0a493c985f1fb716dd6222e438b430947f2a1..1a7d26ad134b094d02023c99934b8ac7a4bb18d7 100644
--- a/src/crypto/crypto_util.cc
+++ b/src/crypto/crypto_util.cc
@@ -491,24 +491,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj,
@@ -503,24 +503,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj,
V(BIO) \
V(PKCS7) \
V(X509V3) \
@@ -272,7 +272,7 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286
V(USER) \
#define V(name) case ERR_LIB_##name: lib = #name "_"; break;
@@ -668,7 +658,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -680,7 +670,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
CHECK(args[0]->IsUint32());
Environment* env = Environment::GetCurrent(args);
uint32_t len = args[0].As<Uint32>()->Value();
@@ -281,7 +281,7 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286
if (data == nullptr) {
// There's no memory available for the allocation.
// Return nothing.
@@ -680,7 +670,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -692,7 +682,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
data,
len,
[](void* data, size_t len, void* deleter_data) {
@@ -290,7 +290,7 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286
},
data);
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);
@@ -688,10 +678,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
@@ -700,10 +690,12 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
}
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
@@ -304,10 +304,10 @@ index 7e0c8ba3eb60db88af8ba75e41e593dab86d2714..5c528c810256872c76dc7ba5a673d286
} // namespace
diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h
index ac95612a0b1a856d7fe07efde59786e811f1b98d..aa62753d7c929027f5265fa4330b0429c726f7ef 100644
index 463a19f516d23fdb56eb83025f4a3f2b3f4a426b..86e66e29ee644f86cb8ac20f37061fc03dc3099b 100644
--- a/src/crypto/crypto_util.h
+++ b/src/crypto/crypto_util.h
@@ -15,7 +15,9 @@
@@ -16,7 +16,9 @@
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/ec.h>

View File

@@ -1,39 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Piotr Rybak <rybak.piotr@yahoo.com>
Date: Sun, 31 Oct 2021 17:58:09 +0900
Subject: test: fix test-datetime-change-notify after daylight change
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add standard timezone name for Dublin without daylight saving
PR-URL: https://github.com/nodejs/node/pull/40684
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
(cherry picked from commit 747ef34fb0c9c1f2924ab1b79ea000c87e67a8eb)
diff --git a/test/parallel/test-datetime-change-notify.js b/test/parallel/test-datetime-change-notify.js
index 9cd6d7abfd898ac6781b04422362a6b459b7dc2c..01843511907077857be22c9bc7e7f8568fc677d1 100644
--- a/test/parallel/test-datetime-change-notify.js
+++ b/test/parallel/test-datetime-change-notify.js
@@ -18,15 +18,15 @@ const cases = [
},
{
timeZone: 'America/New_York',
- expected: /Eastern (Standard|Daylight) Time/,
+ expected: /Eastern (?:Standard|Daylight) Time/,
},
{
timeZone: 'America/Los_Angeles',
- expected: /Pacific (Standard|Daylight) Time/,
+ expected: /Pacific (?:Standard|Daylight) Time/,
},
{
timeZone: 'Europe/Dublin',
- expected: /Irish/,
+ expected: /Irish Standard Time|Greenwich Mean Time/,
},
];

View File

@@ -1054,11 +1054,14 @@ std::string App::GetLocaleCountryCode() {
CFLocaleRef locale = CFLocaleCopyCurrent();
CFStringRef value = CFStringRef(
static_cast<CFTypeRef>(CFLocaleGetValue(locale, kCFLocaleCountryCode)));
const CFIndex kCStringSize = 128;
char temporaryCString[kCStringSize] = {0};
CFStringGetCString(value, temporaryCString, kCStringSize,
kCFStringEncodingUTF8);
region = temporaryCString;
if (value != nil) {
char temporaryCString[3];
const CFIndex kCStringSize = sizeof(temporaryCString);
if (CFStringGetCString(value, temporaryCString, kCStringSize,
kCFStringEncodingUTF8)) {
region = temporaryCString;
}
}
#else
const char* locale_ptr = setlocale(LC_TIME, nullptr);
if (!locale_ptr)

View File

@@ -66,7 +66,7 @@ bool GetProtocolLaunchPath(gin::Arguments* args, std::wstring* exe) {
// Read in optional args arg
std::vector<std::wstring> launch_args;
if (args->GetNext(&launch_args) && !launch_args.empty())
*exe = base::StringPrintf(L"\"%ls\" %ls \"%%1\"", exe->c_str(),
*exe = base::StringPrintf(L"\"%ls\" \"%ls\" \"%%1\"", exe->c_str(),
base::JoinString(launch_args, L" ").c_str());
else
*exe = base::StringPrintf(L"\"%ls\" \"%%1\"", exe->c_str());

View File

@@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 18,0,0,20211213
PRODUCTVERSION 18,0,0,20211213
FILEVERSION 18,0,0,20220104
PRODUCTVERSION 18,0,0,20220104
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L