From 96c3224de0e938d308ab579e4cf7336e87c67d88 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sun, 10 Mar 2019 22:03:15 +0000 Subject: src: remove `AddPromiseHook()` Remove this, as the underlying `Isolate::SetPromiseHook()` may be removed as well in its current form in the future, and `async_hooks` also serves this use case. Refs: https://docs.google.com/document/d/1g8OrG5lMIUhRn1zbkutgY83MiTSMx-0NHDs8Bf-nXxM/ Refs: https://github.com/nodejs/node/pull/26529 PR-URL: https://github.com/nodejs/node/pull/26574 Reviewed-By: Ben Noordhuis Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum Reviewed-By: Gus Caplan Reviewed-By: James M Snell Reviewed-By: Ali Ijaz Sheikh --- src/api/hooks.cc | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/api') diff --git a/src/api/hooks.cc b/src/api/hooks.cc index 4663df43a6..6a0319c61c 100644 --- a/src/api/hooks.cc +++ b/src/api/hooks.cc @@ -65,12 +65,6 @@ int EmitExit(Environment* env) { .ToChecked(); } -void AddPromiseHook(Isolate* isolate, promise_hook_func fn, void* arg) { - Environment* env = Environment::GetCurrent(isolate); - CHECK_NOT_NULL(env); - env->AddPromiseHook(fn, arg); -} - void AddEnvironmentCleanupHook(Isolate* isolate, void (*fun)(void* arg), void* arg) { -- cgit v1.2.3