Skip to content

Commit

Permalink
Hide URL.createObjectURL from ServiceWorker
Browse files Browse the repository at this point in the history
The appropriate lifetime for URLs created with URL.createObjectURL turned
out to be tricky to define, so it was decided to hide it from service
workers altogether. (w3c/ServiceWorker#688)

This commit implements this change and adds a web platform test to verify it.
It also exposes the MediaSource variant of URL.createObjectURL in DedicatedWorker
and SharedWorker contexts in order to comply with the WebIDL spec (see
w3c/media-source#168 (comment)).

Differential Revision: https://phabricator.services.mozilla.com/D2728

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1264182
gecko-commit: 40d4999db3191bca0aeb75a50b37537ad78102ed
gecko-integration-branch: autoland
gecko-reviewers: mrbkap, asuth
  • Loading branch information
ytausky authored and moz-wptsync-bot committed Aug 7, 2018
1 parent eea0b54 commit 0a43521
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,7 @@ test(function() {
test(() => {
assert_false('XMLHttpRequest' in self);
}, 'xhr is not exposed');

test(() => {
assert_false('createObjectURL' in self.URL);
}, 'URL.createObjectURL is not exposed')

0 comments on commit 0a43521

Please sign in to comment.