Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/credentialmanagement/Credential.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 "mozilla/dom/Credential.h"
8
#include "mozilla/dom/CredentialManagementBinding.h"
9
#include "nsCycleCollectionParticipant.h"
10
11
namespace mozilla {
12
namespace dom {
13
14
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Credential, mParent)
15
16
NS_IMPL_CYCLE_COLLECTING_ADDREF(Credential)
17
NS_IMPL_CYCLE_COLLECTING_RELEASE(Credential)
18
19
0
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(Credential)
20
0
  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
21
0
  NS_INTERFACE_MAP_ENTRY(nsISupports)
22
0
NS_INTERFACE_MAP_END
23
24
Credential::Credential(nsPIDOMWindowInner* aParent)
25
  : mParent(aParent)
26
0
{}
27
28
Credential::~Credential()
29
0
{}
30
31
JSObject*
32
Credential::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
33
0
{
34
0
  return Credential_Binding::Wrap(aCx, this, aGivenProto);
35
0
}
36
37
void
38
Credential::GetId(nsAString& aId) const
39
0
{
40
0
  aId.Assign(mId);
41
0
}
42
43
void
44
Credential::GetType(nsAString& aType) const
45
0
{
46
0
  aType.Assign(mType);
47
0
}
48
49
void
50
Credential::SetId(const nsAString& aId)
51
0
{
52
0
  mId.Assign(aId);
53
0
}
54
55
void
56
Credential::SetType(const nsAString& aType)
57
0
{
58
0
  mType.Assign(aType);
59
0
}
60
61
} // namespace dom
62
} // namespace mozilla