Skip to content

Commit

Permalink
refactor: disable URL.createObjectUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Sep 17, 2020
1 parent 46bf660 commit 99c871e
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions cli/rt/11_url.js
Original file line number Diff line number Diff line change
Expand Up @@ -712,27 +712,12 @@
return this.href;
}

// TODO(kevinkassimo): implement MediaSource version in the future.
static createObjectURL(blob) {
const origin = "http://deno-opaque-origin";
const key = `blob:${origin}/${generateUUID()}`;
blobURLMap.set(key, blob);
return key;
throw new Error("Not implemented")
}

static revokeObjectURL(url) {
let urlObject;
try {
urlObject = new URL(url);
} catch {
throw new TypeError("Provided URL string is not valid");
}
if (urlObject.protocol !== "blob:") {
return;
}
// Origin match check seems irrelevant for now, unless we implement
// persisten storage for per globalThis.location.origin at some point.
blobURLMap.delete(url);
throw new Error("Not implemented")
}
}

Expand Down

0 comments on commit 99c871e

Please sign in to comment.