X Tutup
The Wayback Machine - https://web.archive.org/web/20210813154318/https://github.com/nodejs/node/commit/bf79987433
Skip to content
Permalink
Browse files
src: mark internally exported functions as explicitly internal
PR-URL: #37000
Fixes: #36349
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
implausible authored and jasnell committed Jan 24, 2021
1 parent 1fe571a commit bf79987433e8b2457007a8f531e4a0b3112ed466
Showing with 10 additions and 6 deletions.
  1. +2 −2 src/api/hooks.cc
  2. +8 −4 src/node.h
@@ -145,7 +145,7 @@ static void RunAsyncCleanupHook(void* arg) {
info->fun(info->arg, FinishAsyncCleanupHook, info);
}

ACHHandle* AddEnvironmentCleanupHookRaw(
ACHHandle* AddEnvironmentCleanupHookInternal(
Isolate* isolate,
AsyncCleanupHook fun,
void* arg) {
@@ -160,7 +160,7 @@ ACHHandle* AddEnvironmentCleanupHookRaw(
return new ACHHandle { info };
}

void RemoveEnvironmentCleanupHookRaw(
void RemoveEnvironmentCleanupHookInternal(
ACHHandle* handle) {
if (handle->info->started) return;
handle->info->self.reset();
@@ -925,21 +925,25 @@ struct ACHHandle;
struct NODE_EXTERN DeleteACHHandle { void operator()(ACHHandle*) const; };
typedef std::unique_ptr<ACHHandle, DeleteACHHandle> AsyncCleanupHookHandle;

NODE_EXTERN ACHHandle* AddEnvironmentCleanupHookRaw(
/* This function is not intended to be used externally, it exists to aid in
* keeping ABI compatibility between Node and Electron. */
NODE_EXTERN ACHHandle* AddEnvironmentCleanupHookInternal(
v8::Isolate* isolate,
void (*fun)(void* arg, void (*cb)(void*), void* cbarg),
void* arg);
inline AsyncCleanupHookHandle AddEnvironmentCleanupHook(
v8::Isolate* isolate,
void (*fun)(void* arg, void (*cb)(void*), void* cbarg),
void* arg) {
return AsyncCleanupHookHandle(AddEnvironmentCleanupHookRaw(isolate, fun,
return AsyncCleanupHookHandle(AddEnvironmentCleanupHookInternal(isolate, fun,
arg));
}

NODE_EXTERN void RemoveEnvironmentCleanupHookRaw(ACHHandle* holder);
/* This function is not intended to be used externally, it exists to aid in
* keeping ABI compatibility between Node and Electron. */
NODE_EXTERN void RemoveEnvironmentCleanupHookInternal(ACHHandle* holder);
inline void RemoveEnvironmentCleanupHook(AsyncCleanupHookHandle holder) {
RemoveEnvironmentCleanupHookRaw(holder.get());
RemoveEnvironmentCleanupHookInternal(holder.get());
}

/* Returns the id of the current execution context. If the return value is

0 comments on commit bf79987

Please sign in to comment.
X Tutup