Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/MediaEncryptedEventBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM MediaEncryptedEvent.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_MediaEncryptedEventBinding_h
4
#define mozilla_dom_MediaEncryptedEventBinding_h
5
6
#include "EventBinding.h"
7
#include "GeckoProfiler.h"
8
#include "js/RootingAPI.h"
9
#include "jspubtd.h"
10
#include "mozilla/ErrorResult.h"
11
#include "mozilla/dom/BindingDeclarations.h"
12
#include "mozilla/dom/Nullable.h"
13
#include "mozilla/dom/PrototypeList.h"
14
#include "mozilla/dom/TypedArray.h"
15
16
namespace mozilla {
17
namespace dom {
18
19
class MediaEncryptedEvent;
20
struct MediaEncryptedEventAtoms;
21
struct MediaKeyNeededEventInitAtoms;
22
struct NativePropertyHooks;
23
class ProtoAndIfaceCache;
24
25
} // namespace dom
26
} // namespace mozilla
27
28
namespace mozilla {
29
namespace dom {
30
31
struct MediaKeyNeededEventInit : public EventInit
32
{
33
  MOZ_INIT_OUTSIDE_CTOR Nullable<ArrayBuffer> mInitData;
34
  MOZ_INIT_OUTSIDE_CTOR nsString mInitDataType;
35
36
  MediaKeyNeededEventInit();
37
38
  explicit inline MediaKeyNeededEventInit(const FastDictionaryInitializer& )
39
    : EventInit(FastDictionaryInitializer())
40
0
  {
41
0
    // Do nothing here; this is used by our "Fast" subclass
42
0
  }
43
44
private:
45
  MediaKeyNeededEventInit(const MediaKeyNeededEventInit&) = delete;
46
  MediaKeyNeededEventInit& operator=(const MediaKeyNeededEventInit&) = delete;
47
48
  static bool
49
  InitIds(JSContext* cx, MediaKeyNeededEventInitAtoms* atomsCache);
50
51
public:
52
  bool
53
  Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
54
55
  bool
56
  ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
57
58
  void
59
  TraceDictionary(JSTracer* trc);
60
};
61
62
namespace binding_detail {
63
struct FastMediaKeyNeededEventInit : public MediaKeyNeededEventInit
64
{
65
  inline FastMediaKeyNeededEventInit()
66
    : MediaKeyNeededEventInit(FastDictionaryInitializer())
67
0
  {
68
0
    // Doesn't matter what int we pass to the parent constructor
69
0
  }
70
};
71
} // namespace binding_detail
72
73
74
namespace MediaEncryptedEvent_Binding {
75
76
  typedef mozilla::dom::MediaEncryptedEvent NativeType;
77
78
  const JSClass*
79
  GetJSClass();
80
81
  bool
82
  Wrap(JSContext* aCx, mozilla::dom::MediaEncryptedEvent* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
83
84
  template <class T>
85
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
86
0
  {
87
0
    JS::Rooted<JSObject*> reflector(aCx);
88
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
89
0
  }
90
91
  // We declare this as an array so that retrieving a pointer to this
92
  // binding's property hooks only requires compile/link-time resolvable
93
  // address arithmetic.  Declaring it as a pointer instead would require
94
  // doing a run-time load to fetch a pointer to this binding's property
95
  // hooks.  And then structures which embedded a pointer to this structure
96
  // would require a run-time load for proper initialization, which would
97
  // then induce static constructors.  Lots of static constructors.
98
  extern const NativePropertyHooks sNativePropertyHooks[];
99
100
  void
101
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
102
103
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
104
0
  {
105
0
    /* Get the interface prototype object for this class.  This will create the
106
0
       object as needed. */
107
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::MediaEncryptedEvent,
108
0
                                       &CreateInterfaceObjects,
109
0
                                       /* aDefineOnGlobal = */ true);
110
0
111
0
  }
112
113
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
114
0
  {
115
0
    /* Get the interface object for this class.  This will create the object as
116
0
       needed. */
117
0
118
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::MediaEncryptedEvent,
119
0
                                       &CreateInterfaceObjects,
120
0
                                       aDefineOnGlobal);
121
0
  }
122
123
  JSObject*
124
  GetConstructorObject(JSContext* aCx);
125
126
} // namespace MediaEncryptedEvent_Binding
127
128
129
130
} // namespace dom
131
} // namespace mozilla
132
133
#endif // mozilla_dom_MediaEncryptedEventBinding_h