Coverage Report

Created: 2018-09-25 14:53

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