dom/base/PerformanceEntry.cpp

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/base/PerformanceEntry.cpp	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "PerformanceEntry.h"
    1.10 +#include "nsIURI.h"
    1.11 +#include "mozilla/dom/PerformanceEntryBinding.h"
    1.12 +
    1.13 +using namespace mozilla::dom;
    1.14 +
    1.15 +NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE_1(PerformanceEntry, mPerformance)
    1.16 +
    1.17 +NS_IMPL_CYCLE_COLLECTING_ADDREF(PerformanceEntry)
    1.18 +NS_IMPL_CYCLE_COLLECTING_RELEASE(PerformanceEntry)
    1.19 +
    1.20 +NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(PerformanceEntry)
    1.21 +  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
    1.22 +  NS_INTERFACE_MAP_ENTRY(nsISupports)
    1.23 +NS_INTERFACE_MAP_END
    1.24 +
    1.25 +PerformanceEntry::PerformanceEntry(nsPerformance* aPerformance)
    1.26 +: mPerformance(aPerformance)
    1.27 +{
    1.28 +  MOZ_ASSERT(aPerformance, "Parent performance object should be provided");
    1.29 +  SetIsDOMBinding();
    1.30 +}
    1.31 +
    1.32 +PerformanceEntry::~PerformanceEntry()
    1.33 +{
    1.34 +}
    1.35 +
    1.36 +JSObject*
    1.37 +PerformanceEntry::WrapObject(JSContext* aCx)
    1.38 +{
    1.39 +  return mozilla::dom::PerformanceEntryBinding::Wrap(aCx, this);
    1.40 +}

mercurial