GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — v8: move `ToNamespacedPath` to c++ · nodejs/node@5aa2163

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib
    • v8.js
  • src
    • heap_utils.cc
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/v8.js‎

Copy file name to clipboardExpand all lines: lib/v8.js
-2Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ const { copy } = internalBinding('buffer');
5353
const { inspect } = require('internal/util/inspect');
5454
const { FastBuffer } = require('internal/buffer');
5555
const { getValidatedPath } = require('internal/fs/utils');
56-
const { toNamespacedPath } = require('path');
5756
const {
5857
createHeapSnapshotStream,
5958
triggerHeapSnapshot,
@@ -78,7 +77,6 @@ const { getOptionValue } = require('internal/options');
7877
function writeHeapSnapshot(filename, options) {
7978
if (filename !== undefined) {
8079
filename = getValidatedPath(filename);
81-
filename = toNamespacedPath(filename);
8280
}
8381
const optionArray = getHeapSnapshotOptions(options);
8482
return triggerHeapSnapshot(filename, optionArray);
Collapse file

‎src/heap_utils.cc‎

Copy file name to clipboardExpand all lines: src/heap_utils.cc
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "env-inl.h"
33
#include "memory_tracker-inl.h"
44
#include "node_external_reference.h"
5+
#include "path.h"
56
#include "permission/permission.h"
67
#include "stream_base-inl.h"
78
#include "util-inl.h"
@@ -468,6 +469,7 @@ void TriggerHeapSnapshot(const FunctionCallbackInfo<Value>& args) {
468469

469470
BufferValue path(isolate, filename_v);
470471
CHECK_NOT_NULL(*path);
472+
ToNamespacedPath(env, &path);
471473
THROW_IF_INSUFFICIENT_PERMISSIONS(
472474
env, permission::PermissionScope::kFileSystemWrite, path.ToStringView());
473475
if (WriteSnapshot(env, *path, options).IsNothing()) return;

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.