diff options
Diffstat (limited to 'toolkit/components')
-rw-r--r-- | toolkit/components/alerts/resources/content/alert.css | 1 | ||||
-rw-r--r-- | toolkit/components/alerts/resources/content/alert.js | 10 | ||||
-rw-r--r-- | toolkit/components/moz.build | 3 | ||||
-rw-r--r-- | toolkit/components/passwordmgr/content/passwordManager.js | 2 | ||||
-rw-r--r-- | toolkit/components/passwordmgr/content/passwordManager.xul | 2 | ||||
-rw-r--r-- | toolkit/components/passwordmgr/jar.mn | 2 | ||||
-rw-r--r-- | toolkit/components/passwordmgr/nsLoginManagerPrompter.js | 29 | ||||
-rw-r--r-- | toolkit/components/places/tests/cpp/places_test_harness_tail.h | 29 | ||||
-rw-r--r-- | toolkit/components/protobuf/moz.build | 5 | ||||
-rw-r--r-- | toolkit/components/telemetry/TelemetryEnvironment.jsm | 30 | ||||
-rw-r--r-- | toolkit/components/terminator/nsTerminator.cpp | 11 |
11 files changed, 46 insertions, 78 deletions
diff --git a/toolkit/components/alerts/resources/content/alert.css b/toolkit/components/alerts/resources/content/alert.css index c4d94a543..81e5cdd35 100644 --- a/toolkit/components/alerts/resources/content/alert.css +++ b/toolkit/components/alerts/resources/content/alert.css @@ -3,7 +3,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #alertBox[animate] { - animation-duration: 20s; animation-fill-mode: both; animation-name: alert-animation; } diff --git a/toolkit/components/alerts/resources/content/alert.js b/toolkit/components/alerts/resources/content/alert.js index ead4d503f..ce60ab0fa 100644 --- a/toolkit/components/alerts/resources/content/alert.js +++ b/toolkit/components/alerts/resources/content/alert.js @@ -166,7 +166,12 @@ function prefillAlertInfo() { } function onAlertLoad() { - const ALERT_DURATION_IMMEDIATE = 20000; + const ALERT_DURATION_IMMEDIATE_MIN = 4000; + const ALERT_DURATION_IMMEDIATE_MAX = 60000; + let alertDurationImmediate = Services.prefs.getIntPref("alerts.durationImmediate", ALERT_DURATION_IMMEDIATE_MIN); + alertDurationImmediate = alertDurationImmediate >= ALERT_DURATION_IMMEDIATE_MIN + && alertDurationImmediate <= ALERT_DURATION_IMMEDIATE_MAX + ? alertDurationImmediate : ALERT_DURATION_IMMEDIATE_MIN; let alertTextBox = document.getElementById("alertTextBox"); let alertImageBox = document.getElementById("alertImageBox"); alertImageBox.style.minHeight = alertTextBox.scrollHeight + "px"; @@ -186,7 +191,7 @@ function onAlertLoad() { // If the require interaction flag is set, prevent auto-closing the notification. if (!gRequireInteraction) { if (Services.prefs.getBoolPref("alerts.disableSlidingEffect")) { - setTimeout(function() { window.close(); }, ALERT_DURATION_IMMEDIATE); + setTimeout(function() { window.close(); }, alertDurationImmediate); } else { let alertBox = document.getElementById("alertBox"); alertBox.addEventListener("animationend", function hideAlert(event) { @@ -197,6 +202,7 @@ function onAlertLoad() { window.close(); } }, false); + alertBox.style.animationDuration = Math.round(alertDurationImmediate / 1000).toString() + "s"; alertBox.setAttribute("animate", true); } } diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build index 12e1748e9..5dba09a32 100644 --- a/toolkit/components/moz.build +++ b/toolkit/components/moz.build @@ -79,9 +79,6 @@ if not CONFIG['MOZ_FENNEC']: if CONFIG['NS_PRINTING']: DIRS += ['printing'] -if CONFIG['MOZ_CRASHREPORTER']: - DIRS += ['crashes'] - if CONFIG['BUILD_CTYPES']: DIRS += ['ctypes'] diff --git a/toolkit/components/passwordmgr/content/passwordManager.js b/toolkit/components/passwordmgr/content/passwordManager.js index 333dc1d24..3fccb5d30 100644 --- a/toolkit/components/passwordmgr/content/passwordManager.js +++ b/toolkit/components/passwordmgr/content/passwordManager.js @@ -721,8 +721,10 @@ function escapeKeyHandler() { window.close(); } +#if defined(MC_BASILISK) && defined(XP_WIN) function OpenMigrator() { const { MigrationUtils } = Cu.import("resource:///modules/MigrationUtils.jsm", {}); // We pass in the type of source we're using for use in telemetry: MigrationUtils.showMigrationWizard(window, [MigrationUtils.MIGRATION_ENTRYPOINT_PASSWORDS]); } +#endif diff --git a/toolkit/components/passwordmgr/content/passwordManager.xul b/toolkit/components/passwordmgr/content/passwordManager.xul index d248283b6..78dbd7ebc 100644 --- a/toolkit/components/passwordmgr/content/passwordManager.xul +++ b/toolkit/components/passwordmgr/content/passwordManager.xul @@ -113,7 +113,7 @@ label="&removeall.label;" accesskey="&removeall.accesskey;" oncommand="DeleteAllSignons();"/> <spacer flex="1"/> -#if defined(MOZ_BUILD_APP_IS_BROWSER) && defined(XP_WIN) +#if defined(MC_BASILISK) && defined(XP_WIN) <button accesskey="&import.accesskey;" label="&import.label;" oncommand="OpenMigrator();"/> diff --git a/toolkit/components/passwordmgr/jar.mn b/toolkit/components/passwordmgr/jar.mn index 9fa574e49..db6d7ffef 100644 --- a/toolkit/components/passwordmgr/jar.mn +++ b/toolkit/components/passwordmgr/jar.mn @@ -5,5 +5,5 @@ toolkit.jar: % content passwordmgr %content/passwordmgr/ * content/passwordmgr/passwordManager.xul (content/passwordManager.xul) - content/passwordmgr/passwordManager.js (content/passwordManager.js) +* content/passwordmgr/passwordManager.js (content/passwordManager.js) content/passwordmgr/recipes.json (content/recipes.json) diff --git a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js index b66489234..720e80446 100644 --- a/toolkit/components/passwordmgr/nsLoginManagerPrompter.js +++ b/toolkit/components/passwordmgr/nsLoginManagerPrompter.js @@ -808,6 +808,9 @@ LoginManagerPrompter.prototype = { */ _showLoginCaptureDoorhanger(login, type) { let { browser } = this._getNotifyWindow(); + if (!browser) { + return; + } let saveMsgNames = { prompt: login.username === "" ? "rememberLoginMsgNoUser" @@ -1405,10 +1408,34 @@ LoginManagerPrompter.prototype = { * Given a content DOM window, returns the chrome window and browser it's in. */ _getChromeWindow: function (aWindow) { + // Handle non-e10s toolkit consumers. + if (!Cu.isCrossProcessWrapper(aWindow)) { + let chromeWin = aWindow.QueryInterface(Ci.nsIInterfaceRequestor) + .getInterface(Ci.nsIWebNavigation) + .QueryInterface(Ci.nsIDocShell) + .chromeEventHandler.ownerGlobal; + if (!chromeWin) { + return null; + } + + // gBrowser only exists on some apps, like Firefox. + let tabbrowser = chromeWin.gBrowser || + (typeof chromeWin.getBrowser == "function" ? chromeWin.getBrowser() : null); + // At least serve the chrome window if getBrowser() + // or getBrowserForContentWindow() are not supported. + if (!tabbrowser || typeof tabbrowser.getBrowserForContentWindow != "function") { + return { win: chromeWin }; + } + + let browser = tabbrowser.getBrowserForContentWindow(aWindow); + return { win: chromeWin, browser }; + } + let windows = Services.wm.getEnumerator(null); while (windows.hasMoreElements()) { let win = windows.getNext(); - let browser = win.gBrowser.getBrowserForContentWindow(aWindow); + let tabbrowser = win.gBrowser || win.getBrowser(); + let browser = tabbrowser.getBrowserForContentWindow(aWindow); if (browser) { return { win, browser }; } diff --git a/toolkit/components/places/tests/cpp/places_test_harness_tail.h b/toolkit/components/places/tests/cpp/places_test_harness_tail.h index 4bbd45ccb..9e57c3724 100644 --- a/toolkit/components/places/tests/cpp/places_test_harness_tail.h +++ b/toolkit/components/places/tests/cpp/places_test_harness_tail.h @@ -6,9 +6,6 @@ #include "nsWidgetsCID.h" #include "nsIComponentRegistrar.h" -#ifdef MOZ_CRASHREPORTER -#include "nsICrashReporter.h" -#endif #ifndef TEST_NAME #error "Must #define TEST_NAME before including places_test_harness_tail.h" @@ -94,32 +91,6 @@ main(int aArgc, return -1; } -#ifdef MOZ_CRASHREPORTER - char* enabled = PR_GetEnv("MOZ_CRASHREPORTER"); - if (enabled && !strcmp(enabled, "1")) { - // bug 787458: move this to an even-more-common location to use in all - // C++ unittests - nsCOMPtr<nsICrashReporter> crashreporter = - do_GetService("@mozilla.org/toolkit/crash-reporter;1"); - if (crashreporter) { - fprintf(stderr, "Setting up crash reporting\n"); - - nsCOMPtr<nsIProperties> dirsvc = - do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID); - if (!dirsvc) - NS_RUNTIMEABORT("Couldn't get directory service"); - nsCOMPtr<nsIFile> cwd; - nsresult rv = dirsvc->Get(NS_OS_CURRENT_WORKING_DIR, - NS_GET_IID(nsIFile), - getter_AddRefs(cwd)); - if (NS_FAILED(rv)) - NS_RUNTIMEABORT("Couldn't get CWD"); - crashreporter->SetEnabled(true); - crashreporter->SetMinidumpPath(cwd); - } - } -#endif - RefPtr<WaitForConnectionClosed> spinClose = new WaitForConnectionClosed(); // Tinderboxes are constantly on idle. Since idle tasks can interact with diff --git a/toolkit/components/protobuf/moz.build b/toolkit/components/protobuf/moz.build index b5015eb67..8cca3514c 100644 --- a/toolkit/components/protobuf/moz.build +++ b/toolkit/components/protobuf/moz.build @@ -117,10 +117,13 @@ DEFINES['GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER'] = True # Suppress warnings in third-party code. if CONFIG['GNU_CXX']: CXXFLAGS += [ - '-Wno-null-conversion', '-Wno-return-type', '-Wno-sign-compare', ] + if CONFIG['CLANG_CXX']: + CXXFLAGS += [ + '-Wno-null-conversion', + ] elif CONFIG['_MSC_VER']: CXXFLAGS += [ '-wd4005', # 'WIN32_LEAN_AND_MEAN' : macro redefinition diff --git a/toolkit/components/telemetry/TelemetryEnvironment.jsm b/toolkit/components/telemetry/TelemetryEnvironment.jsm index 2f4ac81ba..910d804ae 100644 --- a/toolkit/components/telemetry/TelemetryEnvironment.jsm +++ b/toolkit/components/telemetry/TelemetryEnvironment.jsm @@ -153,7 +153,6 @@ const DEFAULT_ENVIRONMENT_PREFS = new Map([ ["dom.ipc.plugins.enabled", {what: RECORD_PREF_VALUE}], ["dom.ipc.processCount", {what: RECORD_PREF_VALUE, requiresRestart: true}], ["dom.max_script_run_time", {what: RECORD_PREF_VALUE}], - ["experiments.manifest.uri", {what: RECORD_PREF_VALUE}], ["extensions.autoDisableScopes", {what: RECORD_PREF_VALUE}], ["extensions.enabledScopes", {what: RECORD_PREF_VALUE}], ["extensions.blocklist.enabled", {what: RECORD_PREF_VALUE}], @@ -209,7 +208,6 @@ const PREF_E10S_COHORT = "e10s.rollout.cohort"; const COMPOSITOR_CREATED_TOPIC = "compositor:created"; const DISTRIBUTION_CUSTOMIZATION_COMPLETE_TOPIC = "distribution-customization-complete"; -const EXPERIMENTS_CHANGED_TOPIC = "experiments-changed"; const GFX_FEATURES_READY_TOPIC = "gfx-features-ready"; const SEARCH_ENGINE_MODIFIED_TOPIC = "browser-search-engine-modified"; const SEARCH_SERVICE_TOPIC = "browser-search-service"; @@ -465,7 +463,6 @@ EnvironmentAddonBuilder.prototype = { watchForChanges: function() { this._loaded = true; AddonManager.addAddonListener(this); - Services.obs.addObserver(this, EXPERIMENTS_CHANGED_TOPIC, false); }, // AddonListener @@ -490,7 +487,6 @@ EnvironmentAddonBuilder.prototype = { // nsIObserver observe: function (aSubject, aTopic, aData) { this._environment._log.trace("observe - Topic " + aTopic); - this._checkForChanges("experiment-changed"); }, _checkForChanges: function(changeReason) { @@ -515,7 +511,6 @@ EnvironmentAddonBuilder.prototype = { _shutdownBlocker: function() { if (this._loaded) { AddonManager.removeAddonListener(this); - Services.obs.removeObserver(this, EXPERIMENTS_CHANGED_TOPIC); } return this._pendingTask; }, @@ -545,7 +540,6 @@ EnvironmentAddonBuilder.prototype = { theme: yield this._getActiveTheme(), activePlugins: this._getActivePlugins(), activeGMPlugins: yield this._getActiveGMPlugins(), - activeExperiment: this._getActiveExperiment(), persona: personaId, }; @@ -718,29 +712,7 @@ EnvironmentAddonBuilder.prototype = { } return activeGMPlugins; - }), - - /** - * Get the active experiment data in object form. - * @return Object containing the active experiment data. - */ - _getActiveExperiment: function () { - let experimentInfo = {}; - try { - let scope = {}; - Cu.import("resource:///modules/experiments/Experiments.jsm", scope); - let experiments = scope.Experiments.instance(); - let activeExperiment = experiments.getActiveExperimentID(); - if (activeExperiment) { - experimentInfo.id = activeExperiment; - experimentInfo.branch = experiments.getActiveExperimentBranch(); - } - } catch (e) { - // If this is not Firefox, the import will fail. - } - - return experimentInfo; - }, + }) }; function EnvironmentCache() { diff --git a/toolkit/components/terminator/nsTerminator.cpp b/toolkit/components/terminator/nsTerminator.cpp index f9459cc5d..91e872821 100644 --- a/toolkit/components/terminator/nsTerminator.cpp +++ b/toolkit/components/terminator/nsTerminator.cpp @@ -29,9 +29,6 @@ #include "nsIObserverService.h" #include "nsIPrefService.h" -#if defined(MOZ_CRASHREPORTER) -#include "nsExceptionHandler.h" -#endif #if defined(XP_WIN) #include <windows.h> @@ -541,13 +538,7 @@ nsTerminator::UpdateTelemetry() void nsTerminator::UpdateCrashReport(const char* aTopic) { -#if defined(MOZ_CRASHREPORTER) - // In case of crash, we wish to know where in shutdown we are - nsAutoCString report(aTopic); - - Unused << CrashReporter::AnnotateCrashReport(NS_LITERAL_CSTRING("ShutdownProgress"), - report); -#endif // defined(MOZ_CRASH_REPORTER) + /*** STUB ***/ } |