Firefox PerfStats feature mask needs to be updated to support 64bit mask
Have you read the documentation?
- [x] Yes, I've read the how to make a reproducable bug guide
- [x] Yes, I've read the how to debug my script guide
URL
https://www.anysite.com
What are you trying to accomplish
We currently initialize the Firefox PerfStats (internal timing metrics) with a 32-bit feature mask, 0xFF_FF_FF_FF meaning collect all metrics.
https://github.com/sitespeedio/browsertime/blob/89c2ec6215d6ab6519a184a91f6b1d38eb2604e7/lib/core/engine/command/perfStats.js#L29
However, Firefox has since upgraded to a 64-bit feature mask, so we want to pass in
0xFFFF_FFFF_FFFF_FFFF to collect all metrics.
What browser did you use?
Firefox
How to reproduce
Collect PerfStats and observe that the last ones are all zero.
Log output
Patch incoming.
JavaScript cannot represent this integer.
> (0xFFFF_FFFF_FFFF_FFFF).toString(16)
"10000000000000000"
JavaScript cannot represent this integer.
> (0xFFFF_FFFF_FFFF_FFFF).toString(16) "10000000000000000"
Ah, maybe that's why the linter wasn't happy.
This bigInt is valid though, right?
0xFF_FF_FF_FF_FF_FF_FF_FFn
https://github.com/sitespeedio/browsertime/pull/2314/files
Ah yes, a BigInt would work. But then we also have to fix ChromeUtils.setPerfStatsCollectionMask on the Firefox side to accept BigInts.
Hmm, that may be tricky?
https://searchfox.org/mozilla-central/rev/78884344be27b9033bcea5660e0214477567a899/dom/chrome-webidl/ChromeUtils.webidl
It's not clear to me how we would express BigInt in webIdl, but maybe I'm missing something https://firefox-source-docs.mozilla.org/dom/webIdlBindings/index.html
I don't know the answer, this is a question for our DOM team
From mgaudet:
https://webidl.spec.whatwg.org/#idl-bigint
I may have spoken too soon: https://bugzilla.mozilla.org/show_bug.cgi?id=1764326
This is fixed now. We are using a string of features now.