Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f64e5ec

Browse filesBrowse files
joyeecheungaddaleax
authored andcommitted
Revert "os: move process.binding('os') to internalBinding"
This reverts commit 55d185f. PR-URL: #25446 Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent 8cc9757 commit f64e5ec
Copy full SHA for f64e5ec

File tree

Expand file treeCollapse file tree

5 files changed

+3
-9
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+3
-9
lines changed
Open diff view settings
Collapse file

‎lib/internal/bootstrap/loaders.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/loaders.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@
8787
'icu',
8888
'js_stream',
8989
'natives',
90-
'os',
9190
'pipe_wrap',
9291
'process_wrap',
9392
'signal_wrap',
Collapse file

‎lib/os.js‎

Copy file name to clipboardExpand all lines: lib/os.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const {
4444
getUptime,
4545
isBigEndian,
4646
setPriority: _setPriority
47-
} = internalBinding('os');
47+
} = process.binding('os');
4848

4949
function getCheckedFunction(fn) {
5050
return function checkError(...args) {
Collapse file

‎src/node_os.cc‎

Copy file name to clipboardExpand all lines: src/node_os.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,4 +467,4 @@ void Initialize(Local<Object> target,
467467
} // namespace os
468468
} // namespace node
469469

470-
NODE_MODULE_CONTEXT_AWARE_INTERNAL(os, node::os::Initialize)
470+
NODE_BUILTIN_MODULE_CONTEXT_AWARE(os, node::os::Initialize)
Collapse file

‎test/parallel/test-os-checked-function.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-os-checked-function.js
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
'use strict';
2-
// Flags: --expose_internals
3-
4-
const { internalBinding } = require('internal/test/binding');
5-
62
// Monkey patch the os binding before requiring any other modules, including
73
// common, which requires the os module.
8-
internalBinding('os').getHomeDirectory = function(ctx) {
4+
process.binding('os').getHomeDirectory = function(ctx) {
95
ctx.syscall = 'foo';
106
ctx.code = 'bar';
117
ctx.message = 'baz';
Collapse file

‎test/parallel/test-process-binding-internalbinding-whitelist.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-process-binding-internalbinding-whitelist.js
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,3 @@ assert(process.binding('url'));
1616
assert(process.binding('spawn_sync'));
1717
assert(process.binding('js_stream'));
1818
assert(process.binding('buffer'));
19-
assert(process.binding('os'));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.