Coverage Report

Created: 2018-09-25 14:53

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