refactor: rewrite Blob implementation (#9309)

Co-authored-by: Kitson Kelly <me@kitsonkelly.com>
This commit is contained in:
Luca Casonato 2021-01-30 19:22:24 +01:00 committed by GitHub
parent ef46bc88bd
commit fa975a9bae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 346 additions and 277 deletions

View file

@ -27,6 +27,7 @@ delete Object.prototype.__proto__;
const streams = window.__bootstrap.streams;
const fileReader = window.__bootstrap.fileReader;
const webSocket = window.__bootstrap.webSocket;
const blob = window.__bootstrap.blob;
const fetch = window.__bootstrap.fetch;
const prompt = window.__bootstrap.prompt;
const denoNs = window.__bootstrap.denoNs;
@ -197,7 +198,7 @@ delete Object.prototype.__proto__;
// https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope
const windowOrWorkerGlobalScope = {
Blob: util.nonEnumerable(fetch.Blob),
Blob: util.nonEnumerable(blob.Blob),
ByteLengthQueuingStrategy: util.nonEnumerable(
streams.ByteLengthQueuingStrategy,
),