Commit 640a310
committed
Remove caching/shadowing from the
Given that only the `FileSpec.prototype.serializable` getter is ever invoked from "outside" of the class, and only once per `FileSpec`-instance, the caching/shadowing isn't actually necessary.
Furthermore the `_contentRef`-caching wasn't actually correct, since it ended up storing a `BaseStream`-instance and those should *generally* never be cached.
(Since calling `BaseStream.prototype.getBytes()` more than once, without resetting the stream in between, will return an empty TypedArray after the first time.)FileSpec getters, and simplify the code1 parent 84b5866 commit 640a310
3 files changed
Lines changed: 21 additions & 37 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5290 | 5290 | | |
5291 | 5291 | | |
5292 | 5292 | | |
5293 | | - | |
5294 | | - | |
| 5293 | + | |
| 5294 | + | |
5295 | 5295 | | |
5296 | 5296 | | |
5297 | 5297 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| |||
1623 | 1623 | | |
1624 | 1624 | | |
1625 | 1625 | | |
1626 | | - | |
1627 | | - | |
1628 | | - | |
1629 | | - | |
1630 | | - | |
| 1626 | + | |
1631 | 1627 | | |
1632 | 1628 | | |
1633 | 1629 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
69 | | - | |
70 | 67 | | |
| 68 | + | |
71 | 69 | | |
72 | | - | |
| 70 | + | |
73 | 71 | | |
74 | 72 | | |
75 | 73 | | |
76 | 74 | | |
77 | | - | |
| 75 | + | |
78 | 76 | | |
79 | 77 | | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
84 | | - | |
| 82 | + | |
85 | 83 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 84 | + | |
| 85 | + | |
98 | 86 | | |
99 | | - | |
| 87 | + | |
| 88 | + | |
100 | 89 | | |
101 | 90 | | |
102 | 91 | | |
103 | | - | |
104 | | - | |
105 | 92 | | |
106 | 93 | | |
107 | | - | |
| 94 | + | |
108 | 95 | | |
109 | | - | |
| 96 | + | |
110 | 97 | | |
111 | 98 | | |
112 | 99 | | |
| 100 | + | |
113 | 101 | | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
118 | 106 | | |
119 | 107 | | |
120 | 108 | | |
| |||
0 commit comments