From 4e15a6b76ab21926203f4fa484f59d5597568b9d Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Mon, 3 Jul 2017 07:56:43 +0200 Subject: [PATCH] doc: fix order of AtExit callbacks in addons.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sanity_check AtExit callback needs to come last to verify that the other callbacks have been completed. This was not noticed before as this code was not been executed. PR-URL: https://github.com/nodejs/node/pull/14048 Reviewed-By: Michaƫl Zasso --- doc/api/addons.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/addons.md b/doc/api/addons.md index 7f0529e5264454..f09b2e7ee60f3f 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -1109,10 +1109,10 @@ static void sanity_check(void*) { } void init(Local exports) { - AtExit(sanity_check); AtExit(at_exit_cb2, cookie); AtExit(at_exit_cb2, cookie); AtExit(at_exit_cb1, exports->GetIsolate()); + AtExit(sanity_check); } NODE_MODULE(addon, init)