Commit 1edacadd authored by rmcilroy's avatar rmcilroy Committed by Commit bot

[indexeddb] Fix IndexedDBBrowserTest.ConnectionsClosedOnTabClose to retain the db.

Fix IndexedDBBrowserTest.ConnectionsClosedOnTabClose to ensure that the
first tab holds a reference to the DB after it does setVersion to ensure
that if a GC happens before the second tab is loaded, the second tab still
get's blocked from doing it's version update. Previously if a GC happened at
this time then the test would hang as the second tab would set it's title
immediately to "setVersion(3) complete" bypassing the "setVersion(3) blocked"
title.

This was failing when long idle times were enabled because the long idle
times caused more GC when the tab went idle.

BUG=467655

Review URL: https://codereview.chromium.org/1012153002

Cr-Commit-Position: refs/heads/master@{#320957}
parent 163dd240
......@@ -49,6 +49,7 @@ function doSetVersion(version)
};
openreq.onupgradeneeded = function(e) {
openreq.transaction.oncomplete = function(e2) {
db = openreq.result;
result('setVersion(' + version + ') complete');
};
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment