Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
Showing
with
10 additions
and
6 deletions.
-
+2
−2
src/api/hooks.cc
-
+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 |
|
|
|