| Verify that that requests weakly hold script value properties |
| |
| 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; |
| |
| dbname = "request-leak.html" |
| indexedDB.deleteDatabase(dbname) |
| indexedDB.open(dbname) |
| |
| prepareDatabase(): |
| db = event.target.result |
| store = db.createObjectStore('store') |
| store.put({value: 'value'}, 'key') |
| |
| onOpen(): |
| db = event.target.result |
| tx = db.transaction('store') |
| store = tx.objectStore('store') |
| request = store.get('key') |
| |
| onTransactionComplete(): |
| db.close() |
| PASS typeof request.result is "object" |
| request.result.x = 123 |
| PASS request.result.x is 123 |
| request.result.leak = request |
| observer = internals.observeGC(request) |
| request = null |
| gc() |
| PASS observer.wasCollected is true |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |