2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2013-10-16 05:35:44 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "PerformanceEntry.h"
|
2015-07-01 16:56:00 +03:00
|
|
|
#include "MainThreadUtils.h"
|
|
|
|
#include "nsIURI.h"
|
2013-10-16 05:35:44 +04:00
|
|
|
|
|
|
|
using namespace mozilla::dom;
|
|
|
|
|
2015-05-25 19:53:07 +03:00
|
|
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PerformanceEntry, mParent)
|
2013-10-16 05:35:44 +04:00
|
|
|
|
|
|
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(PerformanceEntry)
|
|
|
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(PerformanceEntry)
|
|
|
|
|
|
|
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PerformanceEntry)
|
|
|
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
|
|
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
|
|
|
NS_INTERFACE_MAP_END
|
|
|
|
|
2015-05-25 19:53:07 +03:00
|
|
|
PerformanceEntry::PerformanceEntry(nsISupports* aParent, const nsAString& aName,
|
2015-02-04 08:46:23 +03:00
|
|
|
const nsAString& aEntryType)
|
|
|
|
: mParent(aParent), mName(aName), mEntryType(aEntryType) {}
|
2013-10-16 05:35:44 +04:00
|
|
|
|
|
|
|
PerformanceEntry::~PerformanceEntry() {}
|
|
|
|
|
2017-07-27 10:05:51 +03:00
|
|
|
size_t PerformanceEntry::SizeOfExcludingThis(
|
|
|
|
mozilla::MallocSizeOf aMallocSizeOf) const {
|
|
|
|
return mName.SizeOfExcludingThisIfUnshared(aMallocSizeOf) +
|
|
|
|
mEntryType.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
|
|
|
|
}
|
|
|
|
|
|
|
|
size_t PerformanceEntry::SizeOfIncludingThis(
|
|
|
|
mozilla::MallocSizeOf aMallocSizeOf) const {
|
|
|
|
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
|
|
|
}
|