1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-20 07:08:08 +02:00
pdf.js/test
Jonas Jenwald e9038cc3d1 Send the AnnotationStorage-data to the worker-thread as a Map
Rather than converting the `AnnotationStorage`-data to an Object, before sending it to the worker-thread, we should be able to simply send the internal `Map` directly.
The "structured clone algorithm" doesn't have a problem with `Map`s, however the `LoopbackPort` used when workers are *disabled* (e.g. in Node.js environments) didn't use to support them. With PR 12997 having lifted that restriction, we should now be able to simply send the `AnnotationStorage`-data as-is rather than having to iterate through it to first create an Object.

*Please note:* The changes in `src/core/annotation.js` could have been a lot more compact if we were able to use optional chaining in the `src/core` folder. Unfortunately that's still not possible, since SystemJS is being used in the development viewer (i.g. `gulp server`) and fixing that is *still* blocked by [bug 1247687](https://bugzilla.mozilla.org/show_bug.cgi?id=1247687).
2021-02-18 17:13:43 +01:00
..
chromium Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
features Remove usage of mozFillRule 2017-01-29 23:24:44 +01:00
font Import the TestReporter, in the unit and font tests 2020-10-27 11:30:15 +01:00
integration JS -- add support for choice widget (#12826) 2021-01-25 23:40:57 +01:00
pdfs Avoid infinite loop when getting annotation field name 2021-02-14 19:58:19 +01:00
resources Introduce Puppeteer for handling browsers during tests 2020-04-27 13:03:12 +02:00
stats Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
ttx Update fonttools location and version (issue 6223) 2015-07-17 12:51:09 +02:00
types Add typescript definitions 2020-07-30 11:10:37 +02:00
unit Send the AnnotationStorage-data to the worker-thread as a Map 2021-02-18 17:13:43 +01:00
.eslintrc Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
.gitignore Ignore test snapshots directory. 2013-03-15 11:24:08 -07:00
add_test.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
annotation_layer_builder_overrides.css Enable the Stylelint length-zero-no-unit rule 2021-01-10 14:09:36 +01:00
downloadutils.js Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
driver.js Create an OptionalContentConfig-instance once for each task, when running the reference test-suite 2020-08-30 16:28:40 +02:00
integration-boot.js Add some integration tests using puppeteer and Jasmine 2020-12-10 20:55:15 +01:00
test.js Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00
test_manifest.json Avoid infinite loop when getting annotation field name 2021-02-14 19:58:19 +01:00
test_slave.html Use the SimpleLinkService when running "annotations" reference tests 2017-09-12 15:24:46 +02:00
testutils.js Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
text_layer_test.css Fix text layer regression tests in using the correct line-height property 2021-01-25 23:01:07 +01:00
webserver.js Enable ESLint rules that no longer need to be disabled on a directory/file-basis 2021-01-22 17:47:03 +01:00