mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Bug 1313420 - Implement Performance.timeOrigin - part 1
https://hg.mozilla.org/mozilla-central/rev/cf0f72f0b0be
This commit is contained in:
parent
fdcf9f71e5
commit
ad947fb20a
6 changed files with 117 additions and 1 deletions
|
|
@ -13,6 +13,7 @@
|
|||
#include "PerformanceMeasure.h"
|
||||
#include "PerformanceObserver.h"
|
||||
#include "PerformanceResourceTiming.h"
|
||||
#include "PerformanceService.h"
|
||||
#include "PerformanceWorker.h"
|
||||
#include "mozilla/ErrorResult.h"
|
||||
#include "mozilla/dom/PerformanceBinding.h"
|
||||
|
|
@ -119,6 +120,17 @@ Performance::Performance(nsPIDOMWindowInner* aWindow)
|
|||
Performance::~Performance()
|
||||
{}
|
||||
|
||||
DOMHighResTimeStamp
|
||||
Performance::TimeOrigin()
|
||||
{
|
||||
if (!mPerformanceService) {
|
||||
mPerformanceService = PerformanceService::GetOrCreate();
|
||||
}
|
||||
|
||||
MOZ_ASSERT(mPerformanceService);
|
||||
return mPerformanceService->TimeOrigin(CreationTimeStamp());
|
||||
}
|
||||
|
||||
JSObject*
|
||||
Performance::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||
{
|
||||
|
|
@ -243,7 +255,7 @@ Performance::ClearMarks(const Optional<nsAString>& aName)
|
|||
|
||||
DOMHighResTimeStamp
|
||||
Performance::ResolveTimestampFromName(const nsAString& aName,
|
||||
ErrorResult& aRv)
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
AutoTArray<RefPtr<PerformanceEntry>, 1> arr;
|
||||
DOMHighResTimeStamp ts;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue