diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
commit | fc61780b35af913801d72086456f493f63197da6 (patch) | |
tree | f85891288a7bd988da9f0f15ae64e5c63f00d493 /toolkit/components | |
parent | 69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff) | |
parent | 50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff) | |
download | UXP-fc61780b35af913801d72086456f493f63197da6.tar UXP-fc61780b35af913801d72086456f493f63197da6.tar.gz UXP-fc61780b35af913801d72086456f493f63197da6.tar.lz UXP-fc61780b35af913801d72086456f493f63197da6.tar.xz UXP-fc61780b35af913801d72086456f493f63197da6.zip |
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts:
# browser/app/profile/firefox.js
# browser/components/preferences/jar.mn
Diffstat (limited to 'toolkit/components')
17 files changed, 115 insertions, 266 deletions
diff --git a/toolkit/components/console/content/console.xul b/toolkit/components/console/content/console.xul index 0abd0a981..90b900cf9 100644 --- a/toolkit/components/console/content/console.xul +++ b/toolkit/components/console/content/console.xul @@ -77,9 +77,12 @@ <toolbarseparator/> <toolbarbutton id="Console:clear" oncommand="clearConsole();" label="&clear.label;" accesskey="&clear.accesskey;"/> + <toolbarspring/> </toolbar> <toolbar class="chromeclass-toolbar" id="ToolbarEval" align="center" nowindowdrag="true"> + <label value="&filter2.label;" control="Filter"/> + <textbox accesskey="&filter2.accesskey;" type="search" id="Filter" oncommand="changeFilter();"/> <label value="&codeEval.label;" accesskey="&codeEval.accesskey;" control="TextboxEval"/> <textbox id="TextboxEval" class="toolbar" value="" onkeypress="onEvalKeyPress(event)" flex="1"/> <toolbarbutton id="ButtonEval" label="&evaluate.label;" @@ -90,12 +93,4 @@ <vbox id="ConsoleBox" class="console-box" flex="1" context="ConsoleContext" persist="sortOrder"/> <iframe name="Evaluator" id="Evaluator" collapsed="true"/> - - <statusbar> - <statusbarpanel flex="1" pack="start"> - <label value="&filter2.label;" control="Filter"/> - <textbox accesskey="&filter2.accesskey;" type="search" - id="Filter" oncommand="changeFilter();"/> - </statusbarpanel> - </statusbar> </window> diff --git a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm index 5bd351ee9..ce165205b 100644 --- a/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm +++ b/toolkit/components/jsdownloads/src/DownloadUIHelper.jsm @@ -124,52 +124,35 @@ this.DownloadPrompter.prototype = { /** * Displays a warning message box that informs that the specified file is - * executable, and asks whether the user wants to launch it. The user is - * given the option of disabling future instances of this warning. + * executable, and asks whether the user wants to launch it. * * @param aPath * String containing the full path to the file to be opened. * - * @return {Promise} * @resolves Boolean indicating whether the launch operation can continue. - * @rejects JavaScript exception. */ - confirmLaunchExecutable: function (aPath) + async confirmLaunchExecutable: function (aPath) { - const kPrefAlertOnEXEOpen = "browser.download.manager.alertOnEXEOpen"; + const kPrefConfirmOpenExe = "browser.download.confirmOpenExecutable"; - try { - // Always launch in case we have no prompter implementation. - if (!this._prompter) { - return Promise.resolve(true); - } - - try { - if (!Services.prefs.getBoolPref(kPrefAlertOnEXEOpen)) { - return Promise.resolve(true); - } - } catch (ex) { - // If the preference does not exist, continue with the prompt. - } - - let leafName = OS.Path.basename(aPath); - - let s = DownloadUIHelper.strings; - let checkState = { value: false }; - let shouldLaunch = this._prompter.confirmCheck( - s.fileExecutableSecurityWarningTitle, - s.fileExecutableSecurityWarning(leafName, leafName), - s.fileExecutableSecurityWarningDontAsk, - checkState); + // Always launch in case we have no prompter implementation. + if (!this._prompter) { + return true; + } - if (shouldLaunch) { - Services.prefs.setBoolPref(kPrefAlertOnEXEOpen, !checkState.value); + try { + if (!Services.prefs.getBoolPref(kPrefConfirmOpenExe)) { + return true; } - - return Promise.resolve(shouldLaunch); } catch (ex) { - return Promise.reject(ex); + // If the preference does not exist, continue with the prompt. } + + let leafName = OS.Path.basename(aPath); + + let s = DownloadUIHelper.strings; + return this._prompter.confirm(s.fileExecutableSecurityWarningTitle, + s.fileExecutableSecurityWarning(leafName, leafName)); }, /** diff --git a/toolkit/components/moz.build b/toolkit/components/moz.build index c11f62792..953e6c6e3 100644 --- a/toolkit/components/moz.build +++ b/toolkit/components/moz.build @@ -51,7 +51,6 @@ DIRS += [ 'reader', 'remotebrowserutils', 'reflect', - 'securityreporter', 'sqlite', 'startup', 'statusfilter', diff --git a/toolkit/components/narrate/NarrateControls.jsm b/toolkit/components/narrate/NarrateControls.jsm index be3ce636c..56b3deaf8 100644 --- a/toolkit/components/narrate/NarrateControls.jsm +++ b/toolkit/components/narrate/NarrateControls.jsm @@ -10,7 +10,6 @@ Cu.import("resource://gre/modules/narrate/VoiceSelect.jsm"); Cu.import("resource://gre/modules/narrate/Narrator.jsm"); Cu.import("resource://gre/modules/Services.jsm"); Cu.import("resource://gre/modules/AsyncPrefs.jsm"); -Cu.import("resource://gre/modules/TelemetryStopwatch.jsm"); this.EXPORTED_SYMBOLS = ["NarrateControls"]; @@ -147,11 +146,6 @@ NarrateControls.prototype = { case "voiceschanged": this._setupVoices(); break; - case "unload": - if (this.narrator.speaking) { - TelemetryStopwatch.finish("NARRATE_CONTENT_SPEAKTIME_MS", this); - } - break; } }, @@ -187,20 +181,9 @@ NarrateControls.prototype = { } let narrateToggle = win.document.querySelector(".narrate-toggle"); - let histogram = Services.telemetry.getKeyedHistogramById( - "NARRATE_CONTENT_BY_LANGUAGE_2"); let initial = !this._voicesInitialized; this._voicesInitialized = true; - if (initial) { - histogram.add(language, 0); - } - - if (options.length && narrateToggle.hidden) { - // About to show for the first time.. - histogram.add(language, 1); - } - // We disable this entire feature if there are no available voices. narrateToggle.hidden = !options.length; }); @@ -265,12 +248,6 @@ NarrateControls.prototype = { this._doc.querySelector(".narrate-skip-previous").disabled = !speaking; this._doc.querySelector(".narrate-skip-next").disabled = !speaking; - - if (speaking) { - TelemetryStopwatch.start("NARRATE_CONTENT_SPEAKTIME_MS", this); - } else { - TelemetryStopwatch.finish("NARRATE_CONTENT_SPEAKTIME_MS", this); - } }, _createVoiceLabel(voice) { diff --git a/toolkit/components/passwordmgr/content/passwordManager.js b/toolkit/components/passwordmgr/content/passwordManager.js index da63d7de8..327ebbdf8 100644 --- a/toolkit/components/passwordmgr/content/passwordManager.js +++ b/toolkit/components/passwordmgr/content/passwordManager.js @@ -326,7 +326,7 @@ function LoadSignons() { function GetTreeSelections() { let selections = []; let select = signonsTree.view.selection; - if (select) { + if (select && signonsTree.view.rowCount > 0) { let count = select.getRangeCount(); let min = {}; let max = {}; @@ -727,10 +727,12 @@ function escapeKeyHandler() { window.close(); } -#if defined(MC_BASILISK) && defined(XP_WIN) +#ifdef XP_WIN +#if defined(MC_BASILISK) || defined(HYPE_ICEWEASEL) 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 +#endif diff --git a/toolkit/components/passwordmgr/content/passwordManager.xul b/toolkit/components/passwordmgr/content/passwordManager.xul index c0a10bf8e..8590d96ac 100644 --- a/toolkit/components/passwordmgr/content/passwordManager.xul +++ b/toolkit/components/passwordmgr/content/passwordManager.xul @@ -112,11 +112,13 @@ <button id="removeAllSignons" icon="clear" oncommand="DeleteAllSignons();"/> <spacer flex="1"/> -#if defined(MC_BASILISK) && defined(XP_WIN) +#ifdef XP_WIN +#if defined(MC_BASILISK) || defined(HYPE_ICEWEASEL) <button accesskey="&import.accesskey;" label="&import.label;" oncommand="OpenMigrator();"/> #endif +#endif <button id="togglePasswords" oncommand="TogglePasswordVisible();"/> </hbox> diff --git a/toolkit/components/prompts/src/nsPrompter.js b/toolkit/components/prompts/src/nsPrompter.js index 26efe28cc..0503b5925 100644 --- a/toolkit/components/prompts/src/nsPrompter.js +++ b/toolkit/components/prompts/src/nsPrompter.js @@ -369,7 +369,13 @@ function openTabPrompt(domWin, tabPrompt, args) { .getInterface(Ci.nsIDocShell); let inPermitUnload = docShell.contentViewer && docShell.contentViewer.inPermitUnload; let eventDetail = Cu.cloneInto({tabPrompt: true, inPermitUnload}, domWin); - PromptUtils.fireDialogEvent(domWin, "DOMWillOpenModalDialog", null, eventDetail); + let allowFocusSwitch = true; + try { + allowFocusSwitch = Services.prefs.getBoolPref("prompts.tab_modal.focusSwitch"); + } catch(e) {} + + if (allowFocusSwitch) + PromptUtils.fireDialogEvent(domWin, "DOMWillOpenModalDialog", null, eventDetail); let winUtils = domWin.QueryInterface(Ci.nsIInterfaceRequestor) .getInterface(Ci.nsIDOMWindowUtils); @@ -395,8 +401,8 @@ function openTabPrompt(domWin, tabPrompt, args) { frameMM.removeEventListener("pagehide", pagehide, true); winUtils.leaveModalState(); - - PromptUtils.fireDialogEvent(domWin, "DOMModalDialogClosed"); + if (allowFocusSwitch) + PromptUtils.fireDialogEvent(domWin, "DOMModalDialogClosed"); } frameMM.addEventListener("pagehide", pagehide, true); diff --git a/toolkit/components/reader/AboutReader.jsm b/toolkit/components/reader/AboutReader.jsm index fb82e5789..c5d04476d 100644 --- a/toolkit/components/reader/AboutReader.jsm +++ b/toolkit/components/reader/AboutReader.jsm @@ -200,9 +200,6 @@ AboutReader.prototype = { } else if (!target.closest(".dropdown-popup")) { this._closeDropdowns(); } - if (target.tagName == "A" && !target.classList.contains("reader-domain")) { - this._linkClicked(aEvent); - } break; case "scroll": this._closeDropdowns(true); @@ -720,6 +717,21 @@ AboutReader.prototype = { } }, + _fixLocalLinks() { + // We need to do this because preprocessing the content through nsIParserUtils + // gives back a DOM with a <base> element. That influences how these URLs get + // resolved, making them no longer match the document URI (which is + // about:reader?url=...). To fix this, make all the hash URIs absolute. This + // is hacky, but the alternative of removing the base element has potential + // security implications if Readability has not successfully made all the URLs + // absolute, so we pick just fixing these in-document links explicitly. + let localLinks = this._contentElement.querySelectorAll("a[href^='#']"); + for (let localLink of localLinks) { + // Have to get the attribute because .href provides an absolute URI. + localLink.href = this._doc.documentURI + localLink.getAttribute("href"); + } + }, + _formatReadTime(slowEstimate, fastEstimate) { let displayStringKey = "aboutReader.estimatedReadTimeRange1"; @@ -790,6 +802,7 @@ AboutReader.prototype = { false, articleUri, this._contentElement); this._contentElement.innerHTML = ""; this._contentElement.appendChild(contentFragment); + this._fixLocalLinks(); this._maybeSetTextDirection(article); this._foundLanguage(article.language); @@ -978,18 +991,6 @@ AboutReader.prototype = { }, /* - * Override link handling for same-page references so we don't exit Reader View. - */ - _linkClicked(event) { - var originalUrl = Services.io.newURI(this._getOriginalUrl(), null, null); - var targetUrl = Services.io.newURI(event.target.href, null, null); - if (originalUrl.specIgnoringRef == targetUrl.specIgnoringRef) { - event.preventDefault(); - this._goToReference(targetUrl.ref); - } - }, - - /* * Scroll reader view to a reference */ _goToReference(ref) { diff --git a/toolkit/components/reader/JSDOMParser.js b/toolkit/components/reader/JSDOMParser.js index 38f59c4ea..dd9d37230 100644 --- a/toolkit/components/reader/JSDOMParser.js +++ b/toolkit/components/reader/JSDOMParser.js @@ -560,7 +560,8 @@ }, }; - var Document = function () { + var Document = function (url) { + this.documentURI = url; this.styleSheets = []; this.childNodes = []; this.children = []; @@ -600,6 +601,20 @@ node.textContent = text; return node; }, + + get baseURI() { + if (!this.hasOwnProperty("_baseURI")) { + this._baseURI = this.documentURI; + var baseElements = this.getElementsByTagName("base"); + var href = baseElements[0] && baseElements[0].getAttribute("href"); + if (href) { + try { + this._baseURI = (new URL(href, this._baseURI)).href; + } catch (ex) {/* Just fall back to documentURI */} + } + } + return this._baseURI; + }, }; var Element = function (tag) { @@ -1118,9 +1133,9 @@ /** * Parses an HTML string and returns a JS implementation of the Document. */ - parse: function (html) { + parse: function (html, url) { this.html = html; - var doc = this.doc = new Document(); + var doc = this.doc = new Document(url); this.readChildren(doc); // If this is an HTML document, remove root-level children except for the diff --git a/toolkit/components/reader/Readability.js b/toolkit/components/reader/Readability.js index 04949dc61..064d2ae88 100644 --- a/toolkit/components/reader/Readability.js +++ b/toolkit/components/reader/Readability.js @@ -41,6 +41,7 @@ function Readability(uri, doc, options) { this._articleTitle = null; this._articleByline = null; this._articleDir = null; + this._attempts = []; // Configurable options this._debug = !!options.debug; @@ -275,34 +276,20 @@ Readability.prototype = { * @return void */ _fixRelativeUris: function(articleContent) { - var scheme = this._uri.scheme; - var prePath = this._uri.prePath; - var pathBase = this._uri.pathBase; - + var baseURI = this._doc.baseURI; + var documentURI = this._doc.documentURI; function toAbsoluteURI(uri) { - // If this is already an absolute URI, return it. - if (/^[a-zA-Z][a-zA-Z0-9\+\-\.]*:/.test(uri)) - return uri; - - // Scheme-rooted relative URI. - if (uri.substr(0, 2) == "//") - return scheme + "://" + uri.substr(2); - - // Prepath-rooted relative URI. - if (uri[0] == "/") - return prePath + uri; - - // Dotslash relative URI. - if (uri.indexOf("./") === 0) - return pathBase + uri.slice(2); - - // Ignore hash URIs: - if (uri[0] == "#") + // Leave hash links alone if the base URI matches the document URI: + if (baseURI == documentURI && uri.charAt(0) == "#") { return uri; - - // Standard relative URI; add entire path. pathBase already includes a - // trailing "/". - return pathBase + uri; + } + // Otherwise, resolve against base URI: + try { + return new URL(uri, baseURI).href; + } catch (ex) { + // Something went wrong, just return the original: + } + return uri; } var links = articleContent.getElementsByTagName("a"); @@ -535,6 +522,7 @@ Readability.prototype = { this._clean(articleContent, "embed"); this._clean(articleContent, "h1"); this._clean(articleContent, "footer"); + this._clean(articleContent, "link"); // Clean out elements have "share" in their id/class combinations from final top candidates, // which means we don't remove the top candidates even they have "share". @@ -1089,24 +1077,45 @@ Readability.prototype = { if (this._debug) this.log("Article content after paging: " + articleContent.innerHTML); + var parseSuccessful = true; + // Now that we've gone through the full algorithm, check to see if // we got any meaningful content. If we didn't, we may need to re-run // grabArticle with different flags set. This gives us a higher likelihood of // finding the content, and the sieve approach gives us a higher likelihood of // finding the -right- content. - if (this._getInnerText(articleContent, true).length < this._wordThreshold) { + var textLength = this._getInnerText(articleContent, true).length; + if (textLength < this._wordThreshold) { + parseSuccessful = false; page.innerHTML = pageCacheHtml; if (this._flagIsActive(this.FLAG_STRIP_UNLIKELYS)) { this._removeFlag(this.FLAG_STRIP_UNLIKELYS); + this._attempts.push({articleContent: articleContent, textLength: textLength}); } else if (this._flagIsActive(this.FLAG_WEIGHT_CLASSES)) { this._removeFlag(this.FLAG_WEIGHT_CLASSES); + this._attempts.push({articleContent: articleContent, textLength: textLength}); } else if (this._flagIsActive(this.FLAG_CLEAN_CONDITIONALLY)) { this._removeFlag(this.FLAG_CLEAN_CONDITIONALLY); + this._attempts.push({articleContent: articleContent, textLength: textLength}); } else { - return null; + this._attempts.push({articleContent: articleContent, textLength: textLength}); + // No luck after removing flags, just return the longest text we found during the different loops + this._attempts.sort(function (a, b) { + return a.textLength < b.textLength; + }); + + // But first check if we actually have something + if (!this._attempts[0].textLength) { + return null; + } + + articleContent = this._attempts[0].articleContent; + parseSuccessful = true; } - } else { + } + + if (parseSuccessful) { // Find out text direction from ancestors of final top candidate. var ancestors = [parentOfTopCandidate, topCandidate].concat(this._getNodeAncestors(parentOfTopCandidate)); this._someNode(ancestors, function(ancestor) { diff --git a/toolkit/components/reader/ReaderWorker.js b/toolkit/components/reader/ReaderWorker.js index 9ae589d7d..69426788b 100644 --- a/toolkit/components/reader/ReaderWorker.js +++ b/toolkit/components/reader/ReaderWorker.js @@ -47,7 +47,7 @@ var Agent = { * @return {object} Article object returned from Readability. */ parseDocument(uri, serializedDoc, options) { - let doc = new JSDOMParser().parse(serializedDoc); + let doc = new JSDOMParser().parse(serializedDoc, uri.spec); return new Readability(uri, doc, options).parse(); }, }; diff --git a/toolkit/components/securityreporter/SecurityReporter.js b/toolkit/components/securityreporter/SecurityReporter.js deleted file mode 100644 index 9ca1e5546..000000000 --- a/toolkit/components/securityreporter/SecurityReporter.js +++ /dev/null @@ -1,112 +0,0 @@ -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* 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/. */ - -const { classes: Cc, interfaces: Ci, utils: Cu} = Components; - -Cu.importGlobalProperties(['fetch']); - -const { XPCOMUtils } = Cu.import("resource://gre/modules/XPCOMUtils.jsm", {}); -const protocolHandler = Cc["@mozilla.org/network/protocol;1?name=http"] - .getService(Ci.nsIHttpProtocolHandler); -const { Services } = Cu.import("resource://gre/modules/Services.jsm", {}); - -const TLS_ERROR_REPORT_TELEMETRY_SUCCESS = 6; -const TLS_ERROR_REPORT_TELEMETRY_FAILURE = 7; -const HISTOGRAM_ID = "TLS_ERROR_REPORT_UI"; - - -XPCOMUtils.defineLazyModuleGetter(this, "UpdateUtils", - "resource://gre/modules/UpdateUtils.jsm"); - -function getDERString(cert) -{ - var length = {}; - var derArray = cert.getRawDER(length); - var derString = ''; - for (var i = 0; i < derArray.length; i++) { - derString += String.fromCharCode(derArray[i]); - } - return derString; -} - -function SecurityReporter() { } - -SecurityReporter.prototype = { - classDescription: "Security reporter component", - classID: Components.ID("{8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b}"), - contractID: "@mozilla.org/securityreporter;1", - QueryInterface: XPCOMUtils.generateQI([Ci.nsISecurityReporter]), - reportTLSError: function(transportSecurityInfo, hostname, port) { - // don't send if there's no transportSecurityInfo (since the report cannot - // contain anything of interest) - if (!transportSecurityInfo) { - return; - } - - // don't send a report if the pref is not enabled - if (!Services.prefs.getBoolPref("security.ssl.errorReporting.enabled")) { - return; - } - - // Don't send a report if the host we're connecting to is the report - // server (otherwise we'll get loops when this fails) - let endpoint = - Services.prefs.getCharPref("security.ssl.errorReporting.url"); - let reportURI = Services.io.newURI(endpoint, null, null); - - if (reportURI.host == hostname) { - return; - } - - // Convert the nsIX509CertList into a format that can be parsed into - // JSON - let asciiCertChain = []; - - if (transportSecurityInfo.failedCertChain) { - let certs = transportSecurityInfo.failedCertChain.getEnumerator(); - while (certs.hasMoreElements()) { - let cert = certs.getNext(); - cert.QueryInterface(Ci.nsIX509Cert); - asciiCertChain.push(btoa(getDERString(cert))); - } - } - - let report = { - hostname: hostname, - port: port, - timestamp: Math.round(Date.now() / 1000), - errorCode: transportSecurityInfo.errorCode, - failedCertChain: asciiCertChain, - userAgent: protocolHandler.userAgent, - version: 1, - build: Services.appinfo.appBuildID, - product: Services.appinfo.name, - channel: UpdateUtils.UpdateChannel - } - - fetch(endpoint, { - method: "POST", - body: JSON.stringify(report), - headers: { - 'Content-Type': 'application/json' - } - }).then(function (aResponse) { - if (!aResponse.ok) { - // request returned non-success status - Services.telemetry.getHistogramById(HISTOGRAM_ID) - .add(TLS_ERROR_REPORT_TELEMETRY_FAILURE); - } else { - Services.telemetry.getHistogramById(HISTOGRAM_ID) - .add(TLS_ERROR_REPORT_TELEMETRY_SUCCESS); - } - }).catch(function (e) { - // error making request to reportURL - Services.telemetry.getHistogramById(HISTOGRAM_ID) - .add(TLS_ERROR_REPORT_TELEMETRY_FAILURE); - }); - } -}; - -this.NSGetFactory = XPCOMUtils.generateNSGetFactory([SecurityReporter]); diff --git a/toolkit/components/securityreporter/SecurityReporter.manifest b/toolkit/components/securityreporter/SecurityReporter.manifest deleted file mode 100644 index d4e080dc7..000000000 --- a/toolkit/components/securityreporter/SecurityReporter.manifest +++ /dev/null @@ -1,2 +0,0 @@ -component {8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b} SecurityReporter.js -contract @mozilla.org/securityreporter;1 {8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b} diff --git a/toolkit/components/securityreporter/moz.build b/toolkit/components/securityreporter/moz.build deleted file mode 100644 index 7ef56a115..000000000 --- a/toolkit/components/securityreporter/moz.build +++ /dev/null @@ -1,16 +0,0 @@ -# -*- Mode: python; 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/. - -XPIDL_MODULE = 'toolkit_securityreporter' - -XPIDL_SOURCES += [ - 'nsISecurityReporter.idl', -] - -EXTRA_COMPONENTS += [ - 'SecurityReporter.js', - 'SecurityReporter.manifest', -] diff --git a/toolkit/components/securityreporter/nsISecurityReporter.idl b/toolkit/components/securityreporter/nsISecurityReporter.idl deleted file mode 100644 index 462dd1e48..000000000 --- a/toolkit/components/securityreporter/nsISecurityReporter.idl +++ /dev/null @@ -1,14 +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 "nsISupports.idl" -#include "nsITransportSecurityInfo.idl" - -[scriptable, uuid(8a997c9a-bea1-11e5-a1fa-be6aBc8e7f8b)] -interface nsISecurityReporter : nsISupports -{ - void reportTLSError(in nsITransportSecurityInfo aSecurityInfo, - in AUTF8String aHostname, - in long aPort); -}; diff --git a/toolkit/components/telemetry/tests/unit/xpcshell.ini b/toolkit/components/telemetry/tests/unit/xpcshell.ini index fe58d362e..42354c4cd 100644 --- a/toolkit/components/telemetry/tests/unit/xpcshell.ini +++ b/toolkit/components/telemetry/tests/unit/xpcshell.ini @@ -15,7 +15,6 @@ support-files = system.xpi restartless.xpi theme.xpi - !/toolkit/mozapps/webextensions/test/xpcshell/head_addons.js generated-files = dictionary.xpi experiment.xpi diff --git a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm index fded51cea..bd52e77e9 100644 --- a/toolkit/components/thumbnails/BackgroundPageThumbs.jsm +++ b/toolkit/components/thumbnails/BackgroundPageThumbs.jsm @@ -468,7 +468,12 @@ Capture.prototype = { }; if (!data) { - done(); + // If this background attempt failed, cause a dummy file to be saved, so + // that gets loaded instead of attempting again (and again). + // XXX: Perhaps we can create a placeholder image to use instead of "null" + // here, so it has something to show to the user? + PageThumbs._store(this.url, this.url, null, true) + .then(done, done); return; } |