Coverage Report

Created: 2018-09-25 14:53

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