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;
|
||||
},
|
||||
|
||||
async set(inbin) {
|
||||
const keys = Object.keys(inbin);
|
||||
async set(rawbin) {
|
||||
const keys = Object.keys(rawbin);
|
||||
if ( keys.length === 0 ) { return; }
|
||||
const bin = {};
|
||||
const serializedbin = {};
|
||||
const promises = [];
|
||||
for ( const key of keys ) {
|
||||
promises.push(compress(bin, key, inbin[key]));
|
||||
promises.push(compress(serializedbin, key, rawbin[key]));
|
||||
}
|
||||
await Promise.all(promises);
|
||||
cacheAPIs[fastCache].set(inbin, bin);
|
||||
return extensionStorage.set(bin).catch(reason => {
|
||||
cacheAPIs[fastCache].set(rawbin, serializedbin);
|
||||
return extensionStorage.set(serializedbin).catch(reason => {
|
||||
ubolog(reason);
|
||||
});
|
||||
},
|
||||
|
|
|
@ -224,7 +224,7 @@ const xtypeToSerializedInt = {
|
|||
'[object DataView]': I_DATAVIEW,
|
||||
};
|
||||
|
||||
const typeToSerializedChar = {
|
||||
const xtypeToSerializedChar = {
|
||||
'[object Int8Array]': C_INT8ARRAY,
|
||||
'[object Uint8Array]': C_UINT8ARRAY,
|
||||
'[object Uint8ClampedArray]': C_UINT8CLAMPEDARRAY,
|
||||
|
@ -664,7 +664,7 @@ const _serialize = data => {
|
|||
case I_FLOAT32ARRAY:
|
||||
case I_FLOAT64ARRAY:
|
||||
writeBuffer.push(
|
||||
typeToSerializedChar[xtypeName],
|
||||
xtypeToSerializedChar[xtypeName],
|
||||
strFromLargeUint(data.byteOffset),
|
||||
strFromLargeUint(data.length)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue