зеркало из https://github.com/mozilla/gecko-dev.git
Backed out 2 changesets (bug 1675543) for marionette failures on test_refresh_firefox.py. CLOSED TREE
Backed out changeset d7af96ca92b4 (bug 1675543) Backed out changeset d98cf0c9d34e (bug 1675543)
This commit is contained in:
Родитель
66c2c6c5d5
Коммит
ae9d59c708
|
@ -26,7 +26,7 @@ PerformancePaintTiming::PerformancePaintTiming(Performance* aPerformance,
|
|||
const TimeStamp& aStartTime)
|
||||
: PerformanceEntry(aPerformance->GetParentObject(), aName, u"paint"_ns),
|
||||
mPerformance(aPerformance),
|
||||
mStartTime(CalculateStartTime(aStartTime)) {}
|
||||
mStartTime(aStartTime) {}
|
||||
|
||||
PerformancePaintTiming::~PerformancePaintTiming() = default;
|
||||
|
||||
|
@ -35,10 +35,9 @@ JSObject* PerformancePaintTiming::WrapObject(
|
|||
return PerformancePaintTiming_Binding::Wrap(aCx, this, aGivenProto);
|
||||
}
|
||||
|
||||
DOMHighResTimeStamp PerformancePaintTiming::CalculateStartTime(
|
||||
const TimeStamp& aStartTime) const {
|
||||
DOMHighResTimeStamp PerformancePaintTiming::StartTime() const {
|
||||
DOMHighResTimeStamp rawValue =
|
||||
mPerformance->GetDOMTiming()->TimeStampToDOMHighRes(aStartTime);
|
||||
mPerformance->GetDOMTiming()->TimeStampToDOMHighRes(mStartTime);
|
||||
return nsRFPService::ReduceTimePrecisionAsMSecs(
|
||||
rawValue, mPerformance->GetRandomTimelineSeed(),
|
||||
mPerformance->IsSystemPrincipal(), mPerformance->CrossOriginIsolated());
|
||||
|
|
|
@ -33,7 +33,7 @@ class PerformancePaintTiming final : public PerformanceEntry {
|
|||
JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
DOMHighResTimeStamp StartTime() const override { return mStartTime; }
|
||||
DOMHighResTimeStamp StartTime() const override;
|
||||
|
||||
size_t SizeOfIncludingThis(
|
||||
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
||||
|
@ -41,8 +41,7 @@ class PerformancePaintTiming final : public PerformanceEntry {
|
|||
private:
|
||||
~PerformancePaintTiming();
|
||||
RefPtr<Performance> mPerformance;
|
||||
const DOMHighResTimeStamp mStartTime;
|
||||
DOMHighResTimeStamp CalculateStartTime(const TimeStamp& aStartTime) const;
|
||||
const TimeStamp mStartTime;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
|
@ -29,8 +29,7 @@ PerformanceResourceTiming::PerformanceResourceTiming(
|
|||
Performance* aPerformance, const nsAString& aName)
|
||||
: PerformanceEntry(aPerformance->GetParentObject(), aName, u"resource"_ns),
|
||||
mTimingData(std::move(aPerformanceTiming)),
|
||||
mPerformance(aPerformance),
|
||||
mStartTime(CalculateStartTime()) {
|
||||
mPerformance(aPerformance) {
|
||||
MOZ_ASSERT(aPerformance, "Parent performance object should be provided");
|
||||
if (NS_IsMainThread()) {
|
||||
// Used to check if an addon content script has access to this timing.
|
||||
|
@ -41,7 +40,7 @@ PerformanceResourceTiming::PerformanceResourceTiming(
|
|||
|
||||
PerformanceResourceTiming::~PerformanceResourceTiming() = default;
|
||||
|
||||
DOMHighResTimeStamp PerformanceResourceTiming::CalculateStartTime() const {
|
||||
DOMHighResTimeStamp PerformanceResourceTiming::StartTime() const {
|
||||
// Force the start time to be the earliest of:
|
||||
// - RedirectStart
|
||||
// - WorkerStart
|
||||
|
|
|
@ -33,7 +33,7 @@ class PerformanceResourceTiming : public PerformanceEntry {
|
|||
virtual JSObject* WrapObject(JSContext* aCx,
|
||||
JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
||||
virtual DOMHighResTimeStamp StartTime() const override { return mStartTime; }
|
||||
virtual DOMHighResTimeStamp StartTime() const override;
|
||||
|
||||
virtual DOMHighResTimeStamp Duration() const override {
|
||||
return ResponseEnd() - StartTime();
|
||||
|
@ -179,10 +179,6 @@ class PerformanceResourceTiming : public PerformanceEntry {
|
|||
|
||||
// The same initial requested URI as the `name` attribute.
|
||||
nsCOMPtr<nsIURI> mOriginalURI;
|
||||
|
||||
private:
|
||||
const DOMHighResTimeStamp mStartTime;
|
||||
DOMHighResTimeStamp CalculateStartTime() const;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
|
Загрузка…
Ссылка в новой задаче