chore: upgrade to Node.js v18 (#35999)
* chore: update to Node.js v18
* child_process: improve argument validation
https://github.com/nodejs/node/pull/41305
* bootstrap: support configure-time user-land snapshot
https://github.com/nodejs/node/pull/42466
* chore: update GN patch
* src: disambiguate terms used to refer to builtins and addons
https://github.com/nodejs/node/pull/44135
* src: use a typed array internally for process._exiting
https://github.com/nodejs/node/pull/43883
* chore: lib/internal/bootstrap -> lib/internal/process
* src: disambiguate terms used to refer to builtins and addons
https://github.com/nodejs/node/pull/44135
* chore: remove redudant browserGlobals patch
* chore: update BoringSSL patch
* src: allow embedder-provided PageAllocator in NodePlatform
https://github.com/nodejs/node/pull/38362
* chore: fixup Node.js crypto tests
- https://github.com/nodejs/node/pull/44171
- https://github.com/nodejs/node/pull/41600
* lib: add Promise methods to avoid-prototype-pollution lint rule
https://github.com/nodejs/node/pull/43849
* deps: update V8 to 10.1
https://github.com/nodejs/node/pull/42657
* src: add kNoBrowserGlobals flag for Environment
https://github.com/nodejs/node/pull/40532
* chore: consolidate asar initialization patches
* deps: update V8 to 10.1
https://github.com/nodejs/node/pull/42657
* deps: update V8 to 9.8
https://github.com/nodejs/node/pull/41610
* src,crypto: remove AllocatedBuffers from crypto_spkac
https://github.com/nodejs/node/pull/40752
* build: enable V8's shared read-only heap
https://github.com/nodejs/node/pull/42809
* src: fix ssize_t error from nghttp2.h
https://github.com/nodejs/node/pull/44393
* chore: fixup ESM patch
* chore: fixup patch indices
* src: merge NativeModuleEnv into NativeModuleLoader
https://github.com/nodejs/node/pull/43824
* [API] Pass OOMDetails to OOMErrorCallback
3647827
* src: iwyu in cleanup_queue.cc
* src: return Maybe from a couple of functions
https://github.com/nodejs/node/pull/39603
* src: clean up embedder API
https://github.com/nodejs/node/pull/35897
* src: refactor DH groups to delete crypto_groups.h
https://github.com/nodejs/node/pull/43896
* deps,src: use SIMD for normal base64 encoding
https://github.com/nodejs/node/pull/39775
* chore: remove deleted source file
* chore: update patches
* chore: remove deleted source file
* lib: add fetch
https://github.com/nodejs/node/pull/41749
* chore: remove nonexistent node specs
* test: split report OOM tests
https://github.com/nodejs/node/pull/44389
* src: trace fs async api
https://github.com/nodejs/node/pull/44057
* http: trace http request / response
https://github.com/nodejs/node/pull/44102
* test: split test-crypto-dh.js
https://github.com/nodejs/node/pull/40451
* crypto: introduce X509Certificate API
https://github.com/nodejs/node/pull/36804
* src: split property helpers from node::Environment
https://github.com/nodejs/node/pull/44056
* https://github.com/nodejs/node/pull/38905
bootstrap: implement run-time user-land snapshots via --build-snapshot and --snapshot-blob
* lib,src: implement WebAssembly Web API
https://github.com/nodejs/node/pull/42701
* fixup! deps,src: use SIMD for normal base64 encoding
* fixup! src: refactor DH groups to delete crypto_groups.h
* chore: fixup base64 GN file
* fix: check that node::InitializeContext() returns true
* chore: delete _noBrowserGlobals usage
* chore: disable fetch in renderer procceses
* dns: default to verbatim=true in dns.lookup()
https://github.com/nodejs/node/pull/39987
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
This commit is contained in:
parent
1b1609aa0f
commit
75d2caf451
50 changed files with 792 additions and 1134 deletions
|
@ -7,10 +7,10 @@ This refactors several allocators to allocate within the V8 memory cage,
|
|||
allowing them to be compatible with the V8_SANDBOXED_POINTERS feature.
|
||||
|
||||
diff --git a/src/api/environment.cc b/src/api/environment.cc
|
||||
index 9cbe99596b1b8c148ac076acf8a9623d6989d505..93d85d46dc6b3b30795b88ffa8070253f62e51bd 100644
|
||||
index 8a7ad50b818448fa14eb4707c1dcec2a1339d2db..b6981c37d5b286e22f24d11751eb05f72ca27619 100644
|
||||
--- a/src/api/environment.cc
|
||||
+++ b/src/api/environment.cc
|
||||
@@ -80,6 +80,14 @@ MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context,
|
||||
@@ -82,6 +82,14 @@ MaybeLocal<Value> PrepareStackTraceCallback(Local<Context> context,
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -26,10 +26,10 @@ index 9cbe99596b1b8c148ac076acf8a9623d6989d505..93d85d46dc6b3b30795b88ffa8070253
|
|||
void* ret;
|
||||
if (zero_fill_field_ || per_process::cli_options->zero_fill_all_buffers)
|
||||
diff --git a/src/crypto/crypto_util.cc b/src/crypto/crypto_util.cc
|
||||
index 840fe824617b951d4f4421155c5e1ce79c28525e..b1ae378993723d7a0a71bfe36fc5be94a899082a 100644
|
||||
index 51973d7cb15f0650f3e94a7b8c9811c550ee9b0f..1ab08092e8b8ad8a989eaa18f8e573b5948d295f 100644
|
||||
--- a/src/crypto/crypto_util.cc
|
||||
+++ b/src/crypto/crypto_util.cc
|
||||
@@ -332,10 +332,35 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept {
|
||||
@@ -326,10 +326,35 @@ ByteSource& ByteSource::operator=(ByteSource&& other) noexcept {
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
@ -66,7 +66,7 @@ index 840fe824617b951d4f4421155c5e1ce79c28525e..b1ae378993723d7a0a71bfe36fc5be94
|
|||
std::unique_ptr<BackingStore> ptr = ArrayBuffer::NewBackingStore(
|
||||
allocated_data_,
|
||||
size(),
|
||||
@@ -347,10 +372,11 @@ std::unique_ptr<BackingStore> ByteSource::ReleaseToBackingStore() {
|
||||
@@ -341,10 +366,11 @@ std::unique_ptr<BackingStore> ByteSource::ReleaseToBackingStore() {
|
||||
data_ = nullptr;
|
||||
size_ = 0;
|
||||
return ptr;
|
||||
|
@ -79,10 +79,10 @@ index 840fe824617b951d4f4421155c5e1ce79c28525e..b1ae378993723d7a0a71bfe36fc5be94
|
|||
return ArrayBuffer::New(env->isolate(), std::move(store));
|
||||
}
|
||||
|
||||
@@ -680,6 +706,16 @@ CryptoJobMode GetCryptoJobMode(v8::Local<v8::Value> args) {
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -658,6 +684,16 @@ namespace {
|
||||
// in which case this has the same semantics as
|
||||
// using OPENSSL_malloc. However, if the secure heap is
|
||||
// initialized, SecureBuffer will automatically use it.
|
||||
+#if defined(V8_ENABLE_SANDBOX)
|
||||
+// When V8 sandboxed pointers are enabled, the secure heap cannot be used as
|
||||
+// all ArrayBuffers must be allocated inside the V8 memory cage.
|
||||
|
@ -93,10 +93,10 @@ index 840fe824617b951d4f4421155c5e1ce79c28525e..b1ae378993723d7a0a71bfe36fc5be94
|
|||
+ args.GetReturnValue().Set(Uint8Array::New(buffer, 0, len));
|
||||
+}
|
||||
+#else
|
||||
// SecureBuffer uses openssl to allocate a Uint8Array using
|
||||
// OPENSSL_secure_malloc. Because we do not yet actually
|
||||
// make use of secure heap, this has the same semantics as
|
||||
@@ -707,6 +743,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
CHECK(args[0]->IsUint32());
|
||||
Environment* env = Environment::GetCurrent(args);
|
||||
@@ -679,6 +715,7 @@ void SecureBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
Local<ArrayBuffer> buffer = ArrayBuffer::New(env->isolate(), store);
|
||||
args.GetReturnValue().Set(Uint8Array::New(buffer, 0, len));
|
||||
}
|
||||
|
@ -105,10 +105,10 @@ index 840fe824617b951d4f4421155c5e1ce79c28525e..b1ae378993723d7a0a71bfe36fc5be94
|
|||
void SecureHeapUsed(const FunctionCallbackInfo<Value>& args) {
|
||||
#ifndef OPENSSL_IS_BORINGSSL
|
||||
diff --git a/src/crypto/crypto_util.h b/src/crypto/crypto_util.h
|
||||
index f26422ee106ab7a816750ee717cb18ea454b5b62..5e5798e7e55dbb2df93ef4a8ab6f40aeb85616b4 100644
|
||||
index dc3bb15cfb48a8fdca471ac87840a8de30437920..f54555ae83e0bc2a4fc1bd1c6da08b30dfc1c6e4 100644
|
||||
--- a/src/crypto/crypto_util.h
|
||||
+++ b/src/crypto/crypto_util.h
|
||||
@@ -241,7 +241,7 @@ class ByteSource {
|
||||
@@ -279,7 +279,7 @@ class ByteSource {
|
||||
// Creates a v8::BackingStore that takes over responsibility for
|
||||
// any allocated data. The ByteSource will be reset with size = 0
|
||||
// after being called.
|
||||
|
@ -118,7 +118,7 @@ index f26422ee106ab7a816750ee717cb18ea454b5b62..5e5798e7e55dbb2df93ef4a8ab6f40ae
|
|||
v8::Local<v8::ArrayBuffer> ToArrayBuffer(Environment* env);
|
||||
|
||||
diff --git a/src/node_i18n.cc b/src/node_i18n.cc
|
||||
index c537a247f55ff070da1988fc8b7309b5692b5c18..59bfb597849cd5a94800d6c83b238ef77245243e 100644
|
||||
index 581d52a7d05738133e5c3fad33cb73b7c575ef0b..6a4f24aa1d6853826e7ab5c729918c9048284128 100644
|
||||
--- a/src/node_i18n.cc
|
||||
+++ b/src/node_i18n.cc
|
||||
@@ -104,7 +104,7 @@ namespace {
|
||||
|
@ -131,10 +131,10 @@ index c537a247f55ff070da1988fc8b7309b5692b5c18..59bfb597849cd5a94800d6c83b238ef7
|
|||
return ret;
|
||||
|
||||
diff --git a/src/node_internals.h b/src/node_internals.h
|
||||
index f7314c906e580664be445a8912030e17a3ac2fa4..99258ad0aa1e15ea1ba139fd0e83111e1436cc40 100644
|
||||
index 1449d2acd327b9cbbe32286ec6b7f6b412e693a2..d626d86c8dd8be78b3035be77867903fa0be68d7 100644
|
||||
--- a/src/node_internals.h
|
||||
+++ b/src/node_internals.h
|
||||
@@ -97,7 +97,9 @@ bool InitializePrimordials(v8::Local<v8::Context> context);
|
||||
@@ -99,7 +99,9 @@ v8::Maybe<bool> InitializePrimordials(v8::Local<v8::Context> context);
|
||||
|
||||
class NodeArrayBufferAllocator : public ArrayBufferAllocator {
|
||||
public:
|
||||
|
@ -145,7 +145,7 @@ index f7314c906e580664be445a8912030e17a3ac2fa4..99258ad0aa1e15ea1ba139fd0e83111e
|
|||
|
||||
void* Allocate(size_t size) override; // Defined in src/node.cc
|
||||
void* AllocateUninitialized(size_t size) override;
|
||||
@@ -116,7 +118,7 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator {
|
||||
@@ -118,7 +120,7 @@ class NodeArrayBufferAllocator : public ArrayBufferAllocator {
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -155,7 +155,7 @@ index f7314c906e580664be445a8912030e17a3ac2fa4..99258ad0aa1e15ea1ba139fd0e83111e
|
|||
|
||||
// Delegate to V8's allocator for compatibility with the V8 memory cage.
|
||||
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
|
||||
index f6f0034bc24d09e3ad65491c7d6be0b9c9db1581..92d5020f293c98c81d3891a82f7320629bf9f926 100644
|
||||
index 45a16d9de43703c2115dde85c9faae3a04be2a88..0cd76078218433b46c17f350e3ba6073987438cf 100644
|
||||
--- a/src/node_serdes.cc
|
||||
+++ b/src/node_serdes.cc
|
||||
@@ -29,6 +29,11 @@ using v8::ValueSerializer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue