diff options
Diffstat (limited to 'dom/performance/PerformanceResourceTiming.h')
-rw-r--r-- | dom/performance/PerformanceResourceTiming.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/dom/performance/PerformanceResourceTiming.h b/dom/performance/PerformanceResourceTiming.h index 2dd6b4a06..98a03327e 100644 --- a/dom/performance/PerformanceResourceTiming.h +++ b/dom/performance/PerformanceResourceTiming.h @@ -18,7 +18,7 @@ namespace mozilla { namespace dom { // http://www.w3.org/TR/resource-timing/#performanceresourcetiming -class PerformanceResourceTiming final : public PerformanceEntry +class PerformanceResourceTiming : public PerformanceEntry { public: typedef mozilla::TimeStamp TimeStamp; @@ -30,7 +30,8 @@ public: PerformanceResourceTiming(PerformanceTiming* aPerformanceTiming, Performance* aPerformance, - const nsAString& aName); + const nsAString& aName, + nsIHttpChannel* aChannel = nullptr); virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override; @@ -62,6 +63,12 @@ public: mNextHopProtocol = aNextHopProtocol; } + DOMHighResTimeStamp WorkerStart() const { + return mTiming && mTiming->TimingAllowed() + ? mTiming->WorkerStartHighRes() + : 0; + } + DOMHighResTimeStamp FetchStart() const { return mTiming ? mTiming->FetchStartHighRes() @@ -170,6 +177,7 @@ public: protected: virtual ~PerformanceResourceTiming(); + void SetPropertiesFromChannel(nsIHttpChannel* aChannel); nsString mInitiatorType; nsString mNextHopProtocol; |