Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/doctor/DDLifetime.cpp
Line
Count
Source (jump to first uncovered line)
1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* vim:set ts=2 sw=2 sts=2 et cindent: */
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 "DDLifetime.h"
8
9
namespace mozilla {
10
11
void
12
DDLifetime::AppendPrintf(nsCString& aString) const
13
0
{
14
0
  if (!mDerivedObject.Pointer()) {
15
0
    mObject.AppendPrintf(aString);
16
0
    aString.AppendPrintf("#%" PRIi32, mTag);
17
0
  } else {
18
0
    mDerivedObject.AppendPrintf(aString);
19
0
    aString.AppendPrintf("#%" PRIi32 " (as ", mTag);
20
0
    if (mObject.Pointer() == mDerivedObject.Pointer()) {
21
0
      aString.Append(mObject.TypeName());
22
0
    } else {
23
0
      mObject.AppendPrintf(aString);
24
0
    }
25
0
    aString.Append(")");
26
0
  }
27
0
}
28
29
nsCString
30
DDLifetime::Printf() const
31
0
{
32
0
  nsCString s;
33
0
  AppendPrintf(s);
34
0
  return s;
35
0
}
36
37
} // namespace mozilla