/src/mozilla-central/dom/performance/PerformanceNavigation.cpp
Line | Count | Source (jump to first uncovered line) |
1 | | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 | | /* vim: set ts=8 sts=2 et sw=2 tw=80: */ |
3 | | /* This Source Code Form is subject to the terms of the Mozilla Public |
4 | | * License, v. 2.0. If a copy of the MPL was not distributed with this |
5 | | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
6 | | |
7 | | #include "PerformanceNavigation.h" |
8 | | #include "PerformanceTiming.h" |
9 | | #include "mozilla/dom/PerformanceNavigationBinding.h" |
10 | | |
11 | | namespace mozilla { |
12 | | namespace dom { |
13 | | |
14 | | NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(PerformanceNavigation, mPerformance) |
15 | | |
16 | | NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(PerformanceNavigation, AddRef) |
17 | | NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(PerformanceNavigation, Release) |
18 | | |
19 | | PerformanceNavigation::PerformanceNavigation(Performance* aPerformance) |
20 | | : mPerformance(aPerformance) |
21 | 0 | { |
22 | 0 | MOZ_ASSERT(aPerformance, "Parent performance object should be provided"); |
23 | 0 | } |
24 | | |
25 | | PerformanceNavigation::~PerformanceNavigation() |
26 | 0 | { |
27 | 0 | } |
28 | | |
29 | | JSObject* |
30 | | PerformanceNavigation::WrapObject(JSContext *cx, |
31 | | JS::Handle<JSObject*> aGivenProto) |
32 | 0 | { |
33 | 0 | return PerformanceNavigation_Binding::Wrap(cx, this, aGivenProto); |
34 | 0 | } |
35 | | |
36 | | uint16_t |
37 | | PerformanceNavigation::RedirectCount() const |
38 | 0 | { |
39 | 0 | return GetPerformanceTiming()->Data()->GetRedirectCount(); |
40 | 0 | } |
41 | | |
42 | | } // dom namespace |
43 | | } // mozilla namespace |