Coverage Report

Created: 2018-09-25 14:53

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