Skip to content

Commit

Permalink
Handle delay between context invalidation and IDB request state.
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D203270

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1878146
gecko-commit: 0d93f14cf7ca90ca61ea3ecd31b6992446a4a77c
gecko-reviewers: asuth
  • Loading branch information
jjjalkanen authored and moz-wptsync-bot committed Mar 26, 2024
1 parent 7ebe316 commit 1849930
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IndexedDB/ready-state-destroyed-execution-context.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
const openRequest = iframe.contentWindow.indexedDB.open(dbname);
assert_equals(openRequest.readyState, 'pending');
iframe.remove();
await new Promise(resolve => {
openRequest.onerror = resolve;
openRequest.onsuccess = resolve;
});
assert_equals(openRequest.readyState, 'done');
}, 'readyState accessor is valid after execution context is destroyed');

Expand Down

0 comments on commit 1849930

Please sign in to comment.