crypto: assign missing deprecation code

PR-URL: https://github.com/nodejs/node/pull/22827
Refs: https://github.com/nodejs/node/pull/22747
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Tobias Nießen 2018-09-12 22:54:43 +02:00
parent 79d2536493
commit 360465dfe2
No known key found for this signature in database
GPG Key ID: 718207F8FD156B70
2 changed files with 4 additions and 4 deletions

View File

@ -2184,8 +2184,8 @@ The [Legacy URL API][] is deprecated. This includes [`url.format()`][],
[`url.parse()`][], [`url.resolve()`][], and the [legacy `urlObject`][]. Please
use the [WHATWG URL API][] instead.
<a id="DEP00XX"></a>
### DEP00XX: Native crypto handles
<a id="DEP0117"></a>
### DEP0117: Native crypto handles
<!-- YAML
changes:
- version: REPLACEME

View File

@ -36,10 +36,10 @@ function legacyNativeHandle(obj, handle) {
Object.defineProperty(obj, '_handle', {
get: deprecate(() => handle,
`${obj.constructor.name}._handle is deprecated. Use the ` +
'public API instead.', 'DEP00XX'),
'public API instead.', 'DEP0117'),
set: deprecate((h) => obj[kHandle] = handle = h,
`${obj.constructor.name}._handle is deprecated. Use the ` +
'public API instead.', 'DEP00XX'),
'public API instead.', 'DEP0117'),
enumerable: false
});
}