Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/MIDIOutputMapBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM MIDIOutputMap.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_MIDIOutputMapBinding_h
4
#define mozilla_dom_MIDIOutputMapBinding_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 MIDIOutput;
18
class MIDIOutputMap;
19
struct MIDIOutputMapAtoms;
20
struct NativePropertyHooks;
21
class ProtoAndIfaceCache;
22
23
} // namespace dom
24
} // namespace mozilla
25
26
namespace mozilla {
27
namespace dom {
28
29
namespace MIDIOutputMap_Binding {
30
31
  typedef mozilla::dom::MIDIOutputMap NativeType;
32
33
  namespace MaplikeHelpers {
34
  void
35
  Clear(mozilla::dom::MIDIOutputMap* self, ErrorResult& aRv);
36
  bool
37
  Delete(mozilla::dom::MIDIOutputMap* self, const nsAString& aKey, ErrorResult& aRv);
38
  bool
39
  Has(mozilla::dom::MIDIOutputMap* self, const nsAString& aKey, ErrorResult& aRv);
40
  void
41
  Set(mozilla::dom::MIDIOutputMap* self, const nsAString& aKey, MIDIOutput& aValue, ErrorResult& aRv);
42
  } // namespace MaplikeHelpers
43
44
  bool
45
  ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj);
46
47
  const JSClass*
48
  GetJSClass();
49
50
  bool
51
  Wrap(JSContext* aCx, mozilla::dom::MIDIOutputMap* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
52
53
  template <class T>
54
  inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
55
0
  {
56
0
    JS::Rooted<JSObject*> reflector(aCx);
57
0
    return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
58
0
  }
59
60
  // We declare this as an array so that retrieving a pointer to this
61
  // binding's property hooks only requires compile/link-time resolvable
62
  // address arithmetic.  Declaring it as a pointer instead would require
63
  // doing a run-time load to fetch a pointer to this binding's property
64
  // hooks.  And then structures which embedded a pointer to this structure
65
  // would require a run-time load for proper initialization, which would
66
  // then induce static constructors.  Lots of static constructors.
67
  extern const NativePropertyHooks sNativePropertyHooks[];
68
69
  void
70
  CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
71
72
  inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx)
73
0
  {
74
0
    /* Get the interface prototype object for this class.  This will create the
75
0
       object as needed. */
76
0
    return GetPerInterfaceObjectHandle(aCx, prototypes::id::MIDIOutputMap,
77
0
                                       &CreateInterfaceObjects,
78
0
                                       /* aDefineOnGlobal = */ true);
79
0
80
0
  }
81
82
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
83
0
  {
84
0
    /* Get the interface object for this class.  This will create the object as
85
0
       needed. */
86
0
87
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::MIDIOutputMap,
88
0
                                       &CreateInterfaceObjects,
89
0
                                       aDefineOnGlobal);
90
0
  }
91
92
  JSObject*
93
  GetConstructorObject(JSContext* aCx);
94
95
} // namespace MIDIOutputMap_Binding
96
97
98
99
} // namespace dom
100
} // namespace mozilla
101
102
#endif // mozilla_dom_MIDIOutputMapBinding_h