diff options
Diffstat (limited to 'lib/v8.js')
-rw-r--r-- | lib/v8.js | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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); |