Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(818)

Side by Side Diff: Source/modules/indexeddb/IDBKeyPath.cpp

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.cpp ('k') | Source/modules/indexeddb/IDBRequest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/modules/indexeddb/IDBCursor.cpp ('k') | Source/modules/indexeddb/IDBRequest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698