| <script> |
| |
| function gcAndDetach() { |
| // Collect the IDBRequest so that only the indexeddb message dispatcher |
| // has a reference to IDBDatabase. |
| gc(); |
| // Make Document::detachLayoutTree run stopActiveDOMObjects. |
| location.href = 'database_callbacks_second.html'; |
| } |
| function openConnection() { |
| var idbRequest = indexedDB.open("database_callbacks_first"); |
| // setTimeout is needed so that the IDBRequest returned by |
| // indexedDB.open() can be garbage collected. |
| idbRequest.onsuccess = function() { setTimeout(gcAndDetach, 0) }; |
| } |
| openConnection(); |
| </script> |