/work/obj-fuzz/dist/include/mozilla/dom/TreeBoxObjectBinding.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* THIS FILE IS AUTOGENERATED FROM TreeBoxObject.webidl BY Codegen.py - DO NOT EDIT */ |
2 | | |
3 | | #ifndef mozilla_dom_TreeBoxObjectBinding_h |
4 | | #define mozilla_dom_TreeBoxObjectBinding_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 | | #include "nsTreeColumns.h" |
14 | | |
15 | | class nsTreeColumn; |
16 | | |
17 | | namespace mozilla { |
18 | | namespace dom { |
19 | | |
20 | | struct NativePropertyHooks; |
21 | | class ProtoAndIfaceCache; |
22 | | class TreeBoxObject; |
23 | | struct TreeBoxObjectAtoms; |
24 | | struct TreeCellInfoAtoms; |
25 | | |
26 | | } // namespace dom |
27 | | } // namespace mozilla |
28 | | |
29 | | namespace mozilla { |
30 | | namespace dom { |
31 | | |
32 | | struct TreeCellInfo : public DictionaryBase |
33 | | { |
34 | | MOZ_INIT_OUTSIDE_CTOR nsString mChildElt; |
35 | | MOZ_INIT_OUTSIDE_CTOR RefPtr<nsTreeColumn> mCol; |
36 | | MOZ_INIT_OUTSIDE_CTOR int32_t mRow; |
37 | | |
38 | | TreeCellInfo(); |
39 | | |
40 | | explicit inline TreeCellInfo(const FastDictionaryInitializer& ) |
41 | 0 | { |
42 | 0 | // Do nothing here; this is used by our "Fast" subclass |
43 | 0 | } |
44 | | |
45 | | explicit inline TreeCellInfo(const TreeCellInfo& aOther) |
46 | 0 | { |
47 | 0 | *this = aOther; |
48 | 0 | } |
49 | | |
50 | | bool |
51 | | Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false); |
52 | | |
53 | | bool |
54 | | ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const; |
55 | | |
56 | | void |
57 | | TraceDictionary(JSTracer* trc); |
58 | | |
59 | | inline void |
60 | | TraverseForCC(nsCycleCollectionTraversalCallback& aCallback, uint32_t aFlags) |
61 | 0 | { |
62 | 0 | ImplCycleCollectionTraverse(aCallback, mCol, "mCol", aFlags); |
63 | 0 | } |
64 | | |
65 | | inline void |
66 | | UnlinkForCC() |
67 | 0 | { |
68 | 0 | ImplCycleCollectionUnlink(mCol); |
69 | 0 | } |
70 | | |
71 | | TreeCellInfo& |
72 | | operator=(const TreeCellInfo& aOther); |
73 | | |
74 | | private: |
75 | | static bool |
76 | | InitIds(JSContext* cx, TreeCellInfoAtoms* atomsCache); |
77 | | }; |
78 | | |
79 | | namespace binding_detail { |
80 | | struct FastTreeCellInfo : public TreeCellInfo |
81 | | { |
82 | | inline FastTreeCellInfo() |
83 | | : TreeCellInfo(FastDictionaryInitializer()) |
84 | 0 | { |
85 | 0 | // Doesn't matter what int we pass to the parent constructor |
86 | 0 | } |
87 | | }; |
88 | | } // namespace binding_detail |
89 | | |
90 | | |
91 | | namespace TreeBoxObject_Binding { |
92 | | |
93 | | typedef mozilla::dom::TreeBoxObject NativeType; |
94 | | |
95 | | const JSClass* |
96 | | GetJSClass(); |
97 | | |
98 | | bool |
99 | | Wrap(JSContext* aCx, mozilla::dom::TreeBoxObject* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector); |
100 | | |
101 | | template <class T> |
102 | | inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto) |
103 | 0 | { |
104 | 0 | JS::Rooted<JSObject*> reflector(aCx); |
105 | 0 | return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr; |
106 | 0 | } |
107 | | |
108 | | // We declare this as an array so that retrieving a pointer to this |
109 | | // binding's property hooks only requires compile/link-time resolvable |
110 | | // address arithmetic. Declaring it as a pointer instead would require |
111 | | // doing a run-time load to fetch a pointer to this binding's property |
112 | | // hooks. And then structures which embedded a pointer to this structure |
113 | | // would require a run-time load for proper initialization, which would |
114 | | // then induce static constructors. Lots of static constructors. |
115 | | extern const NativePropertyHooks sNativePropertyHooks[]; |
116 | | |
117 | | void |
118 | | CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal); |
119 | | |
120 | | inline JS::Handle<JSObject*> GetProtoObjectHandle(JSContext* aCx) |
121 | 0 | { |
122 | 0 | /* Get the interface prototype object for this class. This will create the |
123 | 0 | object as needed. */ |
124 | 0 | return GetPerInterfaceObjectHandle(aCx, prototypes::id::TreeBoxObject, |
125 | 0 | &CreateInterfaceObjects, |
126 | 0 | /* aDefineOnGlobal = */ true); |
127 | 0 |
|
128 | 0 | } |
129 | | |
130 | | } // namespace TreeBoxObject_Binding |
131 | | |
132 | | |
133 | | |
134 | | } // namespace dom |
135 | | } // namespace mozilla |
136 | | |
137 | | #endif // mozilla_dom_TreeBoxObjectBinding_h |