Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor Browser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
Tor Browser
Commits
26374f03
Verified
Commit
26374f03
authored
Aug 28, 2024
by
cypherpunks1
Committed by
Pier Angelo Vendrame
Sep 25, 2024
Browse files
Options
Downloads
Patches
Plain Diff
fixup! Bug 31740: Remove some unnecessary RemoteSettings instances
Bug 42730: Revert some changes
parent
f802a8eb
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!1222
Bug 43166: Rebased alpha onto 128.3.0esr
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
services/settings/remote-settings.sys.mjs
+1
-6
1 addition, 6 deletions
services/settings/remote-settings.sys.mjs
toolkit/modules/IgnoreLists.sys.mjs
+7
-13
7 additions, 13 deletions
toolkit/modules/IgnoreLists.sys.mjs
with
8 additions
and
19 deletions
services/settings/remote-settings.sys.mjs
+
1
−
6
View file @
26374f03
...
...
@@ -198,17 +198,12 @@ function remoteSettingsFunction() {
return
;
}
// When running in full mode, we ignore last polling status.
if
(
full
||
AppConstants
.
BASE_BROWSER_VERSION
)
{
if
(
full
)
{
lazy
.
gPrefs
.
clearUserPref
(
PREF_SETTINGS_SERVER_BACKOFF
);
lazy
.
gPrefs
.
clearUserPref
(
PREF_SETTINGS_LAST_UPDATE
);
lazy
.
gPrefs
.
clearUserPref
(
PREF_SETTINGS_LAST_ETAG
);
}
if
(
AppConstants
.
BASE_BROWSER_VERSION
)
{
// tor-browser#41704: pollChanges is always online, so do not allow it.
return
;
}
let
pollTelemetryArgs
=
{
source
:
TELEMETRY_SOURCE_POLL
,
trigger
,
...
...
...
...
This diff is collapsed.
Click to expand it.
toolkit/modules/IgnoreLists.sys.mjs
+
7
−
13
View file @
26374f03
...
...
@@ -5,16 +5,18 @@
const
lazy
=
{};
ChromeUtils
.
defineESModuleGetters
(
lazy
,
{
RemoteSettings
:
"
resource://services-settings/remote-settings.sys.mjs
"
,
RemoteSettingsClient
:
"
resource://services-settings/RemoteSettingsClient.sys.mjs
"
,
});
class
IgnoreListsManager
{
_ignoreListSettings
=
null
;
const
SETTINGS_IGNORELIST_KEY
=
"
hijack-blocklists
"
;
class
IgnoreListsManager
{
async
init
()
{
// TODO: Restore the initialization, once we use only the local dumps for
// the remote settings.
if
(
!
this
.
_ignoreListSettings
)
{
this
.
_ignoreListSettings
=
lazy
.
RemoteSettings
(
SETTINGS_IGNORELIST_KEY
);
}
}
async
getAndSubscribe
(
listener
)
{
...
...
@@ -24,7 +26,7 @@ class IgnoreListsManager {
const
settings
=
await
this
.
_getIgnoreList
();
// Listen for future updates after we first get the values.
this
.
_ignoreListSettings
?
.
on
(
"
sync
"
,
listener
);
this
.
_ignoreListSettings
.
on
(
"
sync
"
,
listener
);
return
settings
;
}
...
...
@@ -65,14 +67,6 @@ class IgnoreListsManager {
* could be obtained.
*/
async
_getIgnoreListSettings
(
firstTime
=
true
)
{
if
(
!
this
.
_ignoreListSettings
)
{
const
dump
=
await
fetch
(
"
resource:///defaults/settings/main/hijack-blocklists.json
"
);
const
{
data
}
=
await
dump
.
json
();
return
data
;
}
let
result
=
[];
try
{
result
=
await
this
.
_ignoreListSettings
.
get
({
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment