Skip to content

Commit c6b4e96

Browse files
committed
test: adapt test-worker-debug for V8 10.0
V8 is removing callFrame.url. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3345001 PR-URL: #42657 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 0854fce commit c6b4e96

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

test/parallel/test-worker-debug.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ common.skipIfInspectorDisabled();
66
const assert = require('assert');
77
const EventEmitter = require('events');
88
const { Session } = require('inspector');
9-
const { pathToFileURL } = require('url');
109
const {
1110
Worker, isMainThread, parentPort, workerData
1211
} = require('worker_threads');
@@ -106,7 +105,6 @@ class WorkerSession extends EventEmitter {
106105
this.post(command);
107106
const notification = await notificationPromise;
108107
const callFrame = notification.params.callFrames[0];
109-
assert.strictEqual(callFrame.url, pathToFileURL(script).toString());
110108
assert.strictEqual(callFrame.location.lineNumber, line);
111109
}
112110

@@ -153,7 +151,7 @@ async function testBasicWorkerDebug(session, post) {
153151
await workerSession.waitForBreakAfterCommand(
154152
'Runtime.runIfWaitingForDebugger', __filename, 1);
155153
await workerSession.waitForBreakAfterCommand(
156-
'Debugger.resume', __filename, 26); // V8 line number is zero-based
154+
'Debugger.resume', __filename, 25); // V8 line number is zero-based
157155
const msg = await consolePromise;
158156
assert.strictEqual(msg, workerMessage);
159157
workerSession.post('Debugger.resume');

0 commit comments

Comments
 (0)