File tree 2 files changed +14
-7
lines changed
2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change
1
+ unreleased
2
+ ==========
3
+
4
+ * perf: fix deopt during mapping
5
+
1
6
2.1.0 / 2015-06-07
2
7
==================
3
8
Original file line number Diff line number Diff line change @@ -167,20 +167,22 @@ function populateMaps(extensions, types) {
167
167
extensions [ type ] = exts
168
168
169
169
// extension -> mime
170
- exts . forEach ( function forEachExtension ( ext ) {
171
- if ( types [ ext ] ) {
172
- var from = preference . indexOf ( db [ types [ ext ] ] . source )
170
+ for ( var i = 0 ; i < exts . length ; i ++ ) {
171
+ var extension = exts [ i ]
172
+
173
+ if ( types [ extension ] ) {
174
+ var from = preference . indexOf ( db [ types [ extension ] ] . source )
173
175
var to = preference . indexOf ( mime . source )
174
176
175
- if ( types [ ext ] !== 'application/octet-stream'
176
- && from > to || ( from === to && types [ ext ] . substr ( 0 , 12 ) === 'application/' ) ) {
177
+ if ( types [ extension ] !== 'application/octet-stream'
178
+ && from > to || ( from === to && types [ extension ] . substr ( 0 , 12 ) === 'application/' ) ) {
177
179
// skip the remapping
178
180
return
179
181
}
180
182
}
181
183
182
184
// set the extension -> mime
183
- types [ ext ] = type
184
- } )
185
+ types [ extension ] = type
186
+ }
185
187
} )
186
188
}
You can’t perform that action at this time.
0 commit comments