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

Side by Side Diff: Source/modules/indexeddb/IDBCursor.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/filesystem/FileWriterSync.cpp ('k') | Source/modules/indexeddb/IDBKeyPath.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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 ScriptValue IDBCursor::value(ScriptState* scriptState) 314 ScriptValue IDBCursor::value(ScriptState* scriptState)
315 { 315 {
316 ASSERT(isCursorWithValue()); 316 ASSERT(isCursorWithValue());
317 317
318 IDBObjectStore* objectStore = effectiveObjectStore(); 318 IDBObjectStore* objectStore = effectiveObjectStore();
319 const IDBObjectStoreMetadata& metadata = objectStore->metadata(); 319 const IDBObjectStoreMetadata& metadata = objectStore->metadata();
320 IDBAny* value; 320 IDBAny* value;
321 if (metadata.autoIncrement && !metadata.keyPath.isNull()) { 321 if (metadata.autoIncrement && !metadata.keyPath.isNull()) {
322 value = IDBAny::create(m_value, m_blobInfo.get(), m_primaryKey, metadata .keyPath); 322 value = IDBAny::create(m_value, m_blobInfo.get(), m_primaryKey, metadata .keyPath);
323 #ifndef NDEBUG 323 #if ENABLE(ASSERT)
324 assertPrimaryKeyValidOrInjectable(scriptState, m_value, m_blobInfo.get() , m_primaryKey, metadata.keyPath); 324 assertPrimaryKeyValidOrInjectable(scriptState, m_value, m_blobInfo.get() , m_primaryKey, metadata.keyPath);
325 #endif 325 #endif
326 } else { 326 } else {
327 value = IDBAny::create(m_value, m_blobInfo.get()); 327 value = IDBAny::create(m_value, m_blobInfo.get());
328 } 328 }
329 329
330 m_valueDirty = false; 330 m_valueDirty = false;
331 ScriptValue scriptValue = idbAnyToScriptValue(scriptState, value); 331 ScriptValue scriptValue = idbAnyToScriptValue(scriptState, value);
332 handleBlobAcks(); 332 handleBlobAcks();
333 return scriptValue; 333 return scriptValue;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 case blink::WebIDBCursorDirectionPrevNoDuplicate: 410 case blink::WebIDBCursorDirectionPrevNoDuplicate:
411 return IDBCursor::directionPrevUnique(); 411 return IDBCursor::directionPrevUnique();
412 412
413 default: 413 default:
414 ASSERT_NOT_REACHED(); 414 ASSERT_NOT_REACHED();
415 return IDBCursor::directionNext(); 415 return IDBCursor::directionNext();
416 } 416 }
417 } 417 }
418 418
419 } // namespace WebCore 419 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/filesystem/FileWriterSync.cpp ('k') | Source/modules/indexeddb/IDBKeyPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698