Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/media/doctor/DDMediaLog.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 "DDMediaLog.h"
8
9
namespace mozilla {
10
11
size_t
12
DDMediaLog::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
13
0
{
14
0
  size_t size = mMessages.ShallowSizeOfExcludingThis(aMallocSizeOf);
15
0
  for (const DDLogMessage& message : mMessages) {
16
0
    if (message.mValue.is<const nsCString>()) {
17
0
      size +=
18
0
        message.mValue.as<const nsCString>().SizeOfExcludingThisIfUnshared(
19
0
          aMallocSizeOf);
20
0
    } else if (message.mValue.is<MediaResult>()) {
21
0
      size += message.mValue.as<MediaResult>()
22
0
                .Message()
23
0
                .SizeOfExcludingThisIfUnshared(aMallocSizeOf);
24
0
    }
25
0
  }
26
0
  return size;
27
0
}
28
29
} // namespace mozilla