Skip to content

Commit 4948358

Browse files
mydeaclaude
andcommitted
test(browser): Allow profile frames without abs_path for clearTimeout
Adds `clearTimeout` to the list of built-in browser functions that may appear in JSSelfProfiler-sampled frames without `abs_path`/`lineno`/ `colno`, alongside `fetch` and `setTimeout`. The chunk-timer cleanup inside the profiler's stop path can sample a `clearTimeout` frame that trips `validateProfile`'s assertion. Fixes #20957 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b9f9ae4 commit 4948358

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • dev-packages/browser-integration-tests/suites/profiling

dev-packages/browser-integration-tests/suites/profiling/test-utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ export function validateProfile(
9999
expect(frame).toHaveProperty('function');
100100
expect(typeof frame.function).toBe('string');
101101

102-
// Some browser functions (fetch, setTimeout) may not have file locations
103-
if (frame.function !== 'fetch' && frame.function !== 'setTimeout') {
102+
// Some browser functions (fetch, setTimeout, clearTimeout) may not have file locations
103+
if (frame.function !== 'fetch' && frame.function !== 'setTimeout' && frame.function !== 'clearTimeout') {
104104
expect(frame).toHaveProperty('abs_path');
105105
expect(frame).toHaveProperty('lineno');
106106
expect(frame).toHaveProperty('colno');

0 commit comments

Comments
 (0)