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

Side by Side Diff: third_party/WebKit/LayoutTests/storage/indexeddb/cursor-after-range-bug.html

Issue 1369773004: IndexedDB: Fix null ptr crash in IDBCursor::value(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted null ptr check removal Created 5 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>IndexedDB: Reading cursor value after advancing past range</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="resources/testharness-helpers.js"></script>
6 <script>
7
8 // A regression test for http://crbug.com/487711
9 indexeddb_test(
10 function(t, db) {
11 var store = db.createObjectStore('store');
12 for (var i = 0; i < 10; ++i)
13 store.put(i, i);
14 },
15 function(t, db) {
16 var transaction = db.transaction('store', 'readonly');
17 var store = transaction.objectStore('store');
18 var req = store.openCursor();
19 var last_cursor;
20 req.onsuccess = t.step_func(function(evt) {
21 var cursor = evt.target.result;
22 if (cursor) {
23 last_cursor = cursor;
24 cursor.continue();
25 } else {
26 assert_equals(last_cursor.value, undefined);
27 t.done();
28 }
29 });
30 req.onerror = t.step_func(function() {
31 assert_unreached('open should not fail');
32 });
33 },
34 'Access to cursor value after final advance should be undefined'
35 );
36
37 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/indexeddb/IDBCursor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698