summaryrefslogtreecommitdiff
path: root/lib/v8.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/v8.js')
-rw-r--r--lib/v8.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/v8.js b/lib/v8.js
index efce85533d..2bede41291 100644
--- a/lib/v8.js
+++ b/lib/v8.js
@@ -25,8 +25,7 @@ const {
const assert = require('internal/assert');
const { copy } = internalBinding('buffer');
const { FastBuffer } = require('internal/buffer');
-const { toPathIfFileURL } = require('internal/url');
-const { validatePath } = require('internal/fs/utils');
+const { getValidatedPath } = require('internal/fs/utils');
const { toNamespacedPath } = require('path');
const {
createHeapSnapshotStream,
@@ -43,8 +42,7 @@ const kHandle = Symbol('kHandle');
function writeHeapSnapshot(filename) {
if (filename !== undefined) {
- filename = toPathIfFileURL(filename);
- validatePath(filename);
+ filename = getValidatedPath(filename);
filename = toNamespacedPath(filename);
}
return triggerHeapSnapshot(filename);