1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-06 09:37:12 +02:00

Do not consider same-creation time to be a stale status

Related commit:
7daf31336a
This commit is contained in:
Raymond Hill 2023-10-17 12:30:06 -04:00
parent 7daf31336a
commit f34855b859
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 9 additions and 14 deletions

View File

@ -82,7 +82,6 @@ const resourceIsStale = (networkDetails, cacheDetails) => {
if ( networkDetails.resourceTime === 0 ) { return false; }
if ( typeof cacheDetails.resourceTime !== 'number' ) { return false; }
if ( cacheDetails.resourceTime === 0 ) { return false; }
if ( networkDetails.resourceTime === cacheDetails.resourceTime ) { return true; }
if ( networkDetails.resourceTime < cacheDetails.resourceTime ) {
ubolog(`Skip ${networkDetails.url}\n\tolder than ${cacheDetails.remoteURL}`);
return true;

View File

@ -598,17 +598,13 @@ const exCharCodeAt = (s, i) => {
/******************************************************************************/
class argListParser {
constructor(separator = 0x2C /* , */, mustQuote = false) {
this.separatorCode = separator.charCodeAt(0);
constructor(separatorChar = ',', mustQuote = false) {
this.separatorChar = this.actualSeparatorChar = separatorChar;
this.separatorCode = this.actualSeparatorCode = separatorChar.charCodeAt(0);
this.mustQuote = mustQuote;
this.quoteBeg = 0;
this.argBeg = 0;
this.argEnd = 0;
this.quoteEnd = 0;
this.actualSeparatorCode = 0x2C /* , */;
this.actualSeparatorChar = ',';
this.separatorBeg = 0;
this.separatorEnd = 0;
this.quoteBeg = 0; this.quoteEnd = 0;
this.argBeg = 0; this.argEnd = 0;
this.separatorBeg = 0; this.separatorEnd = 0;
this.transform = false;
this.failed = false;
this.reWhitespaceStart = /^\s+/;
@ -617,7 +613,7 @@ class argListParser {
this.reUnescapeDoubleQuotes = /((?:^|[^\\])(?:\\\\)*)\\"/g;
this.reUnescapeSingleQuotes = /((?:^|[^\\])(?:\\\\)*)\\'/g;
this.reUnescapeBackticks = /((?:^|[^\\])(?:\\\\)*)\\`/g;
this.reUnescapeCommas = /((?:^|[^\\])(?:\\\\)*)\\,/g;
this.reUnescapeSeparator = new RegExp(`((?:^|[^\\\\])(?:\\\\\\\\)*)\\\\${this.separatorChar}`, 'g');
}
nextArg(pattern, beg = 0) {
const len = pattern.length;
@ -663,8 +659,8 @@ class argListParser {
default:
break;
}
if ( s.includes(',') === false ) { return; }
return s.replace(this.reUnescapeCommas, '$1,');
if ( s.includes(this.separatorChar) === false ) { return; }
return s.replace(this.reUnescapeSeparator, `$1${this.separatorChar}`);
}
leftWhitespaceCount(s) {
const match = this.reWhitespaceStart.exec(s);