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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |