This fixes the performance-measure-invalid.worker.html test. The test failed
because User Timing L3 section 4.2, "Convert a name to a timestamp", was not
implemented - the code was presumably residual from an earlier version of User
Timing. In particular, we never threw if the global object was not a Window. We
also corrected the code order for section 4.1, "Convert a mark to a timestamp",
which was incorrect but didn't cause any tests to fail.
Differential Revision: https://phabricator.services.mozilla.com/D154820
IsPerformanceTimingAttribute can be called by both Window and WorkerGlobalScope
global objects so we move it to the Performance* superclass.
Differential Revision: https://phabricator.services.mozilla.com/D154819
Root cause of test failure: the updates in this bug caused performance.measure
to throw an exception if there is a dying global. However, the test didn't try
to catch the exception so it failed with an uncaught exception. I updated the
test to handle this case which it was already doing for performance.mark.
Additionally, I corrected some indentation.
Depends on D151960
Differential Revision: https://phabricator.services.mozilla.com/D152814
Root cause: the global object can be null but I wasn't checking for it so it
caused a crash. I don't remember under what conditions it can be null but I saw
I had checked for null when I wrote Performance::Mark and remember debugging it
so it makes sense to do so here as well.
Differential Revision: https://phabricator.services.mozilla.com/D151960
Root cause: the global object can be null but I wasn't checking for it so it
caused a crash. I don't remember under what conditions it can be null but I saw
I had checked for null when I wrote Performance::Mark and remember debugging it
so it makes sense to do so here as well.
Differential Revision: https://phabricator.services.mozilla.com/D151960
There are two bugs in this function, first the function doesn't do
the `is not connected` check correctly as it supposes to use
`IsInComposed()` but rather `IsInUnComposed()`. Second, it
doesn't get the root of the element correctly.
Also this patch converts the function be static so that it can be
reused.
Differential Revision: https://phabricator.services.mozilla.com/D151081
Given the Fetch spec, the TAO check algorithm has been updated to
be more restricted. This patch updates the algorithm to match the
spec.
Differential Revision: https://phabricator.services.mozilla.com/D146737
According to the latest Fetch spec, we should generate a opaque
PerformanceResourceTiming entry for cross origin redirects, rather than
not generating it at all.
Plus the timings for cross-origin redirects won't be leaked unless all
redirects pass the TAO check.
Differential Revision: https://phabricator.services.mozilla.com/D146580
The converted value gets passed into TimingNotification which assigns the value
into a PerformanceEntry (this is the only usage). Since PerformanceEntry is
defined in WebIDL, we could not change its types (which is double for mEpoch) so
we were forced to safely convert the value where we did.
I don't think the existing conversion code had any bugs since we converted a
64-bit signed integer timestamp into uint64_t (safe) into a double (which is
safe for the reasons mentioned in the code comments).
Differential Revision: https://phabricator.services.mozilla.com/D145142
This test tests for a bug I discovered in my code that would crash the browser
if certain User Timing APIs were called on the dying iframe global.
I created a new test, rather than using test_performance_user_timing.html,
because it seemed like the code I added to set up the iframe did not easily fit
into the testing model of test_performance_user_timing.
Differential Revision: https://phabricator.services.mozilla.com/D143214
To follow the spec more closely, some functionality moved from
`performance.mark` to the PerformanceMark constructor.
I verified the new fingerprinting protection behavior with :tjr: they said it's
okay to return a PerformanceMark as long as it uses the same reduced precision
of `performance.now`.
Differential Revision: https://phabricator.services.mozilla.com/D142625
This flips around the relationship between IPDLParamTraits and ParamTraits so
that callers can always use ParamTraits instead of IPDLParamTraits.
Differential Revision: https://phabricator.services.mozilla.com/D140005
Automatically generated rewrites of all ParamTraits and IPDLParamTraits
implementations in-tree to use IPC::Message{Reader,Writer}.
Differential Revision: https://phabricator.services.mozilla.com/D140004
PerformanceTimingData supports to transfer through IPC. However, it could not be combined into other struct defined in ipdl/ipdlh
This patch creates IPCPerformanceTimingData to support PerformanceTimingData can be integrated with other ipc structs.
Depends on D138249
Differential Revision: https://phabricator.services.mozilla.com/D138250
PerformanceTimingData supports to transfer through IPC. However, it could not be combined into other struct defined in ipdl/ipdlh
This patch creates IPCPerformanceTimingData to support PerformanceTimingData can be integrated with other ipc structs.
Depends on D138249
Differential Revision: https://phabricator.services.mozilla.com/D138250
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.
Depends on 132800
Depends on D132800
Differential Revision: https://phabricator.services.mozilla.com/D133483
#include "mozilla/dom/WorkerScope.h" is removed from WorkerPrivate.h, where calling WorkerPrivate::GlobalScope() without include "WorkerScope.h" makes WorkerScope as an incomplete type.
Depends on 132800
Depends on D132800
Differential Revision: https://phabricator.services.mozilla.com/D133483