mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Merge pull request #12997 from Snuffleupagus/metadata-worker
Move the Metadata parsing to the worker-thread
This commit is contained in:
commit
4619b1b568
14 changed files with 258 additions and 209 deletions
|
@ -1655,8 +1655,24 @@ class LoopbackPort {
|
|||
cloned.set(value, result);
|
||||
return result;
|
||||
}
|
||||
if (value instanceof Map) {
|
||||
result = new Map();
|
||||
cloned.set(value, result); // Adding to cache now for cyclic references.
|
||||
for (const [key, val] of value) {
|
||||
result.set(key, cloneValue(val));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
if (value instanceof Set) {
|
||||
result = new Set();
|
||||
cloned.set(value, result); // Adding to cache now for cyclic references.
|
||||
for (const val of value) {
|
||||
result.add(cloneValue(val));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
result = Array.isArray(value) ? [] : {};
|
||||
cloned.set(value, result); // adding to cache now for cyclic references
|
||||
cloned.set(value, result); // Adding to cache now for cyclic references.
|
||||
// Cloning all value and object properties, however ignoring properties
|
||||
// defined via getter.
|
||||
for (const i in value) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue