Skip to content

Commit

Permalink
doc: fix order of AtExit callbacks in addons.md
Browse files Browse the repository at this point in the history
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: #14048
Reviewed-By: Michaël Zasso <[email protected]>
  • Loading branch information
danbev committed Aug 10, 2017
1 parent 06ed0e8 commit 02371c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doc/api/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -1109,10 +1109,10 @@ static void sanity_check(void*) {
}

void init(Local<Object> 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)
Expand Down

0 comments on commit 02371c7

Please sign in to comment.