(In reply to Tom Tung [:tt, :ttung] from comment #38) > Hopefully, the remaining test failures are in toolkit/components/passwordmgr/test/unit/ and I'm investigating why my patches cause them to fail. I haven't figured the reason why but it's caused by P3 and the code below: ``` DOMHighResTimeStamp Performance::Now() { DOMHighResTimeStamp rawTime = NowUnclamped(); - if (mSystemPrincipal) { - return rawTime; - } - - return nsRFPService::ReduceTimePrecisionAsMSecs(rawTime, - GetRandomTimelineSeed()); + return nsRFPService::ReduceTimePrecisionAsMSecs( + rawTime, GetRandomTimelineSeed(), mSystemPrincipal, + CrossOriginIsolated()); } ``` I tried to get some information in a failed test (test_LoginManagerParent_doAutocompleteSearch.js) and I got: - It's about `os.file.copy` and [the code which uses `performace.now()`](https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/toolkit/components/osfile/modules/osfile_async_worker.js#33,47) - `!!mSystemPrincipal` is `true` in `Performance::Now`, so `ReduceTimePrecisionAsMSecs` returns the same value as `rawTime`. - I haven't figured out why but if I remove the if-block and returns `rawTime` by `ReduceTimePrecisionAsMSecs` as what the change does, it takes longer between `performance.mark` and `performance.measure` and that seems to cause the unit test to fail.
Bug 1586761 Comment 39 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Tom Tung [:tt, :ttung] from comment #38) > Hopefully, the remaining test failures are in toolkit/components/passwordmgr/test/unit/ and I'm investigating why my patches cause them to fail. I haven't figured the reason why but it's caused by P3 and the code below: ``` DOMHighResTimeStamp Performance::Now() { DOMHighResTimeStamp rawTime = NowUnclamped(); - if (mSystemPrincipal) { - return rawTime; - } - - return nsRFPService::ReduceTimePrecisionAsMSecs(rawTime, - GetRandomTimelineSeed()); + return nsRFPService::ReduceTimePrecisionAsMSecs( + rawTime, GetRandomTimelineSeed(), mSystemPrincipal, + CrossOriginIsolated()); } ``` I tried to get some information in a failed test (test_LoginManagerParent_doAutocompleteSearch.js) and I got: - It's about `os.file.copy` and [the code which uses `performace.now()`](https://searchfox.org/mozilla-central/rev/c80fa7258c935223fe319c5345b58eae85d4c6ae/toolkit/components/osfile/modules/osfile_async_worker.js#33,47) - `!!mSystemPrincipal` is `true` in `Performance::Now`, so `ReduceTimePrecisionAsMSecs` returns the same value as `rawTime`. - I haven't figured out why but if I remove the if-check and returns `rawTime` by `ReduceTimePrecisionAsMSecs` as what the change does, it takes longer between `performance.mark` and `performance.measure` and that seems to cause the unit test to fail.