mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-20 16:55:40 +00:00
Bug 1558522 - Added test case from fuzzer. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D48045 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
bbcc874759
commit
f20a6e81d8
@ -1072,6 +1072,9 @@ void IDBDatabase::LastRelease() {
|
||||
|
||||
CloseInternal();
|
||||
|
||||
// If the database was already closed, CloseInternal does not expire file
|
||||
// actors, which might have been acquired after the close actually happened,
|
||||
// so we expire them here again to be safe (cf. bug 1558522).
|
||||
ExpireFileActors(/* aExpireAll */ true);
|
||||
|
||||
if (mBackgroundActor) {
|
||||
|
40
dom/indexedDB/crashtests/1558522-1.html
Normal file
40
dom/indexedDB/crashtests/1558522-1.html
Normal file
@ -0,0 +1,40 @@
|
||||
<html>
|
||||
<head>
|
||||
<script id='worker' type='javascript/worker'>
|
||||
onmessage = function (e) {
|
||||
const file = e.data[0]
|
||||
const db = indexedDB.open('', {})
|
||||
db.onupgradeneeded = function (event) {
|
||||
const store = event.target.result.createObjectStore('IDBStore_0', {})
|
||||
store.add({}, '')
|
||||
}
|
||||
db.onsuccess = function (event) {
|
||||
const transaction = event.target.result.transaction('IDBStore_0', 'readwrite')
|
||||
const store = transaction.objectStore('IDBStore_0')
|
||||
const cursor = store.openCursor()
|
||||
cursor.onsuccess = function (event) {
|
||||
event.target.result.update({
|
||||
data: file
|
||||
})
|
||||
event.target.result.advance(1)
|
||||
}
|
||||
|
||||
event.target.result.close()
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
let worker;
|
||||
|
||||
function start () {
|
||||
const file = new File([], 'x')
|
||||
const blob = new Blob([document.getElementById('worker').textContent], { type: 'text/javascript' })
|
||||
worker = new Worker(window.URL.createObjectURL(blob))
|
||||
worker.postMessage([file], [])
|
||||
}
|
||||
|
||||
document.addEventListener('DOMContentLoaded', start)
|
||||
</script>
|
||||
</head>
|
||||
</html>
|
@ -2,3 +2,4 @@ load 726376-1.html
|
||||
load 1499854-1.html
|
||||
load 1505821-1.html
|
||||
load 1507229-1.html
|
||||
load 1558522-1.html
|
||||
|
Loading…
Reference in New Issue
Block a user