profiler icon indicating copy to clipboard operation
profiler copied to clipboard

Fix types in GCSlice marker fields

Open PaulBone opened this issue 7 years ago • 1 comments

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

PaulBone avatar Apr 30 '18 05:04 PaulBone

I'd rather use number | null, and have a profile conversion step, because if existing profiles have the value "null" we can have weird results after formatBytes

julienw avatar May 02 '18 16:05 julienw