summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/palemoon/base/content/nsContextMenu.js17
-rw-r--r--application/palemoon/modules/WindowsPreviewPerTab.jsm55
-rw-r--r--dom/base/nsRange.cpp2
-rw-r--r--dom/base/test/mochitest.ini1
-rw-r--r--dom/html/crashtests/1350972.html22
-rw-r--r--dom/html/crashtests/crashtests.list1
-rw-r--r--security/certverifier/NSSCertDBTrustDomain.cpp4
-rw-r--r--toolkit/themes/linux/global/jar.mn6
8 files changed, 74 insertions, 34 deletions
diff --git a/application/palemoon/base/content/nsContextMenu.js b/application/palemoon/base/content/nsContextMenu.js
index 1d3ceb17e..017ab87cc 100644
--- a/application/palemoon/base/content/nsContextMenu.js
+++ b/application/palemoon/base/content/nsContextMenu.js
@@ -1116,10 +1116,17 @@ nsContextMenu.prototype = {
}
}
- // set up a channel to do the saving
- var ioService = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
- var channel = ioService.newChannelFromURI(makeURI(linkURL));
+ // setting up a new channel for 'right click - save link as ...'
+ // ideally we should use:
+ // * doc - as the loadingNode, and/or
+ // * this.principal - as the loadingPrincipal
+ // for now lets use systemPrincipal to bypass mixedContentBlocker
+ // checks after redirects, see bug: 1136055
+ var channel = NetUtil.newChannel({
+ uri: makeURI(linkURL),
+ loadUsingSystemPrincipal: true
+ });
+
if (linkDownload)
channel.contentDispositionFilename = linkDownload;
if (channel instanceof Ci.nsIPrivateBrowsingChannel) {
@@ -1152,7 +1159,7 @@ nsContextMenu.prototype = {
timer.TYPE_ONE_SHOT);
// kick off the channel with our proxy object as the listener
- channel.asyncOpen(new saveAsListener(), null);
+ channel.asyncOpen2(new saveAsListener());
},
// Save URL of clicked-on link.
diff --git a/application/palemoon/modules/WindowsPreviewPerTab.jsm b/application/palemoon/modules/WindowsPreviewPerTab.jsm
index e186bcad2..c1ed05c39 100644
--- a/application/palemoon/modules/WindowsPreviewPerTab.jsm
+++ b/application/palemoon/modules/WindowsPreviewPerTab.jsm
@@ -62,9 +62,6 @@ const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
////////////////////////////////////////////////////////////////////////////////
//// Various utility properties
-XPCOMUtils.defineLazyServiceGetter(this, "ioSvc",
- "@mozilla.org/network/io-service;1",
- "nsIIOService");
XPCOMUtils.defineLazyServiceGetter(this, "imgTools",
"@mozilla.org/image/tools;1",
"imgITools");
@@ -73,8 +70,13 @@ XPCOMUtils.defineLazyServiceGetter(this, "faviconSvc",
"nsIFaviconService");
// nsIURI -> imgIContainer
-function _imageFromURI(uri, privateMode, callback) {
- let channel = ioSvc.newChannelFromURI(uri);
+function _imageFromURI(doc, uri, privateMode, callback) {
+ let channel = NetUtil.newChannel({
+ uri: uri,
+ loadUsingSystemPrincipal: true,
+ contentPolicyType: Ci.nsIContentPolicy.TYPE_INTERNAL_IMAGE
+ });
+
try {
channel.QueryInterface(Ci.nsIPrivateBrowsingChannel);
channel.setPrivate(privateMode);
@@ -93,17 +95,17 @@ function _imageFromURI(uri, privateMode, callback) {
// favicon).
let defaultURI = faviconSvc.defaultFavicon;
if (!defaultURI.equals(uri))
- _imageFromURI(defaultURI, callback);
+ _imageFromURI(doc, defaultURI, privateMode, callback);
}
});
}
// string? -> imgIContainer
-function getFaviconAsImage(iconurl, privateMode, callback) {
+function getFaviconAsImage(doc, iconurl, privateMode, callback) {
if (iconurl)
- _imageFromURI(NetUtil.newURI(iconurl), privateMode, callback);
+ _imageFromURI(doc, NetUtil.newURI(iconurl), privateMode, callback);
else
- _imageFromURI(faviconSvc.defaultFavicon, privateMode, callback);
+ _imageFromURI(doc, faviconSvc.defaultFavicon, privateMode, callback);
}
// Snaps the given rectangle to be pixel-aligned at the given scale
@@ -460,12 +462,16 @@ TabWindow.prototype = {
preview.visible = AeroPeek.enabled;
preview.active = this.tabbrowser.selectedTab == controller.tab;
// Grab the default favicon
- getFaviconAsImage(null, PrivateBrowsingUtils.isWindowPrivate(this.win), function (img) {
- // It is possible that we've already gotten the real favicon, so make sure
- // we have not set one before setting this default one.
- if (!preview.icon)
- preview.icon = img;
- });
+ getFaviconAsImage(
+ controller.linkedBrowser.contentWindow.document,
+ null,
+ PrivateBrowsingUtils.isWindowPrivate(this.win),
+ function (img) {
+ // It is possible that we've already gotten the real favicon, so make sure
+ // we have not set one before setting this default one.
+ if (!preview.icon)
+ preview.icon = img;
+ });
return preview;
},
@@ -552,14 +558,17 @@ TabWindow.prototype = {
//// Browser progress listener
onLinkIconAvailable: function (aBrowser, aIconURL) {
let self = this;
- getFaviconAsImage(aIconURL, PrivateBrowsingUtils.isWindowPrivate(this.win), function (img) {
- let index = self.tabbrowser.browsers.indexOf(aBrowser);
- // Only add it if we've found the index. The tab could have closed!
- if (index != -1) {
- let tab = self.tabbrowser.tabs[index];
- self.previews.get(tab).icon = img;
- }
- });
+ getFaviconAsImage(
+ aBrowser.contentWindow.document,
+ aIconURL,PrivateBrowsingUtils.isWindowPrivate(this.win),
+ function (img) {
+ let index = self.tabbrowser.browsers.indexOf(aBrowser);
+ // Only add it if we've found the index. The tab could have closed!
+ if (index != -1) {
+ let tab = self.tabbrowser.tabs[index];
+ self.previews.get(tab).icon = img;
+ }
+ });
}
}
diff --git a/dom/base/nsRange.cpp b/dom/base/nsRange.cpp
index 37ba147af..4b4ce7885 100644
--- a/dom/base/nsRange.cpp
+++ b/dom/base/nsRange.cpp
@@ -3194,7 +3194,7 @@ nsRange::AutoInvalidateSelection::~AutoInvalidateSelection()
mIsNested = false;
::InvalidateAllFrames(mCommonAncestor);
nsINode* commonAncestor = mRange->GetRegisteredCommonAncestor();
- if (commonAncestor != mCommonAncestor) {
+ if (commonAncestor && commonAncestor != mCommonAncestor) {
::InvalidateAllFrames(commonAncestor);
}
}
diff --git a/dom/base/test/mochitest.ini b/dom/base/test/mochitest.ini
index ea86290d9..ddfd57443 100644
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -609,6 +609,7 @@ skip-if = toolkit == 'android'
[test_bug1307730.html]
[test_bug1308069.html]
[test_bug1314032.html]
+[test_bug1375050.html]
[test_caretPositionFromPoint.html]
[test_change_policy.html]
[test_classList.html]
diff --git a/dom/html/crashtests/1350972.html b/dom/html/crashtests/1350972.html
new file mode 100644
index 000000000..7af7f9e17
--- /dev/null
+++ b/dom/html/crashtests/1350972.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+ try { o1 = document.createElement('tr'); } catch(e) {};
+ try { o2 = document.createElement('div'); } catch(e) {};
+ try { o3 = document.createElement('hr'); } catch(e) {};
+ try { o4 = document.createElement('textarea'); } catch(e) {};
+ try { o5 = document.getSelection(); } catch(e) {};
+ try { o6 = document.createRange(); } catch(e) {};
+ try { document.documentElement.appendChild(o2); } catch(e) {};
+ try { document.documentElement.appendChild(o3); } catch(e) {};
+ try { o2.appendChild(o4); } catch(e) {};
+ try { o3.outerHTML = "<noscript contenteditable='true'>"; } catch(e) {};
+ try { o4.select(); } catch(e) {};
+ try { o5.addRange(o6); } catch(e) {};
+ try { document.documentElement.appendChild(o1); } catch(e) {};
+ try { o5.selectAllChildren(o1); } catch(e) {};
+ try { o6.selectNode(o1); } catch(e) {};
+</script>
+</head>
+</html> \ No newline at end of file
diff --git a/dom/html/crashtests/crashtests.list b/dom/html/crashtests/crashtests.list
index e55a0a350..a2068ea4e 100644
--- a/dom/html/crashtests/crashtests.list
+++ b/dom/html/crashtests/crashtests.list
@@ -78,4 +78,5 @@ load 1237633.html
load 1281972-1.html
load 1282894.html
load 1290904.html
+asserts(0-3) load 1350972.html
load 1386905.html
diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
index 412adb403..1fe27b760 100644
--- a/security/certverifier/NSSCertDBTrustDomain.cpp
+++ b/security/certverifier/NSSCertDBTrustDomain.cpp
@@ -242,9 +242,9 @@ NSSCertDBTrustDomain::GetCertTrust(EndEntityOrCA endEntityOrCA,
return Success;
}
- // For TRUST, we only use the CERTDB_TRUSTED_CA bit, because Gecko hasn't
+ // For TRUST, we only use the CERTDB_TRUSTED_CA bit, because Goanna hasn't
// needed to consider end-entity certs to be their own trust anchors since
- // Gecko implemented nsICertOverrideService.
+ // Goanna implemented nsICertOverrideService.
if (flags & CERTDB_TRUSTED_CA) {
if (policy.IsAnyPolicy()) {
trustLevel = TrustLevel::TrustAnchor;
diff --git a/toolkit/themes/linux/global/jar.mn b/toolkit/themes/linux/global/jar.mn
index c9b579112..b0d0b9ddb 100644
--- a/toolkit/themes/linux/global/jar.mn
+++ b/toolkit/themes/linux/global/jar.mn
@@ -53,6 +53,6 @@ toolkit.jar:
skin/classic/global/tree/twisty-clsd.png (tree/twisty-clsd.png)
skin/classic/global/tree/twisty-open.png (tree/twisty-open.png)
- skin/classic/global/console/console.css (console/console.css)
- skin/classic/global/console/console.png (console/console.png)
- skin/classic/global/console/console-toolbar.png (console/console-toolbar.png)
+ skin/classic/global/console/console.css (console/console.css)
+ skin/classic/global/console/console.png (console/console.png)
+ skin/classic/global/console/console-toolbar.png (console/console-toolbar.png)