diff -Nru firefox-55.0.1+build2/browser/app/blocklist.xml firefox-55.0.2+build1/browser/app/blocklist.xml --- firefox-55.0.1+build2/browser/app/blocklist.xml 2017-08-10 09:51:36.000000000 +0000 +++ firefox-55.0.2+build1/browser/app/blocklist.xml 2017-08-16 14:40:16.000000000 +0000 @@ -1,5 +1,5 @@ - + @@ -941,10 +941,6 @@ - - - - @@ -1753,6 +1749,10 @@ + + + + @@ -1817,6 +1817,10 @@ + + + + @@ -2095,6 +2099,10 @@ + + + + diff -Nru firefox-55.0.1+build2/browser/config/version_display.txt firefox-55.0.2+build1/browser/config/version_display.txt --- firefox-55.0.1+build2/browser/config/version_display.txt 2017-08-10 09:51:36.000000000 +0000 +++ firefox-55.0.2+build1/browser/config/version_display.txt 2017-08-16 14:40:16.000000000 +0000 @@ -1 +1 @@ -55.0.1 +55.0.2 diff -Nru firefox-55.0.1+build2/browser/config/version.txt firefox-55.0.2+build1/browser/config/version.txt --- firefox-55.0.1+build2/browser/config/version.txt 2017-08-10 09:51:36.000000000 +0000 +++ firefox-55.0.2+build1/browser/config/version.txt 2017-08-16 14:40:16.000000000 +0000 @@ -1 +1 @@ -55.0.1 +55.0.2 diff -Nru firefox-55.0.1+build2/config/milestone.txt firefox-55.0.2+build1/config/milestone.txt --- firefox-55.0.1+build2/config/milestone.txt 2017-08-10 09:51:37.000000000 +0000 +++ firefox-55.0.2+build1/config/milestone.txt 2017-08-16 14:40:17.000000000 +0000 @@ -10,4 +10,4 @@ # hardcoded milestones in the tree from these two files. #-------------------------------------------------------- -55.0.1 +55.0.2 diff -Nru firefox-55.0.1+build2/debian/changelog firefox-55.0.2+build1/debian/changelog --- firefox-55.0.1+build2/debian/changelog 2017-08-07 13:08:05.000000000 +0000 +++ firefox-55.0.2+build1/debian/changelog 2017-08-16 15:52:53.000000000 +0000 @@ -1,3 +1,9 @@ +firefox (55.0.2+build1-0ubuntu0.16.04.1) xenial-security; urgency=medium + + * New upstream stable release (55.0.2build1) + + -- Chris Coulson Wed, 16 Aug 2017 16:52:53 +0100 + firefox (55.0.1+build2-0ubuntu0.16.04.2) xenial-security; urgency=medium * New usptream stable release (55.0.1build2) diff -Nru firefox-55.0.1+build2/l10n/changesets firefox-55.0.2+build1/l10n/changesets --- firefox-55.0.1+build2/l10n/changesets 2017-08-10 10:02:19.000000000 +0000 +++ firefox-55.0.2+build1/l10n/changesets 2017-08-16 14:49:57.000000000 +0000 @@ -1,62 +1,62 @@ ach 891:f26087a6a6fd af 1092:eeac1ca62457 an 954:a4f5fb57979d -ar 2529:be091620377b +ar 2530:343322575b20 as 1153:ecbc1fafe3fb -ast 1963:1c103a66413d +ast 1964:91ce2a5d3043 az 998:d3d47516000e -be 2728:1b963f6d8417 -bg 2272:eec5db6c673a -bn-BD 1698:d318bfc6fe59 +be 2729:509bfba6760a +bg 2273:93e8c3a38a44 +bn-BD 1699:c4338cbe4ff0 bn-IN 1414:cd84ee209b9c -br 2032:2be494f41cb3 +br 2033:7a51e5e6ccd6 bs 992:18b79a52d6d3 -ca 3274:975a8feddf73 +ca 3275:53f797899218 cak 740:fe2575be19d0 -cs 5155:34497576b3dc -cy 1857:32cf6d9aa756 -da 2986:554288f1d152 -de 5749:8ff2b923d876 -dsb 1052:84d004a5b7c1 -el 2261:c3c6ff92aac8 -en-GB 2636:073fbc47fb13 +cs 5156:322cbef7695c +cy 1858:fcbadd6cf8e2 +da 2987:478e1b72e5cb +de 5750:fa4ac42ec570 +dsb 1053:621c24b1b28f +el 2262:bb7745ad061b +en-GB 2637:e19e1cff3ccd en-ZA 989:7e04b235c4f3 eo 1787:ebd1765c73f8 -es-AR 3944:c7a19136a76f +es-AR 3945:d8ccb67f39b6 es-CL 1817:a0bb7d0d334e -es-ES 5095:898c8b19898b +es-ES 5096:be226b8180cf es-MX 1801:1f8e97ae724d -et 2468:8c41c2752ba3 -eu 2311:4a7550dc8250 +et 2469:20ae4bc5c2a7 +eu 2312:85d5c37d273d fa 1870:45ef3a098c22 ff 1087:8025b165aead -fi 3066:842df9672246 -fr 8202:c57044348d3e -fy-NL 3543:fec8cfedcdc3 -ga-IE 2550:0bb4311f0d6c -gd 2353:80d83f01c543 -gl 3613:b8c8f7bd3220 +fi 3067:0e395e500c93 +fr 8203:05fd85048523 +fy-NL 3544:9e1725ad05fa +ga-IE 2551:aef8975415a0 +gd 2354:32ab3d31c1d9 +gl 3614:25b9dae8d80b gn 373:fdc6b354f3a4 gu-IN 1671:408c035790bb -he 2279:bbd4d9301a0f +he 2280:791c60afa6f6 hi-IN 1659:8db91f7f5793 -hr 2382:85692e788f85 -hsb 1238:4fac422aa702 -hu 3367:5671194f7ec1 -hy-AM 1914:e86992a0c0ee -id 2478:122c12966b40 -is 2056:70e78feb55c6 -it 8048:9e68b6bce1d2 -ja 3159:591011e15405 -ja-JP-mac 2599:9f89e4e489e5 +hr 2383:a54e94e31dae +hsb 1239:a57446fe31ef +hu 3368:12c2ccd5d5ed +hy-AM 1915:5b866b565d97 +id 2479:13540ea2559a +is 2057:deffba740724 +it 8049:e878f025f0c4 +ja 3160:962734b21b77 +ja-JP-mac 2600:099b636992a5 ka 335:b2f753a8a642 -kab 669:43d30119803d +kab 670:43e6d0b607bc kk 1765:34777b3d0e58 km 1209:3bf31b0b6d9e kn 1556:085cc4cfccad -ko 2718:1ebbc62c4b9f +ko 2719:9ce153ddadf2 lij 1133:217da84c31d3 -lt 3842:a75681318ceb +lt 3843:406ab7fdb18f lv 1859:a2d7fa888232 mai 1242:b78d319868ff mk 901:26b755e4f87b @@ -64,32 +64,32 @@ mr 1640:b84d162a2888 ms 1181:96107ccf5f19 my 680:4a0dc350bdec -nb-NO 3517:d7b76476e97e -nl 6416:eb6618b3166c -nn-NO 2324:55b4657ad2c6 +nb-NO 3518:52202a1158a8 +nl 6417:cbf438398e25 +nn-NO 2325:5833c3363971 or 1237:11e8e75808ae -pa-IN 2401:41ec091d29c4 -pl 10246:d951e89517ea -pt-BR 3476:e64b6f6e6108 -pt-PT 6179:a762c23994b3 -rm 1983:65bc5b45f124 -ro 2800:6538d74548a9 -ru 5012:26bb434e7cca -si 1664:95a129e86704 -sk 4872:0b32ca1321b2 -sl 3328:ad8ee6b5e9eb +pa-IN 2402:b258ebdc4b18 +pl 10247:ad3c588cd2d2 +pt-BR 3477:4adaca58fc23 +pt-PT 6180:d13cded97527 +rm 1984:bc47bf8f2a95 +ro 2801:1a4217445ad0 +ru 5013:f8238289f4fb +si 1665:f23659411285 +sk 4873:fcdcb88e7883 +sl 3329:a548a2661653 son 1336:abb58457c998 -sq 2606:0c99223e8846 -sr 1933:874f8860773c -sv-SE 5595:90180fa4a864 +sq 2607:64e451005f9e +sr 1934:38c49410b1fe +sv-SE 5596:2877fd7cabfa ta 1463:8de385a48ec1 te 1702:311e3844587e th 2305:52f4abb2b927 -tr 3083:2e3b21449529 -uk 4025:c3a164b593f6 +tr 3084:aa6b059fb34a +uk 4026:6cf74d192bba ur 533:a8390b38a5dc uz 912:6a7dac5f89c9 -vi 1339:d931c17a2ff7 +vi 1340:c1e70811920c xh 1154:c2ac7c43e358 -zh-CN 3433:e61f2d1a43f5 -zh-TW 3405:693e61daa229 +zh-CN 3434:91333a73649d +zh-TW 3406:8fbf8246caf4 diff -Nru firefox-55.0.1+build2/l10n/pt-PT/browser/chrome/browser/browser.dtd firefox-55.0.2+build1/l10n/pt-PT/browser/chrome/browser/browser.dtd --- firefox-55.0.1+build2/l10n/pt-PT/browser/chrome/browser/browser.dtd 2017-08-10 09:59:58.000000000 +0000 +++ firefox-55.0.2+build1/l10n/pt-PT/browser/chrome/browser/browser.dtd 2017-08-16 14:47:45.000000000 +0000 @@ -689,7 +689,7 @@ - + diff -Nru firefox-55.0.1+build2/mobile/android/base/android-services.mozbuild firefox-55.0.2+build1/mobile/android/base/android-services.mozbuild --- firefox-55.0.1+build2/mobile/android/base/android-services.mozbuild 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/base/android-services.mozbuild 2017-08-16 14:40:23.000000000 +0000 @@ -864,6 +864,7 @@ 'push/RegisterUserAgentResponse.java', 'push/SubscribeChannelResponse.java', 'sync/AlreadySyncingException.java', + 'sync/BackoffException.java', 'sync/BackoffHandler.java', 'sync/BadRequiredFieldJSONException.java', 'sync/CollectionConcurrentModificationException.java', @@ -880,6 +881,7 @@ 'sync/crypto/NoKeyBundleException.java', 'sync/crypto/PBKDF2.java', 'sync/crypto/PersistedCrypto5Keys.java', + 'sync/CryptoKeysChangedException.java', 'sync/CryptoRecord.java', 'sync/DelayedWorkTracker.java', 'sync/delegates/ClientsDataDelegate.java', @@ -943,6 +945,7 @@ 'sync/NonArrayJSONException.java', 'sync/NonObjectJSONException.java', 'sync/NullClusterURLException.java', + 'sync/OutdatedStorageVersionException.java', 'sync/PersistedMetaGlobal.java', 'sync/PrefsBackoffHandler.java', 'sync/ReflowIsNecessaryException.java', diff -Nru firefox-55.0.1+build2/mobile/android/components/SessionStore.js firefox-55.0.2+build1/mobile/android/components/SessionStore.js --- firefox-55.0.1+build2/mobile/android/components/SessionStore.js 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/components/SessionStore.js 2017-08-16 14:40:22.000000000 +0000 @@ -1078,7 +1078,7 @@ // data will be sent to Java for Android to hold it in memory. for (let i = 0; i < win.tabs.length; ++i) { let tab = win.tabs[i]; - if (tab.type != "BROWSING") { + if (tab.type && tab.type != "BROWSING") { continue; } diff -Nru firefox-55.0.1+build2/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java firefox-55.0.2+build1/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java --- firefox-55.0.1+build2/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/geckoview/src/main/java/org/mozilla/gecko/util/HardwareCodecCapabilityUtils.java 2017-08-16 14:40:23.000000000 +0000 @@ -47,6 +47,7 @@ "GT-I9505", // S4 "GT-I9515", // S4 "SGH-I337", // S4 + "SPH-L720", // S4 (Sprint) "SAMSUNG-SGH-I337" // S4 }; diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/fxa/sync/FxAccountSyncAdapter.java 2017-08-16 14:40:22.000000000 +0000 @@ -33,6 +33,7 @@ import org.mozilla.gecko.fxa.login.State; import org.mozilla.gecko.fxa.login.State.StateLabel; import org.mozilla.gecko.fxa.sync.FxAccountSyncDelegate.Result; +import org.mozilla.gecko.sync.BackoffException; import org.mozilla.gecko.sync.BackoffHandler; import org.mozilla.gecko.sync.GlobalSession; import org.mozilla.gecko.sync.PrefsBackoffHandler; @@ -176,17 +177,7 @@ super.handleError(globalSession, ex, reason); // If an error hasn't been set downstream, record what we know at this point. if (!telemetryCollector.hasError()) { - telemetryCollector.setError(TelemetryCollector.KEY_ERROR_INTERNAL, reason, ex); - } - recordTelemetry(); - } - - @Override - public void handleError(GlobalSession globalSession, Exception ex) { - super.handleError(globalSession, ex); - // If an error hasn't been set downstream, record what we know at this point. - if (!telemetryCollector.hasError()) { - telemetryCollector.setError(TelemetryCollector.KEY_ERROR_INTERNAL, ex); + telemetryCollector.setError(TelemetryCollector.KEY_ERROR_INTERNAL, ex, reason); } recordTelemetry(); } @@ -197,7 +188,7 @@ // Note to future maintainers: while there are reasons, other than 'backoff', this method // might be called, in practice that _is_ the only reason it gets called at the moment of // writing this. If this changes, please do expand this telemetry handling. - this.telemetryCollector.setError(TelemetryCollector.KEY_ERROR_INTERNAL, "backoff"); + this.telemetryCollector.setError(TelemetryCollector.KEY_ERROR_INTERNAL, new BackoffException(), reason); recordTelemetry(); } @@ -293,13 +284,8 @@ @Override public void handleError(GlobalSession globalSession, Exception ex, String reason) { - this.handleError(globalSession, ex); - } - - @Override - public void handleError(GlobalSession globalSession, Exception e) { Logger.warn(LOG_TAG, "Global session failed."); // Exception will be dumped by delegate below. - syncDelegate.handleError(e); + syncDelegate.handleError(ex); // TODO: should we reduce the periodic sync interval? } @@ -428,8 +414,7 @@ callback.getCollector().setIDs(token.hashedFxaUid, clientsDataDelegate.getAccountGUID()); globalSession.start(syncDeadline); } catch (Exception e) { - callback.handleError(globalSession, e); - return; + callback.handleError(globalSession, e, "Unexpected error while starting a sync"); } } @@ -446,22 +431,16 @@ } finally { fxAccount.releaseSharedAccountStateLock(); } - callback.getCollector().setError( - TelemetryCollector.KEY_ERROR_TOKEN, - e.getClass().getSimpleName() - ); - callback.handleError(null, e); + callback.getCollector().setError(TelemetryCollector.KEY_ERROR_TOKEN, e); + callback.handleError(null, e, "Failure processing a token"); } @Override public void handleError(Exception e) { Logger.error(LOG_TAG, "Failed to get token.", e); fxAccount.releaseSharedAccountStateLock(); - callback.getCollector().setError( - TelemetryCollector.KEY_ERROR_TOKEN, - e.getClass().getSimpleName() - ); - callback.handleError(null, e); + callback.getCollector().setError(TelemetryCollector.KEY_ERROR_TOKEN, e); + callback.handleError(null, e, "Error getting a token"); } @Override diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/BackoffException.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/BackoffException.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/BackoffException.java 1970-01-01 00:00:00.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/BackoffException.java 2017-08-16 14:40:21.000000000 +0000 @@ -0,0 +1,9 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.sync; + +public class BackoffException extends SyncException { + private static final long serialVersionUID = 2966836737310897884L; +} diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/CryptoKeysChangedException.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/CryptoKeysChangedException.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/CryptoKeysChangedException.java 1970-01-01 00:00:00.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/CryptoKeysChangedException.java 2017-08-16 14:40:21.000000000 +0000 @@ -0,0 +1,9 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.sync; + +public class CryptoKeysChangedException extends SyncException { + private static final long serialVersionUID = 5729127849933343128L; +} diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/delegates/GlobalSessionCallback.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/delegates/GlobalSessionCallback.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/delegates/GlobalSessionCallback.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/delegates/GlobalSessionCallback.java 2017-08-16 14:40:22.000000000 +0000 @@ -36,7 +36,6 @@ void handleAborted(GlobalSession globalSession, String reason); void handleError(GlobalSession globalSession, Exception ex, String reason); - void handleError(GlobalSession globalSession, Exception ex); void handleSuccess(GlobalSession globalSession); void handleStageCompleted(Stage currentState, GlobalSession globalSession); void handleIncompleteStage(Stage currentState, GlobalSession globalSession); diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/GlobalSession.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/GlobalSession.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/GlobalSession.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/GlobalSession.java 2017-08-16 14:40:22.000000000 +0000 @@ -6,6 +6,8 @@ import android.content.Context; import android.os.SystemClock; +import android.support.annotation.NonNull; +import android.support.annotation.Nullable; import android.support.annotation.VisibleForTesting; import org.json.simple.JSONArray; @@ -277,7 +279,7 @@ // If we have a backoff, request a backoff and don't advance to next stage. long existingBackoff = largestBackoffObserved.get(); if (existingBackoff > 0) { - this.abort(null, "Aborting sync because of backoff of " + existingBackoff + " milliseconds."); + this.abort(new BackoffException(), "Aborting sync because of backoff of " + existingBackoff + " milliseconds."); return; } @@ -512,7 +514,6 @@ }; } - public void abort(Exception e, String reason) { Logger.warn(LOG_TAG, "Aborting sync: " + reason, e); cleanUp(); @@ -1137,7 +1138,7 @@ public void requiresUpgrade() { Logger.info(LOG_TAG, "Client outdated storage version; requires update."); // TODO: notify UI. - this.abort(null, "Requires upgrade from " + STORAGE_VERSION); + this.abort(new OutdatedStorageVersionException(), "Requires upgrade from " + STORAGE_VERSION); } /** diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/OutdatedStorageVersionException.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/OutdatedStorageVersionException.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/OutdatedStorageVersionException.java 1970-01-01 00:00:00.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/OutdatedStorageVersionException.java 2017-08-16 14:40:22.000000000 +0000 @@ -0,0 +1,9 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +package org.mozilla.gecko.sync; + +/* package-private */ class OutdatedStorageVersionException extends SyncException { + private static final long serialVersionUID = 1703691318986965545L; +} diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/EnsureCrypto5KeysStage.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/EnsureCrypto5KeysStage.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/EnsureCrypto5KeysStage.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/EnsureCrypto5KeysStage.java 2017-08-16 14:40:21.000000000 +0000 @@ -12,6 +12,7 @@ import org.mozilla.gecko.background.common.log.Logger; import org.mozilla.gecko.sync.CollectionKeys; +import org.mozilla.gecko.sync.CryptoKeysChangedException; import org.mozilla.gecko.sync.CryptoRecord; import org.mozilla.gecko.sync.ExtendedJSONObject; import org.mozilla.gecko.sync.HTTPFailureException; @@ -50,7 +51,7 @@ telemetryStageCollector.error = new TelemetryCollector .StageErrorBuilder(TELEMETRY_ERROR_NAME, TELEMETRY_ERROR_NO_COLLECTIONS) .build(); - session.abort(null, "No info/collections set in EnsureCrypto5KeysStage."); + session.abort(new IllegalStateException(), "No info/collections set in EnsureCrypto5KeysStage."); return; } @@ -185,7 +186,7 @@ telemetryStageCollector.error = new TelemetryCollector .StageErrorBuilder(TELEMETRY_ERROR_NAME, TELEMETRY_ERROR_KEYS_CHANGED) .build(); - session.abort(null, "crypto/keys changed on server."); + session.abort(new CryptoKeysChangedException(), "crypto/keys changed on server."); return; } diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/FetchMetaGlobalStage.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/FetchMetaGlobalStage.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/FetchMetaGlobalStage.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/stage/FetchMetaGlobalStage.java 2017-08-16 14:40:23.000000000 +0000 @@ -79,7 +79,7 @@ telemetryStageCollector.error = new TelemetryCollector .StageErrorBuilder(TELEMETRY_ERROR_NAME, TELEMETRY_ERROR_NO_INFO_COLLECTIONS) .build(); - session.abort(null, "No info/collections set in FetchMetaGlobalStage."); + session.abort(new IllegalStateException(), "No info/collections set in FetchMetaGlobalStage."); return; } diff -Nru firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/telemetry/TelemetryCollector.java firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/telemetry/TelemetryCollector.java --- firefox-55.0.1+build2/mobile/android/services/src/main/java/org/mozilla/gecko/sync/telemetry/TelemetryCollector.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/services/src/main/java/org/mozilla/gecko/sync/telemetry/TelemetryCollector.java 2017-08-16 14:40:22.000000000 +0000 @@ -82,20 +82,17 @@ } public void setError(@NonNull String name, @NonNull Exception e) { - setError(name, e.getClass().getSimpleName()); + setError(name, e, null); } - public void setError(@NonNull String name, @NonNull String details) { - setError(name, details, null); - } - - public void setError(@NonNull String name, @NonNull String details, @Nullable Exception e) { + public void setError(@NonNull String name, @NonNull Exception e, @Nullable String details) { final ExtendedJSONObject error = new ExtendedJSONObject(); error.put("name", name); - if (e != null) { - error.put("error", e.getClass().getSimpleName() + ":" + details); + final String exceptionName = e.getClass().getSimpleName(); + if (details != null) { + error.put("error", exceptionName + ":" + details); } else { - error.put("error", details); + error.put("error", exceptionName); } this.error = error; } diff -Nru firefox-55.0.1+build2/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/sync/TestResetting.java firefox-55.0.2+build1/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/sync/TestResetting.java --- firefox-55.0.1+build2/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/sync/TestResetting.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/sync/TestResetting.java 2017-08-16 14:40:23.000000000 +0000 @@ -182,7 +182,7 @@ } @Override - public void handleError(GlobalSession globalSession, Exception ex) { + public void handleError(GlobalSession globalSession, Exception ex, String reason) { performNotify(ex); } }; diff -Nru firefox-55.0.1+build2/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java firefox-55.0.2+build1/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java --- firefox-55.0.1+build2/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/tests/background/junit3/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java 2017-08-16 14:40:23.000000000 +0000 @@ -44,10 +44,6 @@ } @Override - public void handleError(GlobalSession globalSession, Exception ex) { - } - - @Override public void handleError(GlobalSession globalSession, Exception ex, String reason) { } diff -Nru firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/helpers/MockGlobalSessionCallback.java firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/helpers/MockGlobalSessionCallback.java --- firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/helpers/MockGlobalSessionCallback.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/helpers/MockGlobalSessionCallback.java 2017-08-16 14:40:22.000000000 +0000 @@ -54,11 +54,6 @@ @Override public void handleError(GlobalSession globalSession, Exception ex, String reason) { - this.handleError(globalSession, ex); - } - - @Override - public void handleError(GlobalSession globalSession, Exception ex) { this.calledError = true; this.calledErrorException = ex; this.testWaiter().performNotify(); diff -Nru firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestResetCommands.java firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestResetCommands.java --- firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestResetCommands.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/android/sync/test/TestResetCommands.java 2017-08-16 14:40:22.000000000 +0000 @@ -141,7 +141,7 @@ } @Override - public void handleError(GlobalSession globalSession, Exception ex) { + public void handleError(GlobalSession globalSession, Exception ex, String reason) { performNotify(ex); } diff -Nru firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java --- firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/gecko/background/testhelpers/DefaultGlobalSessionCallback.java 2017-08-16 14:40:23.000000000 +0000 @@ -36,10 +36,6 @@ } @Override - public void handleError(GlobalSession globalSession, Exception ex) { - } - - @Override public void handleSuccess(GlobalSession globalSession) { } diff -Nru firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/gecko/sync/telemetry/TelemetryCollectorTest.java firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/gecko/sync/telemetry/TelemetryCollectorTest.java --- firefox-55.0.1+build2/mobile/android/tests/background/junit4/src/org/mozilla/gecko/sync/telemetry/TelemetryCollectorTest.java 2017-08-10 09:51:41.000000000 +0000 +++ firefox-55.0.2+build1/mobile/android/tests/background/junit4/src/org/mozilla/gecko/sync/telemetry/TelemetryCollectorTest.java 2017-08-16 14:40:21.000000000 +0000 @@ -142,38 +142,21 @@ assertFalse(data.containsKey("error")); // Test various ways to set an error. - // Just details. - collector.setError("testError", "unexpectedStuff"); - data = collector.build(); - assertTrue(data.containsKey("error")); - JSONObject errorJson = (JSONObject) data.getSerializable("error"); - assertEquals("testError", errorJson.get("name")); - assertEquals("unexpectedStuff", errorJson.get("error")); - assertTrue(collector.hasError()); - // Just exception. collector.setError("exceptionTest", new IllegalArgumentException()); data = collector.build(); assertTrue(data.containsKey("error")); - errorJson = (JSONObject) data.getSerializable("error"); + JSONObject errorJson = (JSONObject) data.getSerializable("error"); assertEquals("exceptionTest", errorJson.get("name")); assertEquals("IllegalArgumentException", errorJson.get("error")); // Details and exception. - collector.setError("anotherTest", "Error details", new ConcurrentModificationException()); + collector.setError("anotherTest", new ConcurrentModificationException(), "Error details"); data = collector.build(); assertTrue(data.containsKey("error")); errorJson = (JSONObject) data.getSerializable("error"); assertEquals("anotherTest", errorJson.get("name")); assertEquals("ConcurrentModificationException:Error details", errorJson.get("error")); - - // Details and explicit null exception. - collector.setError("noExceptionTest", "Error details", null); - data = collector.build(); - assertTrue(data.containsKey("error")); - errorJson = (JSONObject) data.getSerializable("error"); - assertEquals("noExceptionTest", errorJson.get("name")); - assertEquals("Error details", errorJson.get("error")); } @Test diff -Nru firefox-55.0.1+build2/SOURCE_CHANGESET firefox-55.0.2+build1/SOURCE_CHANGESET --- firefox-55.0.1+build2/SOURCE_CHANGESET 2017-08-10 09:51:46.000000000 +0000 +++ firefox-55.0.2+build1/SOURCE_CHANGESET 2017-08-16 14:40:27.000000000 +0000 @@ -1 +1 @@ -cace0357d40e875ea45b9ccad99f8785fc2cdb50 \ No newline at end of file +45ab6e362747102d00fd75378727fcddcfd35f44 \ No newline at end of file diff -Nru firefox-55.0.1+build2/storage/mozStorageConnection.cpp firefox-55.0.2+build1/storage/mozStorageConnection.cpp --- firefox-55.0.1+build2/storage/mozStorageConnection.cpp 2017-08-10 09:51:42.000000000 +0000 +++ firefox-55.0.2+build1/storage/mozStorageConnection.cpp 2017-08-16 14:40:22.000000000 +0000 @@ -1399,8 +1399,15 @@ nsCString path; rv = stmt->GetUTF8String(2, path); if (NS_SUCCEEDED(rv) && !path.IsEmpty()) { - rv = aClone->ExecuteSimpleSQL(NS_LITERAL_CSTRING("ATTACH DATABASE '") + - path + NS_LITERAL_CSTRING("' AS ") + name); + nsCOMPtr attachStmt; + rv = aClone->CreateStatement( + NS_LITERAL_CSTRING("ATTACH DATABASE :path AS ") + name, + getter_AddRefs(attachStmt)); + MOZ_ASSERT(NS_SUCCEEDED(rv)); + rv = attachStmt->BindUTF8StringByName(NS_LITERAL_CSTRING("path"), + path); + MOZ_ASSERT(NS_SUCCEEDED(rv)); + rv = attachStmt->Execute(); MOZ_ASSERT(NS_SUCCEEDED(rv), "couldn't re-attach database to cloned connection"); } } @@ -1408,6 +1415,9 @@ } // Copy over pragmas from the original connection. + // LIMITATION WARNING! Many of these pragmas are actually scoped to the + // schema ("main" and any other attached databases), and this implmentation + // fails to propagate them. This is being addressed on trunk. static const char * pragmas[] = { "cache_size", "temp_store", diff -Nru firefox-55.0.1+build2/toolkit/components/extensions/ExtensionContent.jsm firefox-55.0.2+build1/toolkit/components/extensions/ExtensionContent.jsm --- firefox-55.0.1+build2/toolkit/components/extensions/ExtensionContent.jsm 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/components/extensions/ExtensionContent.jsm 2017-08-16 14:40:24.000000000 +0000 @@ -526,7 +526,7 @@ initialized: false, lazyInit() { - if (this.initalized) { + if (this.initialized) { return; } this.initialized = true; diff -Nru firefox-55.0.1+build2/toolkit/components/extensions/ExtensionUtils.jsm firefox-55.0.2+build1/toolkit/components/extensions/ExtensionUtils.jsm --- firefox-55.0.1+build2/toolkit/components/extensions/ExtensionUtils.jsm 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/components/extensions/ExtensionUtils.jsm 2017-08-16 14:40:24.000000000 +0000 @@ -245,24 +245,37 @@ /** * A set with a limited number of slots, which flushes older entries as * newer ones are added. + * + * @param {integer} limit + * The maximum size to trim the set to after it grows too large. + * @param {integer} [slop = limit * .25] + * The number of extra entries to allow in the set after it + * reaches the size limit, before it is truncated to the limit. + * @param {iterable} [iterable] + * An iterable of initial entries to add to the set. */ class LimitedSet extends Set { - constructor(limit, iterable = undefined) { + constructor(limit, slop = Math.round(limit * .25), iterable = undefined) { super(iterable); this.limit = limit; + this.slop = slop; } truncate(limit) { for (let item of this) { - if (this.size <= limit) { - break; + // Live set iterators can ge relatively expensive, since they need + // to be updated after every modification to the set. Since + // breaking out of the loop early will keep the iterator alive + // until the next full GC, we're currently better off finishing + // the entire loop even after we're done truncating. + if (this.size > limit) { + this.delete(item); } - this.delete(item); } } add(item) { - if (!this.has(item) && this.size >= this.limit) { + if (!this.has(item) && this.size >= this.limit + this.slop) { this.truncate(this.limit - 1); } super.add(item); diff -Nru firefox-55.0.1+build2/toolkit/components/extensions/MessageChannel.jsm firefox-55.0.2+build1/toolkit/components/extensions/MessageChannel.jsm --- firefox-55.0.1+build2/toolkit/components/extensions/MessageChannel.jsm 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/components/extensions/MessageChannel.jsm 2017-08-16 14:40:25.000000000 +0000 @@ -780,6 +780,7 @@ abortResponses(sender, reason = this.REASON_DISCONNECTED) { for (let response of this.pendingResponses) { if (this.matchesFilter(sender, response.sender)) { + this.pendingResponses.delete(response); this.abortedResponses.add(response.channelId); response.reject(reason); } diff -Nru firefox-55.0.1+build2/toolkit/components/places/Database.cpp firefox-55.0.2+build1/toolkit/components/places/Database.cpp --- firefox-55.0.1+build2/toolkit/components/places/Database.cpp 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/components/places/Database.cpp 2017-08-16 14:40:25.000000000 +0000 @@ -379,8 +379,14 @@ AttachDatabase(nsCOMPtr& aDBConn, const nsACString& aPath, const nsACString& aName) { - nsresult rv = aDBConn->ExecuteSimpleSQL( - NS_LITERAL_CSTRING("ATTACH DATABASE '") + aPath + NS_LITERAL_CSTRING("' AS ") + aName); + nsCOMPtr stmt; + nsresult rv = aDBConn->CreateStatement( + NS_LITERAL_CSTRING("ATTACH DATABASE :path AS ") + aName, + getter_AddRefs(stmt)); + NS_ENSURE_SUCCESS(rv, rv); + rv = stmt->BindUTF8StringByName(NS_LITERAL_CSTRING("path"), aPath); + NS_ENSURE_SUCCESS(rv, rv); + rv = stmt->Execute(); NS_ENSURE_SUCCESS(rv, rv); // The journal limit must be set apart for each database. diff -Nru firefox-55.0.1+build2/toolkit/modules/SelectParentHelper.jsm firefox-55.0.2+build1/toolkit/modules/SelectParentHelper.jsm --- firefox-55.0.1+build2/toolkit/modules/SelectParentHelper.jsm 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/modules/SelectParentHelper.jsm 2017-08-16 14:40:25.000000000 +0000 @@ -32,7 +32,7 @@ selectTextShadow) { // Clear the current contents of the popup menulist.menupopup.textContent = ""; - let stylesheet = menulist.querySelector("#ContentSelectDropdownScopedStylesheet"); + let stylesheet = menulist.querySelector("#ContentSelectDropdownStylesheet"); if (stylesheet) { stylesheet.remove(); } @@ -41,8 +41,7 @@ let sheet; if (customStylingEnabled) { stylesheet = doc.createElementNS("http://www.w3.org/1999/xhtml", "style"); - stylesheet.setAttribute("id", "ContentSelectDropdownScopedStylesheet"); - stylesheet.scoped = true; + stylesheet.setAttribute("id", "ContentSelectDropdownStylesheet"); stylesheet.hidden = true; stylesheet = menulist.appendChild(stylesheet); sheet = stylesheet.sheet; @@ -75,7 +74,7 @@ } if (ruleBody) { - sheet.insertRule(`menupopup { + sheet.insertRule(`#ContentSelectDropdown > menupopup { ${ruleBody} }`, 0); menulist.menupopup.setAttribute("customoptionstyling", "true"); @@ -297,7 +296,7 @@ } if (ruleBody) { - sheet.insertRule(`menupopup > :nth-child(${nthChildIndex}):not([_moz-menuactive="true"]) { + sheet.insertRule(`#ContentSelectDropdown > menupopup > :nth-child(${nthChildIndex}):not([_moz-menuactive="true"]) { ${ruleBody} }`, 0); @@ -305,7 +304,7 @@ // Need to explicitly disable the possibly inherited // text-shadow rule when _moz-menuactive=true since // _moz-menuactive=true disables custom option styling. - sheet.insertRule(`menupopup > :nth-child(${nthChildIndex})[_moz-menuactive="true"] { + sheet.insertRule(`#ContentSelectDropdown > menupopup > :nth-child(${nthChildIndex})[_moz-menuactive="true"] { text-shadow: none; }`, 0); } diff -Nru firefox-55.0.1+build2/toolkit/mozapps/extensions/internal/XPIProviderUtils.js firefox-55.0.2+build1/toolkit/mozapps/extensions/internal/XPIProviderUtils.js --- firefox-55.0.1+build2/toolkit/mozapps/extensions/internal/XPIProviderUtils.js 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/mozapps/extensions/internal/XPIProviderUtils.js 2017-08-16 14:40:25.000000000 +0000 @@ -60,7 +60,6 @@ const PREF_E10S_MULTI_BLOCKED_BY_ADDONS = "extensions.e10sMultiBlockedByAddons"; const PREF_E10S_HAS_NONEXEMPT_ADDON = "extensions.e10s.rollout.hasAddon"; -const KEY_APP_PROFILE = "app-profile"; const KEY_APP_SYSTEM_ADDONS = "app-system-addons"; const KEY_APP_SYSTEM_DEFAULTS = "app-system-defaults"; const KEY_APP_GLOBAL = "app-global"; @@ -1275,11 +1274,7 @@ logger.warn("Disabling foreign installed add-on " + aNewAddon.id + " in " + aInstallLocation.name); aNewAddon.userDisabled = true; - - // If we don't have an old app version then this is a new profile in - // which case just mark any sideloaded add-ons as already seen. - aNewAddon.seen = (aInstallLocation.name != KEY_APP_PROFILE && - !aOldAppVersion); + aNewAddon.seen = false; } } diff -Nru firefox-55.0.1+build2/toolkit/mozapps/extensions/test/xpcshell/test_seen.js firefox-55.0.2+build1/toolkit/mozapps/extensions/test/xpcshell/test_seen.js --- firefox-55.0.1+build2/toolkit/mozapps/extensions/test/xpcshell/test_seen.js 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/mozapps/extensions/test/xpcshell/test_seen.js 2017-08-16 14:40:25.000000000 +0000 @@ -7,14 +7,17 @@ let profileDir = gProfD.clone(); profileDir.append("extensions"); -createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); -startupManager(); +// By default disable add-ons from the profile and the system-wide scope +const SCOPES = AddonManager.SCOPE_PROFILE | AddonManager.SCOPE_SYSTEM; +Services.prefs.setIntPref("extensions.enabledScopes", SCOPES); +Services.prefs.setIntPref("extensions.autoDisableScopes", SCOPES); -// By default disable add-ons from the profile -Services.prefs.setIntPref("extensions.autoDisableScopes", AddonManager.SCOPE_PROFILE); +createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); // Installing an add-on through the API should mark it as seen add_task(async function() { + await promiseStartupManager(); + let install = await promiseInstallFile(do_get_addon("test_bootstrap1_1")); do_check_eq(install.state, AddonManager.STATE_INSTALLED); do_check_false(hasFlag(install.addon.pendingOperations, AddonManager.PENDING_INSTALL)); @@ -47,16 +50,58 @@ do_check_true(addon.seen); addon.uninstall(); + await promiseShutdownManager(); }); -// Sideloading an add-on should mark it as unseen +// Sideloading an add-on in the systemwide location should mark it as unseen +add_task(async function() { + let savedStartupScanScopes = Services.prefs.getIntPref("extensions.startupScanScopes"); + Services.prefs.setIntPref("extensions.startupScanScopes", 0); + + let systemParentDir = gTmpD.clone(); + systemParentDir.append("systemwide-extensions"); + registerDirectory("XRESysSExtPD", systemParentDir.clone()); + do_register_cleanup(() => { + systemParentDir.remove(true); + }); + + let systemDir = systemParentDir.clone(); + systemDir.append(Services.appinfo.ID); + + let path = manuallyInstall(do_get_addon("test_bootstrap1_1"), systemDir, ID); + // Make sure the startup code will detect sideloaded updates + setExtensionModifiedTime(path, Date.now() - 10000); + + await promiseStartupManager(); + await AddonManagerPrivate.getNewSideloads(); + + let addon = await promiseAddonByID(ID); + do_check_eq(addon.version, "1.0"); + do_check_true(addon.foreignInstall); + do_check_false(addon.seen); + + await promiseRestartManager(); + + addon = await promiseAddonByID(ID); + do_check_true(addon.foreignInstall); + do_check_false(addon.seen); + + await promiseShutdownManager(); + Services.obs.notifyObservers(path, "flush-cache-entry"); + path.remove(true); + + Services.prefs.setIntPref("extensions.startupScanScopes", savedStartupScanScopes); +}); + +// Sideloading an add-on in the profile should mark it as unseen and it should +// remain unseen after an update is sideloaded. add_task(async function() { let path = manuallyInstall(do_get_addon("test_bootstrap1_1"), profileDir, ID); // Make sure the startup code will detect sideloaded updates setExtensionModifiedTime(path, Date.now() - 10000); - startupManager(); + await promiseStartupManager(); let addon = await promiseAddonByID(ID); do_check_eq(addon.version, "1.0"); @@ -76,7 +121,7 @@ manuallyInstall(do_get_addon("test_bootstrap1_2"), profileDir, ID); setExtensionModifiedTime(path, Date.now()); - startupManager(); + await promiseStartupManager(); addon = await promiseAddonByID(ID); do_check_eq(addon.version, "2.0"); @@ -87,13 +132,14 @@ await promiseShutdownManager(); }); -// Sideloading an add-on should mark it as unseen +// Sideloading an add-on in the profile should mark it as unseen and it should +// remain unseen after a regular update. add_task(async function() { let path = manuallyInstall(do_get_addon("test_bootstrap1_1"), profileDir, ID); // Make sure the startup code will detect sideloaded updates setExtensionModifiedTime(path, Date.now() - 10000); - startupManager(); + await promiseStartupManager(); let addon = await promiseAddonByID(ID); do_check_eq(addon.version, "1.0"); @@ -126,13 +172,14 @@ await promiseShutdownManager(); }); -// Sideloading an add-on should mark it as unseen +// After a sideloaded addon has been seen, sideloading an update should +// not reset it to unseen. add_task(async function() { let path = manuallyInstall(do_get_addon("test_bootstrap1_1"), profileDir, ID); // Make sure the startup code will detect sideloaded updates setExtensionModifiedTime(path, Date.now() - 10000); - startupManager(); + await promiseStartupManager(); let addon = await promiseAddonByID(ID); do_check_eq(addon.version, "1.0"); @@ -154,7 +201,7 @@ manuallyInstall(do_get_addon("test_bootstrap1_2"), profileDir, ID); setExtensionModifiedTime(path, Date.now()); - startupManager(); + await promiseStartupManager(); addon = await promiseAddonByID(ID); do_check_eq(addon.version, "2.0"); @@ -165,13 +212,14 @@ await promiseShutdownManager(); }); -// Sideloading an add-on should mark it as unseen +// After a sideloaded addon has been seen, manually applying an update should +// not reset it to unseen. add_task(async function() { let path = manuallyInstall(do_get_addon("test_bootstrap1_1"), profileDir, ID); // Make sure the startup code will detect sideloaded updates setExtensionModifiedTime(path, Date.now() - 10000); - startupManager(); + await promiseStartupManager(); let addon = await promiseAddonByID(ID); do_check_eq(addon.version, "1.0"); diff -Nru firefox-55.0.1+build2/toolkit/mozapps/extensions/test/xpcshell/test_seen_newprofile.js firefox-55.0.2+build1/toolkit/mozapps/extensions/test/xpcshell/test_seen_newprofile.js --- firefox-55.0.1+build2/toolkit/mozapps/extensions/test/xpcshell/test_seen_newprofile.js 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/mozapps/extensions/test/xpcshell/test_seen_newprofile.js 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - * http://creativecommons.org/publicdomain/zero/1.0/ - */ - -const ID = "bootstrap1@tests.mozilla.org"; - -Services.prefs.setIntPref("extensions.enabledScopes", - AddonManager.SCOPE_PROFILE + AddonManager.SCOPE_SYSTEM); - -createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); - -BootstrapMonitor.init(); - -const globalDir = gProfD.clone(); -globalDir.append("extensions2"); -globalDir.append(gAppInfo.ID); -registerDirectory("XRESysSExtPD", globalDir.parent); -const profileDir = gProfD.clone(); -profileDir.append("extensions"); - -// By default disable add-ons from the system -Services.prefs.setIntPref("extensions.autoDisableScopes", AddonManager.SCOPE_SYSTEM); - -// When new add-ons already exist in a system location when starting with a new -// profile they should be marked as already seen. -add_task(async function() { - manuallyInstall(do_get_addon("test_bootstrap1_1"), globalDir, ID); - - startupManager(); - - let addon = await promiseAddonByID(ID); - do_check_true(addon.foreignInstall); - do_check_true(addon.seen); - do_check_true(addon.userDisabled); - do_check_false(addon.isActive); - - BootstrapMonitor.checkAddonInstalled(ID); - BootstrapMonitor.checkAddonNotStarted(ID); - - await promiseShutdownManager(); -}); diff -Nru firefox-55.0.1+build2/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini firefox-55.0.2+build1/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini --- firefox-55.0.1+build2/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini 2017-08-10 09:51:44.000000000 +0000 +++ firefox-55.0.2+build1/toolkit/mozapps/extensions/test/xpcshell/xpcshell-shared.ini 2017-08-16 14:40:25.000000000 +0000 @@ -311,7 +311,6 @@ [test_json_updatecheck.js] [test_migrate_state_prefs.js] [test_seen.js] -[test_seen_newprofile.js] [test_updateid.js] # Bug 676992: test consistently hangs on Android skip-if = os == "android"