Line data Source code
1 : /* THIS FILE IS AUTOGENERATED FROM IterableIterator.webidl BY Codegen.py - DO NOT EDIT */
2 :
3 : #ifndef mozilla_dom_IterableIteratorBinding_h
4 : #define mozilla_dom_IterableIteratorBinding_h
5 :
6 : #include "js/RootingAPI.h"
7 : #include "jspubtd.h"
8 : #include "mozilla/ErrorResult.h"
9 : #include "mozilla/dom/BindingDeclarations.h"
10 : #include "mozilla/dom/Nullable.h"
11 :
12 : namespace mozilla {
13 : namespace dom {
14 :
15 : struct IterableKeyAndValueResultAtoms;
16 : struct IterableKeyOrValueResultAtoms;
17 : struct NativePropertyHooks;
18 : class ProtoAndIfaceCache;
19 :
20 : } // namespace dom
21 : } // namespace mozilla
22 :
23 : namespace mozilla {
24 : namespace dom {
25 :
26 0 : struct IterableKeyAndValueResult : public DictionaryBase
27 : {
28 : MOZ_INIT_OUTSIDE_CTOR bool mDone;
29 : MOZ_INIT_OUTSIDE_CTOR Sequence<JS::Value> mValue;
30 :
31 : IterableKeyAndValueResult();
32 :
33 : explicit inline IterableKeyAndValueResult(const FastDictionaryInitializer& )
34 : {
35 : // Do nothing here; this is used by our "Fast" subclass
36 : }
37 :
38 : private:
39 : IterableKeyAndValueResult(const IterableKeyAndValueResult&) = delete;
40 : IterableKeyAndValueResult& operator=(const IterableKeyAndValueResult&) = delete;
41 :
42 : static bool
43 : InitIds(JSContext* cx, IterableKeyAndValueResultAtoms* atomsCache);
44 :
45 : public:
46 : bool
47 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
48 :
49 : bool
50 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
51 :
52 : void
53 : TraceDictionary(JSTracer* trc);
54 : };
55 :
56 : namespace binding_detail {
57 : struct FastIterableKeyAndValueResult : public IterableKeyAndValueResult
58 : {
59 : inline FastIterableKeyAndValueResult()
60 : : IterableKeyAndValueResult(FastDictionaryInitializer())
61 : {
62 : // Doesn't matter what int we pass to the parent constructor
63 : }
64 : };
65 : } // namespace binding_detail
66 :
67 :
68 : struct IterableKeyOrValueResult : public DictionaryBase
69 : {
70 : MOZ_INIT_OUTSIDE_CTOR bool mDone;
71 : MOZ_INIT_OUTSIDE_CTOR JS::Value mValue;
72 :
73 : IterableKeyOrValueResult();
74 :
75 : explicit inline IterableKeyOrValueResult(const FastDictionaryInitializer& )
76 : : mValue(JS::UndefinedValue())
77 : {
78 : // Do nothing here; this is used by our "Fast" subclass
79 : }
80 :
81 : private:
82 : IterableKeyOrValueResult(const IterableKeyOrValueResult&) = delete;
83 : IterableKeyOrValueResult& operator=(const IterableKeyOrValueResult&) = delete;
84 :
85 : static bool
86 : InitIds(JSContext* cx, IterableKeyOrValueResultAtoms* atomsCache);
87 :
88 : public:
89 : bool
90 : Init(JSContext* cx, JS::Handle<JS::Value> val, const char* sourceDescription = "Value", bool passedToJSImpl = false);
91 :
92 : bool
93 : ToObjectInternal(JSContext* cx, JS::MutableHandle<JS::Value> rval) const;
94 :
95 : void
96 : TraceDictionary(JSTracer* trc);
97 : };
98 :
99 : namespace binding_detail {
100 : struct FastIterableKeyOrValueResult : public IterableKeyOrValueResult
101 : {
102 : inline FastIterableKeyOrValueResult()
103 : : IterableKeyOrValueResult(FastDictionaryInitializer())
104 : {
105 : // Doesn't matter what int we pass to the parent constructor
106 : }
107 : };
108 : } // namespace binding_detail
109 :
110 :
111 : } // namespace dom
112 : } // namespace mozilla
113 :
114 : #endif // mozilla_dom_IterableIteratorBinding_h
|