summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--AUTHORS7
-rw-r--r--application/basilisk/base/content/aboutNetError.xhtml98
-rw-r--r--application/basilisk/base/content/browser.js92
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/browser.properties7
-rw-r--r--application/basilisk/locales/en-US/chrome/overrides/netError.dtd1
-rw-r--r--application/basilisk/themes/shared/aboutNetError.css23
-rw-r--r--application/palemoon/app/profile/palemoon.js4
-rw-r--r--application/palemoon/base/content/aboutDialog.xul7
-rw-r--r--application/palemoon/branding/unofficial/locales/en-US/brand.dtd2
-rw-r--r--application/palemoon/branding/unofficial/newmoon.desktop352
-rwxr-xr-xgfx/angle/src/libANGLE/Program.cpp6
-rwxr-xr-xgfx/angle/src/libANGLE/renderer/ProgramImpl.h4
-rwxr-xr-xgfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.h2
-rw-r--r--media/libstagefright/binding/MoofParser.cpp273
-rw-r--r--media/libstagefright/binding/SinfParser.cpp24
-rw-r--r--media/libstagefright/binding/include/mp4_demuxer/Box.h6
-rw-r--r--media/libstagefright/binding/include/mp4_demuxer/BufferReader.h225
-rw-r--r--media/libstagefright/binding/include/mp4_demuxer/ByteReader.h38
-rw-r--r--media/libstagefright/moz.build1
-rwxr-xr-xsecurity/manager/locales/en-US/chrome/pipnss/pipnss.properties3
-rw-r--r--security/manager/ssl/TransportSecurityInfo.cpp2
-rw-r--r--security/manager/ssl/nsNSSErrors.cpp2
-rw-r--r--toolkit/components/startup/nsAppStartup.cpp5
-rw-r--r--toolkit/components/thumbnails/PageThumbs.jsm10
24 files changed, 883 insertions, 311 deletions
diff --git a/AUTHORS b/AUTHORS
index 7e9d1f491..149ea5cc4 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -3,8 +3,10 @@ codebase which lives in this repository. If you make a contribution
here, you may add your name and, optionally, email address in the
appropriate place.
-For a full list of the people who are credited with making a
-contribution to Mozilla, see http://www.mozilla.org/credits/ .
+For a more comprehensive list of the people who are credited with
+making a contribution to this project and its Mozilla roots, see
+http://www.palemoon.org/Contributors.shtml
+
<1010mozilla@Ostermiller.com>
Aaron Boodman <aa@google.com>
@@ -650,6 +652,7 @@ Mark Mentovai <mark@moxienet.com>
Mark Pilgrim <pilgrim@gmail.com>
Mark Smith <mcs@pearlcrescent.com>
Mark Steele <mwsteele@gmail.com>
+Mark Straver <moonchild@palemoon.org>
Markus G. Kuhn <mkuhn@acm.org>
Markus Stange <mstange@themasta.com>
Martijn Pieters <mj@digicool.com>
diff --git a/application/basilisk/base/content/aboutNetError.xhtml b/application/basilisk/base/content/aboutNetError.xhtml
index 225cafa21..3296600c8 100644
--- a/application/basilisk/base/content/aboutNetError.xhtml
+++ b/application/basilisk/base/content/aboutNetError.xhtml
@@ -123,13 +123,6 @@
document.getElementById("advancedButton")
.addEventListener("click", function togglePanelVisibility() {
toggleDisplay(panel);
- if (gIsCertError) {
- // Toggling the advanced panel must ensure that the debugging
- // information panel is hidden as well, since it's opened by the
- // error code link in the advanced panel.
- var div = document.getElementById("certificateErrorDebugInformation");
- div.style.display = "none";
- }
if (panel.style.display == "block") {
// send event to trigger telemetry ping
@@ -149,11 +142,6 @@
if (getCSSClass() == "expertBadCert") {
toggleDisplay(document.getElementById("badCertAdvancedPanel"));
- // Toggling the advanced panel must ensure that the debugging
- // information panel is hidden as well, since it's opened by the
- // error code link in the advanced panel.
- var div = document.getElementById("certificateErrorDebugInformation");
- div.style.display = "none";
}
disallowCertOverridesIfNeeded();
@@ -298,7 +286,7 @@
}
}
- addDomainErrorLinks();
+ addDomainErrorLink();
}
function initPageCaptivePortal()
@@ -315,7 +303,7 @@
addAutofocus("openPortalLoginPageButton");
setupAdvancedButton(true);
- addDomainErrorLinks();
+ addDomainErrorLink();
// When the portal is freed, an event is generated by the frame script
// that we can pick up and attempt to reload the original page.
@@ -337,7 +325,7 @@
let event = new CustomEvent("AboutNetErrorLoad", {bubbles:true});
document.getElementById("advancedButton").dispatchEvent(event);
- addDomainErrorLinks();
+ addDomainErrorLink();
}
/* Only do autofocus if we're the toplevel frame; otherwise we
@@ -356,16 +344,13 @@
}
}
- /* Try to preserve the links contained in the error description, like
- the error code.
-
- Also, in the case of SSL error pages about domain mismatch, see if
+ /* In the case of SSL error pages about domain mismatch, see if
we can hyperlink the user to the correct site. We don't want
to do this generically since it allows MitM attacks to redirect
users to a site under attacker control, but in certain cases
it is safe (and helpful!) to do so. Bug 402210
*/
- function addDomainErrorLinks() {
+ function addDomainErrorLink() {
// Rather than textContent, we need to treat description as HTML
var sdid = gIsCertError ? "badCertTechnicalInfo" : "errorShortDescText";
var sd = document.getElementById(sdid);
@@ -374,50 +359,28 @@
// sanitize description text - see bug 441169
- // First, find the index of the <a> tags we care about, being
+ // First, find the index of the <a> tag we care about, being
// careful not to use an over-greedy regex.
- var codeRe = /<a id="errorCode" title="([^"]+)">/;
- var codeResult = codeRe.exec(desc);
- var domainRe = /<a id="cert_domain_link" title="([^"]+)">/;
- var domainResult = domainRe.exec(desc);
-
- // The order of these links in the description is fixed in
- // TransportSecurityInfo.cpp:formatOverridableCertErrorMessage.
- var firstResult = domainResult;
- if (!domainResult)
- firstResult = codeResult;
- if (!firstResult)
+ var re = /<a id="cert_domain_link" title="([^"]+)">/;
+ var result = domainRe.exec(desc);
+
+ if (!result)
return;
// Remove sd's existing children
sd.textContent = "";
- // Everything up to the first link should be text content.
- sd.appendChild(document.createTextNode(desc.slice(0, firstResult.index)));
+ // Everything up to the link should be text content.
+ sd.appendChild(document.createTextNode(desc.slice(0, result.index)));
- // Now create the actual links.
- if (domainResult) {
- createLink(sd, "cert_domain_link", domainResult[1])
- // Append text for anything between the two links.
- sd.appendChild(document.createTextNode(desc.slice(desc.indexOf("</a>") + "</a>".length, codeResult.index)));
- }
- createLink(sd, "errorCode", codeResult[1])
+ // Now create the link itself.
+ var anchorEl = document.createElement("a");
+ anchorEl.setAttribute("id", "cert_domain_link");
+ anchorEl.setAttribute("title", result[1]);
+ anchorEl.appendChild(document.createTextNode(result[1]));
+ sd.appendChild(anchorEl);
- // Finally, append text for anything after the last closing </a>.
- sd.appendChild(document.createTextNode(desc.slice(desc.lastIndexOf("</a>") + "</a>".length)));
- }
-
- if (gIsCertError) {
- // Initialize the error code link embedded in the error message to
- // display debug information about the cert error.
- var errorCode = document.getElementById("errorCode");
- if (errorCode) {
- errorCode.href = "javascript:void(0)";
- errorCode.addEventListener("click", () => {
- let debugInfo = document.getElementById("certificateErrorDebugInformation");
- debugInfo.style.display = "block";
- debugInfo.scrollIntoView({block: "start", behavior: "smooth"});
- }, false);
- }
+ // Finally, append text for anything after the closing </a>.
+ sd.appendChild(document.createTextNode(desc.slice(desc.indexOf("</a>") + "</a>".length)));
}
// Initialize the cert domain link.
@@ -463,23 +426,8 @@
if (link.href && getCSSClass() != "expertBadCert") {
var panelId = gIsCertError ? "badCertAdvancedPanel" : "weakCryptoAdvancedPanel"
toggleDisplay(document.getElementById(panelId));
- if (gIsCertError) {
- // Toggling the advanced panel must ensure that the debugging
- // information panel is hidden as well, since it's opened by the
- // error code link in the advanced panel.
- var div = document.getElementById("certificateErrorDebugInformation");
- div.style.display = "none";
- }
}
}
-
- function createLink(el, id, text) {
- var anchorEl = document.createElement("a");
- anchorEl.setAttribute("id", id);
- anchorEl.setAttribute("title", text);
- anchorEl.appendChild(document.createTextNode(text));
- el.appendChild(anchorEl);
- }
]]></script>
</head>
@@ -612,12 +560,6 @@
</div>
- <div id="certificateErrorDebugInformation">
- <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
- <div id="certificateErrorText"/>
- <button id="copyToClipboard">&certerror.copyToClipboard.label;</button>
- </div>
-
<!--
- Note: It is important to run the script this way, instead of using
- an onload handler. This is because error pages are loaded as
diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js
index 9ec7715fa..031144dfd 100644
--- a/application/basilisk/base/content/browser.js
+++ b/application/basilisk/base/content/browser.js
@@ -2888,24 +2888,7 @@ var BrowserOnClick = {
secHistogram.add(Ci.nsISecurityUITelemetry.WARNING_BAD_CERT_TOP_UNDERSTAND_RISKS);
}
- securityInfo = getSecurityInfo(securityInfoAsString);
- let errorInfo = getDetailedCertErrorInfo(location,
- securityInfo);
- browser.messageManager.sendAsyncMessage( "CertErrorDetails", {
- code: securityInfo.errorCode,
- info: errorInfo
- });
- break;
-
- case "copyToClipboard":
- const gClipboardHelper = Cc["@mozilla.org/widget/clipboardhelper;1"]
- .getService(Ci.nsIClipboardHelper);
- securityInfo = getSecurityInfo(securityInfoAsString);
- let detailedInfo = getDetailedCertErrorInfo(location,
- securityInfo);
- gClipboardHelper.copyString(detailedInfo);
break;
-
}
},
@@ -3145,81 +3128,6 @@ function getSecurityInfo(securityInfoAsString) {
return securityInfo;
}
-/**
- * Returns a string with detailed information about the certificate validation
- * failure from the specified URI that can be used to send a report.
- */
-function getDetailedCertErrorInfo(location, securityInfo) {
- if (!securityInfo)
- return "";
-
- let certErrorDetails = location;
- let code = securityInfo.errorCode;
- let errors = Cc["@mozilla.org/nss_errors_service;1"]
- .getService(Ci.nsINSSErrorsService);
-
- certErrorDetails += "\r\n\r\n" + errors.getErrorMessage(errors.getXPCOMFromNSSError(code));
-
- const sss = Cc["@mozilla.org/ssservice;1"]
- .getService(Ci.nsISiteSecurityService);
- // SiteSecurityService uses different storage if the channel is
- // private. Thus we must give isSecureHost correct flags or we
- // might get incorrect results.
- let flags = PrivateBrowsingUtils.isWindowPrivate(window) ?
- Ci.nsISocketProvider.NO_PERMANENT_STORAGE : 0;
-
- let uri = Services.io.newURI(location, null, null);
-
- let hasHSTS = sss.isSecureHost(sss.HEADER_HSTS, uri.host, flags);
- let hasHPKP = sss.isSecureHost(sss.HEADER_HPKP, uri.host, flags);
- certErrorDetails += "\r\n\r\n" +
- gNavigatorBundle.getFormattedString("certErrorDetailsHSTS.label",
- [hasHSTS]);
- certErrorDetails += "\r\n" +
- gNavigatorBundle.getFormattedString("certErrorDetailsKeyPinning.label",
- [hasHPKP]);
-
- let certChain = "";
- if (securityInfo.failedCertChain) {
- let certs = securityInfo.failedCertChain.getEnumerator();
- while (certs.hasMoreElements()) {
- let cert = certs.getNext();
- cert.QueryInterface(Ci.nsIX509Cert);
- certChain += getPEMString(cert);
- }
- }
-
- certErrorDetails += "\r\n\r\n" +
- gNavigatorBundle.getString("certErrorDetailsCertChain.label") +
- "\r\n\r\n" + certChain;
-
- return certErrorDetails;
-}
-
-// TODO: can we pull getDERString and getPEMString in from pippki.js instead of
-// duplicating them here?
-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 getPEMString(cert)
-{
- var derb64 = btoa(getDERString(cert));
- // Wrap the Base64 string into lines of 64 characters,
- // with CRLF line breaks (as specified in RFC 1421).
- var wrapped = derb64.replace(/(\S{64}(?!$))/g, "$1\r\n");
- return "-----BEGIN CERTIFICATE-----\r\n"
- + wrapped
- + "\r\n-----END CERTIFICATE-----\r\n";
-}
-
var PrintPreviewListener = {
_printPreviewTab: null,
_tabBeforePrintPreview: null,
diff --git a/application/basilisk/locales/en-US/chrome/browser/browser.properties b/application/basilisk/locales/en-US/chrome/browser/browser.properties
index aa7a82e4f..f1c39839b 100644
--- a/application/basilisk/locales/en-US/chrome/browser/browser.properties
+++ b/application/basilisk/locales/en-US/chrome/browser/browser.properties
@@ -679,13 +679,6 @@ weakCryptoOverriding.message = %S recommends that you don’t enter your passwor
revokeOverride.label = Don’t Trust This Website
revokeOverride.accesskey = D
-# LOCALIZATION NOTE (certErrorDetails*.label): These are text strings that
-# appear in the about:certerror page, so that the user can copy and send them to
-# the server administrators for troubleshooting.
-certErrorDetailsHSTS.label = HTTP Strict Transport Security: %S
-certErrorDetailsKeyPinning.label = HTTP Public Key Pinning: %S
-certErrorDetailsCertChain.label = Certificate chain:
-
# LOCALIZATION NOTE (pendingCrashReports2.label): Semi-colon list of plural forms
# See: http://developer.mozilla.org/en/docs/Localization_and_Plurals
# #1 is the number of pending crash reports
diff --git a/application/basilisk/locales/en-US/chrome/overrides/netError.dtd b/application/basilisk/locales/en-US/chrome/overrides/netError.dtd
index 872847458..55da9a36c 100644
--- a/application/basilisk/locales/en-US/chrome/overrides/netError.dtd
+++ b/application/basilisk/locales/en-US/chrome/overrides/netError.dtd
@@ -203,7 +203,6 @@ was trying to connect. -->
Strict Transport Security (HSTS) to specify that &brandShortName; may only connect
to it securely. As a result, it is not possible to add an exception for this
certificate.">
-<!ENTITY certerror.copyToClipboard.label "Copy text to clipboard">
<!ENTITY inadequateSecurityError.title "Your connection is not secure">
<!-- LOCALIZATION NOTE (inadequateSecurityError.longDesc) - Do not translate
diff --git a/application/basilisk/themes/shared/aboutNetError.css b/application/basilisk/themes/shared/aboutNetError.css
index 102e1dc63..7e1e7c32b 100644
--- a/application/basilisk/themes/shared/aboutNetError.css
+++ b/application/basilisk/themes/shared/aboutNetError.css
@@ -128,16 +128,12 @@ span#hostname {
line-height: 16px
}
-#errorCode:not([href]) {
+#errorCode {
color: var(--in-content-page-color);
cursor: text;
text-decoration: none;
}
-#errorCode[href] {
- white-space: nowrap;
-}
-
#badCertTechnicalInfo {
overflow: auto;
white-space: pre-wrap;
@@ -146,20 +142,3 @@ span#hostname {
#certificateErrorReporting {
display: none;
}
-
-#certificateErrorDebugInformation {
- display: none;
- background-color: var(--in-content-box-background-hover) !important;
- border-top: 1px solid var(--in-content-border-color);
- position: absolute;
- left: 0%;
- top: 100%;
- width: 65%;
- padding: 1em 17.5%;
-}
-
-#certificateErrorText {
- font-family: monospace;
- white-space: pre-wrap;
- padding: 1em 0;
-}
diff --git a/application/palemoon/app/profile/palemoon.js b/application/palemoon/app/profile/palemoon.js
index 22c4f8654..8f0b133e5 100644
--- a/application/palemoon/app/profile/palemoon.js
+++ b/application/palemoon/app/profile/palemoon.js
@@ -59,9 +59,9 @@ pref("extensions.blocklist.level.updated", false);
// Controls what level the blocklist switches from warning about items to forcibly
// blocking them.
pref("extensions.blocklist.level", 2);
-pref("extensions.blocklist.url", "http://blocklist.palemoon.org/%VERSION%/blocklist.xml");
+pref("extensions.blocklist.url", "https://blocklist.palemoon.org/?version=%VERSION%");
pref("extensions.blocklist.detailsURL", "https://blocklist.palemoon.org/about.shtml");
-pref("extensions.blocklist.itemURL", "http://blocklist.palemoon.org/info/?id=%blockID%");
+pref("extensions.blocklist.itemURL", "https://blocklist.palemoon.org/info/?id=%blockID%");
pref("extensions.update.autoUpdateDefault", true);
diff --git a/application/palemoon/base/content/aboutDialog.xul b/application/palemoon/base/content/aboutDialog.xul
index 743ff21df..5c344f55d 100644
--- a/application/palemoon/base/content/aboutDialog.xul
+++ b/application/palemoon/base/content/aboutDialog.xul
@@ -88,6 +88,7 @@
</vbox>
<description class="text-pmcreds">
+#if defined(MOZ_OFFICIAL_BRANDING) || defined(MC_OFFICIAL)
#ifdef MC_PRIVATE_BUILD
This is a private build of Pale Moon. If you did not manually build this copy from source yourself, then please download an official version from the <label class="text-link" href="http://www.palemoon.org/">Pale Moon website</label>.
#else
@@ -100,6 +101,12 @@
If you wish to contribute, please consider helping out by providing support to other users on the <label class="text-link" href="https://forum.palemoon.org/">Pale Moon forum</label>
or getting involved in our development by tackling some of the issues found in our GitHub issue tracker.
#endif
+#else
+ &brandFullName; is released by &vendorShortName;.
+ </description>
+ <description class="text-blurb">
+ This is an unofficial build of Pale Moon. For official builds, please go to <label class="text-link" href="http://www.palemoon.org/">the Pale Moon website</label>.
+#endif
</description>
</vbox>
</vbox>
diff --git a/application/palemoon/branding/unofficial/locales/en-US/brand.dtd b/application/palemoon/branding/unofficial/locales/en-US/brand.dtd
index a90d52441..debb7442d 100644
--- a/application/palemoon/branding/unofficial/locales/en-US/brand.dtd
+++ b/application/palemoon/branding/unofficial/locales/en-US/brand.dtd
@@ -4,5 +4,5 @@
<!ENTITY brandShortName "New Moon">
<!ENTITY brandFullName "New Moon">
-<!ENTITY vendorShortName "Moonchild">
+<!ENTITY vendorShortName "a community developer">
<!ENTITY trademarkInfo.part1 " ">
diff --git a/application/palemoon/branding/unofficial/newmoon.desktop b/application/palemoon/branding/unofficial/newmoon.desktop
new file mode 100644
index 000000000..6dcf32477
--- /dev/null
+++ b/application/palemoon/branding/unofficial/newmoon.desktop
@@ -0,0 +1,352 @@
+[Desktop Entry]
+Name=New Moon
+GenericName=Web Browser
+GenericName[ar]=متصفح ويب
+GenericName[ast]=Restolador Web
+GenericName[bn]=ওয়েব ব্রাউজার
+GenericName[ca]=Navegador web
+GenericName[cs]=Webový prohlížeč
+GenericName[da]=Webbrowser
+GenericName[el]=Περιηγητής διαδικτύου
+GenericName[es]=Navegador web
+GenericName[et]=Veebibrauser
+GenericName[fa]=مرورگر اینترنتی
+GenericName[fi]=WWW-selain
+GenericName[fr]=Navigateur Web
+GenericName[gl]=Navegador Web
+GenericName[he]=דפדפן אינטרנט
+GenericName[hr]=Web preglednik
+GenericName[hu]=Webböngésző
+GenericName[it]=Browser web
+GenericName[ja]=ウェブ・ブラウザ
+GenericName[ko]=웹 브라우저
+GenericName[ku]=Geroka torê
+GenericName[lt]=Interneto naršyklė
+GenericName[nb]=Nettleser
+GenericName[nl]=Webbrowser
+GenericName[nn]=Nettlesar
+GenericName[no]=Nettleser
+GenericName[pl]=Przeglądarka WWW
+GenericName[pt]=Navegador Web
+GenericName[pt_BR]=Navegador Web
+GenericName[ro]=Navigator Internet
+GenericName[ru]=Веб-браузер
+GenericName[sk]=Internetový prehliadač
+GenericName[sl]=Spletni brskalnik
+GenericName[sv]=Webbläsare
+GenericName[tr]=Web Tarayıcı
+GenericName[ug]=توركۆرگۈ
+GenericName[uk]=Веб-браузер
+GenericName[vi]=Trình duyệt Web
+GenericName[zh_CN]=网络浏览器
+GenericName[zh_TW]=網路瀏覽器
+Comment=Browse the World Wide Web
+Comment[ar]=تصفح الشبكة العنكبوتية العالمية
+Comment[ast]=Restola pela Rede
+Comment[bn]=ইন্টারনেট ব্রাউজ করুন
+Comment[ca]=Navegueu per la web
+Comment[cs]=Prohlížení stránek World Wide Webu
+Comment[da]=Surf på internettet
+Comment[de]=Im Internet surfen
+Comment[el]=Μπορείτε να περιηγηθείτε στο διαδίκτυο (Web)
+Comment[es]=Navegue por la web
+Comment[et]=Lehitse veebi
+Comment[fa]=صفحات شبکه جهانی اینترنت را مرور نمایید
+Comment[fi]=Selaa Internetin WWW-sivuja
+Comment[fr]=Naviguer sur le Web
+Comment[gl]=Navegar pola rede
+Comment[he]=גלישה ברחבי האינטרנט
+Comment[hr]=Pretražite web
+Comment[hu]=A világháló böngészése
+Comment[it]=Esplora il web
+Comment[ja]=ウェブを閲覧します
+Comment[ko]=웹을 돌아 다닙니다
+Comment[ku]=Li torê bigere
+Comment[lt]=Naršykite internete
+Comment[nb]=Surf på nettet
+Comment[nl]=Verken het internet
+Comment[nn]=Surf på nettet
+Comment[no]=Surf på nettet
+Comment[pl]=Przeglądanie stron WWW
+Comment[pt]=Navegue na Internet
+Comment[pt_BR]=Navegue na Internet
+Comment[ro]=Navigați pe Internet
+Comment[ru]=Доступ в Интернет
+Comment[sk]=Prehliadanie internetu
+Comment[sl]=Brskajte po spletu
+Comment[sv]=Surfa på webben
+Comment[tr]=İnternet'te Gezinin
+Comment[ug]=دۇنيادىكى توربەتلەرنى كۆرگىلى بولىدۇ
+Comment[uk]=Перегляд сторінок Інтернету
+Comment[vi]=Để duyệt các trang web
+Comment[zh_CN]=浏览互联网
+Comment[zh_TW]=瀏覽網際網路
+Exec=palemoon %u
+Terminal=false
+Type=Application
+Icon=palemoon
+Categories=Network;WebBrowser;
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;
+StartupNotify=true
+Actions=NewTab;NewWindow;NewPrivateWindow;
+
+[Desktop Action NewTab]
+Name=Open new tab
+Name[ach]=Yab dirica matidi manyen
+Name[af]=Open nuwe oortjie
+Name[an]=Ubrir una pestanya nueva
+Name[ar]=افتح لسانًا جديدًا
+Name[as]=নতুন টেব খোলক
+Name[ast]=Abrir llingüeta nueva
+Name[az]=Yeni vərəq aç
+Name[be]=Адкрыць новую ўстаўку
+Name[bg]=Отваряне на нов подпрозорец
+Name[bn_BD]=নতুন ট্যাব খুলুন
+Name[bn_IN]=নতুন ট্যাব খুলুন
+Name[br]=Digeriñ un ivinell nevez
+Name[bs]=Otvori novi tab
+Name[ca]=Obre una pestanya nova
+Name[cs]=Otevřít nový panel
+Name[cy]=Agor tab newydd
+Name[da]=Åbn nyt faneblad
+Name[de]=Neuen Tab öffnen
+Name[dsb]=Nowy rejtark wócyniś
+Name[el]=Άνοιγμα νέας καρτέλας
+Name[eo]=Malfermi novan langeton
+Name[es_AR]=Abrir nueva pestaña
+Name[es_CL]=Abrir nueva pestaña
+Name[es_ES]=Abrir pestaña nueva
+Name[es_MX]=Abrir una pestaña nueva
+Name[et]=Ava uus kaart
+Name[eu]=Ireki fitxa berria
+Name[ff]=Uddit tabbere hesere
+Name[fi]=Avaa uusi välilehti
+Name[fr]=Ouvrir un nouvel onglet
+Name[fy_NL]=Iepenje nij ljepblêd
+Name[ga_IE]=Oscail i gcluaisín nua
+Name[gd]=Fosgail taba ùr
+Name[gl]=Abrir unha nova lapela
+Name[gu_IN]=નવી ટૅબને ખોલો
+Name[he]=פתיחת לשונית חדשה
+Name[hi_IN]=नया टैब खोलें
+Name[hr]=Otvori novu karticu
+Name[hsb]=Nowy rajtark wočinić
+Name[hu]=Új lap megnyitása
+Name[hy_AM]=Բացել նոր ներդիր
+Name[id]=Buka tab baru
+Name[is]=Opna nýjan flipa
+Name[it]=Apri nuova scheda
+Name[ja]=新しいタブ
+Name[kk]=Жаңа бетті ашу
+Name[kn]=ಹೊಸ ಹಾಳೆಯನ್ನು ತೆರೆ
+Name[ko]=새 탭 열기
+Name[lij]=Àrvi nêuvo féuggio
+Name[lt]=Atverti naują kortelę
+Name[mai]=नव टैब खोलू
+Name[mk]=Отвори ново јазиче
+Name[ml]=പുതിയ റ്റാബ് തുറക്കുക
+Name[mr]=नवीन टॅब उघडा
+Name[ms]=Buka tab baru
+Name[nb_NO]=Åpne ny fane
+Name[nl]=Nieuw tabblad openen
+Name[nn_NO]=Opna ny fane
+Name[or]=ନୂତନ ଟ୍ୟାବ ଖୋଲନ୍ତୁ
+Name[pa_IN]=ਨਵੀਂ ਟੈਬ ਖੋਲ੍ਹੋ
+Name[pl]=Otwórz nową kartę
+Name[pt_BR]=Nova aba
+Name[pt_PT]=Abrir novo separador
+Name[rm]=Avrir in nov tab
+Name[ro]=Deschide o filă nouă
+Name[ru]=Открыть новую вкладку
+Name[si]=නව ටැබය විවෘත කරන්න
+Name[sk]=Otvoriť novú kartu
+Name[sl]=Odpri nov zavihek
+Name[son]=Nor loku taaga feeri
+Name[sq]=Hap skedë të re
+Name[sr]=Отвори нови језичак
+Name[sv_SE]=Öppna ny flik
+Name[ta]=புதிய கீற்றைத் திற
+Name[te]=కొత్త టాబ్ తెరువుము
+Name[th]=เปิดแท็บใหม่
+Name[tr]=Yeni sekme aç
+Name[uk]=Відкрити нову вкладку
+Name[uz]=Yangi ichki oyna ochish
+Name[vi]=Mở thẻ mới
+Name[xh]=Vula ithebhu entsha
+Name[zh_CN]=打开新标签页
+Name[zh_TW]=開啟新分頁
+Exec=palemoon -new-tab
+
+[Desktop Action NewWindow]
+Name=Open new window
+Name[ach]=Yab dirica manyen
+Name[af]=Open nuwe venster
+Name[an]=Ubrir una nueva finestra
+Name[ar]=افتح نافذة جديدة
+Name[as]=নতুন উইন্ডো খোলক
+Name[ast]=Abrir ventana nueva
+Name[az]=Yeni pəncərə aç
+Name[be]=Адкрыць новае акно
+Name[bg]=Отваряне на нов прозорец
+Name[bn_BD]=নতুন উইন্ডো খুলুন
+Name[bn_IN]=নতুন উইন্ডো খুলুন
+Name[br]=Digeriñ ur prenestr nevez
+Name[bs]=Otvori novi prozor
+Name[ca]=Obre una finestra nova
+Name[cs]=Otevřít nové okno
+Name[cy]=Agor ffenestr newydd
+Name[da]=Åbn nyt vindue
+Name[de]=Neues Fenster öffnen
+Name[dsb]=Nowe wokno wócyniś
+Name[el]=Άνοιγμα νέου παραθύρου
+Name[eo]=Malfermi novan fenestron
+Name[es_AR]=Abrir nueva ventana
+Name[es_CL]=Abrir nueva ventana
+Name[es_ES]=Abrir nueva ventana
+Name[es_MX]=Abrir nueva ventana
+Name[et]=Ava uus aken
+Name[eu]=Ireki leiho berria
+Name[ff]=Uddit henorde hesere
+Name[fi]=Avaa uusi ikkuna
+Name[fr]=Ouvrir une nouvelle fenêtre
+Name[fy_NL]=Iepenje nij finster
+Name[ga_IE]=Oscail fuinneog nua
+Name[gd]=Fosgail uinneag ùr
+Name[gl]=Abrir unha nova xanela
+Name[gu_IN]=નવી વિન્ડોને ખોલો
+Name[he]=פתח חלון חדש
+Name[hi_IN]=नई विंडो खोलें
+Name[hr]=Otvori novi prozor
+Name[hsb]=Nowe wokno wočinić
+Name[hu]=Új ablak megnyitása
+Name[hy_AM]=Բացել նոր պատուհան
+Name[id]=Buka jendela baru
+Name[is]=Opna nýjan glugga
+Name[it]=Apri nuova finestra
+Name[ja]=新しいウィンドウ
+Name[kk]=Жаңа терезені ашу
+Name[kn]=ಹೊಸ ವಿಂಡೊವನ್ನು ತೆರೆ
+Name[ko]=새 창 열기
+Name[lij]=Àrvi nêuvo barcón
+Name[lt]=Atverti naują langą
+Name[mai]=नई विंडो खोलू
+Name[mk]=Отвори нов прозорец
+Name[ml]=പുതിയ ജാലകം തുറക്കുക
+Name[mr]=नवीन पटल उघडा
+Name[ms]=Buka tetingkap baru
+Name[nb_NO]=Åpne nytt vindu
+Name[nl]=Een nieuw venster openen
+Name[nn_NO]=Opna nytt vindauge
+Name[or]=ନୂତନ ୱିଣ୍ଡୋ ଖୋଲନ୍ତୁ
+Name[pa_IN]=ਨਵੀਂ ਵਿੰਡੋ ਖੋਲ੍ਹੋ
+Name[pl]=Otwórz nowe okno
+Name[pt_BR]=Nova janela
+Name[pt_PT]=Abrir nova janela
+Name[rm]=Avrir ina nova fanestra
+Name[ro]=Deschide o nouă fereastră
+Name[ru]=Открыть новое окно
+Name[si]=නව කවුළුවක් විවෘත කරන්න
+Name[sk]=Otvoriť nové okno
+Name[sl]=Odpri novo okno
+Name[son]=Zanfun taaga feeri
+Name[sq]=Hap dritare të re
+Name[sr]=Отвори нови прозор
+Name[sv_SE]=Öppna nytt fönster
+Name[ta]=புதிய சாளரத்தை திற
+Name[te]=కొత్త విండో తెరువుము
+Name[th]=เปิดหน้าต่างใหม่
+Name[tr]=Yeni pencere aç
+Name[uk]=Відкрити нове вікно
+Name[uz]=Yangi oyna ochish
+Name[vi]=Mở cửa sổ mới
+Name[xh]=Vula iwindow entsha
+Name[zh_CN]=打开新窗口
+Name[zh_TW]=開啟新視窗
+Exec=palemoon -new-window
+
+[Desktop Action NewPrivateWindow]
+Name=New private window
+Name[ach]=Dirica manyen me mung
+Name[af]=Nuwe privaatvenster
+Name[an]=Nueva finestra de navegación privada
+Name[ar]=نافذة خاصة جديدة
+Name[as]=নতুন ব্যক্তিগত উইন্ডো
+Name[ast]=Ventana privada nueva
+Name[az]=Yeni məxfi pəncərə
+Name[be]=Новае акно адасаблення
+Name[bg]=Нов прозорец за поверително сърфиране
+Name[bn_BD]=নতুন ব্যক্তিগত উইন্ডো
+Name[bn_IN]=নতুন ব্যাক্তিগত উইন্ডো
+Name[br]=Prenestr merdeiñ prevez nevez
+Name[bs]=Novi privatni prozor
+Name[ca]=Finestra privada nova
+Name[cs]=Nové anonymní okno
+Name[cy]=Ffenestr breifat newydd
+Name[da]=Nyt privat vindue
+Name[de]=Neues privates Fenster öffnen
+Name[dsb]=Nowe priwatne wokno
+Name[el]=Νέο παράθυρο ιδιωτικής περιήγησης
+Name[eo]=Nova privata fenestro
+Name[es_AR]=Nueva ventana privada
+Name[es_CL]=Nueva ventana privada
+Name[es_ES]=Nueva ventana privada
+Name[es_MX]=Nueva ventana privada
+Name[et]=Uus privaatne aken
+Name[eu]=Leiho pribatu berria
+Name[ff]=Henorde suturo hesere
+Name[fi]=Uusi yksityinen ikkuna
+Name[fr]=Nouvelle fenêtre de navigation privée
+Name[fy_NL]=Nij priveefinster
+Name[ga_IE]=Fuinneog nua phríobháideach
+Name[gd]=Uinneag phrìobhaideach ùr
+Name[gl]=Nova xanela privada
+Name[gu_IN]=નવી ખાનગી વિન્ડો
+Name[he]=חלון פרטי חדש
+Name[hi_IN]=नया निजी विंडो
+Name[hr]=Novi privatni prozor
+Name[hsb]=Nowe priwatne wokno
+Name[hu]=Új privát ablak
+Name[hy_AM]=Գաղտնի դիտարկում
+Name[id]=Jendela mode pribadi baru
+Name[is]=Nýr einkagluggi
+Name[it]=Nuova finestra anonima
+Name[ja]=新しいプライベートウィンドウ
+Name[kk]=Жаңа жекелік терезе
+Name[kn]=ಹೊಸ ಖಾಸಗಿ ಕಿಟಕಿ
+Name[ko]=새 사생활 보호 창
+Name[lij]=Nêuvo barcón privòu
+Name[lt]=Atverti privačiojo naršymo langą
+Name[mai]=नव निज विंडो
+Name[mk]=Нов прозорец за приватно сурфање
+Name[ml]=പുതിയ സ്വകാര്യ ജാലകം
+Name[mr]=नवीन वैयक्तिक पटल
+Name[ms]=Tetingkap peribadi baharu
+Name[nb_NO]=Nytt privat vindu
+Name[nl]=Nieuw privévenster
+Name[nn_NO]=Nytt privat vindauge
+Name[or]=ନୂତନ ବ୍ୟକ୍ତିଗତ ୱିଣ୍ଡୋ
+Name[pa_IN]=ਨਵੀਂ ਪ੍ਰਾਈਵੇਟ ਵਿੰਡੋ
+Name[pl]=Nowe okno w trybie prywatnym
+Name[pt_BR]=Nova janela privativa
+Name[pt_PT]=Nova janela privada
+Name[rm]=Nova fanestra privata
+Name[ro]=Fereastră fără urme nouă
+Name[ru]=Новое приватное окно
+Name[si]=නව පුද්ගලික කවුළුව
+Name[sk]=Nové okno v režime Súkromné prehliadanie
+Name[sl]=Novo zasebno okno
+Name[son]=Sutura zanfun taaga
+Name[sq]=Dritare e re private
+Name[sr]=Нови приватни прозор
+Name[sv_SE]=Nytt privat fönster
+Name[ta]=புதிய தனிப்பட்ட சாளரம்
+Name[te]=కొత్త ఆంతరంగిక విండో
+Name[th]=หน้าต่างท่องเว็บแบบส่วนตัวใหม่
+Name[tr]=Yeni gizli pencere
+Name[uk]=Нове приватне вікно
+Name[uz]=Yangi shaxsiy oyna
+Name[vi]=Cửa sổ riêng tư mới
+Name[xh]=Ifestile yangasese entsha
+Name[zh_CN]=新建隐私浏览窗口
+Name[zh_TW]=新增隱私視窗
+Exec=palemoon -private-window
diff --git a/gfx/angle/src/libANGLE/Program.cpp b/gfx/angle/src/libANGLE/Program.cpp
index 7f4226da1..49a0f9a33 100755
--- a/gfx/angle/src/libANGLE/Program.cpp
+++ b/gfx/angle/src/libANGLE/Program.cpp
@@ -679,6 +679,12 @@ Error Program::link(const ContextState &data)
gatherInterfaceBlockInfo();
+ // Because we do lazy init in assignUniformBlockRegisters,
+ // we must initialize them when linking shaders,
+ // otherwise, we will have no shaders for getting uniform blocks
+ // information from shaders when doing draw calls.
+ mProgram->assignUniformBlockRegisters();
+
mLinked = true;
return NoError();
}
diff --git a/gfx/angle/src/libANGLE/renderer/ProgramImpl.h b/gfx/angle/src/libANGLE/renderer/ProgramImpl.h
index 45ff0a05a..e62623a8d 100755
--- a/gfx/angle/src/libANGLE/renderer/ProgramImpl.h
+++ b/gfx/angle/src/libANGLE/renderer/ProgramImpl.h
@@ -86,6 +86,10 @@ class ProgramImpl : angle::NonCopyable
GLint components,
const GLfloat *coeffs) = 0;
+ virtual void assignUniformBlockRegisters()
+ {
+ }
+
protected:
const gl::ProgramState &mState;
};
diff --git a/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.h b/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.h
index 88fe4020d..01f3973c5 100755
--- a/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.h
+++ b/gfx/angle/src/libANGLE/renderer/d3d/ProgramD3D.h
@@ -231,6 +231,7 @@ class ProgramD3D : public ProgramImpl
const GLfloat *value);
void setUniformBlockBinding(GLuint uniformBlockIndex, GLuint uniformBlockBinding) override;
+ void assignUniformBlockRegisters() override;
const UniformStorageD3D &getVertexUniformStorage() const { return *mVertexUniformStorage; }
const UniformStorageD3D &getFragmentUniformStorage() const { return *mFragmentUniformStorage; }
@@ -350,7 +351,6 @@ class ProgramD3D : public ProgramImpl
void initAttribLocationsToD3DSemantic();
void reset();
- void assignUniformBlockRegisters();
void initUniformBlockInfo();
size_t getUniformBlockInfo(const sh::InterfaceBlock &interfaceBlock);
diff --git a/media/libstagefright/binding/MoofParser.cpp b/media/libstagefright/binding/MoofParser.cpp
index ced054282..491967a12 100644
--- a/media/libstagefright/binding/MoofParser.cpp
+++ b/media/libstagefright/binding/MoofParser.cpp
@@ -550,14 +550,20 @@ Moof::ParseTrun(Box& aBox, Tfhd& aTfhd, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, u
LOG(Moof, "Incomplete Box (missing flags)");
return false;
}
- uint32_t flags = reader->ReadU32();
+ uint32_t flags;
+ if (!reader->ReadU32(flags)) {
+ return false;
+ }
uint8_t version = flags >> 24;
if (!reader->CanReadType<uint32_t>()) {
LOG(Moof, "Incomplete Box (missing sampleCount)");
return false;
}
- uint32_t sampleCount = reader->ReadU32();
+ uint32_t sampleCount;
+ if (!reader->ReadU32(sampleCount)) {
+ return false;
+ }
if (sampleCount == 0) {
return true;
}
@@ -577,9 +583,21 @@ Moof::ParseTrun(Box& aBox, Tfhd& aTfhd, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, u
return false;
}
- uint64_t offset = aTfhd.mBaseDataOffset + (flags & 1 ? reader->ReadU32() : 0);
- uint32_t firstSampleFlags =
- flags & 4 ? reader->ReadU32() : aTfhd.mDefaultSampleFlags;
+ uint64_t offset = aTfhd.mBaseDataOffset;
+ if (flags & 1) {
+ uint32_t baseOffset;
+ if (!reader->ReadU32(baseOffset)) {
+ return false;
+ }
+ offset += baseOffset;
+ }
+ uint32_t firstSampleFlags = aTfhd.mDefaultSampleFlags;
+ if (flags & 4) {
+ if (!reader->ReadU32(firstSampleFlags)) {
+ return false;
+ }
+ }
+
uint64_t decodeTime = *aDecodeTime;
nsTArray<Interval<Microseconds>> timeRanges;
@@ -589,16 +607,29 @@ Moof::ParseTrun(Box& aBox, Tfhd& aTfhd, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, u
}
for (size_t i = 0; i < sampleCount; i++) {
- uint32_t sampleDuration =
- flags & 0x100 ? reader->ReadU32() : aTfhd.mDefaultSampleDuration;
- uint32_t sampleSize =
- flags & 0x200 ? reader->ReadU32() : aTfhd.mDefaultSampleSize;
- uint32_t sampleFlags =
- flags & 0x400 ? reader->ReadU32()
- : i ? aTfhd.mDefaultSampleFlags : firstSampleFlags;
+ uint32_t sampleDuration = aTfhd.mDefaultSampleDuration;
+ if (flags & 0x100) {
+ if (!reader->ReadU32(sampleDuration)) {
+ return false;
+ }
+ }
+ uint32_t sampleSize = aTfhd.mDefaultSampleSize;
+ if (flags & 0x200) {
+ if (!reader->ReadU32(sampleSize)) {
+ return false;
+ }
+ }
+ uint32_t sampleFlags = i ? aTfhd.mDefaultSampleFlags : firstSampleFlags;
+ if (flags & 0x400) {
+ if (!reader->ReadU32(sampleFlags)) {
+ return false;
+ }
+ }
int32_t ctsOffset = 0;
if (flags & 0x800) {
- ctsOffset = reader->Read32();
+ if (!reader->Read32(ctsOffset)) {
+ return false;
+ }
}
Sample sample;
@@ -635,7 +666,10 @@ Tkhd::Tkhd(Box& aBox)
LOG(Tkhd, "Incomplete Box (missing flags)");
return;
}
- uint32_t flags = reader->ReadU32();
+ uint32_t flags;
+ if (!reader->ReadU32(flags)) {
+ return;
+ }
uint8_t version = flags >> 24;
size_t need =
3*(version ? sizeof(int64_t) : sizeof(int32_t)) + 2*sizeof(int32_t);
@@ -645,19 +679,30 @@ Tkhd::Tkhd(Box& aBox)
return;
}
if (version == 0) {
- mCreationTime = reader->ReadU32();
- mModificationTime = reader->ReadU32();
- mTrackId = reader->ReadU32();
- uint32_t reserved = reader->ReadU32();
+ uint32_t createTime, modificationTime, trackId, reserved, duration;
+ if (!reader->ReadU32(createTime) ||
+ !reader->ReadU32(modificationTime) ||
+ !reader->ReadU32(trackId) ||
+ !reader->ReadU32(reserved) ||
+ !reader->ReadU32(duration)) {
+ return;
+ }
NS_ASSERTION(!reserved, "reserved should be 0");
- mDuration = reader->ReadU32();
+ mCreationTime = createTime;
+ mModificationTime = modificationTime;
+ mTrackId = trackId;
+ mDuration = duration;
} else if (version == 1) {
- mCreationTime = reader->ReadU64();
- mModificationTime = reader->ReadU64();
- mTrackId = reader->ReadU32();
- uint32_t reserved = reader->ReadU32();
+ uint32_t trackId, reserved;
+ if (!reader->ReadU64(mCreationTime) ||
+ !reader->ReadU64(mModificationTime) ||
+ !reader->ReadU32(trackId) ||
+ !reader->ReadU32(reserved) ||
+ !reader->ReadU64(mDuration)) {
+ return;
+ }
NS_ASSERTION(!reserved, "reserved should be 0");
- mDuration = reader->ReadU64();
+ mTrackId = trackId;
}
// We don't care about whatever else may be in the box.
mValid = true;
@@ -670,10 +715,13 @@ Mvhd::Mvhd(Box& aBox)
LOG(Mdhd, "Incomplete Box (missing flags)");
return;
}
- uint32_t flags = reader->ReadU32();
+ uint32_t flags;
+ if (!reader->ReadU32(flags)) {
+ return;
+ }
uint8_t version = flags >> 24;
size_t need =
- 3*(version ? sizeof(int64_t) : sizeof(int32_t)) + sizeof(uint32_t);
+ 3 * (version ? sizeof(int64_t) : sizeof(int32_t)) + sizeof(uint32_t);
if (reader->Remaining() < need) {
LOG(Mvhd, "Incomplete Box (have:%lld need:%lld)",
(uint64_t)reader->Remaining(), (uint64_t)need);
@@ -681,15 +729,23 @@ Mvhd::Mvhd(Box& aBox)
}
if (version == 0) {
- mCreationTime = reader->ReadU32();
- mModificationTime = reader->ReadU32();
- mTimescale = reader->ReadU32();
- mDuration = reader->ReadU32();
+ uint32_t createTime, modificationTime, duration;
+ if (!reader->ReadU32(createTime) ||
+ !reader->ReadU32(modificationTime) ||
+ !reader->ReadU32(mTimescale) ||
+ !reader->ReadU32(duration)) {
+ return;
+ }
+ mCreationTime = createTime;
+ mModificationTime = modificationTime;
+ mDuration = duration;
} else if (version == 1) {
- mCreationTime = reader->ReadU64();
- mModificationTime = reader->ReadU64();
- mTimescale = reader->ReadU32();
- mDuration = reader->ReadU64();
+ if (!reader->ReadU64(mCreationTime) ||
+ !reader->ReadU64(mModificationTime) ||
+ !reader->ReadU32(mTimescale) ||
+ !reader->ReadU64(mDuration)) {
+ return;
+ }
} else {
return;
}
@@ -707,18 +763,19 @@ Mdhd::Mdhd(Box& aBox)
Trex::Trex(Box& aBox)
{
BoxReader reader(aBox);
- if (reader->Remaining() < 6*sizeof(uint32_t)) {
+ if (reader->Remaining() < 6 * sizeof(uint32_t)) {
LOG(Trex, "Incomplete Box (have:%lld need:%lld)",
(uint64_t)reader->Remaining(), (uint64_t)6*sizeof(uint32_t));
return;
}
- mFlags = reader->ReadU32();
- mTrackId = reader->ReadU32();
- mDefaultSampleDescriptionIndex = reader->ReadU32();
- mDefaultSampleDuration = reader->ReadU32();
- mDefaultSampleSize = reader->ReadU32();
- mDefaultSampleFlags = reader->ReadU32();
- mValid = true;
+ if (!reader->ReadU32(mFlags) ||
+ !reader->ReadU32(mTrackId) ||
+ !reader->ReadU32(mDefaultSampleDescriptionIndex) ||
+ !reader->ReadU32(mDefaultSampleDuration) ||
+ !reader->ReadU32(mDefaultSampleSize) ||
+ !reader->ReadU32(mDefaultSampleFlags)) {
+ return;
+ }
}
Tfhd::Tfhd(Box& aBox, Trex& aTrex)
@@ -733,7 +790,9 @@ Tfhd::Tfhd(Box& aBox, Trex& aTrex)
LOG(Tfhd, "Incomplete Box (missing flags)");
return;
}
- mFlags = reader->ReadU32();
+ if (!reader->ReadU32(mFlags)) {
+ return;
+ }
size_t need = sizeof(uint32_t) /* trackid */;
uint8_t flag[] = { 1, 2, 8, 0x10, 0x20, 0 };
uint8_t flagSize[] = { sizeof(uint64_t), sizeof(uint32_t), sizeof(uint32_t), sizeof(uint32_t), sizeof(uint32_t) };
@@ -747,20 +806,34 @@ Tfhd::Tfhd(Box& aBox, Trex& aTrex)
(uint64_t)reader->Remaining(), (uint64_t)need);
return;
}
- mTrackId = reader->ReadU32();
- mBaseDataOffset =
- mFlags & 1 ? reader->ReadU64() : aBox.Parent()->Parent()->Offset();
+ if (!reader->ReadU32(mTrackId)) {
+ return;
+ }
+ mBaseDataOffset = aBox.Parent()->Parent()->Offset();
+ if (mFlags & 1) {
+ if (!reader->ReadU64(mBaseDataOffset)) {
+ return;
+ }
+ }
if (mFlags & 2) {
- mDefaultSampleDescriptionIndex = reader->ReadU32();
+ if (!reader->ReadU32(mDefaultSampleDescriptionIndex)) {
+ return;
+ }
}
if (mFlags & 8) {
- mDefaultSampleDuration = reader->ReadU32();
+ if (!reader->ReadU32(mDefaultSampleDuration)) {
+ return;
+ }
}
if (mFlags & 0x10) {
- mDefaultSampleSize = reader->ReadU32();
+ if (!reader->ReadU32(mDefaultSampleSize)) {
+ return;
+ }
}
if (mFlags & 0x20) {
- mDefaultSampleFlags = reader->ReadU32();
+ if (!reader->ReadU32(mDefaultSampleFlags)) {
+ return;
+ }
}
mValid = true;
}
@@ -772,7 +845,10 @@ Tfdt::Tfdt(Box& aBox)
LOG(Tfdt, "Incomplete Box (missing flags)");
return;
}
- uint32_t flags = reader->ReadU32();
+ uint32_t flags;
+ if (!reader->ReadU32(flags)) {
+ return;
+ }
uint8_t version = flags >> 24;
size_t need = version ? sizeof(uint64_t) : sizeof(uint32_t) ;
if (reader->Remaining() < need) {
@@ -781,9 +857,15 @@ Tfdt::Tfdt(Box& aBox)
return;
}
if (version == 0) {
- mBaseMediaDecodeTime = reader->ReadU32();
+ uint32_t baseDecodeTime;
+ if (!reader->ReadU32(baseDecodeTime)) {
+ return;
+ }
+ mBaseMediaDecodeTime = baseDecodeTime;
} else if (version == 1) {
- mBaseMediaDecodeTime = reader->ReadU64();
+ if (!reader->ReadU64(mBaseMediaDecodeTime)) {
+ return;
+ }
}
mValid = true;
}
@@ -802,7 +884,10 @@ Edts::Edts(Box& aBox)
LOG(Edts, "Incomplete Box (missing flags)");
return;
}
- uint32_t flags = reader->ReadU32();
+ uint32_t flags;
+ if (!reader->ReadU32(flags)) {
+ return;
+ }
uint8_t version = flags >> 24;
size_t need =
sizeof(uint32_t) + 2*(version ? sizeof(int64_t) : sizeof(uint32_t));
@@ -812,16 +897,27 @@ Edts::Edts(Box& aBox)
return;
}
bool emptyEntry = false;
- uint32_t entryCount = reader->ReadU32();
+ uint32_t entryCount;
+ if (!reader->ReadU32(entryCount)) {
+ return;
+ }
for (uint32_t i = 0; i < entryCount; i++) {
uint64_t segment_duration;
int64_t media_time;
if (version == 1) {
- segment_duration = reader->ReadU64();
- media_time = reader->Read64();
+ if (!reader->ReadU64(segment_duration) ||
+ !reader->Read64(media_time)) {
+ return;
+ }
} else {
- segment_duration = reader->ReadU32();
- media_time = reader->Read32();
+ uint32_t duration;
+ int32_t time;
+ if (!reader->ReadU32(duration) ||
+ !reader->Read32(time)) {
+ return;
+ }
+ segment_duration = duration;
+ media_time = time;
}
if (media_time == -1 && i) {
LOG(Edts, "Multiple empty edit, not handled");
@@ -834,8 +930,12 @@ Edts::Edts(Box& aBox)
} else {
mMediaStart = media_time;
}
- reader->ReadU32(); // media_rate_integer and media_rate_fraction
+ // media_rate_integer and media_rate_fraction
+ if (!reader->Skip(4)) {
+ return;
+ }
}
+ mValid = true;
}
Saiz::Saiz(Box& aBox, AtomType aDefaultType)
@@ -847,7 +947,10 @@ Saiz::Saiz(Box& aBox, AtomType aDefaultType)
LOG(Saiz, "Incomplete Box (missing flags)");
return;
}
- uint32_t flags = reader->ReadU32();
+ uint32_t flags;
+ if (!reader->ReadU32(flags)) {
+ return;
+ }
uint8_t version = flags >> 24;
size_t need =
((flags & 1) ? 2*sizeof(uint32_t) : 0) + sizeof(uint8_t) + sizeof(uint32_t);
@@ -857,11 +960,19 @@ Saiz::Saiz(Box& aBox, AtomType aDefaultType)
return;
}
if (flags & 1) {
- mAuxInfoType = reader->ReadU32();
- mAuxInfoTypeParameter = reader->ReadU32();
+ uint32_t auxType;
+ if (!reader->ReadU32(auxType) ||
+ !reader->ReadU32(mAuxInfoTypeParameter)) {
+ return;
+ }
+ mAuxInfoType = auxType;
+ }
+ uint8_t defaultSampleInfoSize;
+ uint32_t count;
+ if (!reader->ReadU8(defaultSampleInfoSize) ||
+ !reader->ReadU32(count)) {
+ return;
}
- uint8_t defaultSampleInfoSize = reader->ReadU8();
- uint32_t count = reader->ReadU32();
if (defaultSampleInfoSize) {
if (!mSampleInfoSize.SetLength(count, fallible)) {
LOG(Saiz, "OOM");
@@ -886,19 +997,29 @@ Saio::Saio(Box& aBox, AtomType aDefaultType)
LOG(Saio, "Incomplete Box (missing flags)");
return;
}
- uint32_t flags = reader->ReadU32();
+ uint32_t flags;
+ if (!reader->ReadU32(flags)) {
+ return;
+ }
uint8_t version = flags >> 24;
- size_t need = ((flags & 1) ? (2*sizeof(uint32_t)) : 0) + sizeof(uint32_t);
+ size_t need = ((flags & 1) ? (2 * sizeof(uint32_t)) : 0) + sizeof(uint32_t);
if (reader->Remaining() < need) {
LOG(Saio, "Incomplete Box (have:%lld need:%lld)",
(uint64_t)reader->Remaining(), (uint64_t)need);
return;
}
if (flags & 1) {
- mAuxInfoType = reader->ReadU32();
- mAuxInfoTypeParameter = reader->ReadU32();
+ uint32_t auxType;
+ if (!reader->ReadU32(auxType) ||
+ !reader->ReadU32(mAuxInfoTypeParameter)) {
+ return;
+ }
+ mAuxInfoType = auxType;
+ }
+ uint32_t count;
+ if (!reader->ReadU32(count)) {
+ return;
}
- size_t count = reader->ReadU32();
need = (version ? sizeof(uint64_t) : sizeof(uint32_t)) * count;
if (reader->Remaining() < need) {
LOG(Saio, "Incomplete Box (have:%lld need:%lld)",
@@ -910,12 +1031,20 @@ Saio::Saio(Box& aBox, AtomType aDefaultType)
return;
}
if (version == 0) {
+ uint32_t offset;
for (size_t i = 0; i < count; i++) {
- MOZ_ALWAYS_TRUE(mOffsets.AppendElement(reader->ReadU32(), fallible));
+ if (!reader->ReadU32(offset)) {
+ return;
+ }
+ MOZ_ALWAYS_TRUE(mOffsets.AppendElement(offset, fallible));
}
} else {
+ uint64_t offset;
for (size_t i = 0; i < count; i++) {
- MOZ_ALWAYS_TRUE(mOffsets.AppendElement(reader->ReadU64(), fallible));
+ if (!reader->ReadU64(offset)) {
+ return;
+ }
+ MOZ_ALWAYS_TRUE(mOffsets.AppendElement(offset, fallible));
}
}
mValid = true;
diff --git a/media/libstagefright/binding/SinfParser.cpp b/media/libstagefright/binding/SinfParser.cpp
index 5cf3aa553..5f3a2889e 100644
--- a/media/libstagefright/binding/SinfParser.cpp
+++ b/media/libstagefright/binding/SinfParser.cpp
@@ -39,8 +39,13 @@ SinfParser::ParseSchm(Box& aBox)
return;
}
- mozilla::Unused << reader->ReadU32(); // flags -- ignore
- mSinf.mDefaultEncryptionType = reader->ReadU32();
+ uint32_t type;
+ if (!reader->Skip(4) ||
+ !reader->ReadU32(type)) {
+ NS_WARNING("Failed to parse schm data");
+ return;
+ }
+ mSinf.mDefaultEncryptionType = type;
}
void
@@ -62,11 +67,16 @@ SinfParser::ParseTenc(Box& aBox)
return;
}
- mozilla::Unused << reader->ReadU32(); // flags -- ignore
-
- uint32_t isEncrypted = reader->ReadU24();
- mSinf.mDefaultIVSize = reader->ReadU8();
- memcpy(mSinf.mDefaultKeyID, reader->Read(16), 16);
+ uint32_t isEncrypted;
+ const uint8_t* key;
+ if (!reader->Skip(4) || // flags -- ignore
+ !reader->ReadU24(isEncrypted) ||
+ !reader->ReadU8(mSinf.mDefaultIVSize) ||
+ !reader->Read(16, &key)) {
+ NS_WARNING("Failed to parse tenc data");
+ return;
+ }
+ memcpy(mSinf.mDefaultKeyID, key, 16);
}
}
diff --git a/media/libstagefright/binding/include/mp4_demuxer/Box.h b/media/libstagefright/binding/include/mp4_demuxer/Box.h
index f53404a1d..6612f6b49 100644
--- a/media/libstagefright/binding/include/mp4_demuxer/Box.h
+++ b/media/libstagefright/binding/include/mp4_demuxer/Box.h
@@ -12,7 +12,7 @@
#include "MediaResource.h"
#include "mozilla/EndianUtils.h"
#include "mp4_demuxer/AtomType.h"
-#include "mp4_demuxer/ByteReader.h"
+#include "mp4_demuxer/BufferReader.h"
using namespace mozilla;
@@ -73,11 +73,11 @@ public:
, mReader(mBuffer.Elements(), mBuffer.Length())
{
}
- ByteReader* operator->() { return &mReader; }
+ BufferReader* operator->() { return &mReader; }
private:
nsTArray<uint8_t> mBuffer;
- ByteReader mReader;
+ BufferReader mReader;
};
}
diff --git a/media/libstagefright/binding/include/mp4_demuxer/BufferReader.h b/media/libstagefright/binding/include/mp4_demuxer/BufferReader.h
new file mode 100644
index 000000000..160c97fa0
--- /dev/null
+++ b/media/libstagefright/binding/include/mp4_demuxer/BufferReader.h
@@ -0,0 +1,225 @@
+/* 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/. */
+
+#ifndef BUFFER_READER_H_
+#define BUFFER_READER_H_
+
+#include "mozilla/EndianUtils.h"
+#include "mozilla/Vector.h"
+#include "nsTArray.h"
+#include "MediaData.h"
+
+namespace mp4_demuxer {
+
+class MOZ_RAII BufferReader
+{
+public:
+ BufferReader() : mPtr(nullptr), mRemaining(0) {}
+ explicit BufferReader(const mozilla::Vector<uint8_t>& aData)
+ : mPtr(aData.begin()), mRemaining(aData.length()), mLength(aData.length())
+ {
+ }
+ BufferReader(const uint8_t* aData, size_t aSize)
+ : mPtr(aData), mRemaining(aSize), mLength(aSize)
+ {
+ }
+ template<size_t S>
+ explicit BufferReader(const AutoTArray<uint8_t, S>& aData)
+ : mPtr(aData.Elements()), mRemaining(aData.Length()), mLength(aData.Length())
+ {
+ }
+ explicit BufferReader(const nsTArray<uint8_t>& aData)
+ : mPtr(aData.Elements()), mRemaining(aData.Length()), mLength(aData.Length())
+ {
+ }
+ explicit BufferReader(const mozilla::MediaByteBuffer* aData)
+ : mPtr(aData->Elements()), mRemaining(aData->Length()), mLength(aData->Length())
+ {
+ }
+
+ void SetData(const nsTArray<uint8_t>& aData)
+ {
+ MOZ_ASSERT(!mPtr && !mRemaining);
+ mPtr = aData.Elements();
+ mRemaining = aData.Length();
+ mLength = mRemaining;
+ }
+
+ ~BufferReader()
+ {
+ }
+
+ size_t Offset() const
+ {
+ return mLength - mRemaining;
+ }
+
+ size_t Remaining() const { return mRemaining; }
+
+ bool CanRead8() const { return mRemaining >= 1; }
+
+ bool ReadU8(uint8_t& aU8)
+ {
+ const uint8_t* ptr;
+ if (!Read(1, &ptr)) {
+ NS_WARNING("Failed to read data");
+ return false;
+ }
+ aU8 = *ptr;
+ return true;
+ }
+
+ bool CanRead16() { return mRemaining >= 2; }
+
+ bool ReadU16(uint16_t& u16)
+ {
+ const uint8_t* ptr;
+ if (!Read(2, &ptr)) {
+ NS_WARNING("Failed to read data");
+ return false;
+ }
+ u16 = mozilla::BigEndian::readUint16(ptr);
+ return true;
+ }
+
+ bool CanRead32() { return mRemaining >= 4; }
+
+ bool ReadU32(uint32_t& u32)
+ {
+ const uint8_t* ptr;
+ if (!Read(4, &ptr)) {
+ NS_WARNING("Failed to read data");
+ return false;
+ }
+ u32 = mozilla::BigEndian::readUint32(ptr);
+ return true;
+ }
+
+ bool Read32(int32_t& i32)
+ {
+ const uint8_t* ptr;
+ if (!Read(4, &ptr)) {
+ NS_WARNING("Failed to read data");
+ return 0;
+ }
+ i32 = mozilla::BigEndian::readInt32(ptr);
+ return true;
+ }
+
+ bool ReadU64(uint64_t& u64)
+ {
+ const uint8_t* ptr;
+ if (!Read(8, &ptr)) {
+ NS_WARNING("Failed to read data");
+ return false;
+ }
+ u64 = mozilla::BigEndian::readUint64(ptr);
+ return true;
+ }
+
+ bool Read64(int64_t& i64)
+ {
+ const uint8_t* ptr;
+ if (!Read(8, &ptr)) {
+ NS_WARNING("Failed to read data");
+ return false;
+ }
+ i64 = mozilla::BigEndian::readInt64(ptr);
+ return true;
+ }
+
+ bool ReadU24(uint32_t& u32)
+ {
+ const uint8_t* ptr;
+ if (!Read(3, &ptr)) {
+ NS_WARNING("Failed to read data");
+ return false;
+ }
+ u32 = ptr[0] << 16 | ptr[1] << 8 | ptr[2];
+ return true;
+ }
+
+ bool Skip(size_t aCount)
+ {
+ const uint8_t* ptr;
+ if (!Read(aCount, &ptr)) {
+ NS_WARNING("Failed to skip data");
+ return false;
+ }
+ return true;
+ }
+
+ bool Read(size_t aCount, const uint8_t** aPtr)
+ {
+ if (aCount > mRemaining) {
+ mRemaining = 0;
+ return false;
+ }
+ mRemaining -= aCount;
+
+ *aPtr = mPtr;
+ mPtr += aCount;
+
+ return true;
+ }
+
+ uint32_t Align() const
+ {
+ return 4 - ((intptr_t)mPtr & 3);
+ }
+
+ template <typename T> bool CanReadType() const { return mRemaining >= sizeof(T); }
+
+ template <typename T> T ReadType()
+ {
+ const uint8_t* ptr;
+ if (!Read(sizeof(T), &ptr)) {
+ NS_WARNING("ReadType failed");
+ return 0;
+ }
+ return *reinterpret_cast<const T*>(ptr);
+ }
+
+ template <typename T>
+ MOZ_MUST_USE bool ReadArray(nsTArray<T>& aDest, size_t aLength)
+ {
+ const uint8_t* ptr;
+ if (!Read(aLength * sizeof(T), &ptr)) {
+ NS_WARNING("ReadArray failed");
+ return false;
+ }
+
+ aDest.Clear();
+ aDest.AppendElements(reinterpret_cast<const T*>(ptr), aLength);
+ return true;
+ }
+
+ template <typename T>
+ MOZ_MUST_USE bool ReadArray(FallibleTArray<T>& aDest, size_t aLength)
+ {
+ const uint8_t* ptr;
+ if (!Read(aLength * sizeof(T), &ptr)) {
+ NS_WARNING("ReadArray failed");
+ return false;
+ }
+
+ aDest.Clear();
+ if (!aDest.SetCapacity(aLength, mozilla::fallible)) {
+ return false;
+ }
+ MOZ_ALWAYS_TRUE(aDest.AppendElements(reinterpret_cast<const T*>(ptr),
+ aLength,
+ mozilla::fallible));
+ return true;
+ }
+
+private:
+ const uint8_t* mPtr;
+ size_t mRemaining;
+ size_t mLength;
+};
+
+} // namespace mp4_demuxer
+
+#endif
diff --git a/media/libstagefright/binding/include/mp4_demuxer/ByteReader.h b/media/libstagefright/binding/include/mp4_demuxer/ByteReader.h
index 9c7df04bd..f316daa41 100644
--- a/media/libstagefright/binding/include/mp4_demuxer/ByteReader.h
+++ b/media/libstagefright/binding/include/mp4_demuxer/ByteReader.h
@@ -63,7 +63,7 @@ public:
{
auto ptr = Read(1);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return *ptr;
@@ -75,7 +75,7 @@ public:
{
auto ptr = Read(2);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return mozilla::BigEndian::readUint16(ptr);
@@ -85,7 +85,7 @@ public:
{
auto ptr = Read(2);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return mozilla::LittleEndian::readInt16(ptr);
@@ -95,7 +95,7 @@ public:
{
auto ptr = Read(3);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return ptr[0] << 16 | ptr[1] << 8 | ptr[2];
@@ -110,7 +110,7 @@ public:
{
auto ptr = Read(3);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
int32_t result = int32_t(ptr[2] << 16 | ptr[1] << 8 | ptr[0]);
@@ -126,7 +126,7 @@ public:
{
auto ptr = Read(4);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return mozilla::BigEndian::readUint32(ptr);
@@ -136,7 +136,7 @@ public:
{
auto ptr = Read(4);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return mozilla::BigEndian::readInt32(ptr);
@@ -146,7 +146,7 @@ public:
{
auto ptr = Read(8);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return mozilla::BigEndian::readUint64(ptr);
@@ -156,7 +156,7 @@ public:
{
auto ptr = Read(8);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to read data");
return 0;
}
return mozilla::BigEndian::readInt64(ptr);
@@ -192,7 +192,7 @@ public:
{
auto ptr = Peek(1);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to peek data");
return 0;
}
return *ptr;
@@ -202,7 +202,7 @@ public:
{
auto ptr = Peek(2);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to peek data");
return 0;
}
return mozilla::BigEndian::readUint16(ptr);
@@ -212,7 +212,7 @@ public:
{
auto ptr = Peek(3);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to peek data");
return 0;
}
return ptr[0] << 16 | ptr[1] << 8 | ptr[2];
@@ -227,7 +227,7 @@ public:
{
auto ptr = Peek(4);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to peek data");
return 0;
}
return mozilla::BigEndian::readUint32(ptr);
@@ -237,7 +237,7 @@ public:
{
auto ptr = Peek(4);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to peek data");
return 0;
}
return mozilla::BigEndian::readInt32(ptr);
@@ -247,7 +247,7 @@ public:
{
auto ptr = Peek(8);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to peek data");
return 0;
}
return mozilla::BigEndian::readUint64(ptr);
@@ -257,7 +257,7 @@ public:
{
auto ptr = Peek(8);
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("Failed to peek data");
return 0;
}
return mozilla::BigEndian::readInt64(ptr);
@@ -274,7 +274,7 @@ public:
const uint8_t* Seek(size_t aOffset)
{
if (aOffset >= mLength) {
- MOZ_ASSERT(false);
+ NS_WARNING("Seek failed");
return nullptr;
}
@@ -301,7 +301,7 @@ public:
{
auto ptr = Read(sizeof(T));
if (!ptr) {
- MOZ_ASSERT(false);
+ NS_WARNING("ReadType failed");
return 0;
}
return *reinterpret_cast<const T*>(ptr);
@@ -312,6 +312,7 @@ public:
{
auto ptr = Read(aLength * sizeof(T));
if (!ptr) {
+ NS_WARNING("ReadArray failed");
return false;
}
@@ -325,6 +326,7 @@ public:
{
auto ptr = Read(aLength * sizeof(T));
if (!ptr) {
+ NS_WARNING("ReadArray failed");
return false;
}
diff --git a/media/libstagefright/moz.build b/media/libstagefright/moz.build
index c6072d840..5a8c9521a 100644
--- a/media/libstagefright/moz.build
+++ b/media/libstagefright/moz.build
@@ -53,6 +53,7 @@ EXPORTS.mp4_demuxer += [
'binding/include/mp4_demuxer/Atom.h',
'binding/include/mp4_demuxer/AtomType.h',
'binding/include/mp4_demuxer/BitReader.h',
+ 'binding/include/mp4_demuxer/BufferReader.h',
'binding/include/mp4_demuxer/BufferStream.h',
'binding/include/mp4_demuxer/ByteReader.h',
'binding/include/mp4_demuxer/ByteWriter.h',
diff --git a/security/manager/locales/en-US/chrome/pipnss/pipnss.properties b/security/manager/locales/en-US/chrome/pipnss/pipnss.properties
index 9c732ce9d..23d7a323c 100755
--- a/security/manager/locales/en-US/chrome/pipnss/pipnss.properties
+++ b/security/manager/locales/en-US/chrome/pipnss/pipnss.properties
@@ -279,8 +279,7 @@ certErrorExpiredNow=The certificate expired on %1$S. The current time is %2$S.
# LOCALIZATION NOTE (certErrorNotYetValidNow): Do not translate %1$S (date+time certificate will become valid) or %2$S (current date+time)
certErrorNotYetValidNow=The certificate will not be valid until %1$S. The current time is %2$S.
-# LOCALIZATION NOTE (certErrorCodePrefix2): Do not translate <a id="errorCode" title="%1$S">%1$S</a>
-certErrorCodePrefix2=Error code: <a id="errorCode" title="%1$S">%1$S</a>
+certErrorCodePrefix=(Error code: %S)
P12DefaultNickname=Imported Certificate
CertUnknown=Unknown
diff --git a/security/manager/ssl/TransportSecurityInfo.cpp b/security/manager/ssl/TransportSecurityInfo.cpp
index fe39f4017..0e2238ad0 100644
--- a/security/manager/ssl/TransportSecurityInfo.cpp
+++ b/security/manager/ssl/TransportSecurityInfo.cpp
@@ -854,7 +854,7 @@ AppendErrorTextCode(PRErrorCode errorCodeToReport,
nsString formattedString;
nsresult rv;
- rv = component->PIPBundleFormatStringFromName("certErrorCodePrefix2",
+ rv = component->PIPBundleFormatStringFromName("certErrorCodePrefix",
params, 1,
formattedString);
if (NS_SUCCEEDED(rv)) {
diff --git a/security/manager/ssl/nsNSSErrors.cpp b/security/manager/ssl/nsNSSErrors.cpp
index fc8bd3e31..1613eb4e7 100644
--- a/security/manager/ssl/nsNSSErrors.cpp
+++ b/security/manager/ssl/nsNSSErrors.cpp
@@ -84,7 +84,7 @@ nsNSSErrors::getErrorMessageFromCode(PRErrorCode err,
params[0] = idU.get();
nsString formattedString;
- rv = component->PIPBundleFormatStringFromName("certErrorCodePrefix2",
+ rv = component->PIPBundleFormatStringFromName("certErrorCodePrefix",
params, 1,
formattedString);
if (NS_SUCCEEDED(rv)) {
diff --git a/toolkit/components/startup/nsAppStartup.cpp b/toolkit/components/startup/nsAppStartup.cpp
index fde00d1db..391389605 100644
--- a/toolkit/components/startup/nsAppStartup.cpp
+++ b/toolkit/components/startup/nsAppStartup.cpp
@@ -1020,8 +1020,13 @@ nsAppStartup::CreateInstanceWithProfile(nsIToolkitProfile* aProfile)
return rv;
}
+#if defined(XP_WIN)
+ const char *args[] = { "-no-remote", "-P", profileName.get() };
+ rv = process->Run(false, args, 3);
+#else
const char *args[] = { "-P", profileName.get() };
rv = process->Run(false, args, 2);
+#endif
if (NS_WARN_IF(NS_FAILED(rv))) {
return rv;
}
diff --git a/toolkit/components/thumbnails/PageThumbs.jsm b/toolkit/components/thumbnails/PageThumbs.jsm
index 9bd3ae4b3..b0affee92 100644
--- a/toolkit/components/thumbnails/PageThumbs.jsm
+++ b/toolkit/components/thumbnails/PageThumbs.jsm
@@ -609,7 +609,15 @@ this.PageThumbsStorage = {
writeData: function Storage_writeData(aURL, aData, aNoOverwrite) {
let path = this.getFilePathForURL(aURL);
this.ensurePath();
- aData = new Uint8Array(aData);
+
+ // XXX: We try/catch here since 'null' isn't accepted until we implement
+ // ES2017's new Uint8Array(); allowance.
+ try {
+ aData = new Uint8Array(aData);
+ } catch(e) {
+ aData = new Uint8Array(0);
+ }
+
let msg = [
path,
aData,