Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/MediaSourceBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM MediaSource.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_MediaSourceBinding_h
4
#define mozilla_dom_MediaSourceBinding_h
5
6
#include "GeckoProfiler.h"
7
#include "js/RootingAPI.h"
8
#include "jspubtd.h"
9
#include "mozilla/ErrorResult.h"
10
#include "mozilla/dom/BindingDeclarations.h"
11
#include "mozilla/dom/Nullable.h"
12
#include "mozilla/dom/PrototypeList.h"
13
14
namespace mozilla {
15
namespace dom {
16
17
class MediaSource;
18
struct MediaSourceAtoms;
19
struct NativePropertyHooks;
20
class ProtoAndIfaceCache;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
enum class MediaSourceReadyState : uint8_t {
29
  Closed,
30
  Open,
31
  Ended,
32
  EndGuard_
33
};
34
35
namespace MediaSourceReadyStateValues {
36
extern const EnumEntry strings[4];
37
} // namespace MediaSourceReadyStateValues
38
39
bool
40
ToJSValue(JSContext* aCx, MediaSourceReadyState aArgument, JS::MutableHandle<JS::Value> aValue);
41
42
43
enum class MediaSourceEndOfStreamError : uint8_t {
44
  Network,
45
  Decode,
46
  EndGuard_
47
};
48
49
namespace MediaSourceEndOfStreamErrorValues {
50
extern const EnumEntry strings[3];
51
} // namespace MediaSourceEndOfStreamErrorValues
52
53
bool
54
ToJSValue(JSContext* aCx, MediaSourceEndOfStreamError aArgument, JS::MutableHandle<JS::Value> aValue);
55
56
57
namespace MediaSource_Binding {
58
59
  typedef mozilla::dom::MediaSource NativeType;
60
61
  bool
62
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
63
64
  const JSClass*
65
  GetJSClass();
66
67
  bool
68
  Wrap(JSContext* aCx, mozilla::dom::MediaSource* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
69
70
  template <class T>
71
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
72
0
  {
73
0
    JS::Rooted<JSObject*> reflector(aCx);
74
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
75
0
  }
76
77
  // We declare this as an array so that retrieving a pointer to this
78
  // binding's property hooks only requires compile/link-time resolvable
79
  // address arithmetic.  Declaring it as a pointer instead would require
80
  // doing a run-time load to fetch a pointer to this binding's property
81
  // hooks.  And then structures which embedded a pointer to this structure
82
  // would require a run-time load for proper initialization, which would
83
  // then induce static constructors.  Lots of static constructors.
84
  extern const NativePropertyHooks sNativePropertyHooks[];
85
86
  void
87
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
88
89
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
90
0
  {
91
0
    /* Get the interface prototype object for this class.  This will create the
92
0
       object as needed. */
93
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::MediaSource,
94
0
                                       &CreateInterfaceObjects,
95
0
                                       /* aDefineOnGlobal = */ true);
96
0
97
0
  }
98
99
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
100
0
  {
101
0
    /* Get the interface object for this class.  This will create the object as
102
0
       needed. */
103
0
104
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::MediaSource,
105
0
                                       &CreateInterfaceObjects,
106
0
                                       aDefineOnGlobal);
107
0
  }
108
109
  JSObject*
110
  GetConstructorObject(JSContext* aCx);
111
112
} // namespace MediaSource_Binding
113
114
115
116
} // namespace dom
117
} // namespace mozilla
118
119
#endif // mozilla_dom_MediaSourceBinding_h