Skip to content

Commit d34dd93

Browse files
committed
Output 0 instead of null for the frameTable's innerWindowID column.
The profiler front-end treats null and 0 the same in this column. Really we don't want to have this column at all, see firefox-devtools/profiler#5006 . But 0 at least takes up fewer bytes in the JSON file than null.
1 parent 0b527fa commit d34dd93

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

fxprof-processed-profile/src/frame_table.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ impl Serialize for FrameTable {
109109
map.serialize_entry("subcategory", &self.subcategories)?;
110110
map.serialize_entry("func", &self.funcs)?;
111111
map.serialize_entry("nativeSymbol", &self.native_symbols)?;
112-
map.serialize_entry("innerWindowID", &SerializableSingleValueColumn((), len))?;
112+
map.serialize_entry("innerWindowID", &SerializableSingleValueColumn(0, len))?;
113113
map.serialize_entry("line", &SerializableSingleValueColumn((), len))?;
114114
map.serialize_entry("column", &SerializableSingleValueColumn((), len))?;
115115
map.end()

fxprof-processed-profile/tests/integration_tests/main.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -582,22 +582,22 @@ fn profile_without_js() {
582582
2
583583
],
584584
"innerWindowID": [
585-
null,
586-
null,
587-
null,
588-
null,
589-
null,
590-
null,
591-
null,
592-
null,
593-
null,
594-
null,
595-
null,
596-
null,
597-
null,
598-
null,
599-
null,
600-
null
585+
0,
586+
0,
587+
0,
588+
0,
589+
0,
590+
0,
591+
0,
592+
0,
593+
0,
594+
0,
595+
0,
596+
0,
597+
0,
598+
0,
599+
0,
600+
0
601601
],
602602
"line": [
603603
null,
@@ -1102,8 +1102,8 @@ fn profile_with_js() {
11021102
null
11031103
],
11041104
"innerWindowID": [
1105-
null,
1106-
null
1105+
0,
1106+
0
11071107
],
11081108
"line": [
11091109
null,

0 commit comments

Comments
 (0)