Compare commits

..

39 Commits

Author SHA1 Message Date
Electron Bot
702d18b2e3 Bump v9.0.0-nightly.20200111 2020-01-11 07:31:07 -08:00
loc
301bd8aec0 fix: avoid contextBridge double free on garbage collection (#21592)
* fix: reset next/prev pointers for life-monitored nodes

* fix: don't double-delete nodes in a linked list
2020-01-10 15:59:50 -08:00
Shelley Vohr
2858471151 feat: remove visibleOnFullscreen option (#21706) 2020-01-10 09:11:38 -08:00
Electron Bot
48ae7552f6 Bump v9.0.0-nightly.20200110 2020-01-10 07:32:59 -08:00
CezaryKulakowski
f461dc7002 fix: don't unnecessarily copy draggable regions (#21704) 2020-01-09 12:13:28 -08:00
Jeremy Apthorp
768a6ace1b test: move some fixtures from spec/ to spec-main/ (#21403) 2020-01-09 11:50:56 -08:00
Cheng Zhao
8a92b65fd3 test: retry for a few flaky tests (#21658) 2020-01-09 11:50:30 -08:00
Electron Bot
cfae97a64c chore: bump node to v12.14.1 (master) (#21703)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2020-01-09 10:42:53 -08:00
Shelley Vohr
f5e202a898 fix: Notification crash in before-quit (#21709) 2020-01-09 09:42:20 -08:00
Kilian Valkhof
bd923838c1 docs: initial document for comparing web embeds (#20478)
Co-authored-by: Felix Rieseberg <felix@felixrieseberg.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2020-01-09 09:29:22 -08:00
Shelley Vohr
bb054716c9 feat: allow http-parser NODE_OPTION in packaged apps (#21694) 2020-01-09 08:09:14 -08:00
Electron Bot
75e39be916 Bump v9.0.0-nightly.20200109 2020-01-09 07:31:24 -08:00
Electron Bot
349da6af7f Bump v9.0.0-nightly.20200108 2020-01-08 07:31:48 -08:00
Samuel Attard
e18acb4380 build: document electron goma usage and add the external binaries (#21622) 2020-01-07 10:35:52 -08:00
Shogun Sea
0a850fbc5d docs: Update react devtool version in document (#21601)
* docs: update react devtool version in document

* bump react devtool version ref to 4.3.0
2020-01-07 09:14:49 -05:00
Milan Burda
31c93fec67 fix: load window-setup in sandboxed renderer (#21416) 2020-01-06 22:23:03 +01:00
Shelley Vohr
d56f67b7af refactor: throw error for getLastCrashReport if crashReporter not started (#21643) 2020-01-06 11:00:27 -05:00
Electron Bot
7d2c97b671 Bump v9.0.0-nightly.20200106 2020-01-06 07:33:51 -08:00
Electron Bot
fb1131d531 Bump v9.0.0-nightly.20200105 2020-01-05 07:31:32 -08:00
Electron Bot
1abd24aa28 Bump v9.0.0-nightly.20200104 2020-01-04 07:33:32 -08:00
Kilian Valkhof
8dc4a20069 docs: fix typos in security.md (#21665) 2020-01-03 11:11:01 -05:00
Angel_Kitty
70029aa069 chore: update license year (#21657) 2020-01-03 11:10:23 -05:00
Electron Bot
b2071d2966 Bump v9.0.0-nightly.20200103 2020-01-03 07:31:59 -08:00
Electron Bot
35a7f76205 Bump v9.0.0-nightly.20200102 2020-01-02 07:31:08 -08:00
Electron Bot
55d8c4d937 Bump v9.0.0-nightly.20200101 2020-01-01 07:31:32 -08:00
Electron Bot
7b4a5a9f3a Bump v9.0.0-nightly.20191231 2019-12-31 07:32:05 -08:00
Shelley Vohr
fbb10beb40 fix: highlight defaulted button correctly (#21642) 2019-12-31 05:48:43 -08:00
Lutz Roeder
ed6a3877a4 fix: SimpleURLLoaderWrapper redirects (#21630) 2019-12-31 10:47:08 +11:00
Shelley Vohr
181eecd03e docs: fix shell.openPath documentation (#21641) 2019-12-30 11:40:30 -08:00
David Sanders
85382d8f1d fix: improve error handling in npm install (#21589)
* fix: improve error handling in npm install

* chore: simplify logic
2019-12-30 09:48:54 -08:00
Electron Bot
b41fb2e554 Bump v9.0.0-nightly.20191230 2019-12-30 07:32:58 -08:00
Electron Bot
659c4548eb Bump v9.0.0-nightly.20191229 2019-12-29 07:31:35 -08:00
Electron Bot
2497afcf94 Bump v9.0.0-nightly.20191228 2019-12-28 07:31:28 -08:00
Electron Bot
bf266b4479 Bump v9.0.0-nightly.20191226 2019-12-26 07:32:16 -08:00
Electron Bot
4324e4ce1d Bump v9.0.0-nightly.20191225 2019-12-25 07:31:32 -08:00
Electron Bot
a158c80377 Bump v9.0.0-nightly.20191224 2019-12-24 07:31:28 -08:00
Electron Bot
69f37356c1 Bump v9.0.0-nightly.20191223 2019-12-23 07:31:10 -08:00
Electron Bot
023c9a67fd Bump v9.0.0-nightly.20191222 2019-12-22 07:32:10 -08:00
Electron Bot
020cbf3595 Bump v9.0.0-nightly.20191221 2019-12-21 07:31:35 -08:00
113 changed files with 576 additions and 384 deletions

2
DEPS
View File

@@ -13,7 +13,7 @@ vars = {
'chromium_version':
'd0c764fc71894cc24d3bb17a7406ba6c6cc6dc29',
'node_version':
'v12.14.0',
'v12.14.1',
'nan_version':
'2ee313aaca52e2b478965ac50eb5082520380d1b',

View File

@@ -1 +1 @@
9.0.0-nightly.20191220
9.0.0-nightly.20200111

View File

@@ -1,4 +1,4 @@
Copyright (c) 2013-2019 GitHub Inc.
Copyright (c) 2013-2020 GitHub Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the

2
build/args/goma.gn Normal file
View File

@@ -0,0 +1,2 @@
goma_dir = rebase_path("//electron/external_binaries/goma")
use_goma = true

View File

@@ -53,6 +53,7 @@ an issue:
* [Native File Drag & Drop](tutorial/native-file-drag-drop.md)
* [Offscreen Rendering](tutorial/offscreen-rendering.md)
* [Supporting macOS Dark Mode](tutorial/mojave-dark-mode-guide.md)
* [Web embeds in Electron](tutorial/web-embeds.md)
* [Accessibility](tutorial/accessibility.md)
* [Spectron](tutorial/accessibility.md#spectron)
* [Devtron](tutorial/accessibility.md#devtron)

View File

@@ -1627,12 +1627,9 @@ can still bring up the menu bar by pressing the single `Alt` key.
Returns `Boolean` - Whether the menu bar is visible.
#### `win.setVisibleOnAllWorkspaces(visible[, options])`
#### `win.setVisibleOnAllWorkspaces(visible)`
* `visible` Boolean
* `options` Object (optional)
* `visibleOnFullScreen` Boolean (optional) _macOS_ - Sets whether
the window should be visible above fullscreen windows
Sets whether the window should be visible on all workspaces.

View File

@@ -48,6 +48,7 @@ Unsupported options are:
```sh
--max-http-header-size
--http-parser
```
### `GOOGLE_API_KEY`

View File

@@ -28,10 +28,7 @@ Show the given file in a file manager. If possible, select the file.
* `path` String
Returns `Promise<Object>` - Resolve with an object containing the following:
* `success` Boolean - whether or not the path was successfully opened in the desktop's default manner.
* `errorMessage` String (optional) - The error message corresponding to the failure if a failure occurred, otherwise empty string.
Returns `Promise<String>` - Resolves with an string containing the error message corresponding to the failure if a failure occurred, otherwise "".
Open the given file in the desktop's default manner.

61
docs/development/goma.md Normal file
View File

@@ -0,0 +1,61 @@
# Goma
> Goma is a distributed compiler service for open-source projects such as
> Chromium and Android.
Electron has a deployment of a custom Goma Backend that we make available to
all Electron Maintainers. See the [Access](#access) section below for details
on authentication.
## Enabling Goma
Currently Electron Goma supports both Windows and Linux, we may add macOS
support at some point in the future. If you are on a supported platform
you can enable goma by importing the `goma.gn` config file when using `gn`.
```bash
gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\") import(\"//electron/build/args/goma.gn\")"
```
You must ensure that you do not have `cc_wrapper` configured, this means you
can't use `sccache` or similar technology.
Before you can use goma to build Electron you need to authenticate against
the Goma service. You only need to do this once per-machine.
```bash
cd electron/external_binaries/goma
goma_auth.py login
```
Once authenticated you need to make sure the goma daemon is running on your
machine.
```bash
cd electron/external_binaries/goma
goma_ctl.py ensure_start
```
## Building with Goma
When you are using Goma you can run `ninja` with a substantially higher `j`
value than would normally be supported by your machine. Please do not set
a value higher than **300**, we monitor the goma system and users found to
be abusing it with unreasonable concurrency will be de-activated.
```bash
ninja -C out/Testing electron -j 200
```
## Monitoring Goma
If you access [http://localhost:8088](http://localhost:8088) on your local
machine you can monitor compile jobs as they flow through the goma system.
## Access
For security and cost reasons access to Electron Goma is currently restricted
to Electron Maintainers. If you want access please head to `#access-requests` in
Slack and ping `@goma-squad` to ask for access. Please be aware that being a
maintainer does not *automatically* grant access and access is determined on a
case by case basis.

View File

@@ -34,7 +34,7 @@ Using the [React Developer Tools][react-devtools] as example:
const os = require('os')
BrowserWindow.addDevToolsExtension(
path.join(os.homedir(), '/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/0.15.0_0')
path.join(os.homedir(), '/Library/Application Support/Google/Chrome/Default/Extensions/fmkadmapgofadopljbjfkapdkoienihi/4.3.0_0')
)
```

View File

@@ -241,7 +241,7 @@ prevent the use of Node primitives, `contextIsolation` must also be used.
### Why?
Context isolation allows each the scripts on running in the renderer to make
Context isolation allows each of the scripts running in the renderer to make
changes to its JavaScript environment without worrying about conflicting with
the scripts in the Electron API or the preload script.
@@ -422,8 +422,6 @@ on a page directly in the markup using a `<meta>` tag:
<meta http-equiv="Content-Security-Policy" content="default-src 'none'">
```
#### `webRequest.onHeadersReceived([filter, ]listener)`
## 7) Do Not Set `allowRunningInsecureContent` to `true`

View File

@@ -0,0 +1,22 @@
# Web embeds in Electron
If you want to embed (third party) web content in an Electron `BrowserWindow`, there are three options available to you: `<iframe>` tags, `<webview>` tags, and `BrowserViews`. Each one offers slightly different functionality and is useful in different situations. To help you choose between these, this guide will explain the differences and capabilities of each.
## Iframes
Iframes in Electron behave like iframes in regular browsers. An `<iframe>` element in your page can show external web pages, provided that their [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) allows it. To limit the amount of capabilities a site in an `<iframe>` tag, it's recommended to use the [`sandbox` attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox) and only allow the capabilities you want to support.
## WebViews
[WebViews](../api/webview-tag.md) are based on Chromium's WebViews and are not explicitly supported by Electron. We do not guarantee that the WebView API will remain available in future versions of Electron. This is why, if you want to use `<webview>` tags, you will need to set `webviewTag` to `true` in the `webPreferences` of your `BrowserWindow`.
WebViews are a custom element (`<webview>`) that will only work inside Electron.
They are implemented as an "out-of-process iframe". This means that all communication with the `<webview>` is done asynchronously using IPC. The `<webview>` element has many custom methods and events, similar to `webContents`, that allow you much greater control over the contents.
Compared to an `<iframe>`, `<webview>` tends to be slightly slower but offers much greater control in loading and communicating with the third party content and handling various events.
## BrowserViews
[BrowserViews](../api/browser-view.md) are not part of the DOM - instead, they are created in and controlled by your main process. They are simply another layer of web content on top of your existing window. This means that they are completely separate from your own `BrowserWindow` content and that their position is not controlled by the DOM or CSS but by setting the bounds in the main process.
BrowserViews offer the greatest control over their contents, since they implement the `webContents` similarly to how a `BrowserWindow` implements it. However, they are not part of your DOM but are overlaid on top of them, which means you will have to manage their position manually.

View File

@@ -165,6 +165,7 @@ auto_filenames = {
"lib/renderer/web-view/web-view-element.ts",
"lib/renderer/web-view/web-view-impl.ts",
"lib/renderer/web-view/web-view-init.ts",
"lib/renderer/window-setup.ts",
"lib/sandboxed_renderer/api/exports/electron.ts",
"lib/sandboxed_renderer/api/module-list.ts",
"lib/sandboxed_renderer/init.js",

View File

@@ -398,7 +398,7 @@ class ClientRequest extends Writable {
this.emit('redirect', statusCode, newMethod, newUrl, headers)
} finally {
this._followRedirectCb = null
if (!_followRedirect) {
if (!_followRedirect && !this._aborted) {
this._die(new Error('Redirect was cancelled'))
}
}

View File

@@ -75,8 +75,10 @@ const mergeBrowserWindowOptions = function (embedder, options) {
}
}
// Sets correct openerId here to give correct options to 'new-window' event handler
options.webPreferences.openerId = embedder.id
if (!webPreferences.nativeWindowOpen) {
// Sets correct openerId here to give correct options to 'new-window' event handler
options.webPreferences.openerId = embedder.id
}
return options
}

View File

@@ -112,11 +112,15 @@ ipcMainUtils.handleSync('ELECTRON_BROWSER_SANDBOX_LOAD', async function (event)
contentScripts = getContentScripts()
}
const webPreferences = event.sender.getLastWebPreferences() || {}
return {
contentScripts,
preloadScripts: await Promise.all(preloadPaths.map(path => getPreloadScript(path))),
isRemoteModuleEnabled: isRemoteModuleEnabled(event.sender),
isWebViewTagEnabled: guestViewManager.isWebViewTagEnabled(event.sender),
guestInstanceId: webPreferences.guestInstanceId,
openerId: webPreferences.openerId,
process: {
arch: process.arch,
platform: process.platform,

View File

@@ -54,7 +54,12 @@ class CrashReporter {
}
getUploadedReports () {
return binding.getUploadedReports(this.getCrashesDirectory())
const crashDir = this.getCrashesDirectory()
if (!crashDir) {
throw new Error('crashReporter has not been started')
}
return binding.getUploadedReports(crashDir)
}
getCrashesDirectory () {

View File

@@ -177,7 +177,7 @@ class BrowserWindowProxy {
export const windowSetup = (
guestInstanceId: number, openerId: number, isHiddenPage: boolean, usesNativeWindowOpen: boolean
) => {
if (guestInstanceId == null) {
if (!process.sandboxed && guestInstanceId == null) {
// Override default window.close.
window.close = function () {
ipcRendererInternal.send('ELECTRON_BROWSER_WINDOW_CLOSE')
@@ -197,10 +197,10 @@ export const windowSetup = (
return null
}
}
}
if (openerId != null) {
window.opener = getOrCreateProxy(openerId)
}
if (openerId != null) {
window.opener = getOrCreateProxy(openerId)
}
// But we do not support prompt().
@@ -208,43 +208,47 @@ export const windowSetup = (
throw new Error('prompt() is and will not be supported.')
}
ipcRendererInternal.on('ELECTRON_GUEST_WINDOW_POSTMESSAGE', function (
_event, sourceId: number, message: any, sourceOrigin: string
) {
// Manually dispatch event instead of using postMessage because we also need to
// set event.source.
//
// Why any? We can't construct a MessageEvent and we can't
// use `as MessageEvent` because you're not supposed to override
// data, origin, and source
const event: any = document.createEvent('Event')
event.initEvent('message', false, false)
if (!usesNativeWindowOpen || openerId != null) {
ipcRendererInternal.on('ELECTRON_GUEST_WINDOW_POSTMESSAGE', function (
_event, sourceId: number, message: any, sourceOrigin: string
) {
// Manually dispatch event instead of using postMessage because we also need to
// set event.source.
//
// Why any? We can't construct a MessageEvent and we can't
// use `as MessageEvent` because you're not supposed to override
// data, origin, and source
const event: any = document.createEvent('Event')
event.initEvent('message', false, false)
event.data = message
event.origin = sourceOrigin
event.source = getOrCreateProxy(sourceId)
event.data = message
event.origin = sourceOrigin
event.source = getOrCreateProxy(sourceId)
window.dispatchEvent(event as MessageEvent)
})
window.history.back = function () {
ipcRendererInternal.send('ELECTRON_NAVIGATION_CONTROLLER_GO_BACK')
window.dispatchEvent(event as MessageEvent)
})
}
window.history.forward = function () {
ipcRendererInternal.send('ELECTRON_NAVIGATION_CONTROLLER_GO_FORWARD')
}
if (!process.sandboxed) {
window.history.back = function () {
ipcRendererInternal.send('ELECTRON_NAVIGATION_CONTROLLER_GO_BACK')
}
window.history.go = function (offset: number) {
ipcRendererInternal.send('ELECTRON_NAVIGATION_CONTROLLER_GO_TO_OFFSET', +offset)
}
window.history.forward = function () {
ipcRendererInternal.send('ELECTRON_NAVIGATION_CONTROLLER_GO_FORWARD')
}
Object.defineProperty(window.history, 'length', {
get: function () {
return ipcRendererInternal.sendSync('ELECTRON_NAVIGATION_CONTROLLER_LENGTH')
},
set () {}
})
window.history.go = function (offset: number) {
ipcRendererInternal.send('ELECTRON_NAVIGATION_CONTROLLER_GO_TO_OFFSET', +offset)
}
Object.defineProperty(window.history, 'length', {
get: function () {
return ipcRendererInternal.sendSync('ELECTRON_NAVIGATION_CONTROLLER_LENGTH')
},
set () {}
})
}
if (guestInstanceId != null) {
// Webview `document.visibilityState` tracks window visibility (and ignores

View File

@@ -30,7 +30,13 @@ const { ipcRendererInternal } = require('@electron/internal/renderer/ipc-rendere
const ipcRendererUtils = require('@electron/internal/renderer/ipc-renderer-internal-utils')
const {
contentScripts, preloadScripts, isRemoteModuleEnabled, isWebViewTagEnabled, process: processProps
contentScripts,
preloadScripts,
isRemoteModuleEnabled,
isWebViewTagEnabled,
guestInstanceId,
openerId,
process: processProps
} = ipcRendererUtils.invokeSync('ELECTRON_BROWSER_SANDBOX_LOAD')
process.isRemoteModuleEnabled = isRemoteModuleEnabled
@@ -109,6 +115,11 @@ function preloadRequire (module) {
const { hasSwitch } = process.electronBinding('command_line')
const contextIsolation = hasSwitch('context-isolation')
const isHiddenPage = hasSwitch('hidden-page')
const usesNativeWindowOpen = true
// The arguments to be passed to isolated world.
const isolatedWorldArgs = { ipcRendererInternal, guestInstanceId, isHiddenPage, openerId, usesNativeWindowOpen }
switch (window.location.protocol) {
case 'devtools:': {
@@ -127,6 +138,10 @@ switch (window.location.protocol) {
break
}
default: {
// Override default web functions.
const { windowSetup } = require('@electron/internal/renderer/window-setup')
windowSetup(guestInstanceId, openerId, isHiddenPage, usesNativeWindowOpen)
// Inject content scripts.
if (!process.electronBinding('features').isExtensionsEnabled()) {
require('@electron/internal/renderer/content-scripts-injector')(contentScripts)
@@ -134,14 +149,17 @@ switch (window.location.protocol) {
}
}
const guestInstanceId = binding.guestInstanceId && parseInt(binding.guestInstanceId)
// Load webview tag implementation.
if (process.isMainFrame) {
const { webViewInit } = require('@electron/internal/renderer/web-view/web-view-init')
webViewInit(contextIsolation, isWebViewTagEnabled, guestInstanceId)
}
// Pass the arguments to isolatedWorld.
if (contextIsolation) {
v8Util.setHiddenValue(global, 'isolated-world-args', isolatedWorldArgs)
}
// Wrap the script into a function executed in global scope. It won't have
// access to the current scope, so we'll expose a few objects as arguments:
//

View File

@@ -8,22 +8,13 @@ const path = require('path')
const extract = require('extract-zip')
const { downloadArtifact } = require('@electron/get')
let installedVersion = null
try {
installedVersion = fs.readFileSync(path.join(__dirname, 'dist', 'version'), 'utf-8').replace(/^v/, '')
} catch (ignored) {
// do nothing
}
if (process.env.ELECTRON_SKIP_BINARY_DOWNLOAD) {
process.exit(0)
}
const platformPath = getPlatformPath()
const electronPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist', platformPath)
if (installedVersion === version && fs.existsSync(electronPath)) {
if (isInstalled()) {
process.exit(0)
}
@@ -35,22 +26,44 @@ downloadArtifact({
cacheRoot: process.env.electron_config_cache,
platform: process.env.npm_config_platform || process.platform,
arch: process.env.npm_config_arch || process.arch
}).then((zipPath) => extractFile(zipPath)).catch((err) => onerror(err))
}).then(extractFile).catch(err => {
console.error(err.stack)
process.exit(1)
})
function isInstalled () {
try {
if (fs.readFileSync(path.join(__dirname, 'dist', 'version'), 'utf-8').replace(/^v/, '') !== version) {
return false
}
if (fs.readFileSync(path.join(__dirname, 'path.txt'), 'utf-8') !== platformPath) {
return false
}
} catch (ignored) {
return false
}
const electronPath = process.env.ELECTRON_OVERRIDE_DIST_PATH || path.join(__dirname, 'dist', platformPath)
return fs.existsSync(electronPath)
}
// unzips and makes path.txt point at the correct executable
function extractFile (zipPath) {
extract(zipPath, { dir: path.join(__dirname, 'dist') }, function (err) {
if (err) return onerror(err)
fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, function (err) {
if (err) return onerror(err)
return new Promise((resolve, reject) => {
extract(zipPath, { dir: path.join(__dirname, 'dist') }, err => {
if (err) return reject(err)
fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, err => {
if (err) return reject(err)
resolve()
})
})
})
}
function onerror (err) {
throw err
}
function getPlatformPath () {
const platform = process.env.npm_config_platform || os.platform()

View File

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

View File

@@ -25,8 +25,9 @@ chore_prevent_warn_non_context-aware_native_modules_being_loaded.patch
inherit_electron_crashpad_pipe_name_in_child_process.patch
chore_read_nobrowserglobals_from_global_not_process.patch
chore_split_createenvironment_into_createenvironment_and.patch
chore_handle_default_configuration_not_being_set_in_the_electron_env.patch
build_bring_back_node_with_ltcg_configuration.patch
revert_crypto_add_oaeplabel_option.patch
refactor_transferrablemodule_is_deprecated_use_compiledwasmmodule.patch
enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch
fix_remove_unused_llhttp_variables.patch
fix_include_libuv_header_in_node_binding.patch

View File

@@ -883,7 +883,7 @@ index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2ea
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..5eb839f45aca3ed73d69b43a34c438ce254a2c6b
index 0000000000000000000000000000000000000000..db73a7699cdb1925c723fd1708d6ce1fad1cc946
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,448 @@
@@ -1541,7 +1541,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
+ args = rebase_path(inputs + outputs, root_build_dir)
+}
diff --git a/src/node_version.h b/src/node_version.h
index b974af56853d28d2154f314f5ca9a38d19efc84c..57c846c81d511051cc56d3827609b12993e70240 100644
index 8a6fb55a5a3824b40d2c744a0ed1e8d84e6bbc4a..c68a60d7b0a818b25ce3bd44037d52abe57769f2 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -89,7 +89,10 @@

View File

@@ -10,7 +10,7 @@ THe fix for this should land in node-gyp as discussed in above issue,
landing this as temporary patch.
diff --git a/common.gypi b/common.gypi
index bde7d7300f44596abe5cdfac0639ecb1bb4d885f..412f613e7cfcf563fa6a000b932723166ab567da 100644
index f07e65f719a1a5939997dfcae7bc787ee6391f4d..f4d03a2fdfd47a4e6a71c7146d92ce7cbc44993d 100644
--- a/common.gypi
+++ b/common.gypi
@@ -19,7 +19,7 @@

View File

@@ -6,7 +6,7 @@ Subject: Call process.log from fallback stream on Windows
(cherry picked from commit d31e629b4f2daf3500a485caab2b2990a41e3ad4)
diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js
index 08781547c489526834609861c5a906ef5183936b..e60ad6b0d4c634a8b0990da6ca090ea48715b830 100644
index 2491f14cdf01409e4625d6793279ef87dbcc6942..54d3fb23dc1b51fec206e8989e4873d95884583f 100644
--- a/lib/internal/process/stdio.js
+++ b/lib/internal/process/stdio.js
@@ -192,6 +192,11 @@ function createWritableStdioStream(fd) {

View File

@@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <sattard@slack-corp.com>
Date: Tue, 23 Jul 2019 11:36:48 -0700
Subject: chore: handle default_configuration not being set in the electron env
We don't set the `default_configuration` key in our config.gypi, this allows
the tests to run in spite of that.
TODO(marshallofsound/nornagon): Just add this key to config.gypi.
diff --git a/test/common/index.js b/test/common/index.js
index 00ebd283a0c3e960de2a7c4e3748561c499eb820..2ebec24f9e1f53306882e827a17925201cad0ea6 100644
--- a/test/common/index.js
+++ b/test/common/index.js
@@ -118,7 +118,7 @@ const enoughTestCpu = Array.isArray(cpus) &&
const rootDir = isWindows ? 'c:\\' : '/';
-const buildType = process.config.target_defaults.default_configuration;
+const buildType = process.config.target_defaults ? process.config.target_defaults.default_configuration : 'Release';
// If env var is set then enable async_hook hooks for all tests.

View File

@@ -8,7 +8,7 @@ once we stop warning and begin to unilaterally prevent non-context aware modules
from being loaded.
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index 113d2e58a9cecf233bf6a60138cdfc60f338b28c..f4e21997054dc86e21ed093a7bc227b0c5d150cd 100644
index e7bd18855fb98a822833b4366bfb595dccfc1b6f..a96f891f675cc598e912a5e010c24938a9f6fc98 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -80,8 +80,10 @@ function patchProcessObject(expandArgv1) {
@@ -23,10 +23,10 @@ index 113d2e58a9cecf233bf6a60138cdfc60f338b28c..f4e21997054dc86e21ed093a7bc227b0
// TODO(joyeecheung): most of these should be deprecated and removed,
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 18fdf148ccca5d92f10b78144eee39bdff7919d2..df995ecc75a0c7cf509d2f4d75051c68cd507d5a 100644
index 2fddd3766ffb28dc9176ed1b7a4b01361dd72fcd..c14cbe0279bbce98ea875bc3487996da679b4f40 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -933,6 +933,13 @@ Module.prototype._compile = function(content, filename) {
@@ -932,6 +932,13 @@ Module.prototype._compile = function(content, filename) {
if (getOptionValue('--inspect-brk') && process._eval == null) {
if (!resolvedArgv) {
// We enter the repl if we're not given a filename argument.
@@ -41,10 +41,10 @@ index 18fdf148ccca5d92f10b78144eee39bdff7919d2..df995ecc75a0c7cf509d2f4d75051c68
resolvedArgv = Module._resolveFilename(process.argv[1], null, false);
} else {
diff --git a/src/env.h b/src/env.h
index 8e12764ea3a9a3d4441b276fdf9db9fce7109f72..1df2907fe0bc8a4a2bee3c569bfa535465d9f289 100644
index 60cb1b6d113e7e0687d96806f8940b5a715144cf..eef7b7bc244b4231419b4ec3013fa1cf700c97ef 100644
--- a/src/env.h
+++ b/src/env.h
@@ -912,6 +912,15 @@ class Environment : public MemoryRetainer {
@@ -914,6 +914,15 @@ class Environment : public MemoryRetainer {
uint64_t thread_id = kNoThreadId);
~Environment();
@@ -60,7 +60,7 @@ index 8e12764ea3a9a3d4441b276fdf9db9fce7109f72..1df2907fe0bc8a4a2bee3c569bfa5354
void InitializeLibuv(bool start_profiler_idle_notifier);
inline const std::vector<std::string>& exec_argv();
inline const std::vector<std::string>& argv();
@@ -1266,6 +1275,9 @@ class Environment : public MemoryRetainer {
@@ -1268,6 +1277,9 @@ class Environment : public MemoryRetainer {
inline void ThrowError(v8::Local<v8::Value> (*fun)(v8::Local<v8::String>),
const char* errmsg);
@@ -71,7 +71,7 @@ index 8e12764ea3a9a3d4441b276fdf9db9fce7109f72..1df2907fe0bc8a4a2bee3c569bfa5354
v8::Isolate* const isolate_;
IsolateData* const isolate_data_;
diff --git a/src/node_binding.cc b/src/node_binding.cc
index 3a5ea646fc68d88cb045380c3401812dff590496..12255167f0f38ec856339dd86d95171a56d61553 100644
index 4adb4b893925b1b0ebf6ba41040121438db56d1f..7c1dfaf06f1c7a08d9301d6d1837fa008b076cbd 100644
--- a/src/node_binding.cc
+++ b/src/node_binding.cc
@@ -3,6 +3,7 @@

View File

@@ -8,7 +8,7 @@ This allows us to run operations on a created but not yet bootstrapped
environment such as setting up an InspectorAgent
diff --git a/src/api/environment.cc b/src/api/environment.cc
index ae26cb7e9ef55fc0b965e28de4686aec87f42522..50886f4a998f1e7f346a6b7fad91ce49c3a7cdff 100644
index 356131156b4a714eebf4e202cd105f0f184e3852..96192f0ea4174315d73e03849ce1bed996afc44c 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -263,7 +263,8 @@ Environment* CreateEnvironment(IsolateData* isolate_data,
@@ -53,7 +53,7 @@ index ae26cb7e9ef55fc0b965e28de4686aec87f42522..50886f4a998f1e7f346a6b7fad91ce49
void FreeEnvironment(Environment* env) {
diff --git a/src/node.h b/src/node.h
index 80a27dc734a81a7ca8d888d1d55fc8d24a536280..9c6dcbf7014f7cf87f7f66886cbf255978c244fa 100644
index e3258434eba34124c71562225e295cd1807fdf7c..2ac35208ae8b2cfd067b5b712d4447121ef6e47d 100644
--- a/src/node.h
+++ b/src/node.h
@@ -326,7 +326,9 @@ NODE_EXTERN Environment* CreateEnvironment(IsolateData* isolate_data,

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 412f613e7cfcf563fa6a000b932723166ab567da..6e2ad757781f794333b3656ec05f6e48ade86d2e 100644
index f4d03a2fdfd47a4e6a71c7146d92ce7cbc44993d..d88db157c0e2972c5a7c4f8dacb5a69bff1d9b72 100644
--- a/common.gypi
+++ b/common.gypi
@@ -75,6 +75,9 @@

View File

@@ -9,10 +9,10 @@ modules to sandboxed renderers.
(cherry picked from commit 4c058a6cb5331eef1c7f51c042dd074a2d4f9234)
diff --git a/src/node_binding.h b/src/node_binding.h
index dd94fab36a0e8fcb453ba82091f6284e8193c00d..b2aa45b7e85127f645f43d5fce0050fd488f2668 100644
index 42f3c5b8d00880588f442a4e724e080128c56dfe..cefb6419ebb7f5c5c79927d179eef0a790e234ad 100644
--- a/src/node_binding.h
+++ b/src/node_binding.h
@@ -93,6 +93,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
@@ -90,6 +90,8 @@ void GetInternalBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
void GetLinkedBinding(const v8::FunctionCallbackInfo<v8::Value>& args);
void DLOpen(const v8::FunctionCallbackInfo<v8::Value>& args);

View File

@@ -24,10 +24,10 @@ Environment on the V8 context of blink, so no new V8 context is created.
As a result, a renderer process may have multiple Node Environments in it.
diff --git a/src/env.cc b/src/env.cc
index 2400785ea82fe4e975d222214161a417d2e6c002..069cd137b35e748dd45e5c720ec71d4fe274562b 100644
index 90d10590e5dcc4c6cd6253403f8ae34bd02e7212..948a29c5c245ed7e646378bd9b8ea1f213848455 100644
--- a/src/env.cc
+++ b/src/env.cc
@@ -383,6 +383,12 @@ Environment::Environment(IsolateData* isolate_data,
@@ -382,6 +382,12 @@ Environment::Environment(IsolateData* isolate_data,
// TODO(joyeecheung): deserialize when the snapshot covers the environment
// properties.
CreateProperties();
@@ -41,7 +41,7 @@ index 2400785ea82fe4e975d222214161a417d2e6c002..069cd137b35e748dd45e5c720ec71d4f
Environment::~Environment() {
diff --git a/src/node.cc b/src/node.cc
index 572490730da5854ad1a79670564ad9705c86747b..9b43d7676e5e106318b58bfe443651cc49780068 100644
index 9d182d2aeb48c8b600bace036df868fb695dfa7c..38c467c7d49589ef5d985ad999fe22d9462f07f6 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -27,6 +27,7 @@
@@ -62,7 +62,7 @@ index 572490730da5854ad1a79670564ad9705c86747b..9b43d7676e5e106318b58bfe443651cc
namespace per_process {
// node_revert.h
@@ -352,6 +356,13 @@ MaybeLocal<Value> Environment::RunBootstrapping() {
@@ -325,6 +329,13 @@ MaybeLocal<Value> Environment::RunBootstrapping() {
CHECK(!has_run_bootstrapping_code());
@@ -76,7 +76,7 @@ index 572490730da5854ad1a79670564ad9705c86747b..9b43d7676e5e106318b58bfe443651cc
if (BootstrapInternalLoaders().IsEmpty()) {
return MaybeLocal<Value>();
}
@@ -741,7 +752,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
@@ -716,7 +727,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
binding::RegisterBuiltinModules();
// Make inherited handles noninheritable.
@@ -87,7 +87,7 @@ index 572490730da5854ad1a79670564ad9705c86747b..9b43d7676e5e106318b58bfe443651cc
#ifdef NODE_REPORT
// Cache the original command line to be
@@ -843,6 +856,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
@@ -811,6 +824,9 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
}
#endif
@@ -97,7 +97,7 @@ index 572490730da5854ad1a79670564ad9705c86747b..9b43d7676e5e106318b58bfe443651cc
const int exit_code = ProcessGlobalArgs(argv, exec_argv, errors, false);
if (exit_code != 0) return exit_code;
@@ -865,6 +881,8 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
@@ -833,6 +849,8 @@ int InitializeNodeWithArgs(std::vector<std::string>* argv,
per_process::metadata.versions.InitializeIntlVersions();
#endif
@@ -107,7 +107,7 @@ index 572490730da5854ad1a79670564ad9705c86747b..9b43d7676e5e106318b58bfe443651cc
// We should set node_is_initialized here instead of in node::Start,
diff --git a/src/node.h b/src/node.h
index 13d71d41398545963139e61488474e23fa0ebeea..2baf51c3181fe2d390246f655ad35c3aac51f229 100644
index 025c6b949dc438a98a960d3630c723376f731ca7..892dafd8031533d23a88298406356107409cbd0a 100644
--- a/src/node.h
+++ b/src/node.h
@@ -203,6 +203,9 @@ namespace node {

View File

@@ -6,10 +6,10 @@ Subject: feat: add uv_loop watcher_queue code
Electron's Node Integration works by listening to Node's backend file descriptor in a separate thread; when an event is ready the backend file descriptor will trigger a new event for it, and the main thread will then iterate the libuv loop. For certain operations (ex. adding a timeout task) the backend file descriptor isn't informed, & as a result the main thread doesn't know it needs to iterate the libuv loop so the timeout task will never execute until something else trigger a new event. This commit should be removed when https://github.com/libuv/libuv/pull/1921 is merged
diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h
index ee45bcaefce1d3684df90c0342b1ff9f89c94544..a73396b2e74eecb01e6abed755875dde6760d3d6 100644
index 0e8132e4384be02737e9a001aa2a65f76e7a1215..b79a5228c2abef854cf63dbbcd3704c14c3bb25e 100644
--- a/deps/uv/include/uv.h
+++ b/deps/uv/include/uv.h
@@ -1693,6 +1693,8 @@ union uv_any_req {
@@ -1734,6 +1734,8 @@ union uv_any_req {
struct uv_loop_s {
/* User data - use this for whatever. */
void* data;
@@ -19,10 +19,10 @@ index ee45bcaefce1d3684df90c0342b1ff9f89c94544..a73396b2e74eecb01e6abed755875dde
unsigned int active_handles;
void* handle_queue[2];
diff --git a/deps/uv/src/unix/core.c b/deps/uv/src/unix/core.c
index 366c43c2ab08437a6af6bf15f24563bcc6cb40e1..517ca26c39fbcb63f17bca5a0658bda18bc15921 100644
index ffce948c9574034443203b9d2569d5f7aec1070e..ca2a755e09ac96c313737efb7b9c5880a1c158ae 100644
--- a/deps/uv/src/unix/core.c
+++ b/deps/uv/src/unix/core.c
@@ -897,8 +897,11 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
@@ -899,8 +899,11 @@ void uv__io_start(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
return;
#endif
@@ -35,7 +35,7 @@ index 366c43c2ab08437a6af6bf15f24563bcc6cb40e1..517ca26c39fbcb63f17bca5a0658bda1
if (loop->watchers[w->fd] == NULL) {
loop->watchers[w->fd] = w;
@@ -934,8 +937,11 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
@@ -936,8 +939,11 @@ void uv__io_stop(uv_loop_t* loop, uv__io_t* w, unsigned int events) {
w->events = 0;
}
}
@@ -48,7 +48,7 @@ index 366c43c2ab08437a6af6bf15f24563bcc6cb40e1..517ca26c39fbcb63f17bca5a0658bda1
}
@@ -952,6 +958,8 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
@@ -954,6 +960,8 @@ void uv__io_close(uv_loop_t* loop, uv__io_t* w) {
void uv__io_feed(uv_loop_t* loop, uv__io_t* w) {
if (QUEUE_EMPTY(&w->pending_queue))
QUEUE_INSERT_TAIL(&loop->pending_queue, &w->pending_queue);

View File

@@ -19,7 +19,7 @@ index 0cad5209c4ff4e68d7c400af1d2b4c234210ddb4..918bc8c0c4e78bad5a3372e8a5522da0
return NativeModule.map.has(id);
};
diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js
index f959310156141623c2acc9e4d8bdad433d401925..113d2e58a9cecf233bf6a60138cdfc60f338b28c 100644
index 2aa2a3b46c5fc12d22e0e74e304d2d55ca02c3b5..e7bd18855fb98a822833b4366bfb595dccfc1b6f 100644
--- a/lib/internal/bootstrap/pre_execution.js
+++ b/lib/internal/bootstrap/pre_execution.js
@@ -61,6 +61,7 @@ function prepareMainThreadExecution(expandArgv1 = false) {

View File

@@ -8,7 +8,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 6501f78796fd17503f5ff9cd3a52cbfa688c2814..bde7d7300f44596abe5cdfac0639ecb1bb4d885f 100644
index b86e5e05d7df9ad472f16735448a53f433620eef..f07e65f719a1a5939997dfcae7bc787ee6391f4d 100644
--- a/common.gypi
+++ b/common.gypi
@@ -77,6 +77,22 @@

View File

@@ -6,10 +6,10 @@ Subject: fix: build and expose inspector agent
Node inspector initialization happens in a different start-up function in node.cc, which we don't call in Electron. This allows for us to use the inspector agent in electron/atom/browser/node_debugger.cc
diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc
index cf0110144a535dcc7e691650d015da6715179d7e..edb27e4650b1e98b5a5f7765c60e0dd45e7956f0 100644
index aff52a5a5eccd175fae4f82ffcf9897ad43763ee..e55862ca202caaa9ec9800b40215232f98120476 100644
--- a/src/inspector_agent.cc
+++ b/src/inspector_agent.cc
@@ -217,7 +217,7 @@ const int CONTEXT_GROUP_ID = 1;
@@ -222,7 +222,7 @@ const int CONTEXT_GROUP_ID = 1;
std::string GetWorkerLabel(node::Environment* env) {
std::ostringstream result;
@@ -18,7 +18,7 @@ index cf0110144a535dcc7e691650d015da6715179d7e..edb27e4650b1e98b5a5f7765c60e0dd4
return result.str();
}
@@ -465,7 +465,7 @@ class NodeInspectorClient : public V8InspectorClient {
@@ -470,7 +470,7 @@ class NodeInspectorClient : public V8InspectorClient {
client_ = V8Inspector::create(env->isolate(), this);
// TODO(bnoordhuis) Make name configurable from src/node.cc.
std::string name =

View File

@@ -15,7 +15,7 @@ By putting the definitions of constructors into the implementation file,
we can avoid this problem.
diff --git a/src/node_options.cc b/src/node_options.cc
index c0c15a88c028d9c70081aa75fabf63d1d78014e6..03919d450b3373983d647165ee93c006eb5f2902 100644
index 2dd90e9a8cf9381c8608b73ead247bcf86b72ab9..051e7b084b6770215bd009b0e37feabbb7df7389 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -26,6 +26,12 @@ Mutex cli_options_mutex;

View File

@@ -6,7 +6,7 @@ Subject: fix: export DebugOptions
This exports DebugOptions so we can parse args like `--inspect-brk`.
diff --git a/src/node_options.cc b/src/node_options.cc
index d53ab2a4bfe87321e899b431eac262223e532335..c0c15a88c028d9c70081aa75fabf63d1d78014e6 100644
index 35cac18a916c2ce104a3e7b6760d0280b33c2892..2dd90e9a8cf9381c8608b73ead247bcf86b72ab9 100644
--- a/src/node_options.cc
+++ b/src/node_options.cc
@@ -210,11 +210,6 @@ void EnvironmentOptions::CheckOptions(std::vector<std::string>* errors) {

View File

@@ -6,10 +6,10 @@ Subject: fix: expose InternalCallbackScope
This commit exposes InternalCallbackScope in order to allow us access to kAllowEmptyResource for usage https://github.com/electron/electron/blob/master/atom/common/api/atom_bindings.cc\#L108. We should look to accomplish this another way so we no longer need to do this, as in verbose mode the regular CallBack Scope doesn't swallow errors and so we can otherwise use it.
diff --git a/src/node_internals.h b/src/node_internals.h
index 85d2c5c1f18db01d64f8285720f6624f15aa2436..fb1188a6bbce37b2bbaba0a815f2826dca60cf3b 100644
index 0fff2e6111e53f99ca8e92d6966d9847570d01bd..e8d6705e0197aad55b931910bb5221dd33b37fb0 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -200,7 +200,7 @@ v8::MaybeLocal<v8::Value> InternalMakeCallback(
@@ -203,7 +203,7 @@ v8::MaybeLocal<v8::Value> InternalMakeCallback(
v8::Local<v8::Value> argv[],
async_context asyncContext);

View File

@@ -5,7 +5,7 @@ Subject: fix: expose tracing::Agent and use tracing::TracingController instead
of v8::TracingController
diff --git a/src/api/environment.cc b/src/api/environment.cc
index 2c0fe1306319b25c378d0aae73e4045560a9b683..ae26cb7e9ef55fc0b965e28de4686aec87f42522 100644
index 138f9ada984a952a6ecf8089ddb31bc258a8d35b..356131156b4a714eebf4e202cd105f0f184e3852 100644
--- a/src/api/environment.cc
+++ b/src/api/environment.cc
@@ -314,6 +314,10 @@ MultiIsolatePlatform* GetMainThreadMultiIsolatePlatform() {
@@ -20,7 +20,7 @@ index 2c0fe1306319b25c378d0aae73e4045560a9b683..ae26cb7e9ef55fc0b965e28de4686aec
int thread_pool_size,
node::tracing::TracingController* tracing_controller) {
diff --git a/src/node.h b/src/node.h
index 2baf51c3181fe2d390246f655ad35c3aac51f229..80a27dc734a81a7ca8d888d1d55fc8d24a536280 100644
index 892dafd8031533d23a88298406356107409cbd0a..e3258434eba34124c71562225e295cd1807fdf7c 100644
--- a/src/node.h
+++ b/src/node.h
@@ -108,6 +108,7 @@ namespace node {

View File

@@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 8 Jan 2020 12:54:07 -0800
Subject: fix: include libuv header in node_binding
The libuv header uv.h was removed in
https://github.com/nodejs/node/commit/3bb085dbad4d23030c731834e35b2804c8a50b23,
but is necessary for Windows to understand what uv_lib_t is.
Upstreamed in https://github.com/nodejs/node/pull/31265.
diff --git a/src/node_binding.h b/src/node_binding.h
index cefb6419ebb7f5c5c79927d179eef0a790e234ad..5bced5b41431dc7838d1a30774a1a41ff797290e 100644
--- a/src/node_binding.h
+++ b/src/node_binding.h
@@ -10,6 +10,7 @@
#include "node.h"
#define NAPI_EXPERIMENTAL
#include "node_api.h"
+#include "uv.h"
enum {
NM_F_BUILTIN = 1 << 0, // Unused.

View File

@@ -6,7 +6,7 @@ Subject: fix: key gen APIs are not available in BoringSSL
This will make Node's key pair generation APIs fail.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 2d539094a0589e9945bf2f27fa8a8afce47031b0..2c702d2f051d6b8f59ac53a4e2729ee02ba98a47 100644
index ad06141752eae90a655d710932b479f9cd8482ff..861d321d6170b25e874080d4c70dda201cab3248 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -290,24 +290,14 @@ Maybe<bool> Decorate(Environment* env, Local<Object> obj,
@@ -80,7 +80,7 @@ index 2d539094a0589e9945bf2f27fa8a8afce47031b0..2c702d2f051d6b8f59ac53a4e2729ee0
}
private:
@@ -7112,9 +7112,12 @@ void Initialize(Local<Object> target,
@@ -7101,9 +7101,12 @@ void Initialize(Local<Object> target,
env->SetMethod(target, "generateKeyPairEC", GenerateKeyPairEC);
env->SetMethod(target, "generateKeyPairNid", GenerateKeyPairNid);
NODE_DEFINE_CONSTANT(target, EVP_PKEY_ED25519);

View File

@@ -0,0 +1,48 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Wed, 8 Jan 2020 10:12:46 -0800
Subject: fix: remove unused llhttp variables
Node.js updated llhttps in https://github.com/nodejs/node/pull/30553,
which updated some of the llparse_blobs. To keep numbering consistency,
it left the newly unused ones, which causes compilation failures in Electron
as we do not allow unused variables.
Fixed in https://github.com/nodejs/llparse/pull/34; this patch can be removed
as soon as llparse v6.2.1 is rolled into Node.js
diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c
index 698230f93fe08f347a9e6e9f7194663c9b5318c3..664b563ad1ccf69794f0e86245e91d0bc26c1d58 100644
--- a/deps/llhttp/src/llhttp.c
+++ b/deps/llhttp/src/llhttp.c
@@ -24,10 +24,6 @@ typedef int (*llhttp__internal__span_cb)(
static const unsigned char llparse_blob0[] = {
'C', 'L'
};
-static const unsigned char ALIGN(16) llparse_blob1[] = {
- 0x9, 0x9, 0xc, 0xc, '!', '"', '$', '>', '@', '~', 0x80,
- 0xff
-};
static const unsigned char llparse_blob2[] = {
'o', 'n'
};
@@ -43,19 +39,9 @@ static const unsigned char llparse_blob5[] = {
static const unsigned char llparse_blob6[] = {
'p', 'g', 'r', 'a', 'd', 'e'
};
-static const unsigned char ALIGN(16) llparse_blob7[] = {
- 0x9, 0x9, ' ', '~', 0x80, 0xfe
-};
static const unsigned char llparse_blob8[] = {
'h', 'u', 'n', 'k', 'e', 'd'
};
-static const unsigned char ALIGN(16) llparse_blob9[] = {
- ' ', '!', '#', '\'', '*', '+', '-', '.', '0', '9', 'A',
- 'Z', '^', 'z', '|', '|'
-};
-static const unsigned char ALIGN(16) llparse_blob10[] = {
- '~', '~'
-};
static const unsigned char llparse_blob11[] = {
'e', 'n', 't', '-', 'l', 'e', 'n', 'g', 't', 'h'
};

View File

@@ -7,10 +7,10 @@ This broke the build at some point. Does it still? We should probably remove
this patch and find out!
diff --git a/src/node_internals.h b/src/node_internals.h
index fb1188a6bbce37b2bbaba0a815f2826dca60cf3b..843cbf1d253022c9601ceaf74022873a48ac0a5f 100644
index e8d6705e0197aad55b931910bb5221dd33b37fb0..c55ddf6988344eef5fd9efc3b24337d3b1e4cdbb 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -350,10 +350,11 @@ class TraceEventScope {
@@ -358,10 +358,11 @@ class TraceEventScope {
TraceEventScope(const char* category,
const char* name,
void* id) : category_(category), name_(name), id_(id) {

View File

@@ -9,7 +9,7 @@ this has to be done after the upgrade to the Node.js v8.7.0. in the very beginn
to a native Node.js implementation of the function.
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 481d59594dbca27c8529a8b424ab3cb190dd8def..03247551074e1ad3cdd412e6adc0d865746225d1 100644
index 112a35280391ac85665f119ded9c78e88f868542..fc0f953820fa6222ff8cca2e27d3087e05288ff5 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -120,6 +120,8 @@ function enrichCJSError(err) {

View File

@@ -6,7 +6,7 @@ Subject: Inherit ELECTRON_CRASHPAD_PIPE_NAME in child process
This is required for crashReporter to work correctly in node process.
diff --git a/lib/child_process.js b/lib/child_process.js
index 2f478625c8220fc86c34876c17c8f532d88ba922..9a79e06555b6bf5d970f96bedb2c2146d2c74a48 100644
index d5d97c9da90281e0c24fe97a4914db12d685c7bc..a6d058c92dff927cd2fc6bcb2bb304e9ca497a31 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -107,6 +107,10 @@ function fork(modulePath /* , args, options */) {

View File

@@ -10,10 +10,10 @@ node's module code.
(cherry picked from commit 76ba048c37588ee32636817fa7b8dffc64330cbf)
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 2d058b7e0dace3084d068f3e88dffbe93a67390d..a1c6db94e49fb2f13c68dc503481beb3decf5cf4 100644
index c37105fa1ed04bd935bc6886606553cffd56a654..4bd467849ccf98ba17e0f4615d1df5febf878173 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -1102,8 +1102,8 @@ Module._initPaths = function() {
@@ -1110,8 +1110,8 @@ Module._initPaths = function() {
modulePaths = paths;

View File

@@ -6,7 +6,7 @@ Subject: Pass all globals through "require"
(cherry picked from commit 7d015419cb7a0ecfe6728431a4ed2056cd411d62)
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index a1c6db94e49fb2f13c68dc503481beb3decf5cf4..481d59594dbca27c8529a8b424ab3cb190dd8def 100644
index 4bd467849ccf98ba17e0f4615d1df5febf878173..112a35280391ac85665f119ded9c78e88f868542 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -83,6 +83,13 @@ const {
@@ -23,7 +23,7 @@ index a1c6db94e49fb2f13c68dc503481beb3decf5cf4..481d59594dbca27c8529a8b424ab3cb1
const isWindows = process.platform === 'win32';
const relativeResolveCache = Object.create(null);
@@ -951,10 +958,12 @@ Module.prototype._compile = function(content, filename) {
@@ -950,10 +957,12 @@ Module.prototype._compile = function(content, filename) {
if (requireDepth === 0) statCache = new Map();
if (inspectorWrapper) {
result = inspectorWrapper(compiledWrapper, thisValue, exports,

View File

@@ -22,7 +22,7 @@ index 18acd9d2b64774efdb9261e69923a5ba320a7f0e..0f36697ce5ed0b5bb6df74ceca219574
process.config = JSON.parse(internalBinding('native_module').config);
diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js
index 03247551074e1ad3cdd412e6adc0d865746225d1..18fdf148ccca5d92f10b78144eee39bdff7919d2 100644
index fc0f953820fa6222ff8cca2e27d3087e05288ff5..2fddd3766ffb28dc9176ed1b7a4b01361dd72fcd 100644
--- a/lib/internal/modules/cjs/loader.js
+++ b/lib/internal/modules/cjs/loader.js
@@ -42,10 +42,7 @@ const assert = require('internal/assert');

View File

@@ -7,7 +7,7 @@ Subject: refactor: alter child_process.fork to use execute script with
When forking a child script, we setup a special environment to make the Electron binary run like the upstream node. On Mac, we use the helper app as node binary.
diff --git a/lib/child_process.js b/lib/child_process.js
index 43257e53dfe0319d6c110e94529cbc991c2bcfb3..2f478625c8220fc86c34876c17c8f532d88ba922 100644
index 42b04bb9b0629372ed20840a70f768832476d767..d5d97c9da90281e0c24fe97a4914db12d685c7bc 100644
--- a/lib/child_process.js
+++ b/lib/child_process.js
@@ -102,6 +102,15 @@ function fork(modulePath /* , args, options */) {

View File

@@ -8,10 +8,10 @@ The BoringSSL incompatibilities (OPENSSL_memdup) will be shimmed in and this sho
be removed when the associated update is rolled into Chromium.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index d7eff663a5d7465d33f53930868edca6cb89bf49..863b48c614b331fa93a511b21b997891159bb86e 100644
index 861d321d6170b25e874080d4c70dda201cab3248..ef96843c820a5361056022cea5546e94e5572918 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5264,17 +5264,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
@@ -5365,17 +5365,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
return false;
}

View File

@@ -43,6 +43,21 @@
"url": "sccache-win32-x64.zip",
"platform": "win32",
"sha": "b6a20fd1c2026f3792e7286bc768a7ebc261847b76449b49f55455e1f841fecd"
},
{
"url": "goma-win.zip",
"platform": "win32",
"sha": "f97c88aa5d49395ae20387b6329ad406fd019f5fb4aac4ba639ca928b7151f6b"
},
{
"url": "goma-linux.tgz",
"platform": "linux",
"sha": "1cb3099a40f6200ae57216efa26af795c587b6ac7ae97955d1078d0b1e3011a6"
},
{
"url": "goma-mac.tgz",
"platform": "darwin",
"sha": "da1e7de82fbf3b99f1a9d0f9bf51b25e75e8778fec180deb72cff873813d717c"
}
]
}

View File

@@ -1,75 +1,139 @@
[
"abort/test-abort-backtrace",
"async-hooks/test-crypto-pbkdf2",
"async-hooks/test-crypto-randomBytes",
"async-hooks/test-emit-after-on-destroyed",
"async-hooks/test-emit-before-after",
"async-hooks/test-emit-before-on-destroyed",
"async-hooks/test-emit-init",
"async-hooks/test-fseventwrap",
"async-hooks/test-fsreqcallback-readFile",
"async-hooks/test-getaddrinforeqwrap",
"async-hooks/test-getnameinforeqwrap",
"async-hooks/test-graph.signal",
"async-hooks/test-improper-order",
"async-hooks/test-late-hook-enable",
"async-hooks/test-nexttick-default-trigger",
"async-hooks/test-pipewrap",
"async-hooks/test-promise",
"async-hooks/test-queue-microtask",
"async-hooks/test-signalwrap",
"async-hooks/test-statwatcher",
"async-hooks/test-timers.setInterval",
"es-module/test-cjs-esm-warn",
"es-module/test-esm-cjs-load-error-note",
"es-module/test-esm-cjs-main",
"es-module/test-esm-default-type",
"es-module/test-esm-json-cache",
"es-module/test-esm-no-extension",
"es-module/test-esm-scope-node-modules",
"es-module/test-esm-snapshot",
"es-module/test-esm-specifiers",
"es-module/test-esm-type-flag",
"message/assert_throws_stack",
"message/async_error_eval_esm",
"message/async_error_sync_esm",
"message/console",
"message/core_line_numbers",
"message/error_exit",
"message/esm_display_syntax_error",
"message/esm_display_syntax_error_import",
"message/esm_display_syntax_error_import_module",
"message/esm_display_syntax_error_module",
"message/eval_messages",
"message/events_unhandled_error_common_trace",
"message/events_unhandled_error_nexttick",
"message/events_unhandled_error_sameline",
"message/events_unhandled_error_subclass",
"message/if-error-has-good-stack",
"message/internal_assert",
"message/internal_assert_fail",
"message/promise_always_throw_unhandled",
"message/source_map_throw_catch",
"message/source_map_throw_first_tick",
"message/source_map_throw_set_immediate",
"message/undefined_reference_in_new_context",
"message/unhandled_promise_trace_warnings",
"message/util_inspect_error",
"message/v8_warning",
"message/vm_display_runtime_error",
"message/vm_display_syntax_error",
"message/vm_dont_display_runtime_error",
"message/vm_dont_display_syntax_error",
"parallel/test-assert",
"parallel/test-async-hooks-close-during-destroy",
"parallel/test-async-hooks-promise",
"parallel/test-async-hooks-promise-triggerid",
"parallel/test-async-hooks-top-level-clearimmediate",
"parallel/test-inspector-async-hook-after-done",
"parallel/test-inspector-workers-flat-list",
"parallel/test-sync-io-option",
"parallel/test-heapdump-async-hooks-init-promise",
"parallel/test-http2-reset-flood",
"parallel/test-bootstrap-modules",
"parallel/test-buffer-backing-arraybuffer",
"parallel/test-buffer-constructor-node-modules-paths",
"parallel/test-buffer-constructor-outside-node-modules",
"parallel/test-child-process-fork-exec-path",
"parallel/test-cli-bad-options",
"parallel/test-cli-node-print-help",
"parallel/test-child-process-windows-hide",
"parallel/test-cli-bad-options",
"parallel/test-cli-eval",
"parallel/test-cli-syntax-eval",
"parallel/test-cli-node-options",
"parallel/test-cli-syntax-piped-good",
"parallel/test-cli-node-print-help",
"parallel/test-cli-syntax-eval",
"parallel/test-cli-syntax-piped-bad",
"parallel/test-cli-syntax-piped-good",
"parallel/test-code-cache",
"parallel/test-common-gc",
"parallel/test-crypto-aes-wrap",
"parallel/test-crypto",
"parallel/test-crypto-aes-wrap",
"parallel/test-crypto-authenticated",
"parallel/test-crypto-des3-wrap",
"parallel/test-crypto-binary-default",
"parallel/test-crypto-certificate",
"parallel/test-crypto-cipher-decipher",
"parallel/test-crypto-cipheriv-decipheriv",
"parallel/test-crypto-classes",
"parallel/test-crypto-des3-wrap",
"parallel/test-crypto-dh",
"parallel/test-crypto-ecb",
"parallel/test-crypto-ecdh-convert-key",
"parallel/test-crypto-classes",
"parallel/test-crypto-engine",
"parallel/test-crypto-dh",
"parallel/test-crypto-hash-stream-pipe",
"parallel/test-crypto-key-objects",
"parallel/test-crypto-keygen",
"parallel/test-crypto-padding",
"parallel/test-crypto-padding-aes256",
"parallel/test-crypto-sign-verify",
"parallel/test-crypto-rsa-dsa",
"parallel/test-crypto-stream",
"parallel/test-debugger-pid",
"parallel/test-crypto-scrypt",
"parallel/test-crypto-sign-verify",
"parallel/test-crypto-stream",
"parallel/test-debug-usage",
"parallel/test-domain-async-id-map-leak",
"parallel/test-debugger-pid",
"parallel/test-domain-abort-on-uncaught",
"parallel/test-dummy-stdio",
"parallel/test-domain-async-id-map-leak",
"parallel/test-domain-with-abort-on-uncaught-exception",
"parallel/test-dummy-stdio",
"parallel/test-freeze-intrinsics",
"parallel/test-fs-write-sigxfsz",
"parallel/test-http-client-readable",
"parallel/test-gc-tls-external-memory",
"parallel/test-http2-compat-serverrequest-settimeout",
"parallel/test-heapdump-async-hooks-init-promise",
"parallel/test-http-agent-domain-reused-gc",
"parallel/test-http-client-readable",
"parallel/test-http2-compat-serverrequest-settimeout",
"parallel/test-http2-compat-serverresponse-settimeout",
"parallel/test-http2-reset-flood",
"parallel/test-https-agent-session-reuse",
"parallel/test-https-options-boolean-check",
"parallel/test-inspector-async-hook-after-done",
"parallel/test-inspector-esm",
"parallel/test-inspector-heap-allocation-tracker",
"parallel/test-inspector-port-zero-cluster",
"parallel/test-inspector-tracing-domain",
"parallel/test-inspector-vm-global-accessors-getter-sideeffect",
"parallel/test-inspector-vm-global-accessors-sideeffects",
"parallel/test-inspector-workers-flat-list",
"parallel/test-internal-util-weakreference",
"parallel/test-inspector-heap-allocation-tracker",
"parallel/test-module-loading-globalpaths",
"parallel/test-module-version",
"parallel/test-openssl-ca-options",
"parallel/test-preload-print-process-argv",
"parallel/test-policy-integrity",
"parallel/test-preload",
"parallel/test-preload-print-process-argv",
"parallel/test-process-env-allowed-flags-are-documented",
"parallel/test-process-env-sideeffects",
"parallel/test-process-exception-capture",
@@ -80,132 +144,119 @@
"parallel/test-process-external-stdio-close-spawn",
"parallel/test-process-versions",
"parallel/test-readline-interface",
"parallel/test-inspector-esm",
"parallel/test-repl-harmony",
"parallel/test-inspector-tracing-domain",
"parallel/test-repl",
"parallel/test-repl-harmony",
"parallel/test-repl-pretty-custom-stack",
"parallel/test-repl-pretty-stack",
"parallel/test-repl-sigint",
"parallel/test-repl-sigint-nested-eval",
"parallel/test-repl-tab-complete",
"parallel/test-repl-uncaught-exception",
"parallel/test-repl-underscore",
"parallel/test-signal-handler",
"parallel/test-security-revert-unknown",
"parallel/test-signal-handler",
"parallel/test-source-map",
"parallel/test-stdout-close-catch",
"parallel/test-policy-integrity",
"parallel/test-repl-tab-complete",
"parallel/test-sync-io-option",
"parallel/test-tls-cert-chains-concat",
"parallel/test-tls-cert-chains-in-ca",
"parallel/test-tls-client-getephemeralkeyinfo",
"parallel/test-tls-client-mindhsize",
"parallel/test-tls-cli-min-version-1.3",
"parallel/test-tls-cli-max-version-1.2",
"parallel/test-tls-cli-max-version-1.3",
"parallel/test-tls-client-auth",
"parallel/test-tls-cli-min-version-1.1",
"parallel/test-tls-cli-min-version-1.2",
"parallel/test-tls-cli-min-version-1.3",
"parallel/test-tls-client-auth",
"parallel/test-tls-client-getephemeralkeyinfo",
"parallel/test-tls-client-mindhsize",
"parallel/test-tls-client-reject",
"parallel/test-tls-client-renegotiation-13",
"parallel/test-tls-disable-renegotiation",
"parallel/test-tls-empty-sni-context",
"parallel/test-tls-handshake-error",
"parallel/test-tls-env-bad-extra-ca",
"parallel/test-tls-env-extra-ca",
"parallel/test-tls-finished",
"parallel/test-tls-generic-stream",
"parallel/test-tls-getcipher",
"parallel/test-tls-finished",
"parallel/test-tls-env-bad-extra-ca",
"parallel/test-tls-handshake-error",
"parallel/test-tls-honorcipherorder",
"parallel/test-tls-env-extra-ca",
"parallel/test-tls-key-mismatch",
"parallel/test-tls-junk-server",
"parallel/test-tls-key-mismatch",
"parallel/test-tls-max-send-fragment",
"parallel/test-tls-min-max-version",
"parallel/test-tls-multi-key",
"parallel/test-tls-multi-pfx",
"parallel/test-tls-no-cert-required",
"parallel/test-tls-min-max-version",
"parallel/test-tls-options-boolean-check",
"parallel/test-tls-passphrase",
"parallel/test-tls-peer-certificate",
"parallel/test-tls-pfx-authorizationerror",
"parallel/test-tls-server-failed-handshake-emits-clienterror",
"parallel/test-tls-set-ciphers-error",
"parallel/test-tls-set-ciphers",
"parallel/test-tls-socket-failed-handshake-emits-error",
"parallel/test-tls-socket-allow-half-open-option",
"parallel/test-tls-ticket",
"parallel/test-tls-set-ciphers-error",
"parallel/test-tls-set-sigalgs",
"parallel/test-tls-write-error",
"parallel/test-tls-socket-allow-half-open-option",
"parallel/test-tls-socket-failed-handshake-emits-error",
"parallel/test-tls-ticket",
"parallel/test-tls-ticket-cluster",
"parallel/test-tls-write-error",
"parallel/test-trace-events-all",
"parallel/test-trace-events-async-hooks",
"parallel/test-trace-events-binding",
"parallel/test-trace-events-bootstrap",
"parallel/test-trace-events-category-used",
"parallel/test-trace-events-console",
"parallel/test-trace-events-dynamic-enable",
"parallel/test-trace-events-dynamic-enable-workers-disabled",
"parallel/test-trace-events-all",
"parallel/test-trace-events-binding",
"parallel/test-trace-events-async-hooks",
"parallel/test-trace-events-category-used",
"parallel/test-trace-events-fs-sync",
"parallel/test-trace-events-bootstrap",
"parallel/test-trace-events-console",
"parallel/test-trace-events-process-exit",
"parallel/test-trace-events-environment",
"parallel/test-trace-events-file-pattern",
"parallel/test-trace-events-perf",
"parallel/test-trace-events-promises",
"parallel/test-trace-events-fs-sync",
"parallel/test-trace-events-metadata",
"parallel/test-trace-events-none",
"parallel/test-trace-events-vm",
"parallel/test-trace-events-perf",
"parallel/test-trace-events-process-exit",
"parallel/test-trace-events-promises",
"parallel/test-trace-events-v8",
"parallel/test-trace-events-vm",
"parallel/test-trace-events-worker-metadata",
"parallel/test-v8-flags",
"parallel/test-util-inspect",
"parallel/test-v8-coverage",
"parallel/test-v8-flags",
"parallel/test-vm-basic",
"parallel/test-vm-codegen",
"parallel/test-vm-module-basic",
"parallel/test-vm-parse-abort-on-uncaught-exception",
"parallel/test-vm-sigint",
"parallel/test-vm-sigint-existing-handler",
"parallel/test-vm-syntax-error-message",
"parallel/test-vm-timeout",
"parallel/test-warn-sigprof",
"parallel/test-whatwg-encoding-custom-textdecoder",
"parallel/test-worker-debug",
"parallel/test-worker-invalid-workerdata",
"parallel/test-worker-message-channel",
"parallel/test-worker-message-port",
"parallel/test-worker-message-port-transfer-duplicate",
"parallel/test-worker-message-port-transfer-target",
"parallel/test-worker-message-port",
"parallel/test-worker-invalid-workerdata",
"parallel/test-worker-ref-onexit",
"parallel/test-worker-sharedarraybuffer-from-worker-thread",
"parallel/test-worker-stdio",
"parallel/test-wrap-js-stream-exceptions",
"async-hooks/test-crypto-randomBytes",
"async-hooks/test-fseventwrap",
"async-hooks/test-fsreqcallback-readFile",
"async-hooks/test-getaddrinforeqwrap",
"async-hooks/test-emit-after-on-destroyed",
"async-hooks/test-emit-before-after",
"async-hooks/test-emit-before-on-destroyed",
"async-hooks/test-getnameinforeqwrap",
"async-hooks/test-emit-init",
"async-hooks/test-graph.signal",
"async-hooks/test-crypto-pbkdf2",
"async-hooks/test-nexttick-default-trigger",
"async-hooks/test-promise",
"async-hooks/test-improper-order",
"async-hooks/test-pipewrap",
"async-hooks/test-queue-microtask",
"async-hooks/test-signalwrap",
"async-hooks/test-statwatcher",
"async-hooks/test-timers.setInterval",
"async-hooks/test-late-hook-enable",
"es-module/test-esm-cjs-main",
"es-module/test-cjs-esm-warn",
"es-module/test-esm-json-cache",
"es-module/test-esm-snapshot",
"es-module/test-esm-no-extension",
"es-module/test-esm-scope-node-modules",
"es-module/test-esm-cjs-load-error-note",
"pseudo-tty/console_colors",
"pseudo-tty/ref_keeps_node_running",
"pseudo-tty/test-async-wrap-getasyncid-tty",
"pseudo-tty/test-fatal-error",
"pseudo-tty/test-handle-wrap-isrefed-tty",
"pseudo-tty/test-set-raw-mode-reset",
"pseudo-tty/test-set-raw-mode-reset-process-exit",
"pseudo-tty/test-set-raw-mode-reset-signal",
"pseudo-tty/test-tty-color-support",
"pseudo-tty/test-tty-window-size",
"pseudo-tty/test-tty-wrap",
"report/test-report-config",
"report/test-report-getreport",
"report/test-report-signal",
"es-module/test-esm-specifiers",
"report/test-report-uncaught-exception",
"es-module/test-esm-type-flag",
"report/test-report-writereport",
"abort/test-abort-backtrace",
"sequential/test-child-process-execsync",
"sequential/test-cli-syntax-bad",
"sequential/test-cli-syntax-good",
@@ -235,58 +286,9 @@
"sequential/test-inspector-stress-http",
"sequential/test-perf-hooks",
"sequential/test-process-warnings",
"sequential/test-tls-connect",
"parallel/test-vm-module-basic",
"parallel/test-repl-sigint-nested-eval",
"parallel/test-repl-sigint",
"parallel/test-util-inspect",
"sequential/test-vm-timeout-rethrow",
"parallel/test-vm-sigint",
"parallel/test-vm-timeout",
"parallel/test-vm-sigint-existing-handler",
"message/assert_throws_stack",
"message/async_error_eval_esm",
"message/async_error_sync_esm",
"message/console",
"message/core_line_numbers",
"message/error_exit",
"message/esm_display_syntax_error",
"message/esm_display_syntax_error_import",
"message/esm_display_syntax_error_import_module",
"message/esm_display_syntax_error_module",
"message/eval_messages",
"message/events_unhandled_error_common_trace",
"message/events_unhandled_error_nexttick",
"message/events_unhandled_error_sameline",
"message/events_unhandled_error_subclass",
"message/if-error-has-good-stack",
"message/internal_assert",
"message/internal_assert_fail",
"message/promise_always_throw_unhandled",
"message/undefined_reference_in_new_context",
"message/unhandled_promise_trace_warnings",
"message/util_inspect_error",
"message/source_map_throw_catch",
"message/source_map_throw_first_tick",
"message/source_map_throw_set_immediate",
"message/v8_warning",
"message/vm_display_runtime_error",
"message/vm_display_syntax_error",
"message/vm_dont_display_runtime_error",
"message/vm_dont_display_syntax_error",
"pseudo-tty/console_colors",
"pseudo-tty/ref_keeps_node_running",
"pseudo-tty/test-async-wrap-getasyncid-tty",
"pseudo-tty/test-fatal-error",
"pseudo-tty/test-handle-wrap-isrefed-tty",
"pseudo-tty/test-set-raw-mode-reset",
"pseudo-tty/test-set-raw-mode-reset-process-exit",
"pseudo-tty/test-set-raw-mode-reset-signal",
"pseudo-tty/test-tty-color-support",
"pseudo-tty/test-tty-window-size",
"pseudo-tty/test-tty-wrap",
"parallel/test-source-map",
"sequential/test-timers-block-eventloop",
"sequential/test-timers-set-interval-excludes-callback-duration",
"sequential/test-tls-connect",
"sequential/test-vm-timeout-rethrow",
"wpt/test-encoding"
]

View File

@@ -5,6 +5,7 @@ import errno
import hashlib
import json
import os
import tarfile
from lib.config import PLATFORM, get_target_arch
from lib.util import add_exec_bit, download, extract_zip, rm_rf, \
@@ -51,8 +52,12 @@ def main():
temp_path = download_binary(base_url, version, binary['url'], binary['sha'])
# We assume that all binaries are in zip archives.
extract_zip(temp_path, output_dir)
if temp_path.endswith('.zip'):
extract_zip(temp_path, output_dir)
else:
tar = tarfile.open(temp_path, "r:gz")
tar.extractall(output_dir)
tar.close()
# Hack alert. Set exec bit for sccache binaries.
# https://bugs.python.org/issue15795

View File

@@ -101,9 +101,11 @@ void BrowserWindow::UpdateDraggableRegions(
// Draggable regions is implemented by having the whole web view draggable
// (mouseDownCanMoveWindow) and overlaying regions that are not draggable.
draggable_regions_.clear();
for (const auto& r : regions)
draggable_regions_.push_back(r.Clone());
if (&draggable_regions_ != &regions) {
draggable_regions_.clear();
for (const auto& r : regions)
draggable_regions_.push_back(r.Clone());
}
std::vector<gfx::Rect> drag_exclude_rects;
if (regions.empty()) {
drag_exclude_rects.push_back(gfx::Rect(0, 0, webViewWidth, webViewHeight));

View File

@@ -205,6 +205,7 @@ void Notification::NotificationClosed() {
void Notification::Close() {
if (notification_) {
notification_->Dismiss();
notification_->set_delegate(nullptr);
notification_.reset();
}
}

View File

@@ -790,13 +790,8 @@ void TopLevelWindow::SetOverlayIcon(const gfx::Image& overlay,
window_->SetOverlayIcon(overlay, description);
}
void TopLevelWindow::SetVisibleOnAllWorkspaces(bool visible,
gin_helper::Arguments* args) {
gin_helper::Dictionary options;
bool visibleOnFullScreen = false;
args->GetNext(&options) &&
options.Get("visibleOnFullScreen", &visibleOnFullScreen);
return window_->SetVisibleOnAllWorkspaces(visible, visibleOnFullScreen);
void TopLevelWindow::SetVisibleOnAllWorkspaces(bool visible) {
return window_->SetVisibleOnAllWorkspaces(visible);
}
bool TopLevelWindow::IsVisibleOnAllWorkspaces() {

View File

@@ -181,7 +181,7 @@ class TopLevelWindow : public gin_helper::TrackableObject<TopLevelWindow>,
void SetProgressBar(double progress, gin_helper::Arguments* args);
void SetOverlayIcon(const gfx::Image& overlay,
const std::string& description);
void SetVisibleOnAllWorkspaces(bool visible, gin_helper::Arguments* args);
void SetVisibleOnAllWorkspaces(bool visible);
bool IsVisibleOnAllWorkspaces();
void SetAutoHideCursor(bool auto_hide);
virtual void SetVibrancy(v8::Isolate* isolate, v8::Local<v8::Value> value);

View File

@@ -185,8 +185,7 @@ class NativeWindow : public base::SupportsUserData,
const std::string& description) = 0;
// Workspace APIs.
virtual void SetVisibleOnAllWorkspaces(bool visible,
bool visibleOnFullScreen = false) = 0;
virtual void SetVisibleOnAllWorkspaces(bool visible) = 0;
virtual bool IsVisibleOnAllWorkspaces() = 0;

View File

@@ -117,8 +117,7 @@ class NativeWindowMac : public NativeWindow {
void SetOverlayIcon(const gfx::Image& overlay,
const std::string& description) override;
void SetVisibleOnAllWorkspaces(bool visible,
bool visibleOnFullScreen) override;
void SetVisibleOnAllWorkspaces(bool visible) override;
bool IsVisibleOnAllWorkspaces() override;
void SetAutoHideCursor(bool auto_hide) override;

View File

@@ -1271,11 +1271,8 @@ void NativeWindowMac::SetProgressBar(double progress,
void NativeWindowMac::SetOverlayIcon(const gfx::Image& overlay,
const std::string& description) {}
void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible,
bool visibleOnFullScreen) {
void NativeWindowMac::SetVisibleOnAllWorkspaces(bool visible) {
SetCollectionBehavior(visible, NSWindowCollectionBehaviorCanJoinAllSpaces);
SetCollectionBehavior(visibleOnFullScreen,
NSWindowCollectionBehaviorFullScreenAuxiliary);
}
bool NativeWindowMac::IsVisibleOnAllWorkspaces() {

View File

@@ -1156,8 +1156,7 @@ bool NativeWindowViews::IsMenuBarVisible() {
return root_view_->IsMenuBarVisible();
}
void NativeWindowViews::SetVisibleOnAllWorkspaces(bool visible,
bool visibleOnFullScreen) {
void NativeWindowViews::SetVisibleOnAllWorkspaces(bool visible) {
widget()->SetVisibleOnAllWorkspaces(visible);
}

View File

@@ -123,8 +123,7 @@ class NativeWindowViews : public NativeWindow,
void SetMenuBarVisibility(bool visible) override;
bool IsMenuBarVisible() override;
void SetVisibleOnAllWorkspaces(bool visible,
bool visibleOnFullScreen) override;
void SetVisibleOnAllWorkspaces(bool visible) override;
bool IsVisibleOnAllWorkspaces() override;

View File

@@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 9,0,0,20191220
PRODUCTVERSION 9,0,0,20191220
FILEVERSION 9,0,0,20200111
PRODUCTVERSION 9,0,0,20200111
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L

View File

@@ -59,9 +59,11 @@ NSAlert* CreateNSAlert(const MessageBoxSettings& settings) {
int button_count = static_cast<int>([ns_buttons count]);
if (settings.default_id >= 0 && settings.default_id < button_count) {
// Focus the button at default_id if the user opted to do so.
// The first button added gets set as the default selected.
// So remove that default, and make the requested button the default.
// Highlight the button at default_id
[[ns_buttons objectAtIndex:settings.default_id] highlight:YES];
// The first button added gets set as the default selected, so remove
// that and set the button @ default_id to be default.
[[ns_buttons objectAtIndex:0] setKeyEquivalent:@""];
[[ns_buttons objectAtIndex:settings.default_id] setKeyEquivalent:@"\r"];
}

View File

@@ -144,7 +144,8 @@ void SetNodeOptions(base::Environment* env) {
"--force-fips", "--enable-fips"};
// Subset of options allowed in packaged apps
const std::set<std::string> allowed_in_packaged = {"--max-http-header-size"};
const std::set<std::string> allowed_in_packaged = {"--max-http-header-size",
"--http-parser"};
if (env->HasVar("NODE_OPTIONS")) {
std::string options;

View File

@@ -47,9 +47,11 @@ class CachedProxyLifeMonitor final : public ObjectLifeMonitor {
}
if (node_->prev) {
node_->prev->next = node_->next;
node_->prev = nullptr;
}
if (node_->next) {
node_->next->prev = node_->prev;
node_->next = nullptr;
}
if (!node_->prev && !node_->next) {
// Must be a single length linked list
@@ -76,11 +78,7 @@ WeakGlobalPairNode::WeakGlobalPairNode(WeakGlobalPair pair) {
this->pair = std::move(pair);
}
WeakGlobalPairNode::~WeakGlobalPairNode() {
if (next) {
delete next;
}
}
WeakGlobalPairNode::~WeakGlobalPairNode() {}
RenderFramePersistenceStore::RenderFramePersistenceStore(
content::RenderFrame* render_frame)

View File

@@ -141,12 +141,6 @@ void AtomSandboxedRendererClient::InitializeBindings(
process.SetReadOnly("sandboxed", true);
process.SetReadOnly("type", "renderer");
process.SetReadOnly("isMainFrame", is_main_frame);
// Pass in CLI flags needed to setup the renderer
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
if (command_line->HasSwitch(switches::kGuestInstanceID))
b.Set(options::kGuestInstanceID,
command_line->GetSwitchValueASCII(switches::kGuestInstanceID));
}
void AtomSandboxedRendererClient::RenderFrameCreated(

View File

@@ -9,7 +9,7 @@ import { AddressInfo } from 'net'
const features = process.electronBinding('features')
const fixturesPath = path.resolve(__dirname, '../spec/fixtures')
const fixturesPath = path.resolve(__dirname, 'fixtures')
// We can only test the auto updater on darwin non-component builds
const describeFn = (process.platform === 'darwin' && !process.mas && !features.isComponentBuild() ? describe : describe.skip)

View File

@@ -224,7 +224,7 @@ describe('BrowserView module', () => {
describe('new BrowserView()', () => {
it('does not crash on exit', async () => {
const appPath = path.join(fixtures, 'api', 'leak-exit-browserview.js')
const appPath = path.join(__dirname, 'fixtures', 'api', 'leak-exit-browserview.js')
const electronPath = process.execPath
const appProcess = ChildProcess.spawn(electronPath, [appPath])
const [code] = await emittedOnce(appProcess, 'close')

View File

@@ -3603,7 +3603,7 @@ describe('BrowserWindow module', () => {
})
it('throws errors for invalid manifest.json files', () => {
const badManifestExtensionPath = path.join(fixtures, 'devtools-extensions', 'bad-manifest')
const badManifestExtensionPath = path.join(__dirname, 'fixtures', 'devtools-extensions', 'bad-manifest')
expect(() => {
BrowserWindow.addDevToolsExtension(badManifestExtensionPath)
}).to.throw(/Unexpected token }/)
@@ -3614,7 +3614,7 @@ describe('BrowserWindow module', () => {
const extensionName = 'foo'
before(() => {
const extensionPath = path.join(fixtures, 'devtools-extensions', 'foo')
const extensionPath = path.join(__dirname, 'fixtures', 'devtools-extensions', 'foo')
BrowserWindow.addDevToolsExtension(extensionPath)
expect(BrowserWindow.getDevToolsExtensions()).to.have.property(extensionName)
})
@@ -3707,7 +3707,7 @@ describe('BrowserWindow module', () => {
}
})
const extensionPath = path.join(fixtures, 'devtools-extensions', 'foo')
const extensionPath = path.join(__dirname, 'fixtures', 'devtools-extensions', 'foo')
BrowserWindow.addDevToolsExtension(extensionPath)
try {
showLastDevToolsPanel(w)
@@ -3728,7 +3728,7 @@ describe('BrowserWindow module', () => {
it('serializes the registered extensions on quit', () => {
const extensionName = 'foo'
const extensionPath = path.join(fixtures, 'devtools-extensions', extensionName)
const extensionPath = path.join(__dirname, 'fixtures', 'devtools-extensions', extensionName)
const serializedPath = path.join(app.getPath('userData'), 'DevTools Extensions')
BrowserWindow.addDevToolsExtension(extensionPath)
@@ -3749,7 +3749,7 @@ describe('BrowserWindow module', () => {
it('throws errors for invalid manifest.json files', () => {
expect(() => {
BrowserWindow.addExtension(path.join(fixtures, 'devtools-extensions', 'bad-manifest'))
BrowserWindow.addExtension(path.join(__dirname, 'fixtures', 'devtools-extensions', 'bad-manifest'))
}).to.throw('Unexpected token }')
})
})

View File

@@ -32,7 +32,7 @@ describe('debugger module', () => {
expect(w.webContents.debugger.isAttached()).to.be.true()
done()
})
w.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'))
w.webContents.loadURL('about:blank')
})
it('fails when protocol version is not supported', done => {
@@ -134,7 +134,7 @@ describe('debugger module', () => {
const url = process.platform !== 'win32'
? `file://${path.join(fixtures, 'pages', 'a.html')}`
: `file:///${path.join(fixtures, 'pages', 'a.html').replace(/\\/g, '/')}`
w.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'))
w.webContents.loadURL(url)
try {
w.webContents.debugger.attach()
@@ -144,12 +144,16 @@ describe('debugger module', () => {
w.webContents.debugger.on('message', (e, method, params) => {
if (method === 'Console.messageAdded') {
expect(params.message.level).to.equal('log')
expect(params.message.url).to.equal(url)
expect(params.message.text).to.equal('a')
w.webContents.debugger.detach()
done()
try {
expect(params.message.level).to.equal('log')
expect(params.message.url).to.equal(url)
expect(params.message.text).to.equal('a')
done()
} catch (e) {
done(e)
} finally {
w.webContents.debugger.detach()
}
}
})
w.webContents.debugger.sendCommand('Console.enable')

View File

@@ -6,7 +6,7 @@ import { emittedOnce } from './events-helpers'
import { ipcMain, BrowserWindow } from 'electron'
describe('ipc main module', () => {
const fixtures = path.join(__dirname, '..', 'spec', 'fixtures')
const fixtures = path.join(__dirname, 'fixtures')
afterEach(closeAllWindows)

View File

@@ -82,7 +82,7 @@ describe('protocol module', () => {
// Note that we need to do navigation every time after a protocol is
// registered or unregistered, otherwise the new protocol won't be
// recognized by current page when NetworkService is used.
await contents.loadFile(path.join(fixturesPath, 'pages', 'jquery.html'))
await contents.loadFile(path.join(__dirname, 'fixtures', 'pages', 'jquery.html'))
return contents.executeJavaScript(`ajax("${url}", ${JSON.stringify(options)})`)
}

View File

@@ -1122,7 +1122,12 @@ describe('webContents module', () => {
{ name: 'did-fail-load', url: '/net-error' }
]
for (const e of events) {
it(`should not crash when invoked synchronously inside ${e.name} handler`, async () => {
it(`should not crash when invoked synchronously inside ${e.name} handler`, async function () {
// This test is flaky on Windows CI and we don't know why, but the
// purpose of this test is to make sure Electron does not crash so it
// is fine to retry this test for a few times.
this.retries(3)
const contents = (webContents as any).create() as WebContents
const originalEmit = contents.emit.bind(contents)
contents.emit = (...args) => { return originalEmit(...args) }

View File

@@ -5,7 +5,7 @@ import * as path from 'path'
import { session, WebContents, webContents } from 'electron'
import { AddressInfo } from 'net'
const fixturesPath = path.resolve(__dirname, '..', 'spec', 'fixtures')
const fixturesPath = path.resolve(__dirname, 'fixtures')
describe('webRequest module', () => {
const ses = session.defaultSession

View File

@@ -309,7 +309,7 @@ describe('chromium features', () => {
const w = new BrowserWindow({ show: false })
w.webContents.once('did-finish-load', () => { done() })
w.webContents.once('crashed', () => done(new Error('WebContents crashed.')))
w.loadFile(path.join(fixturesPath, 'pages', 'jquery.html'))
w.loadFile(path.join(__dirname, 'fixtures', 'pages', 'jquery.html'))
})
})
@@ -766,22 +766,27 @@ describe('chromium features', () => {
describe('when opened from main window', () => {
for (const { parent, child, nodeIntegration, nativeWindowOpen, openerAccessible } of table) {
const description = `when parent=${s(parent)} opens child=${s(child)} with nodeIntegration=${nodeIntegration} nativeWindowOpen=${nativeWindowOpen}, child should ${openerAccessible ? '' : 'not '}be able to access opener`
it(description, async () => {
const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, nativeWindowOpen } })
await w.loadURL(parent)
const childOpenerLocation = await w.webContents.executeJavaScript(`new Promise(resolve => {
window.addEventListener('message', function f(e) {
resolve(e.data)
for (const sandboxPopup of [false, true]) {
const description = `when parent=${s(parent)} opens child=${s(child)} with nodeIntegration=${nodeIntegration} nativeWindowOpen=${nativeWindowOpen} sandboxPopup=${sandboxPopup}, child should ${openerAccessible ? '' : 'not '}be able to access opener`
it(description, async () => {
const w = new BrowserWindow({ show: false, webPreferences: { nodeIntegration: true, nativeWindowOpen } })
w.webContents.once('new-window', (e, url, frameName, disposition, options) => {
options!.webPreferences!.sandbox = sandboxPopup
})
window.open(${JSON.stringify(child)}, "", "show=no,nodeIntegration=${nodeIntegration ? 'yes' : 'no'}")
})`)
if (openerAccessible) {
expect(childOpenerLocation).to.be.a('string')
} else {
expect(childOpenerLocation).to.be.null()
}
})
await w.loadURL(parent)
const childOpenerLocation = await w.webContents.executeJavaScript(`new Promise(resolve => {
window.addEventListener('message', function f(e) {
resolve(e.data)
})
window.open(${JSON.stringify(child)}, "", "show=no,nodeIntegration=${nodeIntegration ? 'yes' : 'no'}")
})`)
if (openerAccessible) {
expect(childOpenerLocation).to.be.a('string')
} else {
expect(childOpenerLocation).to.be.null()
}
})
}
}
})

View File

@@ -7,7 +7,7 @@ import { emittedNTimes } from './events-helpers'
import { BrowserWindow, ipcMain, WebContents } from 'electron'
describe('chrome extension content scripts', () => {
const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures')
const fixtures = path.resolve(__dirname, 'fixtures')
const extensionPath = path.resolve(fixtures, 'extensions')
const addExtension = (name: string) => BrowserWindow.addExtension(path.resolve(extensionPath, name))

View File

@@ -91,7 +91,7 @@ ifdescribe(process.electronBinding('features').isExtensionsEnabled())('chrome ex
})
ifdescribe(!process.electronBinding('features').isExtensionsEnabled())('chrome extensions', () => {
const fixtures = path.resolve(__dirname, '..', 'spec', 'fixtures')
const fixtures = path.resolve(__dirname, 'fixtures')
let w: BrowserWindow
before(() => {

Some files were not shown because too many files have changed in this diff Show More