Skip to content
Merged
Changes from all commits
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
7 changes: 6 additions & 1 deletion deps/v8/src/debug/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3387,7 +3387,12 @@ static void RecordReplayRegisterScript(Handle<Script> script) {
if (RecordReplayIgnoreScriptByURL(name.get())) {
return;
}
url = std::string("file://") + name.get();
std::string name_str(name.get());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of 1044 sources in a recording 21 were affected by this issue:

[
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/tests/playwright.config.ts",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@playwright+test@1.52.0/node_modules/@playwright/test/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/playwright@1.52.0/node_modules/playwright/test.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/tests/todo-priorities.test.ts",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/tests/fixtures/authFixture.ts",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/shared-node/network.ts",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/shared-node/fetch-polyfill.ts",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/shared-node/node-globals-polyfill.ts",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@mswjs+interceptors@0.39.6/node_modules/@mswjs/interceptors/lib/node/interceptors/fetch/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@mswjs+interceptors@0.39.6/node_modules/@mswjs/interceptors/lib/node/chunk-WI4WZWP4.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@mswjs+interceptors@0.39.6/node_modules/@mswjs/interceptors/lib/node/chunk-TX5GBTFY.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@mswjs+interceptors@0.39.6/node_modules/@mswjs/interceptors/lib/node/chunk-6YM4PLBI.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@mswjs+interceptors@0.39.6/node_modules/@mswjs/interceptors/lib/node/chunk-A7Q4RTDJ.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/outvariant@1.4.3/node_modules/outvariant/lib/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@open-draft+deferred-promise@2.2.0/node_modules/@open-draft/deferred-promise/build/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@open-draft+until@2.1.0/node_modules/@open-draft/until/lib/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@mswjs+interceptors@0.39.6/node_modules/@mswjs/interceptors/lib/node/chunk-IHJSPMYM.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@open-draft+logger@0.3.0/node_modules/@open-draft/logger/lib/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/is-node-process@1.2.0/node_modules/is-node-process/lib/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/strict-event-emitter@0.5.1/node_modules/strict-event-emitter/lib/index.mjs",
    "file://file:///tmp/nut/repository/90a83894-6c8d-4437-a22b-45c890569c63/node_modules/.pnpm/@mswjs+interceptors@0.39.6/node_modules/@mswjs/interceptors/lib/node/chunk-3GJB4JDF.mjs"
]

I'm not 100% sure what's the exact reason but my educated guess is those were loaded through a custom ESM loader and apparently, file:// was already added by that in the process.

if (name_str.find("file://") == 0) {
url = name_str;
} else {
url = std::string("file://") + name_str;
}
}

RecordReplayOnNewSource(isolate, id.get(), "scriptSource", url.length() ? url.c_str() : nullptr);
Expand Down
Loading