Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: make util binding internal #22675

Merged
merged 2 commits into from
Sep 6, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
repl: remove duplicate util binding
PR-URL: #22675
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information
cjihrig committed Sep 6, 2018

Verified

This commit was signed with the committer’s verified signature.
sagikazarmark Márk Sági-Kazár
commit 2bf4697ff4be6a510410be1f1e67549be347614b
9 changes: 5 additions & 4 deletions lib/repl.js
Original file line number Diff line number Diff line change
@@ -54,7 +54,6 @@ const {
const internalUtil = require('internal/util');
const util = require('util');
const { internalBinding } = require('internal/bootstrap/loaders');
const utilBinding = internalBinding('util');
const { inherits } = util;
const Stream = require('stream');
const vm = require('vm');
@@ -79,7 +78,9 @@ const {
propertyFilter: {
ALL_PROPERTIES,
SKIP_SYMBOLS
}
},
startSigintWatchdog,
stopSigintWatchdog
} = internalBinding('util');

// Lazy-loaded.
@@ -314,7 +315,7 @@ function REPLServer(prompt,
if (self.breakEvalOnSigint) {
// Start the SIGINT watchdog before entering raw mode so that a very
// quick Ctrl+C doesn't lead to aborting the process completely.
if (!utilBinding.startSigintWatchdog())
if (!startSigintWatchdog())
throw new ERR_CANNOT_WATCH_SIGINT();
previouslyInRawMode = self._setRawMode(false);
}
@@ -338,7 +339,7 @@ function REPLServer(prompt,

// Returns true if there were pending SIGINTs *after* the script
// has terminated without being interrupted itself.
if (utilBinding.stopSigintWatchdog()) {
if (stopSigintWatchdog()) {
self.emit('SIGINT');
}
}