Skip to content

Commit

Permalink
fix(browser): 0 is a valid index (#8581)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBa authored Jul 19, 2023
1 parent f2bdd1f commit 68c4491
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/browser/src/profiling/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,9 @@ export function convertJSSelfProfileToSampledFormat(input: JSSelfProfile): Profi
if (profile.frames[stackTop.frameId] === undefined) {
profile.frames[stackTop.frameId] = {
function: frame.name,
file: frame.resourceId ? input.resources[frame.resourceId] : undefined,
line: frame.line,
column: frame.column,
abs_path: typeof frame.resourceId === 'number' ? input.resources[frame.resourceId] : undefined,
lineno: frame.line,
colno: frame.column,
};
}

Expand Down
5 changes: 3 additions & 2 deletions packages/types/src/profiling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ export type ThreadCpuStack = FrameId[];
export type ThreadCpuFrame = {
function: string;
file?: string;
line?: number;
column?: number;
lineno?: number;
colno?: number;
abs_path?: string;
};

export interface ThreadCpuProfile {
Expand Down

0 comments on commit 68c4491

Please sign in to comment.