michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "PerformanceEntry.h" michael@0: #include "nsIURI.h" michael@0: #include "mozilla/dom/PerformanceEntryBinding.h" michael@0: michael@0: using namespace mozilla::dom; michael@0: michael@0: NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(PerformanceEntry, mPerformance) michael@0: michael@0: NS_IMPL_CYCLE_COLLECTING_ADDREF(PerformanceEntry) michael@0: NS_IMPL_CYCLE_COLLECTING_RELEASE(PerformanceEntry) michael@0: michael@0: NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PerformanceEntry) michael@0: NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY michael@0: NS_INTERFACE_MAP_ENTRY(nsISupports) michael@0: NS_INTERFACE_MAP_END michael@0: michael@0: PerformanceEntry::PerformanceEntry(nsPerformance* aPerformance) michael@0: : mPerformance(aPerformance) michael@0: { michael@0: MOZ_ASSERT(aPerformance, "Parent performance object should be provided"); michael@0: SetIsDOMBinding(); michael@0: } michael@0: michael@0: PerformanceEntry::~PerformanceEntry() michael@0: { michael@0: } michael@0: michael@0: JSObject* michael@0: PerformanceEntry::WrapObject(JSContext* aCx) michael@0: { michael@0: return mozilla::dom::PerformanceEntryBinding::Wrap(aCx, this); michael@0: }