We always report MacOS 10.15 in the profile meta information
Categories
(Core :: Gecko Profiler, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox93 | --- | fixed |
People
(Reporter: julienw, Assigned: mozbugz)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Profile.meta.oscpu seems to take its value from the same data as navigator.oscpu, which has been frozen to avoid fingerprinting.
We should change this to report the right value.
Note that in the profiler frontend we're parsing this value in an adhoc way (see [1]), but the logic can also be modified if necessary.
Assignee | ||
Comment 1•4 years ago
|
||
The profiler retrieves the information for profile.meta.oscpu
from nsHttpHandler::GetOscpu()
, which on macOS, is hard-coded to a maximum of "10.15"!
A comment above that explains:
Cap the reported macOS version at 10.15 (like Safari) to avoid breaking sites that assume the UA's macOS version always begins with "10.".
Chris, you wrote that comment. will it be true forever?
(If yes, I guess we could copy that code to the Profiler, and update it to show the real macOS version in the Profiler meta info.)
Comment 2•4 years ago
|
||
(In reply to Gerald Squelart [:gerald] (he/him) from comment #1)
A comment above that explains:
Cap the reported macOS version at 10.15 (like Safari) to avoid breaking sites that assume the UA's macOS version always begins with "10.".
Chris, you wrote that comment. will it be true forever?
Yes. Like Safari and Chrome, Firefox's navigator.userAgent and navigator.oscpu APIs are capped at "Mac OS X 10.15" for macOS versions >= 11.0. Firefox on macOS versions <= 10.15, the navigator APIs will still report the real macOS version.
(If yes, I guess we could copy that code to the Profiler, and update it to show the real macOS version in the Profiler meta info.)
I don't know of any method for unprivileged JavaScript content to learn the real macOS version >= 11.0. From C++, you can nsCocoaFeatures::macOSVersionMajor() and macOSVersionMinor() to get the real macOS versions like:
Assignee | ||
Comment 3•4 years ago
|
||
Thank you Chris for the info.
I'll be working in the Gecko Profiler native code, so that should (hopefully) work for me.
Assignee | ||
Comment 4•4 years ago
|
||
We are using the OS version as reported in the user agent string, but on macOS the version is capped at 10.15. This patch now reports the real and full OS version.
Updated•4 years ago
|
Comment 6•4 years ago
|
||
FYI, the Windows version in oscpu is similarly capped here:
Whether we will raise oscpu's cap from Windows 10.0 to 11.0 is TBD. (I see that Chrome's and Edge's UA strings still report "Windows NT 10.0" on Windows 11 Beta.)
Comment 7•4 years ago
|
||
bugherder |
Assignee | ||
Comment 8•4 years ago
|
||
(In reply to Chris Peterson [:cpeterson] from comment #6)
FYI, the Windows version in oscpu is similarly capped
Thank you Chris. I've just filed bug 1725076 to look into it.
Description
•