Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/dom/events/ImageCaptureError.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/ImageCaptureError.h"
8
#include "mozilla/dom/ImageCaptureErrorEventBinding.h"
9
10
namespace mozilla {
11
namespace dom {
12
13
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(ImageCaptureError, mParent)
14
NS_IMPL_CYCLE_COLLECTING_ADDREF(ImageCaptureError)
15
NS_IMPL_CYCLE_COLLECTING_RELEASE(ImageCaptureError)
16
0
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ImageCaptureError)
17
0
  NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
18
0
  NS_INTERFACE_MAP_ENTRY(nsISupports)
19
0
NS_INTERFACE_MAP_END
20
21
ImageCaptureError::ImageCaptureError(nsISupports* aParent,
22
                                     uint16_t aCode,
23
                                     const nsAString& aMessage)
24
  : mParent(aParent)
25
  , mMessage(aMessage)
26
  , mCode(aCode)
27
0
{
28
0
}
29
30
ImageCaptureError::~ImageCaptureError()
31
0
{
32
0
}
33
34
nsISupports*
35
ImageCaptureError::GetParentObject() const
36
0
{
37
0
  return mParent;
38
0
}
39
40
JSObject*
41
ImageCaptureError::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
42
0
{
43
0
  return ImageCaptureError_Binding::Wrap(aCx, this, aGivenProto);
44
0
}
45
46
uint16_t
47
ImageCaptureError::Code() const
48
0
{
49
0
  return mCode;
50
0
}
51
52
void
53
ImageCaptureError::GetMessage(nsAString& retval) const
54
0
{
55
0
  retval = mMessage;
56
0
}
57
58
} // namespace dom
59
} // namespace mozilla