firefox-devtools / firefox-devtools/profiler

Fix types in GCSlice marker fields

Open
#973 1 comment 0 reactions 0 assignees View on GitHub
polish profile data
Dominant language
TypeScript
Stars
1.5k
Forks
491
Avg merge
3d 46m
Merged PRs (30d)
27

Description

julienw said "I noticed trigger_amount and trigger_threshold are strings too, but strings that contain only a number, so maybe we should just convert them when we process this marker. (in a future PR)" and he's right. These are also the last two things with incorrect types.

I checked the corresponding C++ code and these are either floats within strings or the bareword `null`: https://searchfox.org/mozilla-central/source/js/src/vm/JSONPrinter.cpp#174 which is used when the float is infinite (and I presume NaN). We should convert this to the type `number | 'null'` when we load the profile. IMHO it does not need to be a profile conversion step, but I'd like to know what others think.

┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-739)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.