mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 12:20:27 +01:00
lib: unexpose six process bindings
Namely: async_wrap, crypto, http_parser, signal_wrap, url, and v8. They were runtime-deprecated 4 years ago. PR-URL: https://github.com/nodejs/node/pull/57149 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
6cb0690fcc
commit
c864dea910
|
|
@ -112,12 +112,7 @@ const processBindingAllowList = new SafeSet([
|
|||
]);
|
||||
|
||||
const runtimeDeprecatedList = new SafeSet([
|
||||
'async_wrap',
|
||||
'crypto',
|
||||
'http_parser',
|
||||
'signal_wrap',
|
||||
'url',
|
||||
'v8',
|
||||
// The list of runtime-deprecated bindings is currently empty.
|
||||
]);
|
||||
|
||||
const legacyWrapperList = new SafeSet([
|
||||
|
|
|
|||
8
test/fixtures/permission/processbinding.js
vendored
8
test/fixtures/permission/processbinding.js
vendored
|
|
@ -15,14 +15,6 @@ const assert = require('assert');
|
|||
}));
|
||||
}
|
||||
|
||||
{
|
||||
assert.throws(() => {
|
||||
process.binding('async_wrap');
|
||||
}, common.expectsError({
|
||||
code: 'ERR_ACCESS_DENIED',
|
||||
}));
|
||||
}
|
||||
|
||||
{
|
||||
assert.throws(() => {
|
||||
process.binding('fs');
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
// Flags: --expose-internals
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
|
||||
const net = require('net');
|
||||
const { HTTPParser } = process.binding('http_parser');
|
||||
const { internalBinding } = require('internal/test/binding');
|
||||
const { HTTPParser } = internalBinding('http_parser');
|
||||
|
||||
const server = net.createServer((socket) => {
|
||||
socket.write('HTTP/1.1 200 OK\r\n');
|
||||
|
|
|
|||
|
|
@ -6,17 +6,12 @@ const assert = require('assert');
|
|||
|
||||
// Assert that allowed internalBinding modules are accessible via
|
||||
// process.binding().
|
||||
assert(process.binding('async_wrap'));
|
||||
assert(process.binding('buffer'));
|
||||
assert(process.binding('cares_wrap'));
|
||||
assert(process.binding('constants'));
|
||||
assert(process.binding('contextify'));
|
||||
if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check
|
||||
assert(process.binding('crypto'));
|
||||
}
|
||||
assert(process.binding('fs'));
|
||||
assert(process.binding('fs_event_wrap'));
|
||||
assert(process.binding('http_parser'));
|
||||
if (common.hasIntl) {
|
||||
assert(process.binding('icu'));
|
||||
}
|
||||
|
|
@ -25,7 +20,6 @@ assert(process.binding('js_stream'));
|
|||
assert(process.binding('natives'));
|
||||
assert(process.binding('os'));
|
||||
assert(process.binding('pipe_wrap'));
|
||||
assert(process.binding('signal_wrap'));
|
||||
assert(process.binding('spawn_sync'));
|
||||
assert(process.binding('stream_wrap'));
|
||||
assert(process.binding('tcp_wrap'));
|
||||
|
|
@ -34,8 +28,6 @@ if (common.hasCrypto) { // eslint-disable-line node-core/crypto-check
|
|||
}
|
||||
assert(process.binding('tty_wrap'));
|
||||
assert(process.binding('udp_wrap'));
|
||||
assert(process.binding('url'));
|
||||
assert(process.binding('util'));
|
||||
assert(process.binding('uv'));
|
||||
assert(process.binding('v8'));
|
||||
assert(process.binding('zlib'));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user