diff options
author | Ali Ijaz Sheikh <ofrobots@google.com> | 2018-01-24 18:09:53 -0800 |
---|---|---|
committer | Ali Ijaz Sheikh <ofrobots@google.com> | 2018-02-15 17:44:48 -0800 |
commit | efb32592e1b78ec2559e1a409faa049e756a9501 (patch) | |
tree | 40a710822c6a6b24b286cfe0c692cda862d30e5b /doc | |
parent | 3b9cc424a4240c10003dca71c5a7478232e3d0d8 (diff) | |
download | android-node-v8-efb32592e1b78ec2559e1a409faa049e756a9501.tar.gz android-node-v8-efb32592e1b78ec2559e1a409faa049e756a9501.tar.bz2 android-node-v8-efb32592e1b78ec2559e1a409faa049e756a9501.zip |
src: deprecate legacy node::MakeCallback
The legacy MakeCallback functions do not provide a mechanism to
propagate async context. This means that any native modules using these
directly is likely breaking async debugging & tracing tools. For
example it is possible that such a module will cause incorrect async
stack traces to be reported (even when the module is not on the stack).
The new MakeCallback allow the user to specify the async context in
which the callback is to be executed.
Ref: https://github.com/nodejs/node/issues/13254
PR-URL: https://github.com/nodejs/node/pull/18632
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Andreas Madsen <amwebdk@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/deprecations.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index c0778aebad..d1751cdff6 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -893,6 +893,15 @@ Use [`asyncResource.runInAsyncScope()`][] API instead which provides a much safer, and more convenient, alternative. See https://github.com/nodejs/node/pull/18513 for more details. +<a id="DEP0098"></a> +### DEP0098: async context-unaware node::MakeCallback C++ APIs + +Type: Compile-time + +Certain versions of `node::MakeCallback` APIs available to native modules are +deprecated. Please use the versions of the API that accept an `async_context` +parameter. + [`--pending-deprecation`]: cli.html#cli_pending_deprecation [`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size [`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array |