/work/obj-fuzz/dist/include/mozilla/dom/MozDocumentObserverBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM MozDocumentObserver.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_MozDocumentObserverBinding_h |
4 | | #define mozilla_dom_MozDocumentObserverBinding_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/CallbackInterface.h" |
12 | | #include "mozilla/dom/Nullable.h" |
13 | | #include "mozilla/dom/PrototypeList.h" |
14 | | #include "mozilla/dom/ToJSValue.h" |
15 | | |
16 | | class nsILoadInfo; |
17 | | class nsPIDOMWindowOuter; |
18 | | |
19 | | namespace mozilla { |
20 | | |
21 | | namespace dom { |
22 | | |
23 | | class MozDocumentCallback; |
24 | | struct MozDocumentCallbackAtoms; |
25 | | struct NativePropertyHooks; |
26 | | class ProtoAndIfaceCache; |
27 | | |
28 | | } // namespace dom |
29 | | |
30 | | namespace extensions { |
31 | | |
32 | | class DocumentObserver; |
33 | | struct DocumentObserverAtoms; |
34 | | class MozDocumentMatcher; |
35 | | |
36 | | } // namespace extensions |
37 | | |
38 | | } // namespace mozilla |
39 | | |
40 | | namespace mozilla { |
41 | | namespace dom { |
42 | | |
43 | | namespace MozDocumentObserver_Binding { |
44 | | |
45 | | typedef mozilla::extensions::DocumentObserver NativeType; |
46 | | |
47 | | bool |
48 | | ConstructorEnabled(JSContext* aCx, JS::Handle<JSObject*> aObj); |
49 | | |
50 | | const JSClass* |
51 | | GetJSClass(); |
52 | | |
53 | | bool |
54 | | Wrap(JSContext* aCx, mozilla::extensions::DocumentObserver* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
55 | | |
56 | | template <class T> |
57 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
58 | 0 | { |
59 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
60 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
61 | 0 | } |
62 | | |
63 | | void |
64 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
65 | | |
66 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
67 | 0 | { |
68 | 0 | /* Get the interface prototype object for this class. This will create the |
69 | 0 | object as needed. */ |
70 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::MozDocumentObserver, |
71 | 0 | &CreateInterfaceObjects, |
72 | 0 | /* aDefineOnGlobal = */ true); |
73 | 0 |
|
74 | 0 | } |
75 | | |
76 | | inline JS::Handle<JSObject*> GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true) |
77 | 0 | { |
78 | 0 | /* Get the interface object for this class. This will create the object as |
79 | 0 | needed. */ |
80 | 0 |
|
81 | 0 | return GetPerInterfaceObjectHandle(aCx, constructors::id::MozDocumentObserver, |
82 | 0 | &CreateInterfaceObjects, |
83 | 0 | aDefineOnGlobal); |
84 | 0 | } |
85 | | |
86 | | JSObject* |
87 | | GetConstructorObject(JSContext* aCx); |
88 | | |
89 | | } // namespace MozDocumentObserver_Binding |
90 | | |
91 | | |
92 | | |
93 | | class MozDocumentCallback : public CallbackInterface |
94 | | { |
95 | | public: |
96 | | explicit inline MozDocumentCallback(JSContext* aCx, JS::Handle<JSObject*> aCallback, JS::Handle<JSObject*> aCallbackGlobal, nsIGlobalObject* aIncumbentGlobal) |
97 | | : CallbackInterface(aCx, aCallback, aCallbackGlobal, aIncumbentGlobal) |
98 | 0 | { |
99 | 0 | } |
100 | | |
101 | | explicit inline MozDocumentCallback(JSObject* aCallback, JSObject* aCallbackGlobal, const FastCallbackConstructor& ) |
102 | | : CallbackInterface(aCallback, aCallbackGlobal, FastCallbackConstructor()) |
103 | 0 | { |
104 | 0 | } |
105 | | |
106 | | explicit inline MozDocumentCallback(JSObject* aCallback, JSObject* aCallbackGlobal, JSObject* aAsyncStack, nsIGlobalObject* aIncumbentGlobal) |
107 | | : CallbackInterface(aCallback, aCallbackGlobal, aAsyncStack, aIncumbentGlobal) |
108 | 0 | { |
109 | 0 | } |
110 | | |
111 | | void OnNewDocument(extensions::MozDocumentMatcher& matcher, nsPIDOMWindowOuter* window, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JS::Realm* aRealm = nullptr); |
112 | | |
113 | | void OnPreloadDocument(extensions::MozDocumentMatcher& matcher, nsILoadInfo* loadInfo, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JS::Realm* aRealm = nullptr); |
114 | | |
115 | | inline bool |
116 | | operator==(const MozDocumentCallback& aOther) const |
117 | 0 | { |
118 | 0 | return CallbackInterface::operator==(aOther); |
119 | 0 | } |
120 | | |
121 | | private: |
122 | | static bool |
123 | | InitIds(JSContext* cx, MozDocumentCallbackAtoms* atomsCache); |
124 | | }; |
125 | | |
126 | | |
127 | | namespace binding_detail { |
128 | | class FastMozDocumentCallback : public MozDocumentCallback |
129 | | { |
130 | | public: |
131 | | explicit inline FastMozDocumentCallback(JSObject* aCallback, JSObject* aCallbackGlobal) |
132 | | : MozDocumentCallback(aCallback, aCallbackGlobal, FastCallbackConstructor()) |
133 | 0 | { |
134 | 0 | } |
135 | | |
136 | | inline void |
137 | | Trace(JSTracer* aTracer) |
138 | 0 | { |
139 | 0 | MozDocumentCallback::Trace(aTracer); |
140 | 0 | } |
141 | | |
142 | | inline void |
143 | | FinishSlowJSInitIfMoreThanOneOwner(JSContext* aCx) |
144 | 0 | { |
145 | 0 | MozDocumentCallback::FinishSlowJSInitIfMoreThanOneOwner(aCx); |
146 | 0 | } |
147 | | }; |
148 | | } // namespace binding_detail |
149 | | |
150 | | |
151 | | } // namespace dom |
152 | | } // namespace mozilla |
153 | | |
154 | | #endif // mozilla_dom_MozDocumentObserverBinding_h |