| Verify that IDBCursor is not leaked when there is a reference cycle for value attribute |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| indexedDB = self.indexedDB || self.webkitIndexedDB || self.mozIndexedDB || self.msIndexedDB || self.OIndexedDB; |
| |
| indexedDB.deleteDatabase(dbname) |
| indexedDB.open(dbname) |
| |
| prepareDatabase(): |
| db = event.target.result |
| store = db.createObjectStore('store') |
| |
| onOpen(): |
| db = event.target.result |
| tx = db.transaction('store') |
| store = tx.objectStore('store') |
| cursorRequest = store.openCursor() |
| getRequest = store.get('key') |
| |
| openCursorRequestSuccess(): |
| PASS getRequest.result.name is "value" |
| cursor = cursorRequest.result |
| PASS cursor is non-null. |
| value = cursor.value |
| PASS value.name is "value" |
| value.cycle = cursor |
| cursor = null |
| cursorRequest = null |
| gc() |
| PASS cursorObservation.wasCollected is false |
| value = null |
| gc() |
| PASS cursorObservation.wasCollected is true |
| PASS valueObservation.wasCollected is true |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |