From 16e5a6bc2b4e3694afdd865660b00be64578fa89 Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Mon, 18 Jun 2018 12:21:11 +0200 Subject: [PALEMOON] Re-apply removal of unnecessary code (Findbar is no longer in the gBrowser) This resolves #793 --- toolkit/content/browser-content.js | 29 ----------------------------- toolkit/content/jar.mn | 2 +- 2 files changed, 1 insertion(+), 30 deletions(-) (limited to 'toolkit') diff --git a/toolkit/content/browser-content.js b/toolkit/content/browser-content.js index e1114672c..2276f8a0d 100644 --- a/toolkit/content/browser-content.js +++ b/toolkit/content/browser-content.js @@ -841,35 +841,6 @@ var FindBar = { fakeEvent[k] = event[k]; } } -#ifdef MC_PALEMOON - let findBarId = "FindToolbar"; - // The FindBar is in the chrome window's context, not in tabbrowser - // - see also bug 537013 - let chromeWin = null; - try { - chromeWin = content - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocShellTreeItem) - .rootTreeItem - .QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIDOMWindow) - .QueryInterface(Ci.nsIDOMChromeWindow); - } catch (e) { - Cu.reportError( - "The FindBar - the chrome window's context was not detected:\n" + e); - } - if (chromeWin && chromeWin.document.getElementById(findBarId)) { - try { - chromeWin.document.getElementById(findBarId) - .browser = Services.wm.getMostRecentWindow("navigator:browser") - .gBrowser.mCurrentBrowser; - } catch (e) { - Cu.reportError( - "The FindBar - cannot set the property 'browser':\n" + e); - } - } -#endif // sendSyncMessage returns an array of the responses from all listeners let rv = sendSyncMessage("Findbar:Keypress", { diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index c11d3abed..e1d432cb3 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -39,7 +39,7 @@ toolkit.jar: content/global/plugins.html content/global/plugins.css content/global/browser-child.js -* content/global/browser-content.js + content/global/browser-content.js * content/global/buildconfig.html content/global/contentAreaUtils.js #ifndef MOZ_FENNEC -- cgit v1.2.3 From 6a9c2be4eac174c1b44ffb0ff16fd32fca92aa18 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 20 Nov 2018 11:10:18 +0100 Subject: Update package.json Update request version dependency --- toolkit/components/microformats/update/package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolkit') diff --git a/toolkit/components/microformats/update/package.json b/toolkit/components/microformats/update/package.json index 8f829439f..371986694 100644 --- a/toolkit/components/microformats/update/package.json +++ b/toolkit/components/microformats/update/package.json @@ -16,6 +16,6 @@ "dependencies": { "download-github-repo": "0.1.x", "fs-extra": "0.19.x", - "request": "2.58.x" + "request": ">=2.68.0" } -} \ No newline at end of file +} -- cgit v1.2.3 From fe11e14d3cfc2900facf152257acda87280b6cdc Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 27 Nov 2018 17:05:46 -0500 Subject: [TychoAM] Give the second an ID so it can be targeted in extensions.xul --- toolkit/mozapps/extensions/content/extensions.xul | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolkit') diff --git a/toolkit/mozapps/extensions/content/extensions.xul b/toolkit/mozapps/extensions/content/extensions.xul index c5eeb534f..292ecf8d3 100644 --- a/toolkit/mozapps/extensions/content/extensions.xul +++ b/toolkit/mozapps/extensions/content/extensions.xul @@ -186,7 +186,7 @@ placeholder="&search.placeholder;"/> - + -- cgit v1.2.3 From b867c50ee62d5ae2379d9c0c2f2a178d53165759 Mon Sep 17 00:00:00 2001 From: trav90 Date: Sat, 1 Dec 2018 09:38:51 -0600 Subject: Remove DirectShowReader Part 2: Build system --- toolkit/library/moz.build | 8 -------- 1 file changed, 8 deletions(-) (limited to 'toolkit') diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index 71f9a86de..624f8f54d 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -177,14 +177,6 @@ if CONFIG['MOZ_WMF']: 'strmiids', ] -if CONFIG['MOZ_DIRECTSHOW']: - OS_LIBS += [ - 'dmoguids', - 'wmcodecdspuuid', - 'strmiids', - 'msdmo', - ] - if CONFIG['OS_ARCH'] == 'FreeBSD': OS_LIBS += [ 'util', -- cgit v1.2.3 From ea6cc74f2e76cf79b0698832bdb4cfda0e20bd3d Mon Sep 17 00:00:00 2001 From: trav90 Date: Sun, 16 Dec 2018 08:05:21 -0600 Subject: Remove OMX related options from configure --- toolkit/toolkit.mozbuild | 9 --------- 1 file changed, 9 deletions(-) (limited to 'toolkit') diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild index b4aebbef0..da4e7cd85 100644 --- a/toolkit/toolkit.mozbuild +++ b/toolkit/toolkit.mozbuild @@ -58,15 +58,6 @@ if CONFIG['MOZ_WEBRTC']: '/media/mtransport', ] -if CONFIG['MOZ_OMX_PLUGIN']: - DIRS += [ - '/media/omx-plugin/lib/ics/libutils', - '/media/omx-plugin/lib/ics/libstagefright', - '/media/omx-plugin/lib/ics/libvideoeditorplayer', - '/media/omx-plugin', - '/media/omx-plugin/kk', - ] - if CONFIG['ENABLE_TESTS']: DIRS += ['/testing/specialpowers'] -- cgit v1.2.3 From ff8b573a67d9fad769c4461b97d5bf693468dc5b Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sun, 16 Dec 2018 16:03:31 +0100 Subject: Stop including a dummy dll on Windows for broken old versions of WebSense. WebSense has moved to an extension solution instead of dll injection, so this dummy dll (for blocking injection) is no longer necessary. --- toolkit/library/dummydll/dummydll.cpp | 17 ----------------- toolkit/library/dummydll/moz.build | 19 ------------------- toolkit/library/moz.build | 3 --- 3 files changed, 39 deletions(-) delete mode 100644 toolkit/library/dummydll/dummydll.cpp delete mode 100644 toolkit/library/dummydll/moz.build (limited to 'toolkit') diff --git a/toolkit/library/dummydll/dummydll.cpp b/toolkit/library/dummydll/dummydll.cpp deleted file mode 100644 index 5e1c04bd3..000000000 --- a/toolkit/library/dummydll/dummydll.cpp +++ /dev/null @@ -1,17 +0,0 @@ -/* 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/. */ - -#include - -BOOL WINAPI DllMain( - HANDLE hModule, - DWORD dwReason, - LPVOID lpvReserved -) -{ - if (dwReason == DLL_PROCESS_ATTACH) { - ::DisableThreadLibraryCalls((HMODULE)hModule); - } - return TRUE; -} diff --git a/toolkit/library/dummydll/moz.build b/toolkit/library/dummydll/moz.build deleted file mode 100644 index 01a0ddba8..000000000 --- a/toolkit/library/dummydll/moz.build +++ /dev/null @@ -1,19 +0,0 @@ -# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# 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/. - -# Bug 1294650 - populate our install with a shim dll to work around a -# 3rd party code injection crash. - -SOURCES += [ - 'dummydll.cpp', -] - -if CONFIG['CPU_ARCH'] == 'x86_64': - GeckoSharedLibrary('qipcap64') -else: - GeckoSharedLibrary('qipcap') - -NO_VISIBILITY_FLAGS = True diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index 624f8f54d..5191b5a21 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -106,9 +106,6 @@ if CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['GNU_CC']: DIRS += ['gtest'] -if CONFIG['OS_ARCH'] == 'WINNT': - DIRS += ['dummydll'] - # js needs to come after xul for now, because it is an archive and its content # is discarded when it comes first. USE_LIBS += [ -- cgit v1.2.3 From 76c942b1d67f35578f8eae9c23f0095fec564766 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Fri, 21 Dec 2018 14:14:15 +0100 Subject: Return an empty set if getting recipes for host fails. This avoids errors when _recipeManager is not (yet) available. This resolves #496. --- toolkit/components/passwordmgr/LoginManagerParent.jsm | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'toolkit') diff --git a/toolkit/components/passwordmgr/LoginManagerParent.jsm b/toolkit/components/passwordmgr/LoginManagerParent.jsm index e472fb61c..2d75dac7a 100644 --- a/toolkit/components/passwordmgr/LoginManagerParent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerParent.jsm @@ -102,8 +102,13 @@ var LoginManagerParent = { } case "RemoteLogins:findRecipes": { - let formHost = (new URL(data.formOrigin)).host; - return this._recipeManager.getRecipesForHost(formHost); + try { + let formHost = (new URL(data.formOrigin)).host; + return this._recipeManager.getRecipesForHost(formHost); + } catch(e) { + // Just return an empty set in case of error. + return new Set(); + } } case "RemoteLogins:onFormSubmit": { -- cgit v1.2.3 From 202e78b731776c3a102ca2f465ed3864b27effd3 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Mon, 24 Dec 2018 05:06:54 +0100 Subject: Add performance warnings to Deprecated module. Adds a dedicated handler for performance warnings to be logged to consoles if known performance-impacting methods are called. Search service init is changed from a deprecation warning to a performance warning for synchronous init. This also re-enables the warning for the Basilisk & Co. search service initialization which was previously removed in [a930a79] See also the discussion on #916. --- .../components/search/current/nsSearchService.js | 9 ++++ .../components/search/orginal/nsSearchService.js | 6 +-- toolkit/modules/Deprecated.jsm | 49 ++++++++++++++++++++-- 3 files changed, 57 insertions(+), 7 deletions(-) (limited to 'toolkit') diff --git a/toolkit/components/search/current/nsSearchService.js b/toolkit/components/search/current/nsSearchService.js index 99e73b50b..6e8f6da43 100644 --- a/toolkit/components/search/current/nsSearchService.js +++ b/toolkit/components/search/current/nsSearchService.js @@ -21,6 +21,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "OS", "resource://gre/modules/osfile.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Task", "resource://gre/modules/Task.jsm"); +XPCOMUtils.defineLazyModuleGetter(this, "Deprecated", + "resource://gre/modules/Deprecated.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "SearchStaticData", "resource://gre/modules/SearchStaticData.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "setTimeout", @@ -2691,6 +2693,13 @@ SearchService.prototype = { return; } + let performanceWarning = + "Search service falling back to synchronous initialization. " + + "This is generally the consequence of an add-on using a deprecated " + + "search service API."; + Deprecated.perfWarning(performanceWarning, "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning"); + LOG(performanceWarning); + this._syncInit(); if (!Components.isSuccessCode(this._initRV)) { throw this._initRV; diff --git a/toolkit/components/search/orginal/nsSearchService.js b/toolkit/components/search/orginal/nsSearchService.js index 8d81e1a27..6b23724a7 100644 --- a/toolkit/components/search/orginal/nsSearchService.js +++ b/toolkit/components/search/orginal/nsSearchService.js @@ -2917,12 +2917,12 @@ SearchService.prototype = { return; } - let warning = + let performanceWarning = "Search service falling back to synchronous initialization. " + "This is generally the consequence of an add-on using a deprecated " + "search service API."; - Deprecated.warning(warning, "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning"); - LOG(warning); + Deprecated.perfWarning(performanceWarning, "https://developer.mozilla.org/en-US/docs/XPCOM_Interface_Reference/nsIBrowserSearchService#async_warning"); + LOG(performanceWarning); engineMetadataService.syncInit(); this._syncInit(); diff --git a/toolkit/modules/Deprecated.jsm b/toolkit/modules/Deprecated.jsm index 7491a4938..981cd13ab 100644 --- a/toolkit/modules/Deprecated.jsm +++ b/toolkit/modules/Deprecated.jsm @@ -9,15 +9,21 @@ this.EXPORTED_SYMBOLS = [ "Deprecated" ]; const Cu = Components.utils; const Ci = Components.interfaces; const PREF_DEPRECATION_WARNINGS = "devtools.errorconsole.deprecation_warnings"; +const PREF_PERFORMANCE_WARNINGS = "devtools.errorconsole.performance_warnings"; Cu.import("resource://gre/modules/Services.jsm"); // A flag that indicates whether deprecation warnings should be logged. -var logWarnings = Services.prefs.getBoolPref(PREF_DEPRECATION_WARNINGS); +var logDepWarnings = Services.prefs.getBoolPref(PREF_DEPRECATION_WARNINGS); +var logPerfWarnings = Services.prefs.getBoolPref(PREF_PERFORMANCE_WARNINGS); Services.prefs.addObserver(PREF_DEPRECATION_WARNINGS, function (aSubject, aTopic, aData) { - logWarnings = Services.prefs.getBoolPref(PREF_DEPRECATION_WARNINGS); + logDepWarnings = Services.prefs.getBoolPref(PREF_DEPRECATION_WARNINGS); + }, false); +Services.prefs.addObserver(PREF_PERFORMANCE_WARNINGS, + function (aSubject, aTopic, aData) { + logPerfWarnings = Services.prefs.getBoolPref(PREF_PERFORMANCE_WARNINGS); }, false); /** @@ -58,7 +64,7 @@ this.Deprecated = { * logged. */ warning: function (aText, aUrl, aStack) { - if (!logWarnings) { + if (!logDepWarnings) { return; } @@ -71,7 +77,42 @@ this.Deprecated = { let textMessage = "DEPRECATION WARNING: " + aText + "\nYou may find more details about this deprecation at: " + - aUrl + "\n" + + aUrl + "\nCallstack:\n" + + // Append a callstack part to the deprecation message. + stringifyCallstack(aStack); + + // Report deprecation warning. + Cu.reportError(textMessage); + }, + + /** + * Log a performance warning. + * + * @param string aText + * Performance issue warning text. + * @param string aUrl + * A URL pointing to documentation describing performance + * issue and the way to address it. + * @param nsIStackFrame aStack + * An optional callstack. If it is not provided a + * snapshot of the current JavaScript callstack will be + * logged. + */ + perfWarning: function (aText, aUrl, aStack) { + if (!logPerfWarnings) { + return; + } + + // If URL is not provided, report an error. + if (!aUrl) { + Cu.reportError("Error in Deprecated.perfWarning: warnings must " + + "provide a URL documenting this performance issue."); + return; + } + + let textMessage = "PERFORMANCE WARNING: " + aText + + "\nYou may find more details about this problem at: " + + aUrl + "\nCallstack:\n" + // Append a callstack part to the deprecation message. stringifyCallstack(aStack); -- cgit v1.2.3 From 6a97d9db02782978000cc7e081bcc6e954fa62f5 Mon Sep 17 00:00:00 2001 From: JustOff Date: Sun, 6 Jan 2019 13:38:08 +0200 Subject: [WebExAM] Properly handle the add-on name in case it's localized --- toolkit/mozapps/webextensions/internal/XPIProvider.jsm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'toolkit') diff --git a/toolkit/mozapps/webextensions/internal/XPIProvider.jsm b/toolkit/mozapps/webextensions/internal/XPIProvider.jsm index 256765439..c95221417 100644 --- a/toolkit/mozapps/webextensions/internal/XPIProvider.jsm +++ b/toolkit/mozapps/webextensions/internal/XPIProvider.jsm @@ -5663,7 +5663,7 @@ class AddonInstall { this.updateAddonURIs(); this.addon._install = this; - this.name = this.addon.selectedLocale.name; + this.name = this.addon.selectedLocale.name || this.addon.defaultLocale.name; this.type = this.addon.type; this.version = this.addon.version; @@ -6690,8 +6690,9 @@ function createUpdate(aCallback, aAddon, aUpdate) { } else { install = new DownloadAddonInstall(aAddon._installLocation, url, aUpdate.updateHash, aAddon, null, - aAddon.selectedLocale.name, aAddon.type, - aAddon.icons, aUpdate.version); + aAddon.selectedLocale.name ? + aAddon.selectedLocale.name : aAddon.defaultLocale.name, + aAddon.type, aAddon.icons, aUpdate.version); } try { if (aUpdate.updateInfoURL) @@ -7986,6 +7987,9 @@ PROP_LOCALE_SINGLE.forEach(function(aProp) { if (aProp == "creator") return result ? new AddonManagerPrivate.AddonAuthor(result) : null; + if (aProp == "name") + return result ? result : addon.defaultLocale.name; + return result; }); }); -- cgit v1.2.3