Coverage Report

Created: 2018-09-25 14:53

/work/obj-fuzz/dist/include/mozilla/dom/DOMRequestBinding.h
Line
Count
Source (jump to first uncovered line)
1
/* THIS FILE IS AUTOGENERATED FROM DOMRequest.webidl BY Codegen.py - DO NOT EDIT */
2
3
#ifndef mozilla_dom_DOMRequestBinding_h
4
#define mozilla_dom_DOMRequestBinding_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 DOMRequest;
18
struct DOMRequestAtoms;
19
struct NativePropertyHooks;
20
class ProtoAndIfaceCache;
21
22
} // namespace dom
23
} // namespace mozilla
24
25
namespace mozilla {
26
namespace dom {
27
28
enum class DOMRequestReadyState : uint8_t {
29
  Pending,
30
  Done,
31
  EndGuard_
32
};
33
34
namespace DOMRequestReadyStateValues {
35
extern const EnumEntry strings[3];
36
} // namespace DOMRequestReadyStateValues
37
38
bool
39
ToJSValue(JSContext* aCx, DOMRequestReadyState aArgument, JS::MutableHandle<JS::Value> aValue);
40
41
42
namespace DOMRequest_Binding {
43
44
  typedef mozilla::dom::DOMRequest NativeType;
45
46
  const JSClass*
47
  GetJSClass();
48
49
  bool
50
  Wrap(JSContext* aCx, mozilla::dom::DOMRequest* 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::DOMRequest,
76
0
                                       &CreateInterfaceObjects,
77
0
                                       /* aDefineOnGlobal = */ true);
78
0
79
0
  }
80
81
  JSObject*
82
  GetProtoObject(JSContext* aCx);
83
84
  inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true)
85
0
  {
86
0
    /* Get the interface object for this class.  This will create the object as
87
0
       needed. */
88
0
89
0
    return GetPerInterfaceObjectHandle(aCx, constructors::id::DOMRequest,
90
0
                                       &CreateInterfaceObjects,
91
0
                                       aDefineOnGlobal);
92
0
  }
93
94
  JSObject*
95
  GetConstructorObject(JSContext* aCx);
96
97
} // namespace DOMRequest_Binding
98
99
100
101
} // namespace dom
102
} // namespace mozilla
103
104
#endif // mozilla_dom_DOMRequestBinding_h