Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v18.9.0 release proposal #44521

Merged
merged 94 commits into from
Sep 8, 2022
Merged
Changes from 1 commit
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
30da2b4
build: added NINJA env to customize ninja binary
jdx Aug 22, 2022
7039916
tls: use OpenSSL constant for client random size
tniessen Aug 22, 2022
1cdccbc
tls: remove SecureContext setFreeListLength
tniessen Aug 22, 2022
6857ee8
src: make minor improvements to SecureBuffer
tniessen Aug 22, 2022
28781a1
crypto: improve RSA-PSS digest error messages
tniessen Aug 22, 2022
768c9cb
src: fix multiple format string bugs
tniessen Aug 22, 2022
11e9d6e
test: make tmpdir.js importable from esm
GeoffreyBooth Aug 23, 2022
8cc5556
doc: fix typo in test runner code examples
MoLow Aug 23, 2022
4a0f750
doc: add daeyeon to collaborators
daeyeon Aug 23, 2022
65c1f40
doc: add history for net.createServer() options
lpinca Aug 23, 2022
bce827e
vm: make ContextifyContext template context-independent
joyeecheung Aug 16, 2022
736a04a
vm: include vm context in the embedded snapshot
joyeecheung Aug 16, 2022
c4a45a9
vm: avoid unnecessary property getter interceptor calls
joyeecheung Aug 17, 2022
57da3db
deps: update undici to 5.9.1
nodejs-github-bot Aug 24, 2022
8175c65
test_runner: support programmatically running `--test`
MoLow Aug 15, 2022
b1eafe1
debugger: decrease timeout used to wait for the port to be free
joyeecheung Aug 24, 2022
c65d7fb
test: add OpenSSL 3.x providers test
richardlau Aug 24, 2022
df25900
report: add queue info for udp
theanarkh Aug 24, 2022
1f23c17
report: expose report public native apis
legendecas Aug 24, 2022
8b0a4af
tty: fix TypeError when stream is closed
aduh95 Aug 24, 2022
88d9566
src: remove KeyObjectData::symmetric_key_len_
tniessen Aug 24, 2022
8e2dcaf
test: remove duplicate test
lpinca Aug 24, 2022
2563401
node-api: cleanup redundant static modifiers
legendecas Aug 25, 2022
3eb7918
src: make minor improvements to EnabledDebugList
tniessen Aug 25, 2022
ed52bd0
doc: fix style of n-api.md
theanarkh Aug 25, 2022
1e451dc
deps: upgrade llhttp to 6.0.9
ShogunPanda Aug 25, 2022
e001aaf
test: raise sleep times in child process tests
joyeecheung Aug 25, 2022
c3dbe18
crypto: simplify control flow in HKDF
tniessen Aug 25, 2022
2ed3b30
inspector: prevent integer overflow in open()
tniessen Aug 25, 2022
3a5fdac
test: fix WPT runner result
daeyeon Aug 26, 2022
1b50ff2
deps: update icu tzdata to 2022b
Manizuca Aug 18, 2022
2be8aca
src: simplify ECDH::GetCurves()
tniessen Aug 26, 2022
a86ef1b
lib: use safe `Promise` alternatives when available
aduh95 Aug 17, 2022
b670954
tools: refactor `avoid-prototype-pollution` lint rule
aduh95 Jun 17, 2022
7f16177
src: use `if constexpr` where appropriate
addaleax Aug 27, 2022
21437f7
doc: fix release guide example consistency
ruyadorno Aug 27, 2022
65134d6
stream: fix `ReadableStreamReader.releaseLock()`
daeyeon Aug 27, 2022
96df993
tools: update eslint to 8.23.0
nodejs-github-bot Aug 27, 2022
cef30f9
doc: note on release guide to update `main` branch
ruyadorno Aug 27, 2022
b8f08e5
lib: codify findSourceMap return value when not found
legendecas Aug 27, 2022
c03f28b
meta: update AUTHORS
nodejs-github-bot Aug 28, 2022
443730c
tools: update doc to unist-util-visit@4.1.1
nodejs-github-bot Aug 28, 2022
754d26a
deps: patch V8 to 10.2.154.15
targos Aug 28, 2022
e27e709
build: add --libdir flag to configure
sgallagher Aug 28, 2022
05fb650
src: simplify and optimize GetOpenSSLVersion()
tniessen Aug 28, 2022
78c6827
tools: don't use f-strings in test.py
santigimeno Aug 28, 2022
3c53548
cluster: fix cluster rr distribute error
theanarkh Aug 28, 2022
0f4e98b
src: restore context default IsCodeGenerationFromStringsAllowed value
legendecas Aug 28, 2022
dc1c95e
src: trace fs async api
theanarkh Aug 28, 2022
4ae1f49
test: split report OOM tests
joyeecheung Aug 25, 2022
b660b74
doc,worker: document resourceLimits overrides
kvakil Aug 29, 2022
6714736
os: add machine method
theanarkh Aug 29, 2022
048e440
src: fix ssize_t error from nghttp2.h
RaisinTen Aug 29, 2022
8e41dbb
doc: mention cherry-pick edge-case on release
RafaelGSS Aug 26, 2022
3e6cde5
doc: fix spacing issue in `--build-snapshot` help text
syohex Aug 29, 2022
1e62bb1
tools: fix typo in `avoid-prototype-pollution` lint rule
aduh95 Aug 30, 2022
8db2e66
src: make Endianness an enum class
tniessen Aug 30, 2022
92046e8
doc: apply scroll-margin-top to h2, h3 elements
metonym Aug 30, 2022
4776b47
src: fix uv_err_name memory leak
theanarkh Aug 30, 2022
2dd88b8
test: fix multiple incorrect mustNotCall() uses
tniessen Aug 30, 2022
35cbe1a
crypto: use actual option name in error message
tniessen Aug 31, 2022
fd611cc
src: remove base64_select_table and base64_table
tniessen Aug 31, 2022
ef08cbd
node-api: avoid calling virtual methods in base's dtor
legendecas Aug 31, 2022
0f071b8
test: split heap prof tests
joyeecheung Aug 25, 2022
0af15c7
test: make the vm timeout escape tests more lenient
joyeecheung Aug 29, 2022
e36ed44
test: deflake child process exec timeout tests
joyeecheung Aug 25, 2022
dcc1cf4
src: add error handling to `uv_uptime` call
juanarbol Aug 24, 2022
255e7fb
deps: update Acorn to v8.8.0
targos Aug 31, 2022
71c8696
doc: add missing imports in events sample code
mrbrianevans Aug 31, 2022
ae028e8
doc: improve assert.snapshot() docs
cjihrig Aug 28, 2022
0d77342
test: style updates for assert.snapshot()
cjihrig Aug 28, 2022
11452a9
doc: add --update-assert-snapshot to node.1
cjihrig Aug 28, 2022
c5413a1
src: simplify enable_if logic of `ToStringHelper::BaseConvert`
F3n67u Sep 1, 2022
4c33e5d
test: avoid race in file write stream handle tests
joyeecheung Aug 24, 2022
c5630ad
deps: V8: backport ff8d67c88449
targos Sep 1, 2022
4331bbe
src: expose environment RequestInterrupt api
legendecas Aug 21, 2022
18b7208
src: avoid casting std::trunc(... / ...) to size_t
tniessen Sep 1, 2022
aa34f73
src: fix incorrect comments in crypto
tniessen Sep 1, 2022
125ab7d
src: improve error handling in CloneSSLCerts
tniessen Sep 1, 2022
54b6ed5
doc: use serial comma in addons docs
tniessen Sep 1, 2022
b17cc87
report: fix missing section javascriptHeap on OOMError
legendecas Aug 25, 2022
807b1e5
report: get stack trace with cross origin contexts
legendecas Aug 26, 2022
cf19a79
deps: upgrade npm to 8.19.1
npm-cli-bot Sep 2, 2022
05006ed
doc: do not use "Returns:" for crypto.constants
tniessen Sep 2, 2022
c868e36
crypto: add digest name to INVALID_DIGEST errors
tniessen Sep 2, 2022
5cefd02
crypto: handle invalid prepareAsymmetricKey JWK inputs
panva Sep 3, 2022
2facf8b
stream: fix setting abort reason in `ReadableStream.pipeTo()`
daeyeon Sep 3, 2022
a35c2f9
test_runner: fix `duration_ms` to be milliseconds
MoLow Sep 4, 2022
e519ac7
meta: update AUTHORS
nodejs-github-bot Sep 4, 2022
6fe189b
tools: update lint-md-dependencies to rollup@2.79.0
nodejs-github-bot Sep 4, 2022
fc17b80
src: rename misleading arg in ClientHelloParser
tniessen Sep 4, 2022
1c87a7e
doc: add missing parenthesis in TLSSocket section
tniessen Sep 4, 2022
8ef5c40
deps: update corepack to 0.14.0
nodejs-github-bot Sep 5, 2022
9ae2af4
2022-09-08, Version v18.9.0 (Current)
RafaelGSS Sep 5, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
node-api: cleanup redundant static modifiers
Functions declared in anonymous namespaces are not necessarily to be
marked as static.

PR-URL: #44301
Refs: #44141
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michael Dawson <midawson@redhat.com>
  • Loading branch information
legendecas authored and RafaelGSS committed Sep 5, 2022
commit 256340197c72b46c50f02d8b68528ee08bf63f97
34 changes: 16 additions & 18 deletions src/js_native_api_v8.cc
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@ namespace v8impl {

namespace {

inline static napi_status V8NameFromPropertyDescriptor(
inline napi_status V8NameFromPropertyDescriptor(
napi_env env,
const napi_property_descriptor* p,
v8::Local<v8::Name>* result) {
@@ -79,7 +79,7 @@ inline static napi_status V8NameFromPropertyDescriptor(
}

// convert from n-api property attributes to v8::PropertyAttribute
inline static v8::PropertyAttribute V8PropertyAttributesFromDescriptor(
inline v8::PropertyAttribute V8PropertyAttributesFromDescriptor(
const napi_property_descriptor* descriptor) {
unsigned int attribute_flags = v8::PropertyAttribute::None;

@@ -100,12 +100,12 @@ inline static v8::PropertyAttribute V8PropertyAttributesFromDescriptor(
return static_cast<v8::PropertyAttribute>(attribute_flags);
}

inline static napi_deferred JsDeferredFromNodePersistent(
inline napi_deferred JsDeferredFromNodePersistent(
v8impl::Persistent<v8::Value>* local) {
return reinterpret_cast<napi_deferred>(local);
}

inline static v8impl::Persistent<v8::Value>* NodePersistentFromJsDeferred(
inline v8impl::Persistent<v8::Value>* NodePersistentFromJsDeferred(
napi_deferred local) {
return reinterpret_cast<v8impl::Persistent<v8::Value>*>(local);
}
@@ -139,32 +139,30 @@ class EscapableHandleScopeWrapper {
bool escape_called_;
};

inline static napi_handle_scope JsHandleScopeFromV8HandleScope(
HandleScopeWrapper* s) {
inline napi_handle_scope JsHandleScopeFromV8HandleScope(HandleScopeWrapper* s) {
return reinterpret_cast<napi_handle_scope>(s);
}

inline static HandleScopeWrapper* V8HandleScopeFromJsHandleScope(
napi_handle_scope s) {
inline HandleScopeWrapper* V8HandleScopeFromJsHandleScope(napi_handle_scope s) {
return reinterpret_cast<HandleScopeWrapper*>(s);
}

inline static napi_escapable_handle_scope
inline napi_escapable_handle_scope
JsEscapableHandleScopeFromV8EscapableHandleScope(
EscapableHandleScopeWrapper* s) {
return reinterpret_cast<napi_escapable_handle_scope>(s);
}

inline static EscapableHandleScopeWrapper*
inline EscapableHandleScopeWrapper*
V8EscapableHandleScopeFromJsEscapableHandleScope(
napi_escapable_handle_scope s) {
return reinterpret_cast<EscapableHandleScopeWrapper*>(s);
}

inline static napi_status ConcludeDeferred(napi_env env,
napi_deferred deferred,
napi_value result,
bool is_resolved) {
inline napi_status ConcludeDeferred(napi_env env,
napi_deferred deferred,
napi_value result,
bool is_resolved) {
NAPI_PREAMBLE(env);
CHECK_ARG(env, result);

@@ -191,10 +189,10 @@ inline static napi_status ConcludeDeferred(napi_env env,

enum UnwrapAction { KeepWrap, RemoveWrap };

inline static napi_status Unwrap(napi_env env,
napi_value js_object,
void** result,
UnwrapAction action) {
inline napi_status Unwrap(napi_env env,
napi_value js_object,
void** result,
UnwrapAction action) {
NAPI_PREAMBLE(env);
CHECK_ARG(env, js_object);
if (action == KeepWrap) {
24 changes: 11 additions & 13 deletions src/js_native_api_v8.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#ifndef SRC_JS_NATIVE_API_V8_H_
#define SRC_JS_NATIVE_API_V8_H_

// This file needs to be compatible with C compilers.
#include <string.h> // NOLINT(modernize-deprecated-headers)
#include "js_native_api_types.h"
#include "js_native_api_v8_internals.h"

@@ -152,7 +150,7 @@ class EnvRefHolder {
napi_env _env;
};

static inline napi_status napi_clear_last_error(napi_env env) {
inline napi_status napi_clear_last_error(napi_env env) {
env->last_error.error_code = napi_ok;

// TODO(boingoing): Should this be a callback?
@@ -162,10 +160,10 @@ static inline napi_status napi_clear_last_error(napi_env env) {
return napi_ok;
}

static inline napi_status napi_set_last_error(napi_env env,
napi_status error_code,
uint32_t engine_error_code = 0,
void* engine_reserved = nullptr) {
inline napi_status napi_set_last_error(napi_env env,
napi_status error_code,
uint32_t engine_error_code = 0,
void* engine_reserved = nullptr) {
env->last_error.error_code = error_code;
env->last_error.engine_error_code = engine_error_code;
env->last_error.engine_reserved = engine_reserved;
@@ -275,6 +273,12 @@ static inline napi_status napi_set_last_error(napi_env env,
#define CHECK_MAYBE_EMPTY_WITH_PREAMBLE(env, maybe, status) \
RETURN_STATUS_IF_FALSE_WITH_PREAMBLE((env), !((maybe).IsEmpty()), (status))

#define STATUS_CALL(call) \
do { \
napi_status status = (call); \
if (status != napi_ok) return status; \
} while (0)

namespace v8impl {

//=== Conversion between V8 Handles and napi_value ========================
@@ -431,10 +435,4 @@ class Reference : public RefBase {

} // end of namespace v8impl

#define STATUS_CALL(call) \
do { \
napi_status status = (call); \
if (status != napi_ok) return status; \
} while (0)

#endif // SRC_JS_NATIVE_API_V8_H_
5 changes: 3 additions & 2 deletions src/node_api.cc
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
#include "util-inl.h"

#include <atomic>
#include <cstring>
#include <memory>

node_napi_env__::node_napi_env__(v8::Local<v8::Context> context,
@@ -124,8 +125,8 @@ class BufferFinalizer : private Finalizer {
};
};

static inline napi_env NewEnv(v8::Local<v8::Context> context,
const std::string& module_filename) {
inline napi_env NewEnv(v8::Local<v8::Context> context,
const std::string& module_filename) {
node_napi_env result;

result = new node_napi_env__(context, module_filename);