diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-01-06 15:14:54 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-01-06 15:14:54 +0100 |
commit | cc6a935ce54b573c1efd7533aff00e7bf0a9959c (patch) | |
tree | c8ad266edb7ea1e7b93aaaaa98847cf662373668 /toolkit | |
parent | d129c900c9f943adb69c1fb20ba1a029fdd95cff (diff) | |
parent | 9f4afc2552a67cc675b8b8af2ecb8ebc04a473a7 (diff) | |
download | UXP-cc6a935ce54b573c1efd7533aff00e7bf0a9959c.tar UXP-cc6a935ce54b573c1efd7533aff00e7bf0a9959c.tar.gz UXP-cc6a935ce54b573c1efd7533aff00e7bf0a9959c.tar.lz UXP-cc6a935ce54b573c1efd7533aff00e7bf0a9959c.tar.xz UXP-cc6a935ce54b573c1efd7533aff00e7bf0a9959c.zip |
Merge branch 'master' into Pale_Moon-release
# Conflicts:
# application/palemoon/components/feeds/FeedWriter.js
# application/palemoon/config/version.txt
# security/manager/ssl/nsSTSPreloadList.errors
# security/manager/ssl/nsSTSPreloadList.inc
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/components/microformats/update/package.json | 4 | ||||
-rw-r--r-- | toolkit/components/passwordmgr/LoginManagerParent.jsm | 9 | ||||
-rw-r--r-- | toolkit/components/search/current/nsSearchService.js | 9 | ||||
-rw-r--r-- | toolkit/components/search/orginal/nsSearchService.js | 6 | ||||
-rw-r--r-- | toolkit/content/browser-content.js | 29 | ||||
-rw-r--r-- | toolkit/content/jar.mn | 2 | ||||
-rw-r--r-- | toolkit/library/dummydll/dummydll.cpp | 17 | ||||
-rw-r--r-- | toolkit/library/dummydll/moz.build | 19 | ||||
-rw-r--r-- | toolkit/library/moz.build | 11 | ||||
-rw-r--r-- | toolkit/modules/Deprecated.jsm | 49 | ||||
-rw-r--r-- | toolkit/mozapps/webextensions/internal/XPIProvider.jsm | 10 | ||||
-rw-r--r-- | toolkit/toolkit.mozbuild | 9 |
12 files changed, 74 insertions, 100 deletions
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 +} 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": { 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/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 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 <windows.h> - -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 71f9a86de..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 += [ @@ -177,14 +174,6 @@ if CONFIG['MOZ_WMF']: 'strmiids', ] -if CONFIG['MOZ_DIRECTSHOW']: - OS_LIBS += [ - 'dmoguids', - 'wmcodecdspuuid', - 'strmiids', - 'msdmo', - ] - if CONFIG['OS_ARCH'] == 'FreeBSD': OS_LIBS += [ 'util', 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); 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; }); }); 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'] |