author | Carsten "Tomcat" Book <cbook@mozilla.com> |
Tue, 02 May 2017 09:25:45 +0200 | |
changeset 355980 | 7f06e5ac97e6bde50a37e4b716facb5e46c15bd6 |
parent 355979 | e6177d883f379b7c7472e4b19c5c41af1e4c26b3 |
child 355981 | 632e25ba6de9e5d3d0f6d838c59f44fec52562a1 |
push id | 31754 |
push user | kwierso@gmail.com |
push date | Wed, 03 May 2017 00:28:51 +0000 |
treeherder | mozilla-central@5eaf2d70eded [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
bugs | 1359540 |
milestone | 55.0a1 |
backs out | e6177d883f379b7c7472e4b19c5c41af1e4c26b3 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
deleted file mode 100644 --- a/services/.eslintrc.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; - -module.exports = { - extends: [ - "plugin:mozilla/recommended" - ], - - plugins: [ - "mozilla" - ] -}
--- a/services/crypto/modules/utils.js +++ b/services/crypto/modules/utils.js @@ -506,17 +506,17 @@ this.CryptoUtils = { CryptoUtils.updateUTF8("\n", hasher); let hash = hasher.finish(false); // HAWK specifies this .hash to use +/ (not _-) and include the // trailing "==" padding. let hash_b64 = btoa(hash); artifacts.hash = hash_b64; } - let requestString = ("hawk.1.header\n" + + let requestString = ("hawk.1.header" + "\n" + artifacts.ts.toString(10) + "\n" + artifacts.nonce + "\n" + artifacts.method + "\n" + artifacts.resource + "\n" + artifacts.host + "\n" + artifacts.port + "\n" + (artifacts.hash || "") + "\n"); if (artifacts.ext) {
--- a/services/fxaccounts/FxAccountsManager.jsm +++ b/services/fxaccounts/FxAccountsManager.jsm @@ -460,17 +460,17 @@ this.FxAccountsManager = { if (!aEmail) { return this._error(ERROR_INVALID_EMAIL); } let client = this._getFxAccountsClient(); return client.accountExists(aEmail).then( result => { - log.debug("Account " + (result ? "" : "does not ") + "exists"); + log.debug("Account " + result ? "" : "does not" + " exists"); let error = this._getError(result); if (error) { return this._error(error, result); } return Promise.resolve({ registered: result });
--- a/services/fxaccounts/tests/mochitest/test_invalidEmailCase.html +++ b/services/fxaccounts/tests/mochitest/test_invalidEmailCase.html @@ -33,36 +33,36 @@ Components.utils.import("resource://serv const TEST_SERVER = "http://mochi.test:8888/chrome/services/fxaccounts/tests/mochitest/file_invalidEmailCase.sjs?path="; let MockStorage = function() { this.data = null; }; MockStorage.prototype = Object.freeze({ - set(contents) { + set: function (contents) { this.data = contents; return Promise.resolve(null); }, - get() { + get: function () { return Promise.resolve(this.data); }, getOAuthTokens() { return Promise.resolve(null); }, setOAuthTokens(contents) { return Promise.resolve(); }, }); function MockFxAccounts() { return new FxAccounts({ _now_is: new Date(), - now() { + now: function() { return this._now_is; }, signedInUserStorage: new MockStorage(), fxAccountsClient: new FxAccountsClient(TEST_SERVER), }); } @@ -108,22 +108,23 @@ function runTest() { ok(false, JSON.stringify(setSignedInUserError)); } ); }, signInError => { ok(false, JSON.stringify(signInError)); } ); -} +}; SpecialPowers.pushPrefEnv({"set": [ ["identity.fxaccounts.enabled", true], // fx accounts ["identity.fxaccounts.auth.uri", TEST_SERVER], // our sjs server ["browser.dom.window.dump.enabled", true], ]}, - function() { runTest(); } + function () { runTest(); } ); </script> </pre> </body> </html> +
--- a/services/sync/modules/bookmark_repair.js +++ b/services/sync/modules/bookmark_repair.js @@ -376,17 +376,17 @@ class BookmarkRepairRequestor extends Co break; case STATE.ABORTED: break; // our caller will take the abort action. case STATE.FINISHED: break; - case STATE.NOT_REPAIRING: + case NOT_REPAIRING: // No repair is in progress. This is a common case, so only log trace. log.trace("continue repairs called but no repair in progress."); break; default: log.error(`continue repairs finds itself in an unknown state ${state}`); state = STATE.ABORTED; break; @@ -662,26 +662,28 @@ class BookmarkRepairResponder extends Co if (syncable) { log.debug(`repair request to upload item '${id}' which exists locally; uploading`); toUpload.add(id); } else { // explicitly requested and not syncable, so tombstone. log.debug(`repair request to upload item '${id}' but it isn't under a syncable root; writing a tombstone`); toDelete.add(id); } - // The item wasn't explicitly requested - only upload if it is syncable - // and doesn't exist on the server. - } else if (syncable && !existRemotely.has(id)) { - log.debug(`repair request found related item '${id}' which isn't on the server; uploading`); - toUpload.add(id); - } else if (!syncable && existRemotely.has(id)) { - log.debug(`repair request found non-syncable related item '${id}' on the server; writing a tombstone`); - toDelete.add(id); } else { - log.debug(`repair request found related item '${id}' which we will not upload; ignoring`); + // The item wasn't explicitly requested - only upload if it is syncable + // and doesn't exist on the server. + if (syncable && !existRemotely.has(id)) { + log.debug(`repair request found related item '${id}' which isn't on the server; uploading`); + toUpload.add(id); + } else if (!syncable && existRemotely.has(id)) { + log.debug(`repair request found non-syncable related item '${id}' on the server; writing a tombstone`); + toDelete.add(id); + } else { + log.debug(`repair request found related item '${id}' which we will not upload; ignoring`); + } } } return { toUpload, toDelete }; } onUploaded(subject, data) { if (data != "bookmarks") { return;
--- a/services/sync/modules/bookmark_validator.js +++ b/services/sync/modules/bookmark_validator.js @@ -381,18 +381,16 @@ class BookmarkValidator { * - root: Root of the server-side bookmark tree. Has the same properties as * above. * - deletedRecords: As above, but only contains items that the server sent * where it also sent indication that the item should be deleted. * - problemData: a BookmarkProblemData object, with the caveat that * the fields describing client/server relationship will not have been filled * out yet. */ - // XXX This should be split up and the complexity reduced. - // eslint-disable-next-line complexity async inspectServerRecords(serverRecords) { let deletedItemIds = new Set(); let idToRecord = new Map(); let deletedRecords = []; let folders = []; let problemData = new BookmarkProblemData(); @@ -676,18 +674,16 @@ class BookmarkValidator { * * Returns the same data as described in the inspectServerRecords comment, * with the following additional fields. * - clientRecords: an array of client records in a similar format to * the .records (ie, server records) entry. * - problemData is the same as for inspectServerRecords, except all properties * will be filled out. */ - // XXX This should be split up and the complexity reduced. - // eslint-disable-next-line complexity async compareServerWithClient(serverRecords, clientTree) { let clientRecords = await this.createClientRecordsFromTree(clientTree); let inspectionInfo = await this.inspectServerRecords(serverRecords); inspectionInfo.clientRecords = clientRecords; // Mainly do this to remove deleted items and normalize child guids. serverRecords = inspectionInfo.records;
--- a/services/sync/modules/telemetry.js +++ b/services/sync/modules/telemetry.js @@ -692,10 +692,9 @@ class SyncTelemetryImpl { name: "unexpectederror", // as above, remove the profile dir value. error: String(error).replace(reProfileDir, "[profileDir]") } } } -/* global SyncTelemetry */ this.SyncTelemetry = new SyncTelemetryImpl(ENGINES);
--- a/services/sync/tests/unit/head_helpers.js +++ b/services/sync/tests/unit/head_helpers.js @@ -480,18 +480,16 @@ function promiseNextTick() { // Avoid an issue where `client.name2` containing unicode characters causes // a number of tests to fail, due to them assuming that we do not need to utf-8 // encode or decode data sent through the mocked server (see bug 1268912). Utils.getDefaultDeviceName = function() { return "Test device name"; }; function registerRotaryEngine() { - let {RotaryEngine} = - Cu.import("resource://testing-common/services/sync/rotaryengine.js", {}); Service.engineManager.clear(); Service.engineManager.register(RotaryEngine); let engine = Service.engineManager.get("rotary"); engine.enabled = true; return { engine, tracker: engine._tracker }; }
--- a/services/sync/tests/unit/test_bookmark_repair.js +++ b/services/sync/tests/unit/test_bookmark_repair.js @@ -308,16 +308,19 @@ add_task(async function test_bookmark_re add_task(async function test_repair_client_missing() { enableValidationPrefs(); _("Ensure that a record missing from the client only will get re-downloaded from the server"); let server = serverForFoo(bookmarksEngine); await SyncTestingInfrastructure(server); + let user = server.user("foo"); + + let initialID = Service.clientsEngine.localID; let remoteID = Utils.makeGUID(); try { _("Syncing to initialize crypto etc."); Service.sync(); _("Create remote client record"); server.insertWBO("foo", "clients", new ServerWBO(remoteID, encryptPayload({ @@ -379,16 +382,17 @@ add_task(async function test_repair_serv _("Ensure that a record missing from the server only will get re-upload from the client"); let server = serverForFoo(bookmarksEngine); await SyncTestingInfrastructure(server); let user = server.user("foo"); + let initialID = Service.clientsEngine.localID; let remoteID = Utils.makeGUID(); try { _("Syncing to initialize crypto etc."); Service.sync(); _("Create remote client record"); server.insertWBO("foo", "clients", new ServerWBO(remoteID, encryptPayload({ @@ -441,16 +445,19 @@ add_task(async function test_repair_serv add_task(async function test_repair_server_deleted() { enableValidationPrefs(); _("Ensure that a record marked as deleted on the server but present on the client will get deleted on the client"); let server = serverForFoo(bookmarksEngine); await SyncTestingInfrastructure(server); + let user = server.user("foo"); + + let initialID = Service.clientsEngine.localID; let remoteID = Utils.makeGUID(); try { _("Syncing to initialize crypto etc."); Service.sync(); _("Create remote client record"); server.insertWBO("foo", "clients", new ServerWBO(remoteID, encryptPayload({
--- a/services/sync/tests/unit/test_clients_engine.js +++ b/services/sync/tests/unit/test_clients_engine.js @@ -786,16 +786,17 @@ add_task(async function test_clients_not _("Ensure that clients not in the FxA devices list are marked as stale."); engine._store.wipe(); generateNewKeys(Service.collectionKeys); let server = serverForFoo(engine); await SyncTestingInfrastructure(server); + let user = server.user("foo"); let remoteId = Utils.makeGUID(); let remoteId2 = Utils.makeGUID(); _("Create remote client records"); server.insertWBO("foo", "clients", new ServerWBO(remoteId, encryptPayload({ id: remoteId, name: "Remote client", type: "desktop",
--- a/services/sync/tests/unit/test_errorhandler_filelog.js +++ b/services/sync/tests/unit/test_errorhandler_filelog.js @@ -268,16 +268,17 @@ add_test(function test_login_error_logOn setLastSync(PROLONGED_ERROR_DURATION); Svc.Obs.notify("weave:service:login:error"); }); add_test(function test_noNewFailed_noErrorLog() { Svc.Prefs.set("log.appender.file.logOnError", true); Svc.Prefs.set("log.appender.file.logOnSuccess", false); + let log = Log.repository.getLogger("Sync.Test.FileLog"); Svc.Obs.add("weave:service:reset-file-log", function onResetFileLog() { Svc.Obs.remove("weave:service:reset-file-log", onResetFileLog); // No log file was written. do_check_false(logsdir.directoryEntries.hasMoreElements()); Svc.Prefs.resetBranch(""); run_next_test(); });
--- a/tools/lint/eslint/modules.json +++ b/tools/lint/eslint/modules.json @@ -33,17 +33,17 @@ "CloudSyncBookmarksFolderCache.jsm": ["FolderCache"], "CloudSyncEventSource.jsm": ["EventSource"], "CloudSyncLocal.jsm": ["Local"], "CloudSyncPlacesWrapper.jsm": ["PlacesWrapper"], "CloudSyncTabs.jsm": ["Tabs"], "collection_repair.js": ["getRepairRequestor", "getAllRepairRequestors", "CollectionRepairRequestor", "getRepairResponder", "CollectionRepairResponder"], "collection_validator.js": ["CollectionValidator", "CollectionProblemData"], "Console.jsm": ["console", "ConsoleAPI"], - "constants.js": ["WEAVE_VERSION", "SYNC_API_VERSION", "USER_API_VERSION", "MISC_API_VERSION", "STORAGE_VERSION", "PREFS_BRANCH", "PWDMGR_HOST", "PWDMGR_PASSWORD_REALM", "PWDMGR_PASSPHRASE_REALM", "PWDMGR_KEYBUNDLE_REALM", "DEFAULT_KEYBUNDLE_NAME", "HMAC_INPUT", "SYNC_KEY_ENCODED_LENGTH", "SYNC_KEY_DECODED_LENGTH", "SYNC_KEY_HYPHENATED_LENGTH", "NO_SYNC_NODE_INTERVAL", "MAX_ERROR_COUNT_BEFORE_BACKOFF", "MAX_IGNORE_ERROR_COUNT", "MINIMUM_BACKOFF_INTERVAL", "MAXIMUM_BACKOFF_INTERVAL", "HMAC_EVENT_INTERVAL", "MASTER_PASSWORD_LOCKED_RETRY_INTERVAL", "DEFAULT_BLOCK_PERIOD", "MOBILE_BATCH_SIZE", "DEFAULT_GUID_FETCH_BATCH_SIZE", "DEFAULT_MOBILE_GUID_FETCH_BATCH_SIZE", "DEFAULT_STORE_BATCH_SIZE", "HISTORY_STORE_BATCH_SIZE", "FORMS_STORE_BATCH_SIZE", "PASSWORDS_STORE_BATCH_SIZE", "ADDONS_STORE_BATCH_SIZE", "APPS_STORE_BATCH_SIZE", "DEFAULT_DOWNLOAD_BATCH_SIZE", "DEFAULT_MAX_RECORD_PAYLOAD_BYTES", "SINGLE_USER_THRESHOLD", "MULTI_DEVICE_THRESHOLD", "SCORE_INCREMENT_SMALL", "SCORE_INCREMENT_MEDIUM", "SCORE_INCREMENT_XLARGE", "SCORE_UPDATE_DELAY", "IDLE_OBSERVER_BACK_DELAY", "MAX_UPLOAD_RECORDS", "MAX_UPLOAD_BYTES", "MAX_HISTORY_UPLOAD", "MAX_HISTORY_DOWNLOAD", "NOTIFY_TAB_SENT_TTL_SECS", "STATUS_OK", "SYNC_FAILED", "LOGIN_FAILED", "SYNC_FAILED_PARTIAL", "CLIENT_NOT_CONFIGURED", "STATUS_DISABLED", "MASTER_PASSWORD_LOCKED", "LOGIN_SUCCEEDED", "SYNC_SUCCEEDED", "ENGINE_SUCCEEDED", "LOGIN_FAILED_NO_USERNAME", "LOGIN_FAILED_NO_PASSWORD", "LOGIN_FAILED_NO_PASSPHRASE", "LOGIN_FAILED_NETWORK_ERROR", "LOGIN_FAILED_SERVER_ERROR", "LOGIN_FAILED_INVALID_PASSPHRASE", "LOGIN_FAILED_LOGIN_REJECTED", "METARECORD_DOWNLOAD_FAIL", "VERSION_OUT_OF_DATE", "DESKTOP_VERSION_OUT_OF_DATE", "SETUP_FAILED_NO_PASSPHRASE", "CREDENTIALS_CHANGED", "ABORT_SYNC_COMMAND", "NO_SYNC_NODE_FOUND", "OVER_QUOTA", "PROLONGED_SYNC_FAILURE", "SERVER_MAINTENANCE", "RESPONSE_OVER_QUOTA", "ENGINE_UPLOAD_FAIL", "ENGINE_DOWNLOAD_FAIL", "ENGINE_UNKNOWN_FAIL", "ENGINE_APPLY_FAIL", "ENGINE_METARECORD_DOWNLOAD_FAIL", "ENGINE_METARECORD_UPLOAD_FAIL", "ENGINE_BATCH_INTERRUPTED", "JPAKE_ERROR_CHANNEL", "JPAKE_ERROR_NETWORK", "JPAKE_ERROR_SERVER", "JPAKE_ERROR_TIMEOUT", "JPAKE_ERROR_INTERNAL", "JPAKE_ERROR_INVALID", "JPAKE_ERROR_NODATA", "JPAKE_ERROR_KEYMISMATCH", "JPAKE_ERROR_WRONGMESSAGE", "JPAKE_ERROR_USERABORT", "JPAKE_ERROR_DELAYUNSUPPORTED", "INFO_COLLECTIONS", "INFO_COLLECTION_USAGE", "INFO_COLLECTION_COUNTS", "INFO_QUOTA", "kSyncMasterPasswordLocked", "kSyncWeaveDisabled", "kSyncNetworkOffline", "kSyncBackoffNotMet", "kFirstSyncChoiceNotMade", "FIREFOX_ID", "FENNEC_ID", "SEAMONKEY_ID", "TEST_HARNESS_ID", "MIN_PP_LENGTH", "MIN_PASS_LENGTH", "DEVICE_TYPE_DESKTOP", "DEVICE_TYPE_MOBILE", "SQLITE_MAX_VARIABLE_NUMBER"], + "constants.js": ["WEAVE_VERSION", "SYNC_API_VERSION", "USER_API_VERSION", "MISC_API_VERSION", "STORAGE_VERSION", "PREFS_BRANCH", "PWDMGR_HOST", "PWDMGR_PASSWORD_REALM", "PWDMGR_PASSPHRASE_REALM", "PWDMGR_KEYBUNDLE_REALM", "DEFAULT_KEYBUNDLE_NAME", "HMAC_INPUT", "SYNC_KEY_ENCODED_LENGTH", "SYNC_KEY_DECODED_LENGTH", "SYNC_KEY_HYPHENATED_LENGTH", "NO_SYNC_NODE_INTERVAL", "MAX_ERROR_COUNT_BEFORE_BACKOFF", "MAX_IGNORE_ERROR_COUNT", "MINIMUM_BACKOFF_INTERVAL", "MAXIMUM_BACKOFF_INTERVAL", "HMAC_EVENT_INTERVAL", "MASTER_PASSWORD_LOCKED_RETRY_INTERVAL", "DEFAULT_BLOCK_PERIOD", "MOBILE_BATCH_SIZE", "DEFAULT_GUID_FETCH_BATCH_SIZE", "DEFAULT_MOBILE_GUID_FETCH_BATCH_SIZE", "DEFAULT_STORE_BATCH_SIZE", "HISTORY_STORE_BATCH_SIZE", "FORMS_STORE_BATCH_SIZE", "PASSWORDS_STORE_BATCH_SIZE", "ADDONS_STORE_BATCH_SIZE", "APPS_STORE_BATCH_SIZE", "DEFAULT_DOWNLOAD_BATCH_SIZE", "SINGLE_USER_THRESHOLD", "MULTI_DEVICE_THRESHOLD", "SCORE_INCREMENT_SMALL", "SCORE_INCREMENT_MEDIUM", "SCORE_INCREMENT_XLARGE", "SCORE_UPDATE_DELAY", "IDLE_OBSERVER_BACK_DELAY", "MAX_UPLOAD_RECORDS", "MAX_UPLOAD_BYTES", "MAX_HISTORY_UPLOAD", "MAX_HISTORY_DOWNLOAD", "NOTIFY_TAB_SENT_TTL_SECS", "STATUS_OK", "SYNC_FAILED", "LOGIN_FAILED", "SYNC_FAILED_PARTIAL", "CLIENT_NOT_CONFIGURED", "STATUS_DISABLED", "MASTER_PASSWORD_LOCKED", "LOGIN_SUCCEEDED", "SYNC_SUCCEEDED", "ENGINE_SUCCEEDED", "LOGIN_FAILED_NO_USERNAME", "LOGIN_FAILED_NO_PASSWORD", "LOGIN_FAILED_NO_PASSPHRASE", "LOGIN_FAILED_NETWORK_ERROR", "LOGIN_FAILED_SERVER_ERROR", "LOGIN_FAILED_INVALID_PASSPHRASE", "LOGIN_FAILED_LOGIN_REJECTED", "METARECORD_DOWNLOAD_FAIL", "VERSION_OUT_OF_DATE", "DESKTOP_VERSION_OUT_OF_DATE", "SETUP_FAILED_NO_PASSPHRASE", "CREDENTIALS_CHANGED", "ABORT_SYNC_COMMAND", "NO_SYNC_NODE_FOUND", "OVER_QUOTA", "PROLONGED_SYNC_FAILURE", "SERVER_MAINTENANCE", "RESPONSE_OVER_QUOTA", "ENGINE_UPLOAD_FAIL", "ENGINE_DOWNLOAD_FAIL", "ENGINE_UNKNOWN_FAIL", "ENGINE_APPLY_FAIL", "ENGINE_METARECORD_DOWNLOAD_FAIL", "ENGINE_METARECORD_UPLOAD_FAIL", "ENGINE_BATCH_INTERRUPTED", "JPAKE_ERROR_CHANNEL", "JPAKE_ERROR_NETWORK", "JPAKE_ERROR_SERVER", "JPAKE_ERROR_TIMEOUT", "JPAKE_ERROR_INTERNAL", "JPAKE_ERROR_INVALID", "JPAKE_ERROR_NODATA", "JPAKE_ERROR_KEYMISMATCH", "JPAKE_ERROR_WRONGMESSAGE", "JPAKE_ERROR_USERABORT", "JPAKE_ERROR_DELAYUNSUPPORTED", "INFO_COLLECTIONS", "INFO_COLLECTION_USAGE", "INFO_COLLECTION_COUNTS", "INFO_QUOTA", "kSyncMasterPasswordLocked", "kSyncWeaveDisabled", "kSyncNetworkOffline", "kSyncBackoffNotMet", "kFirstSyncChoiceNotMade", "FIREFOX_ID", "FENNEC_ID", "SEAMONKEY_ID", "TEST_HARNESS_ID", "MIN_PP_LENGTH", "MIN_PASS_LENGTH", "DEVICE_TYPE_DESKTOP", "DEVICE_TYPE_MOBILE", "SQLITE_MAX_VARIABLE_NUMBER"], "Constants.jsm": ["Roles", "Events", "Relations", "Filters", "States", "Prefilters"], "ContactDB.jsm": ["ContactDB", "DB_NAME", "STORE_NAME", "SAVED_GETALL_STORE_NAME", "REVISION_STORE", "DB_VERSION"], "content-server.jsm": ["init"], "content.jsm": ["registerContentFrame"], "ContentCrashHandlers.jsm": ["TabCrashHandler", "PluginCrashReporter", "UnsubmittedCrashHandler"], "ContentObservers.js": [], "ContentPrefUtils.jsm": ["ContentPref", "cbHandleResult", "cbHandleError", "cbHandleCompletion", "safeCallback", "_methodsCallableFromChild"], "controller.js": ["MozMillController", "globalEventRegistry", "sleep", "windowMap"],