mirror of https://github.com/gorhill/uBlock.git
Rename `scuo-` to `s14e-`
This commit is contained in:
parent
9c35ffe3c7
commit
461810d93c
|
@ -29,7 +29,7 @@ import lz4Codec from './lz4.js';
|
||||||
import webext from './webext.js';
|
import webext from './webext.js';
|
||||||
import µb from './background.js';
|
import µb from './background.js';
|
||||||
import { ubolog } from './console.js';
|
import { ubolog } from './console.js';
|
||||||
import * as scuo from './scuo-serializer.js';
|
import * as s14e from './s14e-serializer.js';
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ const cacheStorage = (( ) => {
|
||||||
|
|
||||||
const compress = async (bin, key, data) => {
|
const compress = async (bin, key, data) => {
|
||||||
const µbhs = µb.hiddenSettings;
|
const µbhs = µb.hiddenSettings;
|
||||||
const after = await scuo.serializeAsync(data, {
|
const after = await s14e.serializeAsync(data, {
|
||||||
compress: µbhs.cacheStorageCompression,
|
compress: µbhs.cacheStorageCompression,
|
||||||
compressThreshold: µbhs.cacheStorageCompressionThreshold,
|
compressThreshold: µbhs.cacheStorageCompressionThreshold,
|
||||||
multithreaded: µbhs.cacheStorageMultithread,
|
multithreaded: µbhs.cacheStorageMultithread,
|
||||||
|
@ -84,10 +84,10 @@ const cacheStorage = (( ) => {
|
||||||
|
|
||||||
const decompress = async (bin, key) => {
|
const decompress = async (bin, key) => {
|
||||||
const data = bin[key];
|
const data = bin[key];
|
||||||
if ( scuo.isSerialized(data) === false ) { return; }
|
if ( s14e.isSerialized(data) === false ) { return; }
|
||||||
const µbhs = µb.hiddenSettings;
|
const µbhs = µb.hiddenSettings;
|
||||||
const isLarge = data.length >= µbhs.cacheStorageCompressionThreshold;
|
const isLarge = data.length >= µbhs.cacheStorageCompressionThreshold;
|
||||||
bin[key] = await scuo.deserializeAsync(data, {
|
bin[key] = await s14e.deserializeAsync(data, {
|
||||||
multithreaded: isLarge && µbhs.cacheStorageMultithread || 1,
|
multithreaded: isLarge && µbhs.cacheStorageMultithread || 1,
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -45,7 +45,7 @@ import { dnrRulesetFromRawLists } from './static-dnr-filtering.js';
|
||||||
import { i18n$ } from './i18n.js';
|
import { i18n$ } from './i18n.js';
|
||||||
import { redirectEngine } from './redirect-engine.js';
|
import { redirectEngine } from './redirect-engine.js';
|
||||||
import * as sfp from './static-filtering-parser.js';
|
import * as sfp from './static-filtering-parser.js';
|
||||||
import * as scuo from './scuo-serializer.js';
|
import * as s14e from './s14e-serializer.js';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
permanentFirewall,
|
permanentFirewall,
|
||||||
|
@ -947,8 +947,8 @@ const onMessage = function(request, sender, callback) {
|
||||||
|
|
||||||
case 'cloudPull':
|
case 'cloudPull':
|
||||||
request.decode = encoded => {
|
request.decode = encoded => {
|
||||||
if ( scuo.isSerialized(encoded) ) {
|
if ( s14e.isSerialized(encoded) ) {
|
||||||
return scuo.deserializeAsync(encoded, { thread: true });
|
return s14e.deserializeAsync(encoded, { thread: true });
|
||||||
}
|
}
|
||||||
// Legacy decoding: needs to be kept around for the foreseeable future.
|
// Legacy decoding: needs to be kept around for the foreseeable future.
|
||||||
return lz4Codec.decode(encoded, fromBase64);
|
return lz4Codec.decode(encoded, fromBase64);
|
||||||
|
@ -963,7 +963,7 @@ const onMessage = function(request, sender, callback) {
|
||||||
compress: µb.hiddenSettings.cloudStorageCompression,
|
compress: µb.hiddenSettings.cloudStorageCompression,
|
||||||
thread: true,
|
thread: true,
|
||||||
};
|
};
|
||||||
return scuo.serializeAsync(data, options);
|
return s14e.serializeAsync(data, options);
|
||||||
};
|
};
|
||||||
return vAPI.cloud.push(request).then(result => {
|
return vAPI.cloud.push(request).then(result => {
|
||||||
callback(result);
|
callback(result);
|
||||||
|
|
|
@ -1227,7 +1227,7 @@ class Thread {
|
||||||
this.workerPromise = new Promise(resolve => {
|
this.workerPromise = new Promise(resolve => {
|
||||||
let worker = null;
|
let worker = null;
|
||||||
try {
|
try {
|
||||||
worker = new Worker('js/scuo-serializer.js', { type: 'module' });
|
worker = new Worker('js/s14e-serializer.js', { type: 'module' });
|
||||||
worker.onmessage = ev => {
|
worker.onmessage = ev => {
|
||||||
const msg = ev.data;
|
const msg = ev.data;
|
||||||
if ( isInstanceOf(msg, 'Object') === false ) { return; }
|
if ( isInstanceOf(msg, 'Object') === false ) { return; }
|
Loading…
Reference in New Issue