From c0e47e4f220a89d34a151b5105d7f76ef435655a 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 4d29b718ab9dcd..d1c9036f54183d 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -1090,10 +1090,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)