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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 : m_type(StringType) | 197 : m_type(StringType) |
198 , m_string(string) | 198 , m_string(string) |
199 { | 199 { |
200 ASSERT(!m_string.isNull()); | 200 ASSERT(!m_string.isNull()); |
201 } | 201 } |
202 | 202 |
203 IDBKeyPath::IDBKeyPath(const Vector<String>& array) | 203 IDBKeyPath::IDBKeyPath(const Vector<String>& array) |
204 : m_type(ArrayType) | 204 : m_type(ArrayType) |
205 , m_array(array) | 205 , m_array(array) |
206 { | 206 { |
207 #ifndef NDEBUG | 207 #if ENABLE(ASSERT) |
208 for (size_t i = 0; i < m_array.size(); ++i) | 208 for (size_t i = 0; i < m_array.size(); ++i) |
209 ASSERT(!m_array[i].isNull()); | 209 ASSERT(!m_array[i].isNull()); |
210 #endif | 210 #endif |
211 } | 211 } |
212 | 212 |
213 bool IDBKeyPath::isValid() const | 213 bool IDBKeyPath::isValid() const |
214 { | 214 { |
215 switch (m_type) { | 215 switch (m_type) { |
216 case NullType: | 216 case NullType: |
217 return false; | 217 return false; |
(...skipping 25 matching lines...) Expand all Loading... |
243 case StringType: | 243 case StringType: |
244 return m_string == other.m_string; | 244 return m_string == other.m_string; |
245 case ArrayType: | 245 case ArrayType: |
246 return m_array == other.m_array; | 246 return m_array == other.m_array; |
247 } | 247 } |
248 ASSERT_NOT_REACHED(); | 248 ASSERT_NOT_REACHED(); |
249 return false; | 249 return false; |
250 } | 250 } |
251 | 251 |
252 } // namespace WebCore | 252 } // namespace WebCore |
OLD | NEW |