Skip to content

Commit

Permalink
Replace the bundled ReadableStream polyfill with the `web-streams-p…
Browse files Browse the repository at this point in the history
…olyfill` npm package (issue 11157)

Compared to the recently replaced `URL` polyfill, the new `ReadableStream` polyfill isn't being exported globally for two reasons:
 - We're currently checking for the existence of a global `ReadableStream` implementation when determining if the Fetch API will be used; please see `isFetchSupported` in the src/display/display_utils.js file.
 - Given that it's much newer functionality (compared to `URL`) and that not all browsers may implement all parts of the specification yet, not exposing the `ReadableStream` globally seems safer for now.
  • Loading branch information
Snuffleupagus committed Sep 23, 2019
1 parent 9596d70 commit 0ee373f
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 4,014 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ external/webL10n/
external/cmapscompress/
external/builder/fixtures/
external/builder/fixtures_esprima/
external/streams/
src/shared/cffStandardStrings.js
src/shared/fonts_utils.js
test/tmp/
Expand Down
4 changes: 0 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,6 @@
"name": "ReadableStream",
"message": "Import it from `src/shared/util.js` or `pdfjsLib` instead; outside of the `/src` and `/web` folders, the rule may be disabled as needed. ",
},
{
"name": "WritableStream",
"message": "Import it from `src/shared/util.js` or `pdfjsLib` instead; outside of the `/src` and `/web` folders, the rule may be disabled as needed. ",
},
],
"no-shadow-restricted-names": "error",
"no-shadow": "off",
Expand Down
21 changes: 0 additions & 21 deletions external/streams/LICENSE.md

This file was deleted.

9 changes: 0 additions & 9 deletions external/streams/README.md

This file was deleted.

Loading

0 comments on commit 0ee373f

Please sign in to comment.