mirror of https://github.com/gorhill/uBlock.git
Minor renaming of variables
This commit is contained in:
parent
ba95d2bc49
commit
d7154de9e9
|
@ -135,17 +135,17 @@ const cacheStorage = (( ) => {
|
||||||
return keys;
|
return keys;
|
||||||
},
|
},
|
||||||
|
|
||||||
async set(inbin) {
|
async set(rawbin) {
|
||||||
const keys = Object.keys(inbin);
|
const keys = Object.keys(rawbin);
|
||||||
if ( keys.length === 0 ) { return; }
|
if ( keys.length === 0 ) { return; }
|
||||||
const bin = {};
|
const serializedbin = {};
|
||||||
const promises = [];
|
const promises = [];
|
||||||
for ( const key of keys ) {
|
for ( const key of keys ) {
|
||||||
promises.push(compress(bin, key, inbin[key]));
|
promises.push(compress(serializedbin, key, rawbin[key]));
|
||||||
}
|
}
|
||||||
await Promise.all(promises);
|
await Promise.all(promises);
|
||||||
cacheAPIs[fastCache].set(inbin, bin);
|
cacheAPIs[fastCache].set(rawbin, serializedbin);
|
||||||
return extensionStorage.set(bin).catch(reason => {
|
return extensionStorage.set(serializedbin).catch(reason => {
|
||||||
ubolog(reason);
|
ubolog(reason);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -224,7 +224,7 @@ const xtypeToSerializedInt = {
|
||||||
'[object DataView]': I_DATAVIEW,
|
'[object DataView]': I_DATAVIEW,
|
||||||
};
|
};
|
||||||
|
|
||||||
const typeToSerializedChar = {
|
const xtypeToSerializedChar = {
|
||||||
'[object Int8Array]': C_INT8ARRAY,
|
'[object Int8Array]': C_INT8ARRAY,
|
||||||
'[object Uint8Array]': C_UINT8ARRAY,
|
'[object Uint8Array]': C_UINT8ARRAY,
|
||||||
'[object Uint8ClampedArray]': C_UINT8CLAMPEDARRAY,
|
'[object Uint8ClampedArray]': C_UINT8CLAMPEDARRAY,
|
||||||
|
@ -664,7 +664,7 @@ const _serialize = data => {
|
||||||
case I_FLOAT32ARRAY:
|
case I_FLOAT32ARRAY:
|
||||||
case I_FLOAT64ARRAY:
|
case I_FLOAT64ARRAY:
|
||||||
writeBuffer.push(
|
writeBuffer.push(
|
||||||
typeToSerializedChar[xtypeName],
|
xtypeToSerializedChar[xtypeName],
|
||||||
strFromLargeUint(data.byteOffset),
|
strFromLargeUint(data.byteOffset),
|
||||||
strFromLargeUint(data.length)
|
strFromLargeUint(data.length)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue