Skip to content

Commit

Permalink
Backed out changeset 7aa8180f36eb (bug 1563180) for ESlint failure
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoroiu committed Jul 6, 2019
1 parent 4039e26 commit 6e3840d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
10 changes: 0 additions & 10 deletions services/settings/RemoteSettingsClient.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ class RemoteSettingsClient extends EventEmitter {
this.localFields = localFields;
this._lastCheckTimePref = lastCheckTimePref;
this._verifier = null;
this._syncRunning = false;

// This attribute allows signature verification to be disabled, when running tests
// or when pulling data from a dev server.
Expand Down Expand Up @@ -363,14 +362,6 @@ class RemoteSettingsClient extends EventEmitter {
async maybeSync(expectedTimestamp, options = {}) {
const { loadDump = true, trigger = "manual" } = options;

// Make sure we don't run several synchronizations in parallel, mainly
// in order to avoid race conditions in "sync" events listeners.
if (this._syncRunning) {
console.warn(`${this.identifier} sync already running`);
return;
}
this._syncRunning = true;

let importedFromDump = [];
const startedAt = new Date();
let reportStatus = null;
Expand Down Expand Up @@ -597,7 +588,6 @@ class RemoteSettingsClient extends EventEmitter {
duration: durationMilliseconds,
});
console.debug(`${this.identifier} sync status is ${reportStatus}`);
this._syncRunning = false;
}
}

Expand Down
14 changes: 0 additions & 14 deletions services/settings/test/unit/test_remote_settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,20 +351,6 @@ add_task(async function test_get_does_not_verify_signature_if_load_dump() {
});
add_task(clear_state);

add_task(async function test_sync_runs_once_only() {
const backup = Utils.log.warn;
const messages = [];
Utils.log.warn = (m) => {
messages.push(m);
};

await Promise.all([client.maybeSync(2000), client.maybeSync(2000)]);

ok(messages.includes("main/password-fields sync already running"), "warning is shown about sync already running");
Utils.log.warn = backup;
});
add_task(clear_state);

add_task(
async function test_sync_pulls_metadata_if_missing_with_dump_is_up_to_date() {
if (IS_ANDROID) {
Expand Down

0 comments on commit 6e3840d

Please sign in to comment.