Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/gfx/thebes/gfxFontSrcPrincipal.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
 * This Source Code Form is subject to the terms of the Mozilla Public
3
 * License, v. 2.0. If a copy of the MPL was not distributed with this
4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
#include "gfxFontSrcPrincipal.h"
7
8
#include "nsProxyRelease.h"
9
#include "nsURIHashKey.h"
10
#include "mozilla/BasePrincipal.h"
11
12
using mozilla::BasePrincipal;
13
14
gfxFontSrcPrincipal::gfxFontSrcPrincipal(nsIPrincipal* aPrincipal)
15
0
{
16
0
  MOZ_ASSERT(NS_IsMainThread());
17
0
  MOZ_ASSERT(aPrincipal);
18
0
19
0
  mPrincipal = aPrincipal;
20
0
21
0
  uint32_t hash = 0;
22
0
  mPrincipal->GetHashValue(&hash);
23
0
  mHash = hash;
24
0
}
25
26
gfxFontSrcPrincipal::~gfxFontSrcPrincipal()
27
0
{
28
0
  NS_ReleaseOnMainThreadSystemGroup("gfxFontSrcPrincipal::mPrincipal",
29
0
                                    mPrincipal.forget());
30
0
}
31
32
bool
33
gfxFontSrcPrincipal::Equals(gfxFontSrcPrincipal* aOther)
34
0
{
35
0
  return BasePrincipal::Cast(mPrincipal)->
36
0
           FastEquals(BasePrincipal::Cast(aOther->mPrincipal));
37
0
}