1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17

content / test / data / indexeddb / database_callbacks_first.html [blame]

<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>