Coverage Report

Created: 2018-09-25 14:53

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