Coverage Report

Created: 2018-09-25 14:53

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