chore: bump chromium to a84d34e372b8fb5e9a94b1b4b447e (master) (#23908)

* chore: bump chromium in DEPS to a7249f73ae05d456c04487ef1693325f719556dd

* chore: bump chromium in DEPS to 202466fa40b58f0bb9c9a76a037d1c50154c099e

* chore: bump chromium in DEPS to 2dd1b25c8d794b50fb0dd911e0c4e909ff39f145

* Update patches

* update patches

* Revert "[printing] Mojofy PrintHostMsg_CheckForCancel"

2226002

* chore: bump chromium in DEPS to 8c1542e7dd36854fdf4abd1a8021eeb65a6a2e2b

* chore: bump chromium in DEPS to 078bc6d796334fb403acd8975b99d1c8ecd028e8

* chore: bump chromium in DEPS to d96e9f16ae852ec9dbd15bf17df3d440402413bb

* update patches

* chore: update patches

* Use ExtensionSystem::is_ready() instead of ExtensionService::is_ready()

2207499

* Remove WebImeTextSpan

2225240

* Remove PDFAnnotations flag altogether.

2229317

* Rework find-from-selection so it's synchronous -- fixes flaky tests

2181570

* fixup! Revert "[printing] Mojofy PrintHostMsg_CheckForCancel"

* chore: bump chromium in DEPS to a8a280835830c65145ed8573a9a09f36d3920418

* update sysroots

* update patches

* update patches

* Take RFH as a parameter for DidUpdateFavicon/ManifestURL

2224745

* chore: bump chromium in DEPS to b6149cb5a5e32caf8eab67b97ef3072b72521ca8

* Update patches

* Rename net::cookie_util::StripStatuses to StripAccessResults

2212697

* use net::CookieAccessResultList instead of net::CookieAccessResultList

* fix mas_no_private_api patch

2230281

* chore: bump chromium in DEPS to a27feee1643d952e48f77c92d8c03aedea14b720

* update patches

* fix: add new navigation state REUSE_SITE_INSTANCE

To fix the new set of state checks added in
2215141

* chore: bump chromium in DEPS to ff4559a4c13d20888202474e4ab9917dbdad8a9a

* update patches

* Cleanup usages of old mojo types and remove unused code

2235699

* chore: bump chromium in DEPS to 05279845f76eb22900a8b0d1a11d4fd339a8e53b

* chore: bump chromium in DEPS to 821558279767cffec90e3b5b947865f90089fed3

* chore: bump chromium in DEPS to 1aef04e6486be337d3dd820b2d64d6320a1b9c13

* chore: bump chromium in DEPS to dc86386e8fdd796a0f7577e91e42a7f8b7e9bc78

* chore: bump chromium in DEPS to 64f2360794f14643764092ba3e58e2ed8f9fee12

* chore: update patches

* refactor: MessageLoop, you are terminated \o/

Refs: 2246173

* refactor: plumb DownloadSchedule to DownloadItem

Refs: 2242202

* chore: fix variable typo in IPC

* chore: s/BindPipeAndPassReceiver/BindNewPipeAndPassReceiver

* chore: update patches

* chore: XEvent becomes x11::Event

Refs: 2240355

* fixup! refactor: MessageLoop, you are terminated \o/

* fixup! chore: XEvent becomes x11::Event

* build: update v8 headers

* chore: fix windows build

* chore: disable SameSite-by-default changes

2231445

* update printing.patch

* chore: bump chromium DEPS to 9ae03ef8f7d4f6ac663f725bcfe70311987652f3

* Convert WidgetHostMsg_SelectionBoundsChanged/TextInputStateChanged

2243531

* chore: update v8 patches

* [XProto] Replace usages of XID and ::Window with x11::Window

2249389

* Update VideoFrameMetadata to use base::Optionals

2231706
2238361

* --disable-dev-shm-usage for gpu process crash

* [v8] Allow for 4GB TypedArrays

2249668

* update lib_src_switch_buffer_kmaxlength_to_size_t.patch

* disable app.getGPUInfo spec on linux

* update patches

Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: Electron Bot <anonymous@electronjs.org>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
Electron Bot 2020-06-22 10:35:10 -07:00 committed by GitHub
parent 61a05caa78
commit 72a089262e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
107 changed files with 1029 additions and 663 deletions

View file

@ -38,3 +38,5 @@ chore_sethostcleanupfinalizationgroupcallback_has_been_removed_from.patch
fix_remove_bad_semicolon_outside_fn.patch
fix_comment_out_incompatible_crypto_modules.patch
test_account_for_non-node_basename.patch
lib_src_switch_buffer_kmaxlength_to_size_t.patch
update_tests_after_increasing_typed_array_size.patch

View file

@ -865,10 +865,10 @@ index 0000000000000000000000000000000000000000..2c9d2826c85bdd033f1df1d6188df636
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..ca5ae6d2e24d53db37257192f3c34068ba0f8e69
index 0000000000000000000000000000000000000000..94816008fb2aeb4c8453f87ca8d612afdc6d9e1a
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,513 @@
@@ -0,0 +1,518 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
@ -908,15 +908,18 @@ index 0000000000000000000000000000000000000000..ca5ae6d2e24d53db37257192f3c34068
+ {
+ "dest_dir": "include/node//cppgc/internal/",
+ "files": [
+ "//v8/include/cppgc/internal/accessors.h",
+ "//v8/include/cppgc/internal/api-constants.h",
+ "//v8/include/cppgc/internal/atomic-entry-flag.h",
+ "//v8/include/cppgc/internal/caged-heap-local-data.h",
+ "//v8/include/cppgc/internal/compiler-specific.h",
+ "//v8/include/cppgc/internal/finalizer-trait.h",
+ "//v8/include/cppgc/internal/gc-info.h",
+ "//v8/include/cppgc/internal/logging.h",
+ "//v8/include/cppgc/internal/persistent-node.h",
+ "//v8/include/cppgc/internal/pointer-policies.h",
+ "//v8/include/cppgc/internal/prefinalizer-handler.h"
+ "//v8/include/cppgc/internal/prefinalizer-handler.h",
+ "//v8/include/cppgc/internal/process-heap.h",
+ "//v8/include/cppgc/internal/write-barrier.h"
+ ]
+ },
+ {
@ -1292,6 +1295,8 @@ index 0000000000000000000000000000000000000000..ca5ae6d2e24d53db37257192f3c34068
+ "src/base_object.h",
+ "src/base_object-inl.h",
+ "src/base64.h",
+ "src/callback_queue.h",
+ "src/callback_queue-inl.h",
+ "src/connect_wrap.h",
+ "src/connection_wrap.h",
+ "src/debug_utils.h",

View file

@ -0,0 +1,234 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ben Noordhuis <info@bnoordhuis.nl>
Date: Sat, 18 Jan 2020 10:55:31 +0100
Subject: lib,src: switch Buffer::kMaxLength to size_t
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change the type of `Buffer::kMaxLength` to size_t because upcoming
changes in V8 will allow typed arrays > 2 GB on 64 bits platforms.
Not all platforms handle file reads and writes > 2 GB though so keep
enforcing the 2 GB typed array limit for I/O operations.
Fixes: https://github.com/nodejs/node/issues/31399
Refs: https://github.com/libuv/libuv/pull/1501
PR-URL: https://github.com/nodejs/node/pull/31406
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
diff --git a/lib/fs.js b/lib/fs.js
index 4a19e3b6033711d8c77d1ac9ea7e0f2cd9742ce9..59a41fe62c68c05ab09ad280e4e9ecdb2ca23349 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -24,6 +24,10 @@
'use strict';
+// Most platforms don't allow reads or writes >= 2 GB.
+// See https://github.com/libuv/libuv/pull/1501.
+const kIoMaxLength = 2 ** 31 - 1;
+
const {
Map,
MathMax,
@@ -52,7 +56,7 @@ const {
const pathModule = require('path');
const { isArrayBufferView } = require('internal/util/types');
const binding = internalBinding('fs');
-const { Buffer, kMaxLength } = require('buffer');
+const { Buffer } = require('buffer');
const {
codes: {
ERR_FS_FILE_TOO_LARGE,
@@ -274,7 +278,7 @@ function readFileAfterStat(err, stats) {
const size = context.size = isFileType(stats, S_IFREG) ? stats[8] : 0;
- if (size > kMaxLength) {
+ if (size > kIoMaxLength) {
err = new ERR_FS_FILE_TOO_LARGE(size);
return context.close(err);
}
@@ -331,7 +335,7 @@ function tryCreateBuffer(size, fd, isUserFd) {
let threw = true;
let buffer;
try {
- if (size > kMaxLength) {
+ if (size > kIoMaxLength) {
throw new ERR_FS_FILE_TOO_LARGE(size);
}
buffer = Buffer.allocUnsafe(size);
diff --git a/lib/internal/errors.js b/lib/internal/errors.js
index 1e987cefb156df8e7a494bcb80547ae8e0ea649f..567d82c7bd12a7233481d80042d331afd7471674 100644
--- a/lib/internal/errors.js
+++ b/lib/internal/errors.js
@@ -822,9 +822,7 @@ E('ERR_FALSY_VALUE_REJECTION', function(reason) {
this.reason = reason;
return 'Promise was rejected with falsy value';
}, Error);
-E('ERR_FS_FILE_TOO_LARGE', 'File size (%s) is greater than possible Buffer: ' +
- `${kMaxLength} bytes`,
- RangeError);
+E('ERR_FS_FILE_TOO_LARGE', 'File size (%s) is greater than 2 GB', RangeError);
E('ERR_FS_INVALID_SYMLINK_TYPE',
'Symlink type must be one of "dir", "file", or "junction". Received "%s"',
Error); // Switch to TypeError. The current implementation does not seem right
diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js
index d653724474f314cd1c6bebe0a2d9285439d54928..98335fdc1027409a2f17ae50fba378f5d78b2cab 100644
--- a/lib/internal/fs/promises.js
+++ b/lib/internal/fs/promises.js
@@ -1,5 +1,9 @@
'use strict';
+// Most platforms don't allow reads or writes >= 2 GB.
+// See https://github.com/libuv/libuv/pull/1501.
+const kIoMaxLength = 2 ** 31 - 1;
+
const {
MathMax,
MathMin,
@@ -15,7 +19,7 @@ const {
S_IFREG
} = internalBinding('constants').fs;
const binding = internalBinding('fs');
-const { Buffer, kMaxLength } = require('buffer');
+const { Buffer } = require('buffer');
const {
ERR_FS_FILE_TOO_LARGE,
ERR_INVALID_ARG_TYPE,
@@ -166,7 +170,7 @@ async function readFileHandle(filehandle, options) {
size = 0;
}
- if (size > kMaxLength)
+ if (size > kIoMaxLength)
throw new ERR_FS_FILE_TOO_LARGE(size);
const chunks = [];
diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js
index 6f096336f20e10727b6328af9f0130b37de74050..ff26568bd95e0c966b7f3a7c63d3f594b411fbab 100644
--- a/lib/internal/fs/utils.js
+++ b/lib/internal/fs/utils.js
@@ -12,7 +12,7 @@ const {
Symbol,
} = primordials;
-const { Buffer, kMaxLength } = require('buffer');
+const { Buffer } = require('buffer');
const {
codes: {
ERR_FS_INVALID_SYMLINK_TYPE,
@@ -72,6 +72,10 @@ const {
const isWindows = process.platform === 'win32';
+// Most platforms don't allow reads or writes >= 2 GB.
+// See https://github.com/libuv/libuv/pull/1501.
+const kIoMaxLength = 2 ** 31 - 1;
+
let fs;
function lazyLoadFs() {
if (!fs) {
@@ -525,7 +529,7 @@ const validateOffsetLengthWrite = hideStackFrames(
throw new ERR_OUT_OF_RANGE('offset', `<= ${byteLength}`, offset);
}
- const max = byteLength > kMaxLength ? kMaxLength : byteLength;
+ const max = byteLength > kIoMaxLength ? kIoMaxLength : byteLength;
if (length > max - offset) {
throw new ERR_OUT_OF_RANGE('length', `<= ${max - offset}`, length);
}
diff --git a/src/node_buffer.cc b/src/node_buffer.cc
index 59baa45413d500272d0e293ab06bfe4d24e5e0cb..4d1951b740240bff231b7f4c855beb5b73d076af 100644
--- a/src/node_buffer.cc
+++ b/src/node_buffer.cc
@@ -62,6 +62,7 @@ using v8::Local;
using v8::Maybe;
using v8::MaybeLocal;
using v8::Nothing;
+using v8::Number;
using v8::Object;
using v8::String;
using v8::Uint32;
@@ -1161,7 +1162,7 @@ void Initialize(Local<Object> target,
target->Set(env->context(),
FIXED_ONE_BYTE_STRING(env->isolate(), "kMaxLength"),
- Integer::NewFromUnsigned(env->isolate(), kMaxLength)).Check();
+ Number::New(env->isolate(), kMaxLength)).Check();
target->Set(env->context(),
FIXED_ONE_BYTE_STRING(env->isolate(), "kStringMaxLength"),
diff --git a/src/node_buffer.h b/src/node_buffer.h
index 11010017ce0df8367b1992bd9df57117ff50454d..606a6f5caa3b11b6d2a9068ed2fd65800530a5eb 100644
--- a/src/node_buffer.h
+++ b/src/node_buffer.h
@@ -29,7 +29,7 @@ namespace node {
namespace Buffer {
-static const unsigned int kMaxLength = v8::TypedArray::kMaxLength;
+static const size_t kMaxLength = v8::TypedArray::kMaxLength;
typedef void (*FreeCallback)(char* data, void* hint);
diff --git a/test/parallel/test-fs-util-validateoffsetlengthwrite.js b/test/parallel/test-fs-util-validateoffsetlengthwrite.js
index be6d8acea77efa5adc82a6bcaaa192167b510fb0..e2c583749d041d76da630bbbf6b46ac490076c56 100644
--- a/test/parallel/test-fs-util-validateoffsetlengthwrite.js
+++ b/test/parallel/test-fs-util-validateoffsetlengthwrite.js
@@ -4,7 +4,10 @@
require('../common');
const assert = require('assert');
const { validateOffsetLengthWrite } = require('internal/fs/utils');
-const { kMaxLength } = require('buffer');
+
+// Most platforms don't allow reads or writes >= 2 GB.
+// See https://github.com/libuv/libuv/pull/1501.
+const kIoMaxLength = 2 ** 31 - 1;
// RangeError when offset > byteLength
{
@@ -22,27 +25,27 @@ const { kMaxLength } = require('buffer');
);
}
-// RangeError when byteLength > kMaxLength, and length > kMaxLength - offset .
+// RangeError when byteLength > kIoMaxLength, and length > kIoMaxLength - offset .
{
- const offset = kMaxLength;
+ const offset = kIoMaxLength;
const length = 100;
- const byteLength = kMaxLength + 1;
+ const byteLength = kIoMaxLength + 1;
assert.throws(
() => validateOffsetLengthWrite(offset, length, byteLength),
{
code: 'ERR_OUT_OF_RANGE',
name: 'RangeError',
message: 'The value of "length" is out of range. ' +
- `It must be <= ${kMaxLength - offset}. Received ${length}`
+ `It must be <= ${kIoMaxLength - offset}. Received ${length}`
}
);
}
-// RangeError when byteLength < kMaxLength, and length > byteLength - offset .
+// RangeError when byteLength < kIoMaxLength, and length > byteLength - offset.
{
- const offset = kMaxLength - 150;
+ const offset = kIoMaxLength - 150;
const length = 200;
- const byteLength = kMaxLength - 100;
+ const byteLength = kIoMaxLength - 100;
assert.throws(
() => validateOffsetLengthWrite(offset, length, byteLength),
{

View file

@ -0,0 +1,50 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Kim-Anh Tran <kimanh@chromium.org>
Date: Fri, 19 Jun 2020 11:29:45 +0200
Subject: Update tests after increasing typed array size
Refs https://github.com/v8/node/pull/114
diff --git a/test/parallel/test-buffer-alloc.js b/test/parallel/test-buffer-alloc.js
index 070a3803802e56ec7736791559ec7d7204625754..9f626c0683ae74ae984496c77d0b73c9b4c7b872 100644
--- a/test/parallel/test-buffer-alloc.js
+++ b/test/parallel/test-buffer-alloc.js
@@ -8,8 +8,8 @@ const SlowBuffer = require('buffer').SlowBuffer;
// Verify the maximum Uint8Array size. There is no concrete limit by spec. The
// internal limits should be updated if this fails.
assert.throws(
- () => new Uint8Array(2 ** 32),
- { message: 'Invalid typed array length: 4294967296' }
+ () => new Uint8Array(2 ** 32 + 1),
+ { message: 'Invalid typed array length: 4294967297' }
);
const b = Buffer.allocUnsafe(1024);
diff --git a/test/parallel/test-buffer-over-max-length.js b/test/parallel/test-buffer-over-max-length.js
index b04f89aae0344c008dff4c737aac96f53d6f7e17..ddbd93ddb088deb53304cb06d8fcdc59214dbc31 100644
--- a/test/parallel/test-buffer-over-max-length.js
+++ b/test/parallel/test-buffer-over-max-length.js
@@ -12,11 +12,11 @@ const bufferMaxSizeMsg = {
message: /^The value "[^"]*" is invalid for option "size"$/
};
-assert.throws(() => Buffer((-1 >>> 0) + 1), bufferMaxSizeMsg);
-assert.throws(() => SlowBuffer((-1 >>> 0) + 1), bufferMaxSizeMsg);
-assert.throws(() => Buffer.alloc((-1 >>> 0) + 1), bufferMaxSizeMsg);
-assert.throws(() => Buffer.allocUnsafe((-1 >>> 0) + 1), bufferMaxSizeMsg);
-assert.throws(() => Buffer.allocUnsafeSlow((-1 >>> 0) + 1), bufferMaxSizeMsg);
+assert.throws(() => Buffer((-1 >>> 0) + 2), bufferMaxSizeMsg);
+assert.throws(() => SlowBuffer((-1 >>> 0) + 2), bufferMaxSizeMsg);
+assert.throws(() => Buffer.alloc((-1 >>> 0) + 2), bufferMaxSizeMsg);
+assert.throws(() => Buffer.allocUnsafe((-1 >>> 0) + 2), bufferMaxSizeMsg);
+assert.throws(() => Buffer.allocUnsafeSlow((-1 >>> 0) + 2), bufferMaxSizeMsg);
assert.throws(() => Buffer(kMaxLength + 1), bufferMaxSizeMsg);
assert.throws(() => SlowBuffer(kMaxLength + 1), bufferMaxSizeMsg);
@@ -25,5 +25,5 @@ assert.throws(() => Buffer.allocUnsafe(kMaxLength + 1), bufferMaxSizeMsg);
assert.throws(() => Buffer.allocUnsafeSlow(kMaxLength + 1), bufferMaxSizeMsg);
// issue GH-4331
-assert.throws(() => Buffer.allocUnsafe(0x100000000), bufferMaxSizeMsg);
+assert.throws(() => Buffer.allocUnsafe(0x100000001), bufferMaxSizeMsg);
assert.throws(() => Buffer.allocUnsafe(0xFFFFFFFFF), bufferMaxSizeMsg);