OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 PassRefPtr<IDBAny> IDBAny::createString(const String& value) | 49 PassRefPtr<IDBAny> IDBAny::createString(const String& value) |
50 { | 50 { |
51 return adoptRef(new IDBAny(value)); | 51 return adoptRef(new IDBAny(value)); |
52 } | 52 } |
53 | 53 |
54 IDBAny::IDBAny(Type type) | 54 IDBAny::IDBAny(Type type) |
55 : m_type(type) | 55 : m_type(type) |
56 , m_integer(0) | 56 , m_integer(0) |
57 { | 57 { |
58 ASSERT(type == UndefinedType || type == NullType); | 58 ASSERT(type == UndefinedType || type == NullType); |
| 59 ScriptWrappable::init(this); |
59 } | 60 } |
60 | 61 |
61 IDBAny::~IDBAny() | 62 IDBAny::~IDBAny() |
62 { | 63 { |
63 } | 64 } |
64 | 65 |
65 PassRefPtr<DOMStringList> IDBAny::domStringList() | 66 PassRefPtr<DOMStringList> IDBAny::domStringList() |
66 { | 67 { |
67 ASSERT(m_type == DOMStringListType); | 68 ASSERT(m_type == DOMStringListType); |
68 return m_domStringList; | 69 return m_domStringList; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 { | 127 { |
127 ASSERT(m_type == IntegerType); | 128 ASSERT(m_type == IntegerType); |
128 return m_integer; | 129 return m_integer; |
129 } | 130 } |
130 | 131 |
131 IDBAny::IDBAny(PassRefPtr<DOMStringList> value) | 132 IDBAny::IDBAny(PassRefPtr<DOMStringList> value) |
132 : m_type(DOMStringListType) | 133 : m_type(DOMStringListType) |
133 , m_domStringList(value) | 134 , m_domStringList(value) |
134 , m_integer(0) | 135 , m_integer(0) |
135 { | 136 { |
| 137 ScriptWrappable::init(this); |
136 } | 138 } |
137 | 139 |
138 IDBAny::IDBAny(PassRefPtr<IDBCursorWithValue> value) | 140 IDBAny::IDBAny(PassRefPtr<IDBCursorWithValue> value) |
139 : m_type(IDBCursorWithValueType) | 141 : m_type(IDBCursorWithValueType) |
140 , m_idbCursorWithValue(value) | 142 , m_idbCursorWithValue(value) |
141 , m_integer(0) | 143 , m_integer(0) |
142 { | 144 { |
| 145 ScriptWrappable::init(this); |
143 } | 146 } |
144 | 147 |
145 IDBAny::IDBAny(PassRefPtr<IDBCursor> value) | 148 IDBAny::IDBAny(PassRefPtr<IDBCursor> value) |
146 : m_type(IDBCursorType) | 149 : m_type(IDBCursorType) |
147 , m_idbCursor(value) | 150 , m_idbCursor(value) |
148 , m_integer(0) | 151 , m_integer(0) |
149 { | 152 { |
| 153 ScriptWrappable::init(this); |
150 } | 154 } |
151 | 155 |
152 IDBAny::IDBAny(PassRefPtr<IDBDatabase> value) | 156 IDBAny::IDBAny(PassRefPtr<IDBDatabase> value) |
153 : m_type(IDBDatabaseType) | 157 : m_type(IDBDatabaseType) |
154 , m_idbDatabase(value) | 158 , m_idbDatabase(value) |
155 , m_integer(0) | 159 , m_integer(0) |
156 { | 160 { |
| 161 ScriptWrappable::init(this); |
157 } | 162 } |
158 | 163 |
159 IDBAny::IDBAny(PassRefPtr<IDBFactory> value) | 164 IDBAny::IDBAny(PassRefPtr<IDBFactory> value) |
160 : m_type(IDBFactoryType) | 165 : m_type(IDBFactoryType) |
161 , m_idbFactory(value) | 166 , m_idbFactory(value) |
162 , m_integer(0) | 167 , m_integer(0) |
163 { | 168 { |
| 169 ScriptWrappable::init(this); |
164 } | 170 } |
165 | 171 |
166 IDBAny::IDBAny(PassRefPtr<IDBIndex> value) | 172 IDBAny::IDBAny(PassRefPtr<IDBIndex> value) |
167 : m_type(IDBIndexType) | 173 : m_type(IDBIndexType) |
168 , m_idbIndex(value) | 174 , m_idbIndex(value) |
169 , m_integer(0) | 175 , m_integer(0) |
170 { | 176 { |
| 177 ScriptWrappable::init(this); |
171 } | 178 } |
172 | 179 |
173 IDBAny::IDBAny(PassRefPtr<IDBTransaction> value) | 180 IDBAny::IDBAny(PassRefPtr<IDBTransaction> value) |
174 : m_type(IDBTransactionType) | 181 : m_type(IDBTransactionType) |
175 , m_idbTransaction(value) | 182 , m_idbTransaction(value) |
176 , m_integer(0) | 183 , m_integer(0) |
177 { | 184 { |
| 185 ScriptWrappable::init(this); |
178 } | 186 } |
179 | 187 |
180 IDBAny::IDBAny(PassRefPtr<IDBObjectStore> value) | 188 IDBAny::IDBAny(PassRefPtr<IDBObjectStore> value) |
181 : m_type(IDBObjectStoreType) | 189 : m_type(IDBObjectStoreType) |
182 , m_idbObjectStore(value) | 190 , m_idbObjectStore(value) |
183 , m_integer(0) | 191 , m_integer(0) |
184 { | 192 { |
| 193 ScriptWrappable::init(this); |
185 } | 194 } |
186 | 195 |
187 IDBAny::IDBAny(const ScriptValue& value) | 196 IDBAny::IDBAny(const ScriptValue& value) |
188 : m_type(ScriptValueType) | 197 : m_type(ScriptValueType) |
189 , m_scriptValue(value) | 198 , m_scriptValue(value) |
190 , m_integer(0) | 199 , m_integer(0) |
191 { | 200 { |
| 201 ScriptWrappable::init(this); |
192 } | 202 } |
193 | 203 |
194 IDBAny::IDBAny(const IDBKeyPath& value) | 204 IDBAny::IDBAny(const IDBKeyPath& value) |
195 : m_type(KeyPathType) | 205 : m_type(KeyPathType) |
196 , m_idbKeyPath(value) | 206 , m_idbKeyPath(value) |
197 , m_integer(0) | 207 , m_integer(0) |
198 { | 208 { |
| 209 ScriptWrappable::init(this); |
199 } | 210 } |
200 | 211 |
201 IDBAny::IDBAny(const String& value) | 212 IDBAny::IDBAny(const String& value) |
202 : m_type(StringType) | 213 : m_type(StringType) |
203 , m_string(value) | 214 , m_string(value) |
204 , m_integer(0) | 215 , m_integer(0) |
205 { | 216 { |
| 217 ScriptWrappable::init(this); |
206 } | 218 } |
207 | 219 |
208 IDBAny::IDBAny(int64_t value) | 220 IDBAny::IDBAny(int64_t value) |
209 : m_type(IntegerType) | 221 : m_type(IntegerType) |
210 , m_integer(value) | 222 , m_integer(value) |
211 { | 223 { |
| 224 ScriptWrappable::init(this); |
212 } | 225 } |
213 | 226 |
214 } // namespace WebCore | 227 } // namespace WebCore |
OLD | NEW |