forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1800470, make it possible to extend WritableStream with another c…
…ycle collectable class, r=saschanaz Differential Revision: https://phabricator.services.mozilla.com/D162287
- Loading branch information
Olli Pettay
authored and
Olli Pettay
committed
Nov 17, 2022
1 parent
caf1ed9
commit 7042f24
Showing
7 changed files
with
72 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html class="reftest-wait"> | ||
<head> | ||
<script id="worker1" type="javascript/worker"> | ||
self.onmessage = async function (e) { | ||
const directory = await navigator.storage.getDirectory() | ||
const file = await directory.getFileHandle("500014c3-f683-4551-bb26-08025c9be332", { | ||
create: true, | ||
}); | ||
const stream = await file.createWritable({}); | ||
const regex = new RegExp(".*"); | ||
await stream.abort(regex); | ||
self.postMessage("done"); | ||
self.close(); | ||
} | ||
</script> | ||
<script> | ||
document.addEventListener('DOMContentLoaded', () => { | ||
const buffer = new ArrayBuffer(1); | ||
const blob = new Blob([document.querySelector('#worker1').textContent], { type: 'text/javascript' }); | ||
const worker = new Worker(window.URL.createObjectURL(blob)); | ||
worker.postMessage([buffer], [buffer]); | ||
worker.onmessage = function() {document.documentElement.removeAttribute("class"); } | ||
}); | ||
</script> | ||
</head> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# StorageManager isn't enabled on Android | ||
skip-if(Android) pref(dom.fs.enabled,true) load 1800470.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters