summaryrefslogtreecommitdiffstats
path: root/chrome/test/data/indexeddb/database_callbacks_first.html
blob: 4f99f62f2404fac65bfba36d0cbc2856ec7ec29e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script>

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