[Pkg-javascript-commits] [node-nan] 01/03: New upstream version 2.9.2

Jérémy Lal kapouer at moszumanska.debian.org
Mon Feb 26 21:20:32 UTC 2018


This is an automated email from the git hooks/post-receive script.

kapouer pushed a commit to branch master
in repository node-nan.

commit 06bd8b6b1fa0ec1c003edeaaf31292a62a1463d2
Author: Jérémy Lal <kapouer at melix.org>
Date:   Mon Feb 26 22:18:50 2018 +0100

    New upstream version 2.9.2
---
 .travis.yml                                        |   4 +
 CHANGELOG.md                                       |  21 +-
 LICENSE.md                                         |   2 +-
 Makefile                                           |   3 +
 README.md                                          |  33 ++-
 doc/asyncworker.md                                 |  15 +-
 doc/callback.md                                    |  30 ++-
 doc/maybe_types.md                                 |   6 +-
 doc/node_misc.md                                   |  62 +++++-
 examples/async_pi_estimate/addon.cc                |   2 +-
 examples/async_pi_estimate/addon.js                |   2 +-
 examples/async_pi_estimate/async.cc                |   2 +-
 examples/async_pi_estimate/async.h                 |   2 +-
 examples/async_pi_estimate/pi_est.cc               |   2 +-
 examples/async_pi_estimate/pi_est.h                |   2 +-
 examples/async_pi_estimate/sync.cc                 |   2 +-
 examples/async_pi_estimate/sync.h                  |   2 +-
 nan.h                                              | 239 +++++++++++++++++++--
 nan_callbacks.h                                    |   2 +-
 nan_callbacks_12_inl.h                             |   2 +-
 nan_callbacks_pre_12_inl.h                         |   2 +-
 nan_converters.h                                   |   2 +-
 nan_converters_43_inl.h                            |   2 +-
 nan_converters_pre_43_inl.h                        |   2 +-
 nan_implementation_12_inl.h                        |   2 +-
 nan_implementation_pre_12_inl.h                    |   2 +-
 nan_json.h                                         |  13 +-
 nan_maybe_43_inl.h                                 |  16 +-
 nan_maybe_pre_43_inl.h                             |   6 +-
 nan_new.h                                          |   2 +-
 nan_object_wrap.h                                  |   2 +-
 nan_persistent_12_inl.h                            |   2 +-
 nan_persistent_pre_12_inl.h                        |   2 +-
 nan_private.h                                      |   2 +-
 nan_typedarray_contents.h                          |   2 +-
 nan_weak.h                                         |   2 +-
 package.json                                       |   2 +-
 test/binding.gyp                                   |   8 +
 test/cpp/accessors.cpp                             |   2 +-
 test/cpp/accessors2.cpp                            |   2 +-
 test/cpp/asyncprogressqueueworker.cpp              |   4 +-
 test/cpp/asyncprogressqueueworkerstream.cpp        |   4 +-
 test/cpp/asyncprogressworker.cpp                   |   4 +-
 test/cpp/asyncprogressworkersignal.cpp             |   4 +-
 test/cpp/asyncprogressworkerstream.cpp             |   4 +-
 test/cpp/asyncresource.cpp                         |  68 ++++++
 test/cpp/asyncworker.cpp                           |  10 +-
 test/cpp/asyncworkererror.cpp                      |   2 +-
 test/cpp/buffer.cpp                                |   2 +-
 test/cpp/bufferworkerpersistent.cpp                |   8 +-
 test/cpp/callbackcontext.cpp                       |  65 ++++++
 test/cpp/converters.cpp                            |   2 +-
 test/cpp/error.cpp                                 |   2 +-
 test/cpp/gc.cpp                                    |   2 +-
 test/cpp/indexedinterceptors.cpp                   |   2 +-
 test/cpp/isolatedata.cpp                           |   2 +-
 test/cpp/json-parse.cpp                            |   2 +-
 test/cpp/json-stringify.cpp                        |   2 +-
 test/cpp/makecallback.cpp                          |   2 +-
 test/cpp/morenews.cpp                              |   2 +-
 test/cpp/multifile1.cpp                            |   2 +-
 test/cpp/multifile2.cpp                            |   2 +-
 test/cpp/multifile2.h                              |   2 +-
 test/cpp/namedinterceptors.cpp                     |   2 +-
 test/cpp/nancallback.cpp                           |  14 +-
 test/cpp/nannew.cpp                                |   2 +-
 test/cpp/news.cpp                                  |   2 +-
 test/cpp/objectwraphandle.cpp                      |   2 +-
 test/cpp/persistent.cpp                            |   2 +-
 test/cpp/private.cpp                               |   2 +-
 test/cpp/returnemptystring.cpp                     |   2 +-
 test/cpp/returnnull.cpp                            |   2 +-
 test/cpp/returnundefined.cpp                       |   2 +-
 test/cpp/returnvalue.cpp                           |   2 +-
 test/cpp/setcallhandler.cpp                        |   2 +-
 test/cpp/settemplate.cpp                           |   2 +-
 .../async_pi_estimate/pi_est.h => test/cpp/sleep.h |  12 +-
 test/cpp/strings.cpp                               |   2 +-
 test/cpp/symbols.cpp                               |   2 +-
 test/cpp/threadlocal.cpp                           |   2 +-
 test/cpp/trycatch.cpp                              |   2 +-
 test/cpp/typedarrays.cpp                           |   2 +-
 test/cpp/weak.cpp                                  |   2 +-
 test/cpp/weak2.cpp                                 |   2 +-
 test/cpp/wrappedobjectfactory.cpp                  |   2 +-
 test/js/accessors-test.js                          |   2 +-
 test/js/accessors2-test.js                         |   2 +-
 test/js/asyncprogressqueueworker-test.js           |   2 +-
 test/js/asyncprogressqueueworkerstream-test.js     |   2 +-
 test/js/asyncprogressworker-test.js                |   2 +-
 test/js/asyncprogressworkersignal-test.js          |   2 +-
 test/js/asyncprogressworkerstream-test.js          |   2 +-
 test/js/asyncresource-test.js                      |  75 +++++++
 test/js/asyncworker-test.js                        |  74 ++++++-
 test/js/asyncworkererror-test.js                   |   2 +-
 test/js/buffer-test.js                             |   2 +-
 test/js/bufferworkerpersistent-test.js             |   2 +-
 test/js/callbackcontext-test.js                    |  79 +++++++
 test/js/converters-test.js                         |   2 +-
 test/js/error-test.js                              |   2 +-
 test/js/gc-test.js                                 |   2 +-
 test/js/indexedinterceptors-test.js                |   2 +-
 test/js/isolatedata-test.js                        |   2 +-
 test/js/json-parse-test.js                         |   8 +
 test/js/json-stringify-test.js                     |   8 +
 test/js/makecallback-test.js                       |   2 +-
 test/js/morenews-test.js                           |   2 +-
 test/js/multifile-test.js                          |   2 +-
 test/js/namedinterceptors-test.js                  |   2 +-
 test/js/nancallback-test.js                        |   2 +-
 test/js/nannew-test.js                             |   2 +-
 test/js/news-test.js                               |   2 +-
 test/js/objectwraphandle-test.js                   |   2 +-
 test/js/persistent-test.js                         |   2 +-
 test/js/private-test.js                            |   2 +-
 test/js/returnemptystring-test.js                  |   2 +-
 test/js/returnnull-test.js                         |   2 +-
 test/js/returnundefined-test.js                    |   2 +-
 test/js/returnvalue-test.js                        |   2 +-
 test/js/setcallhandler-test.js                     |   2 +-
 test/js/settemplate-test.js                        |   2 +-
 test/js/strings-test.js                            |   2 +-
 test/js/symbols-test.js                            |   2 +-
 test/js/threadlocal-test.js                        |   2 +-
 test/js/trycatch-test.js                           |   2 +-
 test/js/typedarrays-test.js                        |   2 +-
 test/js/weak-test.js                               |   2 +-
 test/js/weak2-test.js                              |   2 +-
 test/js/wrappedobjectfactory-test.js               |   2 +-
 tools/1to2.js                                      |   2 +-
 130 files changed, 918 insertions(+), 181 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 49312e5..8b8cbaf 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,10 @@ env:
   - TRAVIS_NODE_VERSION="7"
   - TRAVIS_NODE_VERSION="8"
   - TRAVIS_NODE_VERSION="9"
+matrix:
+  exclude:
+    - os: osx
+      env: TRAVIS_NODE_VERSION="0.12"
 install:
   - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
   - if [[ $TRAVIS_OS_NAME == "linux" ]]; then export CXX=g++-4.8; fi
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4e04975..e78fd8f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,25 @@
 # NAN ChangeLog
 
-**Version 2.8.0: current Node 9.2.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1**
+**Version 2.9.2: current Node 9.5.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1**
+
+### 2.9.2 Feb 22 2018
+
+  - Bugfix: Bandaid for async hooks 212bd2f849be14ef1b02fc85010b053daa24252b
+
+### 2.9.1 Feb 22 2018
+
+  - Bugfix: Avoid deprecation warnings in deprecated `Nan::Callback::operator()` 372b14d91289df4604b0f81780709708c45a9aa4
+  - Bugfix: Avoid deprecation warnings in `Nan::JSON` 3bc294bce0b7d0a3ee4559926303e5ed4866fda2
+
+### 2.9.0 Feb 22 2018
+
+  - Deprecation: Deprecate legacy `Callback::Call` 6dd5fa690af61ca3523004b433304c581b3ea309
+  - Feature: introduce `AsyncResource` class 90c0a179c0d8cb5fd26f1a7d2b1d6231eb402d48o
+  - Feature: Add context aware `Nan::Callback::Call` functions 7169e09fb088418b6e388222e88b4c13f07ebaee
+  - Feature: Make `AsyncWorker` context aware 066ba21a6fb9e2b5230c9ed3a6fc51f1211736a4
+  - Feature: add `Callback` overload to `Nan::Call` 5328daf66e202658c1dc0d916c3aaba99b3cc606
+  - Bugfix: fix warning: suggest parentheses around `&&` within `||` b2bb63d68b8ae623a526b542764e1ac82319cb2c
+  - Bugfix: Fix compilation on io.js 3 d06114dba0a522fb436f0c5f47b994210968cd7b
 
 ### 2.8.0 Nov 15 2017
 
diff --git a/LICENSE.md b/LICENSE.md
index d4d2da7..dddd13d 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,7 +1,7 @@
 The MIT License (MIT)
 =====================
 
-Copyright (c) 2017 NAN contributors
+Copyright (c) 2018 NAN contributors
 -----------------------------------
 
 *NAN contributors listed at <https://github.com/nodejs/nan#contributors>*
diff --git a/Makefile b/Makefile
index fc164f8..44e22c2 100644
--- a/Makefile
+++ b/Makefile
@@ -35,6 +35,7 @@ LINT_SOURCES = \
 	nan_weak.h \
 	test/cpp/accessors.cpp \
 	test/cpp/accessors2.cpp \
+	test/cpp/asyncresource.cpp \
 	test/cpp/asyncworker.cpp \
 	test/cpp/asyncprogressworker.cpp \
 	test/cpp/asyncprogressworkerstream.cpp \
@@ -47,6 +48,7 @@ LINT_SOURCES = \
 	test/cpp/error.cpp \
 	test/cpp/gc.cpp \
 	test/cpp/indexedinterceptors.cpp \
+	test/cpp/callbackcontext.cpp \
 	test/cpp/converters.cpp \
 	test/cpp/isolatedata.cpp \
 	test/cpp/json-parse.cpp \
@@ -69,6 +71,7 @@ LINT_SOURCES = \
 	test/cpp/returnvalue.cpp \
 	test/cpp/setcallhandler.cpp \
 	test/cpp/settemplate.cpp \
+	test/cpp/sleep.h \
 	test/cpp/strings.cpp \
 	test/cpp/symbols.cpp \
 	test/cpp/threadlocal.cpp \
diff --git a/README.md b/README.md
index a93d391..7d432d9 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@ Native Abstractions for Node.js
 
 **A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8 and 9.**
 
-***Current version: 2.8.0***
+***Current version: 2.9.2***
 
 *(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)*
 
@@ -21,6 +21,7 @@ This project also contains some helper utilities that make addon development a b
  * **[Example](#example)**
  * **[API](#api)**
  * **[Tests](#tests)**
+ * **[Knowns issues](#issues)**
  * **[Governance & Contributing](#governance)**
 
 <a name="news"></a>
@@ -315,6 +316,7 @@ The hooks to access V8 internals—including GC and statistics—are different a
 
 ### Miscellaneous Node Helpers
 
+ - <a href="doc/node_misc.md#api_nan_asyncresource"><b><code>Nan::AsyncResource</code></b></a>
  - <a href="doc/node_misc.md#api_nan_make_callback"><b><code>Nan::MakeCallback()</code></b></a>
  - <a href="doc/node_misc.md#api_nan_module_init"><b><code>NAN_MODULE_INIT()</code></b></a>
  - <a href="doc/node_misc.md#api_nan_export"><b><code>Nan::Export()</code></b></a>
@@ -341,6 +343,33 @@ npm install
 make test
 ```
 
+<a name="issues"></a>
+
+## Known issues
+
+### Compiling against Node.js 0.12 on OSX
+
+With new enough compilers available on OSX, the versions of V8 headers corresponding to Node.js 0.12
+do not compile anymore. The error looks something like:
+
+```
+❯   CXX(target) Release/obj.target/accessors/cpp/accessors.o
+In file included from ../cpp/accessors.cpp:9:
+In file included from ../../nan.h:51:
+In file included from /Users/ofrobots/.node-gyp/0.12.18/include/node/node.h:61:
+/Users/ofrobots/.node-gyp/0.12.18/include/node/v8.h:5800:54: error: 'CreateHandle' is a protected member of 'v8::HandleScope'
+  return Handle<T>(reinterpret_cast<T*>(HandleScope::CreateHandle(
+                                        ~~~~~~~~~~~~~^~~~~~~~~~~~
+```
+
+This can be worked around by patching your local versions of v8.h corresponding to Node 0.12 to make
+`v8::Handle` a friend of `v8::HandleScope`. Since neither Node.js not V8 support this release line anymore
+this patch cannot be released by either project in an official release.
+
+For this reason, we do not test against Node.js 0.12 on OSX in this project's CI. If you need to support
+that configuration, you will need to either get an older compiler, or apply a source patch to the version
+of V8 headers as a workaround.
+
 <a name="governance"></a>
 
 ## Governance & Contributing
@@ -422,6 +451,6 @@ By making a contribution to this project, I certify that:
 
 ## Licence & copyright
 
-Copyright (c) 2017 NAN WG Members / Collaborators (listed above).
+Copyright (c) 2018 NAN WG Members / Collaborators (listed above).
 
 Native Abstractions for Node.js is licensed under an MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
diff --git a/doc/asyncworker.md b/doc/asyncworker.md
index b75cb4b..239de80 100644
--- a/doc/asyncworker.md
+++ b/doc/asyncworker.md
@@ -12,12 +12,17 @@
 
 `Nan::AsyncWorker` is an _abstract_ class that you can subclass to have much of the annoying asynchronous queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the asynchronous work is in progress.
 
+This class internally handles the details of creating an [`AsyncResource`][AsyncResource], and running the callback in the
+correct async context. To be able to identify the async resources created by this class in async-hooks, provide a
+`resource_name` to the constructor. It is recommended that the module name be used as a prefix to the `resource_name` to avoid
+collisions in the names. For more details see [`AsyncResource`][AsyncResource] documentation.  The `resource_name` needs to stay valid for the lifetime of the worker instance.
+
 Definition:
 
 ```c++
 class AsyncWorker {
  public:
-  explicit AsyncWorker(Callback *callback_);
+  explicit AsyncWorker(Callback *callback_, const char* resource_name = "nan:AsyncWorker");
 
   virtual ~AsyncWorker();
 
@@ -73,9 +78,9 @@ Definition:
 template<class T>
 class AsyncProgressWorkerBase<T> : public AsyncWorker {
  public:
-  explicit AsyncProgressWorker(Callback *callback_);
+  explicit AsyncProgressWorkerBase(Callback *callback_, const char* resource_name = ...);
 
-  virtual ~AsyncProgressWorker();
+  virtual ~AsyncProgressWorkerBase();
 
   void WorkProgress();
 
@@ -108,7 +113,7 @@ Definition:
 template<class T>
 class AsyncProgressQueueWorker<T> : public AsyncWorker {
  public:
-  explicit AsyncProgressQueueWorker(Callback *callback_);
+  explicit AsyncProgressQueueWorker(Callback *callback_, const char* resource_name = "nan:AsyncProgressQueueWorker");
 
   virtual ~AsyncProgressQueueWorker();
 
@@ -137,3 +142,5 @@ Definition:
 ```c++
 void AsyncQueueWorker(AsyncWorker *);
 ```
+
+[AsyncResource]: "node_misc.html#api_nan_asyncresource"
diff --git a/doc/callback.md b/doc/callback.md
index 46de1d7..f7af0bf 100644
--- a/doc/callback.md
+++ b/doc/callback.md
@@ -22,12 +22,14 @@ class Callback {
 
   v8::Local<v8::Function> operator*() const;
 
-  v8::Local<v8::Value> operator()(v8::Local<v8::Object> target,
-                                  int argc = 0,
-                                  v8::Local<v8::Value> argv[] = 0) const;
+  MaybeLocal<v8::Value> operator()(AsyncResource* async_resource,
+                                   v8::Local<v8::Object> target,
+                                   int argc = 0,
+                                   v8::Local<v8::Value> argv[] = 0) const;
 
-  v8::Local<v8::Value> operator()(int argc = 0,
-                                  v8::Local<v8::Value> argv[] = 0) const;
+  MaybeLocal<v8::Value> operator()(AsyncResource* async_resource,
+                                   int argc = 0,
+                                   v8::Local<v8::Value> argv[] = 0) const;
 
   void SetFunction(const v8::Local<v8::Function> &fn);
 
@@ -39,6 +41,24 @@ class Callback {
 
   void Reset();
 
+  MaybeLocal<v8::Value> Call(v8::Local<v8::Object> target,
+                            int argc,
+                            v8::Local<v8::Value> argv[],
+                            AsyncResource* async_resource) const;
+  MaybeLocal<v8::Value> Call(int argc,
+                             v8::Local<v8::Value> argv[],
+                             AsyncResource* async_resource) const;
+
+  // Deprecated versions. Use the versions that accept an async_resource instead
+  // as they run the callback in the correct async context as specified by the
+  // resource. If you want to call a synchronous JS function (i.e. on a
+  // non-empty JS stack), you can use Nan::Call instead.
+  v8::Local<v8::Value> operator()(v8::Local<v8::Object> target,
+                                  int argc = 0,
+                                  v8::Local<v8::Value> argv[] = 0) const;
+
+  v8::Local<v8::Value> operator()(int argc = 0,
+                                  v8::Local<v8::Value> argv[] = 0) const;
   v8::Local<v8::Value> Call(v8::Local<v8::Object> target,
                             int argc,
                             v8::Local<v8::Value> argv[]) const;
diff --git a/doc/maybe_types.md b/doc/maybe_types.md
index 5baa2cf..6609f15 100644
--- a/doc/maybe_types.md
+++ b/doc/maybe_types.md
@@ -122,12 +122,16 @@ template<typename T> Nan::Maybe<T> Nan::Just(const T &t);
 <a name="api_nan_call"></a>
 ### Nan::Call()
 
-A helper method for calling [`v8::Function#Call()`](https://v8docs.nodesource.com/io.js-3.3/d5/d54/classv8_1_1_function.html#a468a89f737af0612db10132799c827c0) in a way compatible across supported versions of V8.
+A helper method for calling a synchronous [`v8::Function#Call()`](https://v8docs.nodesource.com/io.js-3.3/d5/d54/classv8_1_1_function.html#a468a89f737af0612db10132799c827c0) in a way compatible across supported versions of V8.
+
+For asynchronous callbacks, use Nan::Callback::Call along with an AsyncResource.
 
 Signature:
 
 ```c++
 Nan::MaybeLocal<v8::Value> Nan::Call(v8::Local<v8::Function> fun, v8::Local<v8::Object> recv, int argc, v8::Local<v8::Value> argv[]);
+Nan::MaybeLocal<v8::Value> Nan::Call(const Nan::Callback& callback, v8::Local<v8::Object> recv,
+ int argc, v8::Local<v8::Value> argv[]);
 ```
 
 
diff --git a/doc/node_misc.md b/doc/node_misc.md
index 8aa080f..045e381 100644
--- a/doc/node_misc.md
+++ b/doc/node_misc.md
@@ -1,16 +1,71 @@
 ## Miscellaneous Node Helpers
 
+ - <a href="#api_nan_asyncresource"><b><code>Nan::AsyncResource</code></b></a>
  - <a href="#api_nan_make_callback"><b><code>Nan::MakeCallback()</code></b></a>
  - <a href="#api_nan_module_init"><b><code>NAN_MODULE_INIT()</code></b></a>
  - <a href="#api_nan_export"><b><code>Nan::Export()</code></b></a>
 
+<a name="api_nan_asyncresource"></a>
+### Nan::AsyncResource
+
+This class is analogous to the `AsyncResource` JavaScript class exposed by Node's [async_hooks][] API.
+
+When calling back into JavaScript asynchornously, special care must be taken to ensure that the runtime can properly track
+async hops. `Nan::AsyncResource` is a class that provides an RAII wrapper around `node::EmitAsyncInit`, `node::EmitAsyncDestroy`,
+and `node::MakeCallback`. Using this mechanism to call back into JavaScript, as opposed to `Nan::MakeCallback` or
+`v8::Function::Call` ensures that the callback is executed in the correct async context. This ensures that async mechanisms
+such as domains and [async_hooks][] function correctly.
+
+Definition:
+
+```c++
+class AsyncResource {
+ public:
+  AsyncResource(v8::Local<v8::String> name,
+                v8::Local<v8::Object> resource = New<v8::Object>());
+  AsyncResource(const char* name,
+                v8::Local<v8::Object> resource = New<v8::Object>());
+  ~AsyncResource();
+
+  v8::MaybeLocal<v8::Value> runInAsyncScope(v8::Local<v8::Object> target,
+                                            v8::Local<v8::Function> func,
+                                            int argc,
+                                            v8::Local<v8::Value>* argv,
+                                            Nan::async_context async_context);
+  v8::MaybeLocal<v8::Value> runInAsyncScope(v8::Local<v8::Object> target,
+                                            v8::Local<v8::String> symbol,
+                                            int argc,
+                                            v8::Local<v8::Value>* argv,
+                                            Nan::async_context async_context);
+  v8::MaybeLocal<v8::Value> runInAsyncScope(v8::Local<v8::Object> target,
+                                            const char* method,
+                                            int argc,
+                                            v8::Local<v8::Value>* argv,
+                                            Nan::async_context async_context);
+};
+```
+
+* `name`: Identifier for the kind of resource that is being provided for diagnostics information exposed by the [async_hooks][]
+  API. This will be passed to the possible `init` hook as the `type`. To avoid name collisions with other modules we recommend
+  that the name include the name of the owning module as a prefix. For example `mysql` module could use something like
+  `mysql:batch-db-query-resource`.
+* `resource`: An optional object associated with the async work that will be passed to the possible [async_hooks][]
+  `init` hook. If this parameter is omitted, or an empty handle is provided, this object will be created automatically.
+* When calling JS on behalf of this resource, one can use `runInAsyncScope`. This will ensure that the callback runs in the
+  correct async execution context.
+* `AsyncDestroy` is automatically called when an AsyncResource object is destroyed.
+
+For more details, see the Node [async_hooks][] documentation. You might also want to take a look at the documentation for the
+[N-API counterpart][napi]. For example usage, see the `asyncresource.cpp` example in the `test/cpp` directory.
 
 <a name="api_nan_make_callback"></a>
 ### Nan::MakeCallback()
 
-Wrappers around `node::MakeCallback()` providing a consistent API across all supported versions of Node.
+Wrappers around the legacy `node::MakeCallback()` APIs.
 
-Use `MakeCallback()` rather than using `v8::Function#Call()` directly in order to properly process internal Node functionality including domains, async hooks, the microtask queue, and other debugging functionality.
+We recommend that you use the `AsyncResource` class and `AsyncResource::runInAsyncScope` instead of using `Nan::MakeCallback` or
+`v8::Function#Call()` directly. `AsyncResource` properly takes care of running the callback in the correct async execution
+context – something that is essential for functionality like domains, async_hooks and async debugging.
 
 Signatures:
 
@@ -61,3 +116,6 @@ NAN_MODULE_INIT(Init) {
   NAN_EXPORT(target, Foo);
 }
 ```
+
+[async_hooks]: https://nodejs.org/dist/latest-v9.x/docs/api/async_hooks.html
+[napi]: https://nodejs.org/dist/latest-v9.x/docs/api/n-api.html#n_api_custom_asynchronous_operations
diff --git a/examples/async_pi_estimate/addon.cc b/examples/async_pi_estimate/addon.cc
index 7a37061..f36f7ff 100644
--- a/examples/async_pi_estimate/addon.cc
+++ b/examples/async_pi_estimate/addon.cc
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/addon.js b/examples/async_pi_estimate/addon.js
index 33fd71c..fcbd41d 100644
--- a/examples/async_pi_estimate/addon.js
+++ b/examples/async_pi_estimate/addon.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/async.cc b/examples/async_pi_estimate/async.cc
index c215af8..428a054 100644
--- a/examples/async_pi_estimate/async.cc
+++ b/examples/async_pi_estimate/async.cc
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/async.h b/examples/async_pi_estimate/async.h
index 65ead05..834722e 100644
--- a/examples/async_pi_estimate/async.h
+++ b/examples/async_pi_estimate/async.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/pi_est.cc b/examples/async_pi_estimate/pi_est.cc
index 07a5242..98a10b8 100644
--- a/examples/async_pi_estimate/pi_est.cc
+++ b/examples/async_pi_estimate/pi_est.cc
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/pi_est.h b/examples/async_pi_estimate/pi_est.h
index ffd29e5..087f2e5 100644
--- a/examples/async_pi_estimate/pi_est.h
+++ b/examples/async_pi_estimate/pi_est.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/sync.cc b/examples/async_pi_estimate/sync.cc
index a13cbdd..f27895d 100644
--- a/examples/async_pi_estimate/sync.cc
+++ b/examples/async_pi_estimate/sync.cc
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/sync.h b/examples/async_pi_estimate/sync.h
index 41b70ad..467e7a2 100644
--- a/examples/async_pi_estimate/sync.h
+++ b/examples/async_pi_estimate/sync.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan.h b/nan.h
index 7c7699f..5df6c5c 100644
--- a/nan.h
+++ b/nan.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors:
+ * Copyright (c) 2018 NAN contributors:
  *   - Rod Vagg <https://github.com/rvagg>
  *   - Benjamin Byholm <https://github.com/kkoopa>
  *   - Trevor Norris <https://github.com/trevnorris>
@@ -13,7 +13,7 @@
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  *
- * Version 2.8.0: current Node 9.2.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1
+ * Version 2.9.2: current Node 9.5.0, Node 12: 0.12.18, Node 10: 0.10.48, iojs: 3.3.1
  *
  * See https://github.com/nodejs/nan for the latest update to this file
  **********************************************************************************/
@@ -1273,6 +1273,93 @@ class Utf8String {
 
 #endif  // NODE_MODULE_VERSION
 
+// === AsyncResource ===========================================================
+
+  class AsyncResource {
+   public:
+    AsyncResource(
+        v8::Local<v8::String> name
+      , v8::Local<v8::Object> resource = New<v8::Object>()) {
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+      v8::Isolate* isolate = v8::Isolate::GetCurrent();
+
+      if (resource.IsEmpty()) {
+        resource = New<v8::Object>();
+      }
+
+      context = node::EmitAsyncInit(isolate, resource, name);
+#endif
+    }
+
+    AsyncResource(
+        const char* name
+      , v8::Local<v8::Object> resource = New<v8::Object>()) {
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+      v8::Isolate* isolate = v8::Isolate::GetCurrent();
+
+      if (resource.IsEmpty()) {
+        resource = New<v8::Object>();
+      }
+
+      v8::Local<v8::String> name_string =
+          New<v8::String>(name).ToLocalChecked();
+      context = node::EmitAsyncInit(isolate, resource, name_string);
+#endif
+    }
+
+    ~AsyncResource() {
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+      v8::Isolate* isolate = v8::Isolate::GetCurrent();
+      node::EmitAsyncDestroy(isolate, context);
+#endif
+    }
+
+    inline MaybeLocal<v8::Value> runInAsyncScope(
+        v8::Local<v8::Object> target
+      , v8::Local<v8::Function> func
+      , int argc
+      , v8::Local<v8::Value>* argv) {
+#if NODE_MODULE_VERSION < NODE_9_0_MODULE_VERSION
+      return MakeCallback(target, func, argc, argv);
+#else
+      return node::MakeCallback(
+          v8::Isolate::GetCurrent(), target, func, argc, argv, context);
+#endif
+    }
+
+    inline MaybeLocal<v8::Value> runInAsyncScope(
+        v8::Local<v8::Object> target
+      , v8::Local<v8::String> symbol
+      , int argc
+      , v8::Local<v8::Value>* argv) {
+#if NODE_MODULE_VERSION < NODE_9_0_MODULE_VERSION
+      return MakeCallback(target, symbol, argc, argv);
+#else
+      return node::MakeCallback(
+          v8::Isolate::GetCurrent(), target, symbol, argc, argv, context);
+#endif
+    }
+
+    inline MaybeLocal<v8::Value> runInAsyncScope(
+        v8::Local<v8::Object> target
+      , const char* method
+      , int argc
+      , v8::Local<v8::Value>* argv) {
+#if NODE_MODULE_VERSION < NODE_9_0_MODULE_VERSION
+      return MakeCallback(target, method, argc, argv);
+#else
+      return node::MakeCallback(
+          v8::Isolate::GetCurrent(), target, method, argc, argv, context);
+#endif
+    }
+
+   private:
+    NAN_DISALLOW_ASSIGN_COPY_MOVE(AsyncResource)
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+    node::async_context context;
+#endif
+  };
+
 typedef void (*FreeCallback)(char *data, void *hint);
 
 typedef const FunctionCallbackInfo<v8::Value>& NAN_METHOD_ARGS_TYPE;
@@ -1395,17 +1482,45 @@ class Callback {
   inline
   v8::Local<v8::Function> operator*() const { return GetFunction(); }
 
-  inline v8::Local<v8::Value> operator()(
+  NAN_DEPRECATED inline v8::Local<v8::Value> operator()(
       v8::Local<v8::Object> target
     , int argc = 0
     , v8::Local<v8::Value> argv[] = 0) const {
-    return this->Call(target, argc, argv);
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+    v8::Isolate *isolate = v8::Isolate::GetCurrent();
+    return Call_(isolate, target, argc, argv);
+#else
+    return Call_(target, argc, argv);
+#endif
   }
 
-  inline v8::Local<v8::Value> operator()(
+  NAN_DEPRECATED inline v8::Local<v8::Value> operator()(
       int argc = 0
     , v8::Local<v8::Value> argv[] = 0) const {
-    return this->Call(argc, argv);
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+    v8::Isolate *isolate = v8::Isolate::GetCurrent();
+    v8::EscapableHandleScope scope(isolate);
+    return scope.Escape(
+        Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv));
+#else
+    v8::HandleScope scope;
+    return scope.Close(Call_(v8::Context::GetCurrent()->Global(), argc, argv));
+#endif
+  }
+
+  inline MaybeLocal<v8::Value> operator()(
+      AsyncResource* resource
+    , int argc = 0
+    , v8::Local<v8::Value> argv[] = 0) const {
+    return this->Call(argc, argv, resource);
+  }
+
+  inline MaybeLocal<v8::Value> operator()(
+      AsyncResource* resource
+    , v8::Local<v8::Object> target
+    , int argc = 0
+    , v8::Local<v8::Value> argv[] = 0) const {
+    return this->Call(target, argc, argv, resource);
   }
 
   // TODO(kkoopa): remove
@@ -1429,11 +1544,15 @@ class Callback {
     return handle_.IsEmpty();
   }
 
-  inline v8::Local<v8::Value>
+  // Deprecated: For async callbacks Use the versions that accept an
+  // AsyncResource. If this callback does not correspond to an async resource,
+  // that is, it is a synchronous function call on a non-empty JS stack, you
+  // should Nan::Call instead.
+  NAN_DEPRECATED inline v8::Local<v8::Value>
   Call(v8::Local<v8::Object> target
      , int argc
      , v8::Local<v8::Value> argv[]) const {
-#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
     v8::Isolate *isolate = v8::Isolate::GetCurrent();
     return Call_(isolate, target, argc, argv);
 #else
@@ -1441,9 +1560,45 @@ class Callback {
 #endif
   }
 
-  inline v8::Local<v8::Value>
+  // Deprecated: For async callbacks Use the versions that accept an
+  // AsyncResource. If this callback does not correspond to an async resource,
+  // that is, it is a synchronous function call on a non-empty JS stack, you
+  // should Nan::Call instead.
+  NAN_DEPRECATED inline v8::Local<v8::Value>
   Call(int argc, v8::Local<v8::Value> argv[]) const {
-#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+    v8::Isolate *isolate = v8::Isolate::GetCurrent();
+    v8::EscapableHandleScope scope(isolate);
+    return scope.Escape(
+        Call_(isolate, isolate->GetCurrentContext()->Global(), argc, argv));
+#else
+    v8::HandleScope scope;
+    return scope.Close(Call_(v8::Context::GetCurrent()->Global(), argc, argv));
+#endif
+  }
+
+  inline MaybeLocal<v8::Value>
+  Call(v8::Local<v8::Object> target
+     , int argc
+     , v8::Local<v8::Value> argv[]
+     , AsyncResource* resource) const {
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+    v8::Isolate* isolate = v8::Isolate::GetCurrent();
+    return Call_(isolate, target, argc, argv, resource);
+#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
+    v8::Isolate *isolate = v8::Isolate::GetCurrent();
+    return Call_(isolate, target, argc, argv);
+#else
+    return Call_(target, argc, argv);
+#endif
+  }
+
+  inline MaybeLocal<v8::Value>
+  Call(int argc, v8::Local<v8::Value> argv[], AsyncResource* resource) const {
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+    v8::Isolate* isolate = v8::Isolate::GetCurrent();
+    return Call(isolate->GetCurrentContext()->Global(), argc, argv, resource);
+#elif NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
     v8::Isolate *isolate = v8::Isolate::GetCurrent();
     v8::EscapableHandleScope scope(isolate);
     return scope.Escape(
@@ -1458,7 +1613,22 @@ class Callback {
   NAN_DISALLOW_ASSIGN_COPY_MOVE(Callback)
   Persistent<v8::Function> handle_;
 
-#if (NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION)
+#if NODE_MODULE_VERSION >= NODE_9_0_MODULE_VERSION
+  MaybeLocal<v8::Value> Call_(v8::Isolate *isolate
+                            , v8::Local<v8::Object> target
+                            , int argc
+                            , v8::Local<v8::Value> argv[]
+                            , AsyncResource* resource) const {
+    EscapableHandleScope scope;
+    v8::Local<v8::Function> func = New(handle_);
+    auto maybe = resource->runInAsyncScope(target, func, argc, argv);
+    v8::Local<v8::Value> local;
+    if (!maybe.ToLocal(&local)) return MaybeLocal<v8::Value>();
+    return scope.Escape(local);
+  }
+#endif
+
+#if NODE_MODULE_VERSION > NODE_0_10_MODULE_VERSION
   v8::Local<v8::Value> Call_(v8::Isolate *isolate
                            , v8::Local<v8::Object> target
                            , int argc
@@ -1501,15 +1671,25 @@ class Callback {
 #endif
 };
 
+inline MaybeLocal<v8::Value> Call(
+    const Nan::Callback& callback
+  , v8::Local<v8::Object> recv
+  , int argc
+  , v8::Local<v8::Value> argv[]) {
+  return Call(*callback, recv, argc, argv);
+}
+
 /* abstract */ class AsyncWorker {
  public:
-  explicit AsyncWorker(Callback *callback_)
+  explicit AsyncWorker(Callback *callback_,
+                       const char* resource_name = "nan:AsyncWorker")
       : callback(callback_), errmsg_(NULL) {
     request.data = this;
 
     HandleScope scope;
     v8::Local<v8::Object> obj = New<v8::Object>();
     persistentHandle.Reset(obj);
+    async_resource = new AsyncResource(resource_name, obj);
   }
 
   virtual ~AsyncWorker() {
@@ -1519,6 +1699,7 @@ class Callback {
       persistentHandle.Reset();
     delete callback;
     delete[] errmsg_;
+    delete async_resource;
   }
 
   virtual void WorkComplete() {
@@ -1578,11 +1759,12 @@ class Callback {
  protected:
   Persistent<v8::Object> persistentHandle;
   Callback *callback;
+  AsyncResource *async_resource;
 
   virtual void HandleOKCallback() {
     HandleScope scope;
 
-    callback->Call(0, NULL);
+    callback->Call(0, NULL, async_resource);
   }
 
   virtual void HandleErrorCallback() {
@@ -1591,7 +1773,7 @@ class Callback {
     v8::Local<v8::Value> argv[] = {
       v8::Exception::Error(New<v8::String>(ErrorMessage()).ToLocalChecked())
     };
-    callback->Call(1, argv);
+    callback->Call(1, argv, async_resource);
   }
 
   void SetErrorMessage(const char *msg) {
@@ -1613,8 +1795,10 @@ class Callback {
 
 /* abstract */ class AsyncBareProgressWorkerBase : public AsyncWorker {
  public:
-  explicit AsyncBareProgressWorkerBase(Callback *callback_)
-      : AsyncWorker(callback_) {
+  explicit AsyncBareProgressWorkerBase(
+      Callback *callback_,
+      const char* resource_name = "nan:AsyncBareProgressWorkerBase")
+      : AsyncWorker(callback_, resource_name) {
     uv_async_init(
         uv_default_loop()
       , &async
@@ -1653,8 +1837,10 @@ template<class T>
 /* abstract */
 class AsyncBareProgressWorker : public AsyncBareProgressWorkerBase {
  public:
-  explicit AsyncBareProgressWorker(Callback *callback_)
-      : AsyncBareProgressWorkerBase(callback_) {
+  explicit AsyncBareProgressWorker(
+      Callback *callback_,
+      const char* resource_name = "nan:AsyncBareProgressWorker")
+      : AsyncBareProgressWorkerBase(callback_, resource_name) {
   }
 
   virtual ~AsyncBareProgressWorker() {
@@ -1693,8 +1879,11 @@ template<class T>
 /* abstract */
 class AsyncProgressWorkerBase : public AsyncBareProgressWorker<T> {
  public:
-  explicit AsyncProgressWorkerBase(Callback *callback_)
-      : AsyncBareProgressWorker<T>(callback_), asyncdata_(NULL), asyncsize_(0) {
+  explicit AsyncProgressWorkerBase(
+      Callback *callback_,
+      const char* resource_name = "nan:AsyncProgressWorkerBase")
+      : AsyncBareProgressWorker<T>(callback_, resource_name), asyncdata_(NULL),
+        asyncsize_(0) {
     uv_mutex_init(&async_lock);
   }
 
@@ -1749,8 +1938,10 @@ template<class T>
 /* abstract */
 class AsyncBareProgressQueueWorker : public AsyncBareProgressWorkerBase {
  public:
-  explicit AsyncBareProgressQueueWorker(Callback *callback_)
-      : AsyncBareProgressWorkerBase(callback_) {
+  explicit AsyncBareProgressQueueWorker(
+      Callback *callback_,
+      const char* resource_name = "nan:AsyncBareProgressQueueWorker")
+      : AsyncBareProgressWorkerBase(callback_, resource_name) {
   }
 
   virtual ~AsyncBareProgressQueueWorker() {
@@ -1786,7 +1977,9 @@ template<class T>
 /* abstract */
 class AsyncProgressQueueWorker : public AsyncBareProgressQueueWorker<T> {
  public:
-  explicit AsyncProgressQueueWorker(Callback *callback_)
+  explicit AsyncProgressQueueWorker(
+      Callback *callback_,
+      const char* resource_name = "nan:AsyncProgressQueueWorker")
       : AsyncBareProgressQueueWorker<T>(callback_) {
     uv_mutex_init(&async_lock);
   }
diff --git a/nan_callbacks.h b/nan_callbacks.h
index c612cee..53ede84 100644
--- a/nan_callbacks.h
+++ b/nan_callbacks.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_callbacks_12_inl.h b/nan_callbacks_12_inl.h
index 9c8bf7e..d3df79a 100644
--- a/nan_callbacks_12_inl.h
+++ b/nan_callbacks_12_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_callbacks_pre_12_inl.h b/nan_callbacks_pre_12_inl.h
index 087ee52..c9ba499 100644
--- a/nan_callbacks_pre_12_inl.h
+++ b/nan_callbacks_pre_12_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_converters.h b/nan_converters.h
index 8a569b5..c0b3272 100644
--- a/nan_converters.h
+++ b/nan_converters.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_converters_43_inl.h b/nan_converters_43_inl.h
index 0c7cd50..d3567a7 100644
--- a/nan_converters_43_inl.h
+++ b/nan_converters_43_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_converters_pre_43_inl.h b/nan_converters_pre_43_inl.h
index 3391be2..ae0518a 100644
--- a/nan_converters_pre_43_inl.h
+++ b/nan_converters_pre_43_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_implementation_12_inl.h b/nan_implementation_12_inl.h
index be80a45..baacb38 100644
--- a/nan_implementation_12_inl.h
+++ b/nan_implementation_12_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_implementation_pre_12_inl.h b/nan_implementation_pre_12_inl.h
index 6afe94c..1472421 100644
--- a/nan_implementation_pre_12_inl.h
+++ b/nan_implementation_pre_12_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_json.h b/nan_json.h
index 1b1b38f..33ac8ba 100644
--- a/nan_json.h
+++ b/nan_json.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -134,14 +134,17 @@ class JSON {
 #if NAN_JSON_H_NEED_PARSE
   inline v8::Local<v8::Value> parse(v8::Local<v8::Value> arg) {
     assert(!parse_cb_.IsEmpty() && "parse_cb_ is empty");
-    return parse_cb_.Call(1, &arg);
+    AsyncResource resource("nan:JSON.parse");
+    return parse_cb_.Call(1, &arg, &resource).FromMaybe(v8::Local<v8::Value>());
   }
 #endif  // NAN_JSON_H_NEED_PARSE
 
 #if NAN_JSON_H_NEED_STRINGIFY
   inline v8::Local<v8::Value> stringify(v8::Local<v8::Value> arg) {
     assert(!stringify_cb_.IsEmpty() && "stringify_cb_ is empty");
-    return stringify_cb_.Call(1, &arg);
+    AsyncResource resource("nan:JSON.stringify");
+    return stringify_cb_.Call(1, &arg, &resource)
+        .FromMaybe(v8::Local<v8::Value>());
   }
 
   inline v8::Local<v8::Value> stringify(v8::Local<v8::Value> arg,
@@ -153,7 +156,9 @@ class JSON {
       Nan::Null(),
       gap
     };
-    return stringify_cb_.Call(3, argv);
+    AsyncResource resource("nan:JSON.stringify");
+    return stringify_cb_.Call(3, argv, &resource)
+        .FromMaybe(v8::Local<v8::Value>());
   }
 #endif  // NAN_JSON_H_NEED_STRINGIFY
 };
diff --git a/nan_maybe_43_inl.h b/nan_maybe_43_inl.h
index 5bfac72..3fc3872 100644
--- a/nan_maybe_43_inl.h
+++ b/nan_maybe_43_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -109,8 +109,22 @@ inline Maybe<bool> DefineOwnProperty(
   , v8::PropertyAttribute attribs = v8::None) {
   v8::Isolate *isolate = v8::Isolate::GetCurrent();
   v8::HandleScope scope(isolate);
+#if NODE_MODULE_VERSION >= NODE_4_0_MODULE_VERSION
   return obj->DefineOwnProperty(isolate->GetCurrentContext(), key, value,
                                 attribs);
+#else
+  Maybe<v8::PropertyAttribute> maybeCurrent =
+      obj->GetPropertyAttributes(isolate->GetCurrentContext(), key);
+  if (maybeCurrent.IsNothing()) {
+    return Nothing<bool>();
+  }
+  v8::PropertyAttribute current = maybeCurrent.FromJust();
+  return !(current & v8::DontDelete) ||                     // configurable OR
+                  (!(current & v8::ReadOnly) &&             // writable AND
+                   !((attribs ^ current) & ~v8::ReadOnly))  // same excluding RO
+             ? Just<bool>(obj->ForceSet(key, value, attribs))
+             : Nothing<bool>();
+#endif
 }
 
 NAN_DEPRECATED inline Maybe<bool> ForceSet(
diff --git a/nan_maybe_pre_43_inl.h b/nan_maybe_pre_43_inl.h
index 8100125..49c181b 100644
--- a/nan_maybe_pre_43_inl.h
+++ b/nan_maybe_pre_43_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -155,8 +155,8 @@ inline Maybe<bool> DefineOwnProperty(
   , v8::PropertyAttribute attribs = v8::None) {
   v8::PropertyAttribute current = obj->GetPropertyAttributes(key);
   return !(current & v8::DontDelete) ||                     // configurable OR
-                 !(current & v8::ReadOnly) &&               // writable AND
-                     !((attribs ^ current) & ~v8::ReadOnly) // same excluding RO
+                  (!(current & v8::ReadOnly) &&             // writable AND
+                   !((attribs ^ current) & ~v8::ReadOnly))  // same excluding RO
              ? Just<bool>(obj->ForceSet(key, value, attribs))
              : Nothing<bool>();
 }
diff --git a/nan_new.h b/nan_new.h
index 628f40c..cdf8bbe 100644
--- a/nan_new.h
+++ b/nan_new.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_object_wrap.h b/nan_object_wrap.h
index 28281b0..a4d9617 100644
--- a/nan_object_wrap.h
+++ b/nan_object_wrap.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_persistent_12_inl.h b/nan_persistent_12_inl.h
index a23d899..d9649e8 100644
--- a/nan_persistent_12_inl.h
+++ b/nan_persistent_12_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_persistent_pre_12_inl.h b/nan_persistent_pre_12_inl.h
index f915746..4c9c59d 100644
--- a/nan_persistent_pre_12_inl.h
+++ b/nan_persistent_pre_12_inl.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_private.h b/nan_private.h
index 03082cd..15f44cc 100644
--- a/nan_private.h
+++ b/nan_private.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_typedarray_contents.h b/nan_typedarray_contents.h
index 17c9681..d28ae32 100644
--- a/nan_typedarray_contents.h
+++ b/nan_typedarray_contents.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/nan_weak.h b/nan_weak.h
index 3f2d569..744ffd6 100644
--- a/nan_weak.h
+++ b/nan_weak.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/package.json b/package.json
index db7c35f..bde0533 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "nan",
-  "version": "2.8.0",
+  "version": "2.9.2",
   "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 9 compatibility",
   "main": "include_dirs.js",
   "repository": {
diff --git a/test/binding.gyp b/test/binding.gyp
index 2c70cb9..c292835 100644
--- a/test/binding.gyp
+++ b/test/binding.gyp
@@ -91,6 +91,14 @@
       , "sources"     : [ "cpp/makecallback.cpp" ]
     }
     , {
+        "target_name" : "asyncresource"
+      , "sources"     : [ "cpp/asyncresource.cpp" ]
+    }
+    , {
+        "target_name" : "callbackcontext"
+      , "sources"     : [ "cpp/callbackcontext.cpp" ]
+    }
+    , {
         "target_name" : "isolatedata"
       , "sources"     : [ "cpp/isolatedata.cpp" ]
     }
diff --git a/test/cpp/accessors.cpp b/test/cpp/accessors.cpp
index 5da51e6..50edbe5 100644
--- a/test/cpp/accessors.cpp
+++ b/test/cpp/accessors.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/accessors2.cpp b/test/cpp/accessors2.cpp
index 7688b80..e82ced4 100644
--- a/test/cpp/accessors2.cpp
+++ b/test/cpp/accessors2.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/asyncprogressqueueworker.cpp b/test/cpp/asyncprogressqueueworker.cpp
index f6b276e..7b51641 100644
--- a/test/cpp/asyncprogressqueueworker.cpp
+++ b/test/cpp/asyncprogressqueueworker.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -35,7 +35,7 @@ class ProgressQueueWorker : public AsyncProgressQueueWorker<char> {
     v8::Local<v8::Value> argv[] = {
         New<v8::Integer>(*reinterpret_cast<int*>(const_cast<char*>(data)))
     };
-    progress->Call(1, argv);
+    progress->Call(1, argv, async_resource);
   }
 
  private:
diff --git a/test/cpp/asyncprogressqueueworkerstream.cpp b/test/cpp/asyncprogressqueueworkerstream.cpp
index b6f5745..b85f14c 100644
--- a/test/cpp/asyncprogressqueueworkerstream.cpp
+++ b/test/cpp/asyncprogressqueueworkerstream.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -54,7 +54,7 @@ class ProgressQueueWorker : public AsyncProgressQueueWorker<T> {
       New<v8::Integer>(data->data));
 
     v8::Local<v8::Value> argv[] = { obj };
-    progress->Call(1, argv);
+    progress->Call(1, argv, this->async_resource);
   }
 
  private:
diff --git a/test/cpp/asyncprogressworker.cpp b/test/cpp/asyncprogressworker.cpp
index 2e030b1..dce24f2 100644
--- a/test/cpp/asyncprogressworker.cpp
+++ b/test/cpp/asyncprogressworker.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -41,7 +41,7 @@ class ProgressWorker : public AsyncProgressWorker {
     v8::Local<v8::Value> argv[] = {
         New<v8::Integer>(*reinterpret_cast<int*>(const_cast<char*>(data)))
     };
-    progress->Call(1, argv);
+    progress->Call(1, argv, async_resource);
   }
 
  private:
diff --git a/test/cpp/asyncprogressworkersignal.cpp b/test/cpp/asyncprogressworkersignal.cpp
index 6563128..5ae8429 100644
--- a/test/cpp/asyncprogressworkersignal.cpp
+++ b/test/cpp/asyncprogressworkersignal.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -39,7 +39,7 @@ class ProgressWorker : public AsyncProgressWorker {
     HandleScope scope;
 
     v8::Local<v8::Value> arg = New<v8::Boolean>(data == NULL && count == 0);
-    progress->Call(1, &arg);
+    progress->Call(1, &arg, async_resource);
   }
 
  private:
diff --git a/test/cpp/asyncprogressworkerstream.cpp b/test/cpp/asyncprogressworkerstream.cpp
index d50459e..aeb0610 100644
--- a/test/cpp/asyncprogressworkerstream.cpp
+++ b/test/cpp/asyncprogressworkerstream.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -61,7 +61,7 @@ class ProgressWorker : public AsyncProgressWorkerBase<T> {
       New<v8::Integer>(data->data));
 
     v8::Local<v8::Value> argv[] = { obj };
-    progress->Call(1, argv);
+    progress->Call(1, argv, this->async_resource);
   }
 
  private:
diff --git a/test/cpp/asyncresource.cpp b/test/cpp/asyncresource.cpp
new file mode 100644
index 0000000..a2be134
--- /dev/null
+++ b/test/cpp/asyncresource.cpp
@@ -0,0 +1,68 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2018 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#include <nan.h>
+#include "sleep.h"
+
+using namespace Nan;  // NOLINT(build/namespaces)
+
+class DelayRequest : public AsyncResource {
+ public:
+  DelayRequest(int milliseconds_, v8::Local<v8::Function> callback_)
+    : AsyncResource("nan:test.DelayRequest"),
+      milliseconds(milliseconds_) {
+      callback.Reset(callback_);
+      request.data = this;
+    }
+  ~DelayRequest() {
+    callback.Reset();
+  }
+
+  Persistent<v8::Function> callback;
+  uv_work_t request;
+  int milliseconds;
+};
+
+void Delay(uv_work_t* req) {
+  DelayRequest *delay_request = static_cast<DelayRequest*>(req->data);
+  Sleep(delay_request->milliseconds);
+}
+
+void AfterDelay(uv_work_t* req, int status) {
+  HandleScope scope;
+
+  DelayRequest *delay_request = static_cast<DelayRequest*>(req->data);
+  v8::Local<v8::Function> callback = New(delay_request->callback);
+
+  v8::Local<v8::Object> target = New<v8::Object>();
+
+  // Run the callback in the async context.
+  delay_request->runInAsyncScope(target, callback, 0, NULL);
+
+  delete delay_request;
+}
+
+NAN_METHOD(Delay) {
+  int delay = To<int>(info[0]).FromJust();
+  v8::Local<v8::Function> cb = To<v8::Function>(info[1]).ToLocalChecked();
+
+  DelayRequest* delay_request = new DelayRequest(delay, cb);
+
+  uv_queue_work(
+      uv_default_loop()
+    , &delay_request->request
+    , Delay
+    , reinterpret_cast<uv_after_work_cb>(AfterDelay));
+}
+
+NAN_MODULE_INIT(Init) {
+  Set(target, New<v8::String>("delay").ToLocalChecked(),
+    GetFunction(New<v8::FunctionTemplate>(Delay)).ToLocalChecked());
+}
+
+NODE_MODULE(asyncresource, Init)
diff --git a/test/cpp/asyncworker.cpp b/test/cpp/asyncworker.cpp
index 90a2b3d..d1cd82a 100644
--- a/test/cpp/asyncworker.cpp
+++ b/test/cpp/asyncworker.cpp
@@ -1,15 +1,12 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
 
-#ifndef _WIN32
-#include <unistd.h>
-#define Sleep(x) usleep((x)*1000)
-#endif
+#include "sleep.h"
 #include <nan.h>
 
 using namespace Nan;  // NOLINT(build/namespaces)
@@ -17,7 +14,8 @@ using namespace Nan;  // NOLINT(build/namespaces)
 class SleepWorker : public AsyncWorker {
  public:
   SleepWorker(Callback *callback, int milliseconds)
-    : AsyncWorker(callback), milliseconds(milliseconds) {}
+    : AsyncWorker(callback, "nan:test.SleepWorker"),
+      milliseconds(milliseconds) {}
   ~SleepWorker() {}
 
   void Execute () {
diff --git a/test/cpp/asyncworkererror.cpp b/test/cpp/asyncworkererror.cpp
index 21eb19b..16e2027 100644
--- a/test/cpp/asyncworkererror.cpp
+++ b/test/cpp/asyncworkererror.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/buffer.cpp b/test/cpp/buffer.cpp
index 95c2b4c..723e22d 100644
--- a/test/cpp/buffer.cpp
+++ b/test/cpp/buffer.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/bufferworkerpersistent.cpp b/test/cpp/bufferworkerpersistent.cpp
index a120055..093ebe4 100644
--- a/test/cpp/bufferworkerpersistent.cpp
+++ b/test/cpp/bufferworkerpersistent.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -37,13 +37,13 @@ class BufferWorker : public AsyncWorker {
     HandleScope scope;
 
     v8::Local<v8::Value> handle = GetFromPersistent("buffer");
-    callback->Call(1, &handle);
+    callback->Call(1, &handle, async_resource);
 
     handle = GetFromPersistent(New("puffer").ToLocalChecked());
-    callback->Call(1, &handle);
+    callback->Call(1, &handle, async_resource);
 
     handle = GetFromPersistent(0u);
-    callback->Call(1, &handle);
+    callback->Call(1, &handle, async_resource);
   }
 
  private:
diff --git a/test/cpp/callbackcontext.cpp b/test/cpp/callbackcontext.cpp
new file mode 100644
index 0000000..8b4f311
--- /dev/null
+++ b/test/cpp/callbackcontext.cpp
@@ -0,0 +1,65 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2018 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+#include <nan.h>
+#include "sleep.h"
+
+using namespace Nan;  // NOLINT(build/namespaces)
+
+class DelayRequest : public AsyncResource {
+ public:
+  DelayRequest(int milliseconds_, v8::Local<v8::Function> callback_)
+    : AsyncResource("nan:test.DelayRequest"),
+      callback(callback_),
+      milliseconds(milliseconds_) {
+      request.data = this;
+    }
+  ~DelayRequest() {}
+
+  Callback callback;
+  uv_work_t request;
+  int milliseconds;
+};
+
+void Delay(uv_work_t* req) {
+  DelayRequest *delay_request = static_cast<DelayRequest*>(req->data);
+  Sleep(delay_request->milliseconds);
+}
+
+void AfterDelay(uv_work_t* req, int status) {
+  HandleScope scope;
+
+  DelayRequest *delay_request = static_cast<DelayRequest*>(req->data);
+
+  v8::Local<v8::Object> target = New<v8::Object>();
+
+  // Run the callback in the async context.
+  delay_request->callback.Call(target, 0, NULL, delay_request);
+
+  delete delay_request;
+}
+
+NAN_METHOD(Delay) {
+  int delay = To<int>(info[0]).FromJust();
+  v8::Local<v8::Function> cb = To<v8::Function>(info[1]).ToLocalChecked();
+
+  DelayRequest* delay_request = new DelayRequest(delay, cb);
+
+  uv_queue_work(
+      uv_default_loop()
+    , &delay_request->request
+    , Delay
+    , reinterpret_cast<uv_after_work_cb>(AfterDelay));
+}
+
+NAN_MODULE_INIT(Init) {
+  Set(target, New<v8::String>("delay").ToLocalChecked(),
+    GetFunction(New<v8::FunctionTemplate>(Delay)).ToLocalChecked());
+}
+
+NODE_MODULE(asyncresource, Init)
diff --git a/test/cpp/converters.cpp b/test/cpp/converters.cpp
index c236325..f989b63 100644
--- a/test/cpp/converters.cpp
+++ b/test/cpp/converters.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/error.cpp b/test/cpp/error.cpp
index f138a56..03bb686 100644
--- a/test/cpp/error.cpp
+++ b/test/cpp/error.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/gc.cpp b/test/cpp/gc.cpp
index ce01c64..7110560 100644
--- a/test/cpp/gc.cpp
+++ b/test/cpp/gc.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/indexedinterceptors.cpp b/test/cpp/indexedinterceptors.cpp
index ae8c5a9..dea307b 100644
--- a/test/cpp/indexedinterceptors.cpp
+++ b/test/cpp/indexedinterceptors.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/isolatedata.cpp b/test/cpp/isolatedata.cpp
index d642727..c406faa 100644
--- a/test/cpp/isolatedata.cpp
+++ b/test/cpp/isolatedata.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/json-parse.cpp b/test/cpp/json-parse.cpp
index a3173fd..57aab78 100644
--- a/test/cpp/json-parse.cpp
+++ b/test/cpp/json-parse.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/json-stringify.cpp b/test/cpp/json-stringify.cpp
index 09209c8..afc4ded 100644
--- a/test/cpp/json-stringify.cpp
+++ b/test/cpp/json-stringify.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/makecallback.cpp b/test/cpp/makecallback.cpp
index 1598e6f..2a1e621 100644
--- a/test/cpp/makecallback.cpp
+++ b/test/cpp/makecallback.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/morenews.cpp b/test/cpp/morenews.cpp
index fea83b9..4215310 100644
--- a/test/cpp/morenews.cpp
+++ b/test/cpp/morenews.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/multifile1.cpp b/test/cpp/multifile1.cpp
index a439fce..d0a441e 100644
--- a/test/cpp/multifile1.cpp
+++ b/test/cpp/multifile1.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/multifile2.cpp b/test/cpp/multifile2.cpp
index 69ded2f..2ce5913 100644
--- a/test/cpp/multifile2.cpp
+++ b/test/cpp/multifile2.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/multifile2.h b/test/cpp/multifile2.h
index 5f229c5..61913b8 100644
--- a/test/cpp/multifile2.h
+++ b/test/cpp/multifile2.h
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/namedinterceptors.cpp b/test/cpp/namedinterceptors.cpp
index 50664db..529aa4f 100644
--- a/test/cpp/namedinterceptors.cpp
+++ b/test/cpp/namedinterceptors.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/nancallback.cpp b/test/cpp/nancallback.cpp
index c6311cb..f09a497 100644
--- a/test/cpp/nancallback.cpp
+++ b/test/cpp/nancallback.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
@@ -11,17 +11,20 @@
 using namespace Nan;  // NOLINT(build/namespaces)
 
 NAN_METHOD(GlobalContext) {
-  Callback(To<v8::Function>(info[0]).ToLocalChecked()).Call(0, NULL);
+  AsyncResource resource("nan:test.nancallback");
+  Callback(To<v8::Function>(info[0]).ToLocalChecked()).Call(0, NULL, &resource);
 }
 
 NAN_METHOD(SpecificContext) {
+  AsyncResource resource("nan:test.nancallback");
   Callback cb(To<v8::Function>(info[0]).ToLocalChecked());
-  cb.Call(GetCurrentContext()->Global(), 0, NULL);
+  cb.Call(GetCurrentContext()->Global(), 0, NULL, &resource);
 }
 
 NAN_METHOD(CustomReceiver) {
+  AsyncResource resource("nan:test.nancallback");
   Callback cb(To<v8::Function>(info[0]).ToLocalChecked());
-  cb.Call(To<v8::Object>(info[1]).ToLocalChecked(), 0, NULL);
+  cb.Call(To<v8::Object>(info[1]).ToLocalChecked(), 0, NULL, &resource);
 }
 
 NAN_METHOD(CompareCallbacks) {
@@ -38,7 +41,8 @@ NAN_METHOD(CallDirect) {
 }
 
 NAN_METHOD(CallAsFunction) {
-  Callback(To<v8::Function>(info[0]).ToLocalChecked())();
+  AsyncResource resource("nan:test.nancallback");
+  Callback(To<v8::Function>(info[0]).ToLocalChecked())(&resource);
 }
 
 NAN_METHOD(ResetUnset) {
diff --git a/test/cpp/nannew.cpp b/test/cpp/nannew.cpp
index d83d434..bab53d1 100644
--- a/test/cpp/nannew.cpp
+++ b/test/cpp/nannew.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/news.cpp b/test/cpp/news.cpp
index 1043dbf..3d8f29e 100644
--- a/test/cpp/news.cpp
+++ b/test/cpp/news.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/objectwraphandle.cpp b/test/cpp/objectwraphandle.cpp
index e334026..ac4f79a 100644
--- a/test/cpp/objectwraphandle.cpp
+++ b/test/cpp/objectwraphandle.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/persistent.cpp b/test/cpp/persistent.cpp
index 652e7fd..e9bfffd 100644
--- a/test/cpp/persistent.cpp
+++ b/test/cpp/persistent.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/private.cpp b/test/cpp/private.cpp
index c918864..f136cb7 100644
--- a/test/cpp/private.cpp
+++ b/test/cpp/private.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/returnemptystring.cpp b/test/cpp/returnemptystring.cpp
index 8272f28..eb60cc8 100644
--- a/test/cpp/returnemptystring.cpp
+++ b/test/cpp/returnemptystring.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/returnnull.cpp b/test/cpp/returnnull.cpp
index 825d104..33faa31 100644
--- a/test/cpp/returnnull.cpp
+++ b/test/cpp/returnnull.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/returnundefined.cpp b/test/cpp/returnundefined.cpp
index 8fd7984..10499cf 100644
--- a/test/cpp/returnundefined.cpp
+++ b/test/cpp/returnundefined.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/returnvalue.cpp b/test/cpp/returnvalue.cpp
index a5537c6..fc08ed0 100644
--- a/test/cpp/returnvalue.cpp
+++ b/test/cpp/returnvalue.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/setcallhandler.cpp b/test/cpp/setcallhandler.cpp
index d1584ea..c0eb09b 100644
--- a/test/cpp/setcallhandler.cpp
+++ b/test/cpp/setcallhandler.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/settemplate.cpp b/test/cpp/settemplate.cpp
index ef8fb5e..588aaad 100644
--- a/test/cpp/settemplate.cpp
+++ b/test/cpp/settemplate.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/examples/async_pi_estimate/pi_est.h b/test/cpp/sleep.h
similarity index 55%
copy from examples/async_pi_estimate/pi_est.h
copy to test/cpp/sleep.h
index ffd29e5..600d65f 100644
--- a/examples/async_pi_estimate/pi_est.h
+++ b/test/cpp/sleep.h
@@ -1,14 +1,12 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
 
-#ifndef EXAMPLES_ASYNC_PI_ESTIMATE_PI_EST_H_
-#define EXAMPLES_ASYNC_PI_ESTIMATE_PI_EST_H_
-
-double Estimate(int points);
-
-#endif  // EXAMPLES_ASYNC_PI_ESTIMATE_PI_EST_H_
+#ifndef _WIN32
+#include <unistd.h>
+#define Sleep(x) usleep((x)*1000)
+#endif
diff --git a/test/cpp/strings.cpp b/test/cpp/strings.cpp
index a01ff16..73f87fb 100644
--- a/test/cpp/strings.cpp
+++ b/test/cpp/strings.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/symbols.cpp b/test/cpp/symbols.cpp
index 90e18c1..0ae6849 100644
--- a/test/cpp/symbols.cpp
+++ b/test/cpp/symbols.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/threadlocal.cpp b/test/cpp/threadlocal.cpp
index 9f42bd0..83e800c 100644
--- a/test/cpp/threadlocal.cpp
+++ b/test/cpp/threadlocal.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/trycatch.cpp b/test/cpp/trycatch.cpp
index c685597..8ce20c6 100644
--- a/test/cpp/trycatch.cpp
+++ b/test/cpp/trycatch.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/typedarrays.cpp b/test/cpp/typedarrays.cpp
index 2ed5ff4..ce742fb 100644
--- a/test/cpp/typedarrays.cpp
+++ b/test/cpp/typedarrays.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/weak.cpp b/test/cpp/weak.cpp
index dcb7420..2cf68b9 100644
--- a/test/cpp/weak.cpp
+++ b/test/cpp/weak.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/weak2.cpp b/test/cpp/weak2.cpp
index 6f35327..393ef21 100644
--- a/test/cpp/weak2.cpp
+++ b/test/cpp/weak2.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/cpp/wrappedobjectfactory.cpp b/test/cpp/wrappedobjectfactory.cpp
index b3ebf9d..9930a5f 100644
--- a/test/cpp/wrappedobjectfactory.cpp
+++ b/test/cpp/wrappedobjectfactory.cpp
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/accessors-test.js b/test/js/accessors-test.js
index 23d99ab..e6ad457 100644
--- a/test/js/accessors-test.js
+++ b/test/js/accessors-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/accessors2-test.js b/test/js/accessors2-test.js
index d80e19c..92a6ee0 100644
--- a/test/js/accessors2-test.js
+++ b/test/js/accessors2-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/asyncprogressqueueworker-test.js b/test/js/asyncprogressqueueworker-test.js
index 9d27177..1a37c38 100644
--- a/test/js/asyncprogressqueueworker-test.js
+++ b/test/js/asyncprogressqueueworker-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/asyncprogressqueueworkerstream-test.js b/test/js/asyncprogressqueueworkerstream-test.js
index 3386e58..a456ac7 100644
--- a/test/js/asyncprogressqueueworkerstream-test.js
+++ b/test/js/asyncprogressqueueworkerstream-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/asyncprogressworker-test.js b/test/js/asyncprogressworker-test.js
index 8f157b0..faaada9 100644
--- a/test/js/asyncprogressworker-test.js
+++ b/test/js/asyncprogressworker-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/asyncprogressworkersignal-test.js b/test/js/asyncprogressworkersignal-test.js
index 59c2866..44813b4 100644
--- a/test/js/asyncprogressworkersignal-test.js
+++ b/test/js/asyncprogressworkersignal-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/asyncprogressworkerstream-test.js b/test/js/asyncprogressworkerstream-test.js
index 3c09dc9..d8c8fca 100644
--- a/test/js/asyncprogressworkerstream-test.js
+++ b/test/js/asyncprogressworkerstream-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/asyncresource-test.js b/test/js/asyncresource-test.js
new file mode 100644
index 0000000..d0ca132
--- /dev/null
+++ b/test/js/asyncresource-test.js
@@ -0,0 +1,75 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2018 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+const version = process.versions.node.split('.');
+if (version[0] < 9) {
+  process.exit(0);
+}
+
+try {
+  require('async_hooks');
+} catch (e) {
+  process.exit(0);
+}
+
+const test     = require('tap').test
+    , testRoot = require('path').resolve(__dirname, '..')
+    , delay = require('bindings')({ module_root: testRoot, bindings: 'asyncresource' }).delay
+    , asyncHooks = require('async_hooks');
+
+test('asyncresource', function (t) {
+  t.plan(7);
+
+  var resourceAsyncId;
+  var originalExecutionAsyncId;
+  var beforeCalled = false;
+  var afterCalled = false;
+  var destroyCalled = false;
+
+  var hooks = asyncHooks.createHook({
+    init: function(asyncId, type, triggerAsyncId, resource) {
+      if (type === 'nan:test.DelayRequest') {
+        resourceAsyncId = asyncId;
+      }
+    },
+    before: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        beforeCalled = true;
+      }
+    },
+    after: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        afterCalled = true;
+      }
+    },
+    destroy: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        destroyCalled = true;
+      }
+    }
+
+  });
+  hooks.enable();
+
+  originalExecutionAsyncId = asyncHooks.executionAsyncId();
+  delay(1000, function() {
+    t.equal(asyncHooks.executionAsyncId(), resourceAsyncId,
+            'callback should have the correct execution context');
+    t.equal(asyncHooks.triggerAsyncId(), originalExecutionAsyncId,
+            'callback should have the correct trigger context');
+    t.ok(beforeCalled, 'before should have been called');
+    t.notOk(afterCalled, 'after should not have been called yet');
+    setTimeout(function() {
+      t.ok(afterCalled, 'after should have been called');
+      t.ok(destroyCalled, 'destroy should have been called');
+      t.equal(asyncHooks.triggerAsyncId(), resourceAsyncId,
+              'setTimeout should have been triggered by the async resource');
+      hooks.disable();
+    }, 1);
+  });
+});
diff --git a/test/js/asyncworker-test.js b/test/js/asyncworker-test.js
index 1d4d60c..a6a5d08 100644
--- a/test/js/asyncworker-test.js
+++ b/test/js/asyncworker-test.js
@@ -1,11 +1,12 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
 
+const version = process.versions.node.split('.');
 const test     = require('tap').test
     , testRoot = require('path').resolve(__dirname, '..')
     , bindings = require('bindings')({ module_root: testRoot, bindings: 'asyncworker' });
@@ -26,4 +27,73 @@ test('asyncworker', function (t) {
     t.ok(ticks > 6, 'got plenty of ticks! (' + ticks + ')')
     t.end()
   })
-})
+});
+
+test('asyncworker context', function (t) {
+  var asyncHooks;
+  if (version[0] < 9) {
+    t.ok(true);
+    t.end();
+    return;
+  }
+
+  try {
+    asyncHooks = require('async_hooks');
+  } catch (e) {
+    t.ok(true);
+    t.end();
+    return;
+  }
+
+  t.plan(7);
+
+  var sleep = bindings.a;
+  var resourceAsyncId;
+  var originalExecutionAsyncId;
+  var beforeCalled = false;
+  var afterCalled = false;
+  var destroyCalled = false;
+
+  var hooks = asyncHooks.createHook({
+    init: function(asyncId, type, triggerAsyncId, resource) {
+      if (type === 'nan:test.SleepWorker') {
+        resourceAsyncId = asyncId;
+      }
+    },
+    before: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        beforeCalled = true;
+      }
+    },
+    after: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        afterCalled = true;
+      }
+    },
+    destroy: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        destroyCalled = true;
+      }
+    }
+
+  });
+  hooks.enable();
+
+  originalExecutionAsyncId = asyncHooks.executionAsyncId();
+  sleep(200, function() {
+    t.equal(asyncHooks.executionAsyncId(), resourceAsyncId,
+            'callback should have the correct execution context');
+    t.equal(asyncHooks.triggerAsyncId(), originalExecutionAsyncId,
+            'callback should have the correct trigger context');
+    t.ok(beforeCalled, 'before should have been called');
+    t.notOk(afterCalled, 'after should not have been called yet');
+    setTimeout(function() {
+      t.ok(afterCalled, 'after should have been called');
+      t.ok(destroyCalled, 'destroy should have been called');
+      t.equal(asyncHooks.triggerAsyncId(), resourceAsyncId,
+              'setTimeout should have been triggered by the async resource');
+      hooks.disable();
+    }, 1);
+  });
+});
+
diff --git a/test/js/asyncworkererror-test.js b/test/js/asyncworkererror-test.js
index ebdb8d6..3870602 100644
--- a/test/js/asyncworkererror-test.js
+++ b/test/js/asyncworkererror-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/buffer-test.js b/test/js/buffer-test.js
index 7a88764..2cbf280 100644
--- a/test/js/buffer-test.js
+++ b/test/js/buffer-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/bufferworkerpersistent-test.js b/test/js/bufferworkerpersistent-test.js
index 4f9fcf8..6fd7da9 100644
--- a/test/js/bufferworkerpersistent-test.js
+++ b/test/js/bufferworkerpersistent-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/callbackcontext-test.js b/test/js/callbackcontext-test.js
new file mode 100644
index 0000000..3ef8213
--- /dev/null
+++ b/test/js/callbackcontext-test.js
@@ -0,0 +1,79 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2018 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
+const bindingName = 'callbackcontext';
+
+const version = process.versions.node.split('.');
+if (version[0] < 9) {
+  console.log('1..0 # Skipped: ' + bindingName);
+  process.exit(0);
+}
+
+try {
+  require('async_hooks');
+} catch (e) {
+  console.log('1..0 # Skipped: ' + bindingName);
+  process.exit(0);
+}
+
+const test     = require('tap').test
+    , testRoot = require('path').resolve(__dirname, '..')
+    , delay = require('bindings')({ module_root: testRoot, bindings: bindingName }).delay
+    , asyncHooks = require('async_hooks');
+
+test(bindingName, function (t) {
+  t.plan(7);
+
+  var resourceAsyncId;
+  var originalExecutionAsyncId;
+  var beforeCalled = false;
+  var afterCalled = false;
+  var destroyCalled = false;
+
+  var hooks = asyncHooks.createHook({
+    init: function(asyncId, type, triggerAsyncId, resource) {
+      if (type === 'nan:test.DelayRequest') {
+        resourceAsyncId = asyncId;
+      }
+    },
+    before: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        beforeCalled = true;
+      }
+    },
+    after: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        afterCalled = true;
+      }
+    },
+    destroy: function(asyncId) {
+      if (asyncId === resourceAsyncId) {
+        destroyCalled = true;
+      }
+    }
+
+  });
+  hooks.enable();
+
+  originalExecutionAsyncId = asyncHooks.executionAsyncId();
+  delay(1000, function() {
+    t.equal(asyncHooks.executionAsyncId(), resourceAsyncId,
+            'callback should have the correct execution context');
+    t.equal(asyncHooks.triggerAsyncId(), originalExecutionAsyncId,
+            'callback should have the correct trigger context');
+    t.ok(beforeCalled, 'before should have been called');
+    t.notOk(afterCalled, 'after should not have been called yet');
+    setTimeout(function() {
+      t.ok(afterCalled, 'after should have been called');
+      t.ok(destroyCalled, 'destroy should have been called');
+      t.equal(asyncHooks.triggerAsyncId(), resourceAsyncId,
+              'setTimeout should have been triggered by the async resource');
+      hooks.disable();
+    }, 1);
+  });
+});
diff --git a/test/js/converters-test.js b/test/js/converters-test.js
index 19972ac..bd55e3f 100644
--- a/test/js/converters-test.js
+++ b/test/js/converters-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/error-test.js b/test/js/error-test.js
index 2bb439d..3ab341d 100644
--- a/test/js/error-test.js
+++ b/test/js/error-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/gc-test.js b/test/js/gc-test.js
index e5a0b33..6b664cf 100644
--- a/test/js/gc-test.js
+++ b/test/js/gc-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/indexedinterceptors-test.js b/test/js/indexedinterceptors-test.js
index 98ae142..dfca2ef 100644
--- a/test/js/indexedinterceptors-test.js
+++ b/test/js/indexedinterceptors-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/isolatedata-test.js b/test/js/isolatedata-test.js
index 7d40af8..2d3d80e 100644
--- a/test/js/isolatedata-test.js
+++ b/test/js/isolatedata-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/json-parse-test.js b/test/js/json-parse-test.js
index 296456c..f2a435c 100644
--- a/test/js/json-parse-test.js
+++ b/test/js/json-parse-test.js
@@ -1,3 +1,11 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2018 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
 const test     = require('tap').test
     , testRoot = require('path').resolve(__dirname, '..')
     , bindings = require('bindings')({ module_root: testRoot, bindings: 'parse' });
diff --git a/test/js/json-stringify-test.js b/test/js/json-stringify-test.js
index 63fbed2..e2ee5a2 100644
--- a/test/js/json-stringify-test.js
+++ b/test/js/json-stringify-test.js
@@ -1,3 +1,11 @@
+/*********************************************************************
+ * NAN - Native Abstractions for Node.js
+ *
+ * Copyright (c) 2018 NAN contributors
+ *
+ * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
+ ********************************************************************/
+
 const test     = require('tap').test
     , testRoot = require('path').resolve(__dirname, '..')
     , bindings = require('bindings')({ module_root: testRoot, bindings: 'stringify' });
diff --git a/test/js/makecallback-test.js b/test/js/makecallback-test.js
index 8558a6a..151bf4a 100644
--- a/test/js/makecallback-test.js
+++ b/test/js/makecallback-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/morenews-test.js b/test/js/morenews-test.js
index 0dc8300..38ca324 100644
--- a/test/js/morenews-test.js
+++ b/test/js/morenews-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/multifile-test.js b/test/js/multifile-test.js
index 072b8fe..6e1c330 100644
--- a/test/js/multifile-test.js
+++ b/test/js/multifile-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/namedinterceptors-test.js b/test/js/namedinterceptors-test.js
index 68f2da9..ef3d7ac 100644
--- a/test/js/namedinterceptors-test.js
+++ b/test/js/namedinterceptors-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/nancallback-test.js b/test/js/nancallback-test.js
index c755aba..2bd39b8 100644
--- a/test/js/nancallback-test.js
+++ b/test/js/nancallback-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/nannew-test.js b/test/js/nannew-test.js
index 83cbc83..5af96ec 100644
--- a/test/js/nannew-test.js
+++ b/test/js/nannew-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/news-test.js b/test/js/news-test.js
index 63cae98..d870b13 100644
--- a/test/js/news-test.js
+++ b/test/js/news-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/objectwraphandle-test.js b/test/js/objectwraphandle-test.js
index 9b863ff..a9318b5 100644
--- a/test/js/objectwraphandle-test.js
+++ b/test/js/objectwraphandle-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/persistent-test.js b/test/js/persistent-test.js
index dce4e73..afc7fde 100644
--- a/test/js/persistent-test.js
+++ b/test/js/persistent-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/private-test.js b/test/js/private-test.js
index 3212265..f82e0ef 100644
--- a/test/js/private-test.js
+++ b/test/js/private-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/returnemptystring-test.js b/test/js/returnemptystring-test.js
index 078c277..08fb398 100644
--- a/test/js/returnemptystring-test.js
+++ b/test/js/returnemptystring-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/returnnull-test.js b/test/js/returnnull-test.js
index 3305d3d..7832b4b 100644
--- a/test/js/returnnull-test.js
+++ b/test/js/returnnull-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/returnundefined-test.js b/test/js/returnundefined-test.js
index 048aa37..9e3477e 100644
--- a/test/js/returnundefined-test.js
+++ b/test/js/returnundefined-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/returnvalue-test.js b/test/js/returnvalue-test.js
index 5d87558..55e2bd2 100644
--- a/test/js/returnvalue-test.js
+++ b/test/js/returnvalue-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/setcallhandler-test.js b/test/js/setcallhandler-test.js
index 29fc534..18f6ecb 100644
--- a/test/js/setcallhandler-test.js
+++ b/test/js/setcallhandler-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/settemplate-test.js b/test/js/settemplate-test.js
index 5748062..8fea19e 100644
--- a/test/js/settemplate-test.js
+++ b/test/js/settemplate-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/strings-test.js b/test/js/strings-test.js
index 9f3c45b..789c4f4 100644
--- a/test/js/strings-test.js
+++ b/test/js/strings-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/symbols-test.js b/test/js/symbols-test.js
index 36bb5b5..67b922b 100644
--- a/test/js/symbols-test.js
+++ b/test/js/symbols-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/threadlocal-test.js b/test/js/threadlocal-test.js
index 49fab2d..ea91b57 100644
--- a/test/js/threadlocal-test.js
+++ b/test/js/threadlocal-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/trycatch-test.js b/test/js/trycatch-test.js
index 0e19a46..c38cb5f 100644
--- a/test/js/trycatch-test.js
+++ b/test/js/trycatch-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/typedarrays-test.js b/test/js/typedarrays-test.js
index 3696624..0ea426b 100644
--- a/test/js/typedarrays-test.js
+++ b/test/js/typedarrays-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/weak-test.js b/test/js/weak-test.js
index 8275c14..34a8b9c 100644
--- a/test/js/weak-test.js
+++ b/test/js/weak-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/weak2-test.js b/test/js/weak2-test.js
index 1cc4284..af738b9 100644
--- a/test/js/weak2-test.js
+++ b/test/js/weak2-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/test/js/wrappedobjectfactory-test.js b/test/js/wrappedobjectfactory-test.js
index a7cd66d..ec37269 100644
--- a/test/js/wrappedobjectfactory-test.js
+++ b/test/js/wrappedobjectfactory-test.js
@@ -1,7 +1,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/
diff --git a/tools/1to2.js b/tools/1to2.js
index 1e86be7..337f8bf 100755
--- a/tools/1to2.js
+++ b/tools/1to2.js
@@ -2,7 +2,7 @@
 /*********************************************************************
  * NAN - Native Abstractions for Node.js
  *
- * Copyright (c) 2017 NAN contributors
+ * Copyright (c) 2018 NAN contributors
  *
  * MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
  ********************************************************************/

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-nan.git



More information about the Pkg-javascript-commits mailing list