firefox-devtools / firefox-devtools/profiler
Consider banning undefined values in profile data
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 491
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 30
Description
Currently some fields or array values can be undefined in profile. But `undefined` is not a valid JSON value[1], because of that, `JSON.stringify` removes the `undefined` object fields and converts the `undefined` array values to `null`. We are using `JSON.stringify` to serialize the profile data and use `JSON.parse` to unserialize it. When we serialize and unserialize the profile data, it produces a different profile data compared to first profile. To fix this issue we should probably ban `undefined` and use `null` instead.
-[1]: http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf (A JSON value can be an object, array, number, string, true, false, or null.)
cc julienw gregtatum
┆Issue is synchronized with this [Jira Task](https://mozilla-hub.atlassian.net/browse/FP-99)
Contributor guide
Assessment
This issue has not been assessed yet.