Skip to content

Commit 68c4491

Browse files
authored
fix(browser): 0 is a valid index (#8581)
1 parent f2bdd1f commit 68c4491

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/browser/src/profiling/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,9 @@ export function convertJSSelfProfileToSampledFormat(input: JSSelfProfile): Profi
249249
if (profile.frames[stackTop.frameId] === undefined) {
250250
profile.frames[stackTop.frameId] = {
251251
function: frame.name,
252-
file: frame.resourceId ? input.resources[frame.resourceId] : undefined,
253-
line: frame.line,
254-
column: frame.column,
252+
abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,
253+
lineno: frame.line,
254+
colno: frame.column,
255255
};
256256
}
257257

packages/types/src/profiling.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ export type ThreadCpuStack = FrameId[];
1414
export type ThreadCpuFrame = {
1515
function: string;
1616
file?: string;
17-
line?: number;
18-
column?: number;
17+
lineno?: number;
18+
colno?: number;
19+
abs_path?: string;
1920
};
2021

2122
export interface ThreadCpuProfile {

0 commit comments

Comments
 (0)