mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-18 03:46:03 +00:00
www/waterfox: update to 56.0.3
- Apply more FF58 fixes [1] Changes: https://github.com/MrAlex94/Waterfox/compare/56.0.2...56.0.3 Security: a891c5b4-3d7a-4de9-9c71-eef3fd698c77 [1]
This commit is contained in:
parent
8fc54fc791
commit
80a466e59a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=458873
@ -1,8 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= waterfox
|
||||
DISTVERSION= 56.0.2
|
||||
PORTREVISION= 1
|
||||
DISTVERSION= 56.0.3
|
||||
CATEGORIES= www ipv6
|
||||
|
||||
MAINTAINER= jbeich@FreeBSD.org
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1515201685
|
||||
SHA256 (MrAlex94-Waterfox-56.0.2_GH0.tar.gz) = baf0717ed49005535cce646976c4d088a25033bd83960381388e7b2ba23389c9
|
||||
SIZE (MrAlex94-Waterfox-56.0.2_GH0.tar.gz) = 394203428
|
||||
TIMESTAMP = 1515710085
|
||||
SHA256 (MrAlex94-Waterfox-56.0.3_GH0.tar.gz) = 80d4bba90b2d8aac7223aa81302ea56e0dc226e29d01c206e2cbf375d471a9fa
|
||||
SIZE (MrAlex94-Waterfox-56.0.3_GH0.tar.gz) = 394227402
|
||||
|
56
www/waterfox/files/patch-bug1246883
Normal file
56
www/waterfox/files/patch-bug1246883
Normal file
@ -0,0 +1,56 @@
|
||||
commit b175b27efefd
|
||||
Author: Mantaroh Yoshinaga <mantaroh@gmail.com>
|
||||
Date: Wed Dec 13 08:58:05 2017 +0900
|
||||
|
||||
Bug 1246883 - Load UA Stylesheet when printing the SVG document. r=jwatt, a=gchang
|
||||
|
||||
Currently, Gecko load only minimal-xul.css if the document is the SVG[1].
|
||||
In the case of printing SVG document, gecko should load ua.css for using style
|
||||
which related to print.
|
||||
|
||||
This patch will load ua.css when printing the SVG document.
|
||||
|
||||
[1] http://searchfox.org/mozilla-central/rev/67f38de2443e6b613d874fcf4d2cd1f2fc3d5e97/layout/base/nsDocumentViewer.cpp#2472
|
||||
|
||||
MozReview-Commit-ID: JtdaEvX8QTw
|
||||
|
||||
--HG--
|
||||
extra : source : 727a90ad06e715b3a4457b2532e922d22a2469a2
|
||||
---
|
||||
layout/printing/nsPrintEngine.cpp | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git layout/printing/nsPrintEngine.cpp layout/printing/nsPrintEngine.cpp
|
||||
index f8d8f1077ba5..3ac2211d159d 100644
|
||||
--- layout/printing/nsPrintEngine.cpp
|
||||
+++ layout/printing/nsPrintEngine.cpp
|
||||
@@ -75,6 +75,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||
#include "nsISupportsUtils.h"
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIDOMDocument.h"
|
||||
+#include "nsIDocumentObserver.h"
|
||||
#include "nsISelectionListener.h"
|
||||
#include "nsISelectionPrivate.h"
|
||||
#include "nsIDOMRange.h"
|
||||
@@ -82,6 +83,7 @@ static const char kPrintingPromptService[] = "@mozilla.org/embedcomp/printingpro
|
||||
#include "nsLayoutCID.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "nsIPresShell.h"
|
||||
+#include "nsLayoutStylesheetCache.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
|
||||
@@ -2267,6 +2269,13 @@ nsPrintEngine::ReflowPrintObject(const UniquePtr<nsPrintObject>& aPO)
|
||||
|
||||
StyleSetHandle styleSet = mDocViewerPrint->CreateStyleSet(aPO->mDocument);
|
||||
|
||||
+ if (aPO->mDocument->IsSVGDocument()) {
|
||||
+ // The SVG document only loads minimal-xul.css, so it doesn't apply other
|
||||
+ // styles. We should add ua.css for applying style which related to print.
|
||||
+ auto cache = nsLayoutStylesheetCache::For(aPO->mDocument->GetStyleBackendType());
|
||||
+ styleSet->PrependStyleSheet(SheetType::Agent, cache->UASheet());
|
||||
+ }
|
||||
+
|
||||
aPO->mPresShell = aPO->mDocument->CreateShell(aPO->mPresContext,
|
||||
aPO->mViewManager, styleSet);
|
||||
if (!aPO->mPresShell) {
|
499
www/waterfox/files/patch-bug1387427
Normal file
499
www/waterfox/files/patch-bug1387427
Normal file
@ -0,0 +1,499 @@
|
||||
commit ecb753bbae79
|
||||
Author: Peter Van der Beken <peterv@propagandism.org>
|
||||
Date: Fri Nov 3 16:58:59 2017 +0100
|
||||
|
||||
Bug 1387427 - Don't insert source content into the document for XSLT transforms. r=smaug, a=gchang
|
||||
|
||||
--HG--
|
||||
extra : source : b069f99a8ca9989f277645bbadc2116dcabd8ad0
|
||||
---
|
||||
dom/xml/nsXMLContentSink.cpp | 93 +++++++++++++++++---------------
|
||||
dom/xml/nsXMLContentSink.h | 8 ++-
|
||||
dom/xslt/base/txURIUtils.cpp | 11 +---
|
||||
dom/xslt/base/txURIUtils.h | 4 +-
|
||||
dom/xslt/nsIDocumentTransformer.h | 6 ++-
|
||||
dom/xslt/xslt/txExecutionState.cpp | 15 ++++--
|
||||
dom/xslt/xslt/txExecutionState.h | 7 ++-
|
||||
dom/xslt/xslt/txMozillaTextOutput.cpp | 2 +-
|
||||
dom/xslt/xslt/txMozillaXMLOutput.cpp | 2 +-
|
||||
dom/xslt/xslt/txMozillaXSLTProcessor.cpp | 37 +++++++------
|
||||
dom/xslt/xslt/txMozillaXSLTProcessor.h | 7 +--
|
||||
11 files changed, 107 insertions(+), 85 deletions(-)
|
||||
|
||||
diff --git dom/xml/nsXMLContentSink.cpp dom/xml/nsXMLContentSink.cpp
|
||||
index 637939261be7..3d973f2bcf97 100644
|
||||
--- dom/xml/nsXMLContentSink.cpp
|
||||
+++ dom/xml/nsXMLContentSink.cpp
|
||||
@@ -152,6 +152,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsXMLContentSink,
|
||||
const StackNode& node = tmp->mContentStack.ElementAt(i);
|
||||
cb.NoteXPCOMChild(node.mContent);
|
||||
}
|
||||
+ NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocumentChildren)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
// nsIContentSink
|
||||
@@ -293,8 +294,7 @@ nsXMLContentSink::DidBuildModel(bool aTerminated)
|
||||
}
|
||||
}
|
||||
|
||||
- nsCOMPtr<nsIDOMDocument> currentDOMDoc(do_QueryInterface(mDocument));
|
||||
- mXSLTProcessor->SetSourceContentModel(currentDOMDoc);
|
||||
+ mXSLTProcessor->SetSourceContentModel(mDocument, mDocumentChildren);
|
||||
// Since the processor now holds a reference to us we drop our reference
|
||||
// to it to avoid owning cycles
|
||||
mXSLTProcessor = nullptr;
|
||||
@@ -358,8 +358,9 @@ NS_IMETHODIMP
|
||||
nsXMLContentSink::OnTransformDone(nsresult aResult,
|
||||
nsIDocument* aResultDocument)
|
||||
{
|
||||
- NS_ASSERTION(NS_FAILED(aResult) || aResultDocument,
|
||||
- "Don't notify about transform success without a document.");
|
||||
+ MOZ_ASSERT(aResultDocument, "Don't notify about transform end without a document.");
|
||||
+
|
||||
+ mDocumentChildren.Clear();
|
||||
|
||||
nsCOMPtr<nsIDOMDocument> domDoc = do_QueryInterface(aResultDocument);
|
||||
|
||||
@@ -368,28 +369,17 @@ nsXMLContentSink::OnTransformDone(nsresult aResult,
|
||||
|
||||
if (NS_FAILED(aResult) && contentViewer) {
|
||||
// Transform failed.
|
||||
- if (domDoc) {
|
||||
- aResultDocument->SetMayStartLayout(false);
|
||||
- // We have an error document.
|
||||
- contentViewer->SetDOMDocument(domDoc);
|
||||
- }
|
||||
- else {
|
||||
- // We don't have an error document, display the
|
||||
- // untransformed source document.
|
||||
- nsCOMPtr<nsIDOMDocument> document = do_QueryInterface(mDocument);
|
||||
- contentViewer->SetDOMDocument(document);
|
||||
- }
|
||||
+ aResultDocument->SetMayStartLayout(false);
|
||||
+ // We have an error document.
|
||||
+ contentViewer->SetDOMDocument(domDoc);
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIDocument> originalDocument = mDocument;
|
||||
- if (NS_SUCCEEDED(aResult) || aResultDocument) {
|
||||
- // Transform succeeded or it failed and we have an error
|
||||
- // document to display.
|
||||
- mDocument = aResultDocument;
|
||||
- nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(mDocument);
|
||||
- if (htmlDoc) {
|
||||
- htmlDoc->SetDocWriteDisabled(false);
|
||||
- }
|
||||
+ // Transform succeeded, or it failed and we have an error document to display.
|
||||
+ mDocument = aResultDocument;
|
||||
+ nsCOMPtr<nsIHTMLDocument> htmlDoc = do_QueryInterface(mDocument);
|
||||
+ if (htmlDoc) {
|
||||
+ htmlDoc->SetDocWriteDisabled(false);
|
||||
}
|
||||
|
||||
// Notify document observers that all the content has been stuck
|
||||
@@ -617,12 +607,17 @@ nsXMLContentSink::AddContentAsLeaf(nsIContent *aContent)
|
||||
{
|
||||
nsresult result = NS_OK;
|
||||
|
||||
- if ((eXMLContentSinkState_InProlog == mState) ||
|
||||
- (eXMLContentSinkState_InEpilog == mState)) {
|
||||
- NS_ASSERTION(mDocument, "Fragments have no prolog or epilog");
|
||||
- mDocument->AppendChildTo(aContent, false);
|
||||
- }
|
||||
- else {
|
||||
+ if (mState == eXMLContentSinkState_InProlog) {
|
||||
+ NS_ASSERTION(mDocument, "Fragments have no prolog");
|
||||
+ mDocumentChildren.AppendElement(aContent);
|
||||
+ } else if (mState == eXMLContentSinkState_InEpilog) {
|
||||
+ NS_ASSERTION(mDocument, "Fragments have no epilog");
|
||||
+ if (mXSLTProcessor) {
|
||||
+ mDocumentChildren.AppendElement(aContent);
|
||||
+ } else {
|
||||
+ mDocument->AppendChildTo(aContent, false);
|
||||
+ }
|
||||
+ } else {
|
||||
nsCOMPtr<nsIContent> parent = GetCurrentContent();
|
||||
|
||||
if (parent) {
|
||||
@@ -875,6 +870,20 @@ nsXMLContentSink::SetDocElement(int32_t aNameSpaceID,
|
||||
if (mDocElement)
|
||||
return false;
|
||||
|
||||
+ mDocElement = aContent;
|
||||
+
|
||||
+ if (mXSLTProcessor) {
|
||||
+ mDocumentChildren.AppendElement(aContent);
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ if (!mDocumentChildren.IsEmpty()) {
|
||||
+ for (nsIContent* child : mDocumentChildren) {
|
||||
+ mDocument->AppendChildTo(child, false);
|
||||
+ }
|
||||
+ mDocumentChildren.Clear();
|
||||
+ }
|
||||
+
|
||||
// check for root elements that needs special handling for
|
||||
// prettyprinting
|
||||
if ((aNameSpaceID == kNameSpaceID_XBL &&
|
||||
@@ -893,7 +902,6 @@ nsXMLContentSink::SetDocElement(int32_t aNameSpaceID,
|
||||
}
|
||||
}
|
||||
|
||||
- mDocElement = aContent;
|
||||
nsresult rv = mDocument->AppendChildTo(mDocElement, NotifyForDocElement());
|
||||
if (NS_FAILED(rv)) {
|
||||
// If we return false here, the caller will bail out because it won't
|
||||
@@ -1001,17 +1009,17 @@ nsXMLContentSink::HandleStartElement(const char16_t *aName,
|
||||
mInMonolithicContainer++;
|
||||
}
|
||||
|
||||
- if (content != mDocElement && !mCurrentHead) {
|
||||
- // This isn't the root and we're not inside an XHTML <head>.
|
||||
- // Might need to start layout
|
||||
- MaybeStartLayout(false);
|
||||
- }
|
||||
-
|
||||
- if (content == mDocElement) {
|
||||
- NotifyDocElementCreated(mDocument);
|
||||
+ if (!mXSLTProcessor) {
|
||||
+ if (content == mDocElement) {
|
||||
+ NotifyDocElementCreated(mDocument);
|
||||
|
||||
- if (aInterruptable && NS_SUCCEEDED(result) && mParser && !mParser->IsParserEnabled()) {
|
||||
- return NS_ERROR_HTMLPARSER_BLOCK;
|
||||
+ if (aInterruptable && NS_SUCCEEDED(result) && mParser && !mParser->IsParserEnabled()) {
|
||||
+ return NS_ERROR_HTMLPARSER_BLOCK;
|
||||
+ }
|
||||
+ } else if (!mCurrentHead) {
|
||||
+ // This isn't the root and we're not inside an XHTML <head>.
|
||||
+ // Might need to start layout
|
||||
+ MaybeStartLayout(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1171,9 +1179,9 @@ nsXMLContentSink::HandleDoctypeDecl(const nsAString & aSubset,
|
||||
nsCOMPtr<nsIContent> content = do_QueryInterface(docType);
|
||||
NS_ASSERTION(content, "doctype isn't content?");
|
||||
|
||||
- rv = mDocument->AppendChildTo(content, false);
|
||||
+ mDocumentChildren.AppendElement(content);
|
||||
DidAddContent();
|
||||
- return NS_SUCCEEDED(rv) ? DidProcessATokenImpl() : rv;
|
||||
+ return DidProcessATokenImpl();
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -1321,6 +1329,7 @@ nsXMLContentSink::ReportError(const char16_t* aErrorText,
|
||||
mIsDocumentObserver = false;
|
||||
|
||||
// Clear the current content
|
||||
+ mDocumentChildren.Clear();
|
||||
nsCOMPtr<nsIDOMNode> node(do_QueryInterface(mDocument));
|
||||
if (node) {
|
||||
for (;;) {
|
||||
diff --git dom/xml/nsXMLContentSink.h dom/xml/nsXMLContentSink.h
|
||||
index a1a7fc8814e9..17ac940caa07 100644
|
||||
--- dom/xml/nsXMLContentSink.h
|
||||
+++ dom/xml/nsXMLContentSink.h
|
||||
@@ -139,7 +139,7 @@ protected:
|
||||
|
||||
void DidAddContent()
|
||||
{
|
||||
- if (IsTimeToNotify()) {
|
||||
+ if (!mXSLTProcessor && IsTimeToNotify()) {
|
||||
FlushTags();
|
||||
}
|
||||
}
|
||||
@@ -190,6 +190,12 @@ protected:
|
||||
|
||||
nsCOMPtr<nsIDocumentTransformer> mXSLTProcessor;
|
||||
|
||||
+ // Holds the children in the prolog until the root element is added, after which they're
|
||||
+ // inserted in the document. However, if we're doing an XSLT transform this will
|
||||
+ // actually hold all the children of the source document, until the transform is
|
||||
+ // finished. After the transform is finished we'll just discard the children.
|
||||
+ nsTArray<nsCOMPtr<nsIContent>> mDocumentChildren;
|
||||
+
|
||||
static const int NS_ACCUMULATION_BUFFER_SIZE = 4096;
|
||||
// Our currently accumulated text that we have not flushed to a textnode yet.
|
||||
char16_t mText[NS_ACCUMULATION_BUFFER_SIZE];
|
||||
diff --git dom/xslt/base/txURIUtils.cpp dom/xslt/base/txURIUtils.cpp
|
||||
index 2c0dec942b80..3f3556f80110 100644
|
||||
--- dom/xslt/base/txURIUtils.cpp
|
||||
+++ dom/xslt/base/txURIUtils.cpp
|
||||
@@ -43,16 +43,9 @@ void URIUtils::resolveHref(const nsAString& href, const nsAString& base,
|
||||
|
||||
// static
|
||||
void
|
||||
-URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsIDOMNode *aSourceNode)
|
||||
+URIUtils::ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode)
|
||||
{
|
||||
- nsCOMPtr<nsINode> node = do_QueryInterface(aSourceNode);
|
||||
- if (!node) {
|
||||
- // XXXbz passing nullptr as the first arg to Reset is illegal
|
||||
- aNewDoc->Reset(nullptr, nullptr);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- nsCOMPtr<nsIDocument> sourceDoc = node->OwnerDoc();
|
||||
+ nsCOMPtr<nsIDocument> sourceDoc = aSourceNode->OwnerDoc();
|
||||
nsIPrincipal* sourcePrincipal = sourceDoc->NodePrincipal();
|
||||
|
||||
// Copy the channel and loadgroup from the source document.
|
||||
diff --git dom/xslt/base/txURIUtils.h dom/xslt/base/txURIUtils.h
|
||||
index ca38538a8b82..ad182a00a795 100644
|
||||
--- dom/xslt/base/txURIUtils.h
|
||||
+++ dom/xslt/base/txURIUtils.h
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "txCore.h"
|
||||
|
||||
class nsIDocument;
|
||||
-class nsIDOMNode;
|
||||
+class nsINode;
|
||||
|
||||
/**
|
||||
* A utility class for URI handling
|
||||
@@ -22,7 +22,7 @@ public:
|
||||
/**
|
||||
* Reset the given document with the document of the source node
|
||||
*/
|
||||
- static void ResetWithSource(nsIDocument *aNewDoc, nsIDOMNode *aSourceNode);
|
||||
+ static void ResetWithSource(nsIDocument *aNewDoc, nsINode *aSourceNode);
|
||||
|
||||
/**
|
||||
* Resolves the given href argument, using the given documentBase
|
||||
diff --git dom/xslt/nsIDocumentTransformer.h dom/xslt/nsIDocumentTransformer.h
|
||||
index a5df807ffe8c..34343e8e1a15 100644
|
||||
--- dom/xslt/nsIDocumentTransformer.h
|
||||
+++ dom/xslt/nsIDocumentTransformer.h
|
||||
@@ -7,10 +7,13 @@
|
||||
|
||||
#include "nsISupports.h"
|
||||
|
||||
+template<class> class nsCOMPtr;
|
||||
+class nsIContent;
|
||||
class nsIDocument;
|
||||
class nsIDOMNode;
|
||||
class nsIURI;
|
||||
class nsString;
|
||||
+template<class> class nsTArray;
|
||||
|
||||
#define NS_ITRANSFORMOBSERVER_IID \
|
||||
{ 0x04b2d17c, 0xe98d, 0x45f5, \
|
||||
@@ -43,7 +46,8 @@ public:
|
||||
|
||||
NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) = 0;
|
||||
NS_IMETHOD LoadStyleSheet(nsIURI* aUri, nsIDocument* aLoaderDocument) = 0;
|
||||
- NS_IMETHOD SetSourceContentModel(nsIDOMNode* aSource) = 0;
|
||||
+ NS_IMETHOD SetSourceContentModel(nsIDocument* aDocument,
|
||||
+ const nsTArray<nsCOMPtr<nsIContent>>& aSource) = 0;
|
||||
NS_IMETHOD CancelLoads() = 0;
|
||||
|
||||
NS_IMETHOD AddXSLTParamNamespace(const nsString& aPrefix,
|
||||
diff --git dom/xslt/xslt/txExecutionState.cpp dom/xslt/xslt/txExecutionState.cpp
|
||||
index e1d714189ce7..2fc84971d2d3 100644
|
||||
--- dom/xslt/xslt/txExecutionState.cpp
|
||||
+++ dom/xslt/xslt/txExecutionState.cpp
|
||||
@@ -17,9 +17,9 @@
|
||||
const int32_t txExecutionState::kMaxRecursionDepth = 20000;
|
||||
|
||||
nsresult
|
||||
-txLoadedDocumentsHash::init(txXPathNode* aSourceDocument)
|
||||
+txLoadedDocumentsHash::init(const txXPathNode& aSource)
|
||||
{
|
||||
- mSourceDocument = aSourceDocument;
|
||||
+ mSourceDocument = txXPathNodeUtils::getOwnerDocument(aSource);
|
||||
|
||||
nsAutoString baseURI;
|
||||
nsresult rv = txXPathNodeUtils::getBaseURI(*mSourceDocument, baseURI);
|
||||
@@ -27,7 +27,14 @@ txLoadedDocumentsHash::init(txXPathNode* aSourceDocument)
|
||||
return rv;
|
||||
}
|
||||
|
||||
- PutEntry(baseURI)->mDocument = mSourceDocument;
|
||||
+ // Technically the hash holds documents, but we allow any node that we're transforming
|
||||
+ // from. In particular, the document() function uses this hash and it can return the
|
||||
+ // source document, but if we're transforming from a document fragment (through
|
||||
+ // txMozillaXSLTProcessor::SetSourceContentModel/txMozillaXSLTProcessor::DoTransform)
|
||||
+ // or from another type of node (through txMozillaXSLTProcessor::TransformToDocument
|
||||
+ // or txMozillaXSLTProcessor::TransformToFragment) it makes more sense to return the
|
||||
+ // real root of the source tree, which is the node where the transform started.
|
||||
+ PutEntry(baseURI)->mDocument = txXPathNativeNode::createXPathNode(txXPathNativeNode::getNode(aSource));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@@ -121,7 +128,7 @@ txExecutionState::init(const txXPathNode& aNode,
|
||||
mOutputHandler->startDocument();
|
||||
|
||||
// Set up loaded-documents-hash
|
||||
- rv = mLoadedDocuments.init(txXPathNodeUtils::getOwnerDocument(aNode));
|
||||
+ rv = mLoadedDocuments.init(aNode);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
// Init members
|
||||
diff --git dom/xslt/xslt/txExecutionState.h dom/xslt/xslt/txExecutionState.h
|
||||
index 44f1918c86b0..300bcfed07e4 100644
|
||||
--- dom/xslt/xslt/txExecutionState.h
|
||||
+++ dom/xslt/xslt/txExecutionState.h
|
||||
@@ -56,16 +56,15 @@ class txLoadedDocumentsHash : public nsTHashtable<txLoadedDocumentEntry>
|
||||
{
|
||||
public:
|
||||
txLoadedDocumentsHash()
|
||||
- : nsTHashtable<txLoadedDocumentEntry>(4),
|
||||
- mSourceDocument(nullptr)
|
||||
+ : nsTHashtable<txLoadedDocumentEntry>(4)
|
||||
{
|
||||
}
|
||||
~txLoadedDocumentsHash();
|
||||
- MOZ_MUST_USE nsresult init(txXPathNode* aSourceDocument);
|
||||
+ MOZ_MUST_USE nsresult init(const txXPathNode& aSource);
|
||||
|
||||
private:
|
||||
friend class txExecutionState;
|
||||
- txXPathNode* mSourceDocument;
|
||||
+ nsAutoPtr<txXPathNode> mSourceDocument;
|
||||
};
|
||||
|
||||
|
||||
diff --git dom/xslt/xslt/txMozillaTextOutput.cpp dom/xslt/xslt/txMozillaTextOutput.cpp
|
||||
index 9056bd8f2608..c2c6ba8757be 100644
|
||||
--- dom/xslt/xslt/txMozillaTextOutput.cpp
|
||||
+++ dom/xslt/xslt/txMozillaTextOutput.cpp
|
||||
@@ -153,7 +153,7 @@ txMozillaTextOutput::createResultDocument(nsIDOMDocument* aSourceDocument,
|
||||
NS_ASSERTION(mDocument, "Need document");
|
||||
|
||||
// Reset and set up document
|
||||
- URIUtils::ResetWithSource(mDocument, aSourceDocument);
|
||||
+ URIUtils::ResetWithSource(mDocument, source);
|
||||
// Only do this after resetting the document to ensure we have the
|
||||
// correct principal.
|
||||
mDocument->SetScriptHandlingObject(sgo);
|
||||
diff --git dom/xslt/xslt/txMozillaXMLOutput.cpp dom/xslt/xslt/txMozillaXMLOutput.cpp
|
||||
index 451f093682a4..5c254e22c0e9 100644
|
||||
--- dom/xslt/xslt/txMozillaXMLOutput.cpp
|
||||
+++ dom/xslt/xslt/txMozillaXMLOutput.cpp
|
||||
@@ -812,7 +812,7 @@ txMozillaXMLOutput::createResultDocument(const nsAString& aName, int32_t aNsID,
|
||||
mNodeInfoManager = mDocument->NodeInfoManager();
|
||||
|
||||
// Reset and set up the document
|
||||
- URIUtils::ResetWithSource(mDocument, aSourceDocument);
|
||||
+ URIUtils::ResetWithSource(mDocument, source);
|
||||
|
||||
// Make sure we set the script handling object after resetting with the
|
||||
// source, so that we have the right principal.
|
||||
diff --git dom/xslt/xslt/txMozillaXSLTProcessor.cpp dom/xslt/xslt/txMozillaXSLTProcessor.cpp
|
||||
index bc554e54878e..54e7c2aed220 100644
|
||||
--- dom/xslt/xslt/txMozillaXSLTProcessor.cpp
|
||||
+++ dom/xslt/xslt/txMozillaXSLTProcessor.cpp
|
||||
@@ -377,15 +377,27 @@ txMozillaXSLTProcessor::SetTransformObserver(nsITransformObserver* aObserver)
|
||||
}
|
||||
|
||||
nsresult
|
||||
-txMozillaXSLTProcessor::SetSourceContentModel(nsIDOMNode* aSourceDOM)
|
||||
+txMozillaXSLTProcessor::SetSourceContentModel(nsIDocument* aDocument,
|
||||
+ const nsTArray<nsCOMPtr<nsIContent>>& aSource)
|
||||
{
|
||||
- mSource = aSourceDOM;
|
||||
-
|
||||
if (NS_FAILED(mTransformResult)) {
|
||||
notifyError();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
+ mSource = aDocument->CreateDocumentFragment();
|
||||
+
|
||||
+ ErrorResult rv;
|
||||
+ for (nsIContent* child : aSource) {
|
||||
+ // XPath data model doesn't have DocumentType nodes.
|
||||
+ if (child->NodeType() != nsIDOMNode::DOCUMENT_TYPE_NODE) {
|
||||
+ mSource->AppendChild(*child, rv);
|
||||
+ if (rv.Failed()) {
|
||||
+ return rv.StealNSResult();
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if (mStylesheet) {
|
||||
return DoTransform();
|
||||
}
|
||||
@@ -552,8 +564,7 @@ public:
|
||||
|
||||
~nsTransformBlockerEvent()
|
||||
{
|
||||
- nsCOMPtr<nsIDocument> document =
|
||||
- do_QueryInterface(mProcessor->GetSourceContentModel());
|
||||
+ nsCOMPtr<nsIDocument> document = mProcessor->GetSourceContentModel()->OwnerDoc();
|
||||
document->UnblockOnload(true);
|
||||
}
|
||||
|
||||
@@ -572,13 +583,9 @@ txMozillaXSLTProcessor::DoTransform()
|
||||
NS_ASSERTION(mObserver, "no observer");
|
||||
NS_ASSERTION(NS_IsMainThread(), "should only be on main thread");
|
||||
|
||||
- nsresult rv;
|
||||
- nsCOMPtr<nsIDocument> document = do_QueryInterface(mSource, &rv);
|
||||
- NS_ENSURE_SUCCESS(rv, rv);
|
||||
-
|
||||
nsCOMPtr<nsIRunnable> event = new nsTransformBlockerEvent(this);
|
||||
- document->BlockOnload();
|
||||
- rv = NS_DispatchToCurrentThread(event);
|
||||
+ mSource->OwnerDoc()->BlockOnload();
|
||||
+ nsresult rv = NS_DispatchToCurrentThread(event);
|
||||
if (NS_FAILED(rv)) {
|
||||
// XXX Maybe we should just display the source document in this case?
|
||||
// Also, set up context information, see bug 204655.
|
||||
@@ -643,7 +650,7 @@ txMozillaXSLTProcessor::TransformToDocument(nsIDOMNode *aSource,
|
||||
nsresult rv = ensureStylesheet();
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
- mSource = aSource;
|
||||
+ mSource = do_QueryInterface(aSource);
|
||||
|
||||
return TransformToDoc(aResult, true);
|
||||
}
|
||||
@@ -657,11 +664,7 @@ txMozillaXSLTProcessor::TransformToDoc(nsIDOMDocument **aResult,
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
- nsCOMPtr<nsIDOMDocument> sourceDOMDocument;
|
||||
- mSource->GetOwnerDocument(getter_AddRefs(sourceDOMDocument));
|
||||
- if (!sourceDOMDocument) {
|
||||
- sourceDOMDocument = do_QueryInterface(mSource);
|
||||
- }
|
||||
+ nsCOMPtr<nsIDOMDocument> sourceDOMDocument = do_QueryInterface(mSource->OwnerDoc());
|
||||
|
||||
txExecutionState es(mStylesheet, IsLoadDisabled());
|
||||
|
||||
diff --git dom/xslt/xslt/txMozillaXSLTProcessor.h dom/xslt/xslt/txMozillaXSLTProcessor.h
|
||||
index 569ca7adbf6e..b3c5420d6fee 100644
|
||||
--- dom/xslt/xslt/txMozillaXSLTProcessor.h
|
||||
+++ dom/xslt/xslt/txMozillaXSLTProcessor.h
|
||||
@@ -75,7 +75,8 @@ public:
|
||||
// nsIDocumentTransformer interface
|
||||
NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) override;
|
||||
NS_IMETHOD LoadStyleSheet(nsIURI* aUri, nsIDocument* aLoaderDocument) override;
|
||||
- NS_IMETHOD SetSourceContentModel(nsIDOMNode* aSource) override;
|
||||
+ NS_IMETHOD SetSourceContentModel(nsIDocument* aDocument,
|
||||
+ const nsTArray<nsCOMPtr<nsIContent>>& aSource) override;
|
||||
NS_IMETHOD CancelLoads() override {return NS_OK;}
|
||||
NS_IMETHOD AddXSLTParamNamespace(const nsString& aPrefix,
|
||||
const nsString& aNamespace) override;
|
||||
@@ -136,7 +137,7 @@ public:
|
||||
void reportError(nsresult aResult, const char16_t *aErrorText,
|
||||
const char16_t *aSourceText);
|
||||
|
||||
- nsIDOMNode *GetSourceContentModel()
|
||||
+ nsINode *GetSourceContentModel()
|
||||
{
|
||||
return mSource;
|
||||
}
|
||||
@@ -169,7 +170,7 @@ private:
|
||||
nsIDocument* mStylesheetDocument; // weak
|
||||
nsCOMPtr<nsIContent> mEmbeddedStylesheetRoot;
|
||||
|
||||
- nsCOMPtr<nsIDOMNode> mSource;
|
||||
+ nsCOMPtr<nsINode> mSource;
|
||||
nsresult mTransformResult;
|
||||
nsresult mCompileResult;
|
||||
nsString mErrorText, mSourceText;
|
35
www/waterfox/files/patch-bug1395508
Normal file
35
www/waterfox/files/patch-bug1395508
Normal file
@ -0,0 +1,35 @@
|
||||
commit e6d14191c530
|
||||
Author: Marco Bonardo <mbonardo@mozilla.com>
|
||||
Date: Wed Nov 8 15:42:21 2017 +0100
|
||||
|
||||
Bug 1395508. r=dao, a=gchang
|
||||
|
||||
MozReview-Commit-ID: 8jH9dyj5JZU
|
||||
|
||||
--HG--
|
||||
extra : source : a14cc3bd9643311badcf1f8c00a58a493c2f5a2e
|
||||
---
|
||||
browser/base/content/browser.js | 9 ++++++---
|
||||
.../content/test/urlbar/browser_urlbarCopying.js | 22 +++++++++++++++++++++-
|
||||
2 files changed, 27 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git browser/base/content/browser.js browser/base/content/browser.js
|
||||
index c4eb8b8c7e43..80c44f32dc38 100755
|
||||
--- browser/base/content/browser.js
|
||||
+++ browser/base/content/browser.js
|
||||
@@ -2763,9 +2763,12 @@ function losslessDecodeURI(aURI) {
|
||||
// a sequence that survived decodeURI, i.e. one for:
|
||||
// ';', '/', '?', ':', '@', '&', '=', '+', '$', ',', '#'
|
||||
// (RFC 3987 section 3.2)
|
||||
- // 2. Re-encode whitespace so that it doesn't get eaten away
|
||||
- // by the location bar (bug 410726).
|
||||
- .replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)|[\r\n\t]/ig,
|
||||
+ // 2. Re-encode select whitespace so that it doesn't get eaten
|
||||
+ // away by the location bar (bug 410726). Re-encode all
|
||||
+ // adjacent whitespace, to prevent spoofing attempts where
|
||||
+ // invisible characters would push part of the URL to
|
||||
+ // overflow the location bar (bug 1395508).
|
||||
+ .replace(/%(?!3B|2F|3F|3A|40|26|3D|2B|24|2C|23)|[\r\n\t]|\s(?=\s)|\s$/ig,
|
||||
encodeURIComponent);
|
||||
} catch (e) {}
|
||||
}
|
44
www/waterfox/files/patch-bug1402715
Normal file
44
www/waterfox/files/patch-bug1402715
Normal file
@ -0,0 +1,44 @@
|
||||
commit 6c7fb56e58c5
|
||||
Author: Mats Palmgren <mats@mozilla.com>
|
||||
Date: Wed Sep 27 14:12:01 2017 +0200
|
||||
|
||||
Bug 1402715 - Treat URL bar contents as raw text when copying. r=mak
|
||||
|
||||
MozReview-Commit-ID: LuSvwRUVwAq
|
||||
---
|
||||
browser/base/content/test/urlbar/browser_urlbarCopying.js | 5 +++++
|
||||
browser/base/content/urlbarBindings.xml | 5 ++++-
|
||||
2 files changed, 9 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git browser/base/content/test/urlbar/browser_urlbarCopying.js browser/base/content/test/urlbar/browser_urlbarCopying.js
|
||||
index 521dace780f2..9559b06b2ec6 100644
|
||||
--- browser/base/content/test/urlbar/browser_urlbarCopying.js
|
||||
+++ browser/base/content/test/urlbar/browser_urlbarCopying.js
|
||||
@@ -164,6 +164,11 @@ var tests = [
|
||||
copyVal: "<example.com/?\xf7>\xf7",
|
||||
copyExpected: "http://example.com/?\xf7"
|
||||
},
|
||||
+ {
|
||||
+ loadURL: "http://example.com/%20%20%20",
|
||||
+ expectedURL: "example.com/ ",
|
||||
+ copyExpected: "http://example.com/%20%20%20"
|
||||
+ },
|
||||
|
||||
// data: and javsacript: URIs shouldn't be encoded
|
||||
{
|
||||
diff --git browser/base/content/urlbarBindings.xml browser/base/content/urlbarBindings.xml
|
||||
index 8999ab379cb2..4a86ce38e893 100644
|
||||
--- browser/base/content/urlbarBindings.xml
|
||||
+++ browser/base/content/urlbarBindings.xml
|
||||
@@ -972,7 +972,10 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
// Grab the actual input field's value, not our value, which could include moz-action:
|
||||
var inputVal = this.inputField.value;
|
||||
let selection = this.editor.selection;
|
||||
- var selectedVal = selection.toString();
|
||||
+ const flags = Ci.nsIDocumentEncoder.OutputPreformatted |
|
||||
+ Ci.nsIDocumentEncoder.OutputRaw;
|
||||
+ let selectedVal = selection.QueryInterface(Ci.nsISelectionPrivate)
|
||||
+ .toStringWithFormat("text/plain", flags, 0);
|
||||
|
||||
// Handle multiple-range selection as a string for simplicity.
|
||||
if (selection.rangeCount > 1) {
|
40
www/waterfox/files/patch-bug1408017
Normal file
40
www/waterfox/files/patch-bug1408017
Normal file
@ -0,0 +1,40 @@
|
||||
commit 5738242a26f0
|
||||
Author: Andrew McCreight <continuation@gmail.com>
|
||||
Date: Thu Oct 26 16:47:27 2017 -0400
|
||||
|
||||
Bug 1408017 - Clear gStartupCacheWrapper in the dtor. r=froydnj
|
||||
---
|
||||
startupcache/StartupCache.cpp | 6 ++++++
|
||||
startupcache/StartupCache.h | 2 +-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git startupcache/StartupCache.cpp startupcache/StartupCache.cpp
|
||||
index 895696d854eb..c84da5c16d41 100644
|
||||
--- startupcache/StartupCache.cpp
|
||||
+++ startupcache/StartupCache.cpp
|
||||
@@ -700,6 +700,12 @@ StartupCacheWrapper* StartupCacheWrapper::gStartupCach
|
||||
|
||||
NS_IMPL_ISUPPORTS(StartupCacheWrapper, nsIStartupCache)
|
||||
|
||||
+StartupCacheWrapper::~StartupCacheWrapper()
|
||||
+{
|
||||
+ MOZ_ASSERT(gStartupCacheWrapper == this);
|
||||
+ gStartupCacheWrapper = nullptr;
|
||||
+}
|
||||
+
|
||||
StartupCacheWrapper* StartupCacheWrapper::GetSingleton()
|
||||
{
|
||||
if (!gStartupCacheWrapper)
|
||||
diff --git startupcache/StartupCache.h startupcache/StartupCache.h
|
||||
index a7618415dd1f..f8994749aa5c 100644
|
||||
--- startupcache/StartupCache.h
|
||||
+++ startupcache/StartupCache.h
|
||||
@@ -209,7 +209,7 @@ class StartupCacheDebugOutputStream final
|
||||
class StartupCacheWrapper final
|
||||
: public nsIStartupCache
|
||||
{
|
||||
- ~StartupCacheWrapper() {}
|
||||
+ ~StartupCacheWrapper();
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
NS_DECL_NSISTARTUPCACHE
|
174
www/waterfox/files/patch-bug1408631
Normal file
174
www/waterfox/files/patch-bug1408631
Normal file
@ -0,0 +1,174 @@
|
||||
commit 48a63f5601f6
|
||||
Author: dimi <dlee@mozilla.com>
|
||||
Date: Fri Oct 20 10:18:59 2017 +0800
|
||||
|
||||
Bug 1408631 - Release SafeBrowsing lookupcache in worker thread while shutdown. r=francois
|
||||
|
||||
MozReview-Commit-ID: HuPUyIDFLPX
|
||||
|
||||
--HG--
|
||||
extra : rebase_source : d6e4f5bbcf96c97541792e23447f0810150c5ac9
|
||||
---
|
||||
toolkit/components/url-classifier/Classifier.cpp | 13 +++++---
|
||||
.../url-classifier/nsUrlClassifierDBService.cpp | 37 ++++++++++++++++++++++
|
||||
.../url-classifier/nsUrlClassifierDBService.h | 5 +++
|
||||
.../url-classifier/nsUrlClassifierProxies.cpp | 10 ++++++
|
||||
.../url-classifier/nsUrlClassifierProxies.h | 1 +
|
||||
5 files changed, 62 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git toolkit/components/url-classifier/Classifier.cpp toolkit/components/url-classifier/Classifier.cpp
|
||||
index 404e31e2421e..9946469268fa 100644
|
||||
--- toolkit/components/url-classifier/Classifier.cpp
|
||||
+++ toolkit/components/url-classifier/Classifier.cpp
|
||||
@@ -267,6 +267,8 @@ Classifier::Open(nsIFile& aCacheDirectory)
|
||||
void
|
||||
Classifier::Close()
|
||||
{
|
||||
+ // Close will be called by PreShutdown, so it is important to note that
|
||||
+ // things put here should not affect an ongoing update thread.
|
||||
DropStores();
|
||||
}
|
||||
|
||||
@@ -1428,10 +1430,8 @@ Classifier::UpdateCache(TableUpdate* aUpdate)
|
||||
LookupCache *
|
||||
Classifier::GetLookupCache(const nsACString& aTable, bool aForUpdate)
|
||||
{
|
||||
- if (aForUpdate) {
|
||||
- MOZ_ASSERT(NS_GetCurrentThread() == mUpdateThread,
|
||||
- "GetLookupCache(aForUpdate==true) can only be called on update thread.");
|
||||
- }
|
||||
+ // GetLookupCache(aForUpdate==true) can only be called on update thread.
|
||||
+ MOZ_ASSERT_IF(aForUpdate, NS_GetCurrentThread() == mUpdateThread);
|
||||
|
||||
nsTArray<LookupCache*>& lookupCaches = aForUpdate ? mNewLookupCaches
|
||||
: mLookupCaches;
|
||||
@@ -1444,6 +1444,11 @@ Classifier::GetLookupCache(const nsACString& aTable, bool aForUpdate)
|
||||
}
|
||||
}
|
||||
|
||||
+ // We don't want to create lookupcache when shutdown is already happening.
|
||||
+ if (nsUrlClassifierDBService::ShutdownHasStarted()) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+
|
||||
// TODO : Bug 1302600, It would be better if we have a more general non-main
|
||||
// thread method to convert table name to protocol version. Currently
|
||||
// we can only know this by checking if the table name ends with '-proto'.
|
||||
diff --git toolkit/components/url-classifier/nsUrlClassifierDBService.cpp toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
|
||||
index 78dbfaeaf046..e1a1be065aaf 100644
|
||||
--- toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
|
||||
+++ toolkit/components/url-classifier/nsUrlClassifierDBService.cpp
|
||||
@@ -817,6 +817,20 @@ nsUrlClassifierDBServiceWorker::CloseDb()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
+nsresult
|
||||
+nsUrlClassifierDBServiceWorker::PreShutdown()
|
||||
+{
|
||||
+ if (mClassifier) {
|
||||
+ // Classifier close will release all lookup caches which may be a time-consuming job.
|
||||
+ // See Bug 1408631.
|
||||
+ mClassifier->Close();
|
||||
+ }
|
||||
+
|
||||
+ // WARNING: nothing we put here should affect an ongoing update thread. When in doubt,
|
||||
+ // put things in Shutdown() instead.
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
nsresult
|
||||
nsUrlClassifierDBServiceWorker::CacheCompletions(CacheResultArray *results)
|
||||
{
|
||||
@@ -2427,6 +2441,13 @@ nsUrlClassifierDBService::Observe(nsISupports *aSubject, const char *aTopic,
|
||||
} else if (!strcmp(aTopic, "quit-application")) {
|
||||
// Tell the update thread to finish as soon as possible.
|
||||
gShuttingDownThread = true;
|
||||
+
|
||||
+ // The code in ::Shutdown() is run on a 'profile-before-change' event and
|
||||
+ // ensures that objects are freed by blocking on this freeing.
|
||||
+ // We can however speed up the shutdown time by using the worker thread to
|
||||
+ // release, in an earlier event, any objects that cannot affect an ongoing
|
||||
+ // update on the update thread.
|
||||
+ PreShutdown();
|
||||
} else if (!strcmp(aTopic, "profile-before-change")) {
|
||||
gShuttingDownThread = true;
|
||||
Shutdown();
|
||||
@@ -2437,6 +2458,22 @@ nsUrlClassifierDBService::Observe(nsISupports *aSubject, const char *aTopic,
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
+// Post a PreShutdown task to worker thread to release objects without blocking
|
||||
+// main-thread. Notice that shutdown process may still be blocked by PreShutdown task
|
||||
+// when ::Shutdown() is executed and synchronously waits for worker thread to finish
|
||||
+// PreShutdown event.
|
||||
+nsresult
|
||||
+nsUrlClassifierDBService::PreShutdown()
|
||||
+{
|
||||
+ MOZ_ASSERT(XRE_IsParentProcess());
|
||||
+
|
||||
+ if (mWorkerProxy) {
|
||||
+ mWorkerProxy->PreShutdown();
|
||||
+ }
|
||||
+
|
||||
+ return NS_OK;
|
||||
+}
|
||||
+
|
||||
// Join the background thread if it exists.
|
||||
nsresult
|
||||
nsUrlClassifierDBService::Shutdown()
|
||||
diff --git toolkit/components/url-classifier/nsUrlClassifierDBService.h toolkit/components/url-classifier/nsUrlClassifierDBService.h
|
||||
index a4c5952e91bb..9d9671d9d8fa 100644
|
||||
--- toolkit/components/url-classifier/nsUrlClassifierDBService.h
|
||||
+++ toolkit/components/url-classifier/nsUrlClassifierDBService.h
|
||||
@@ -140,6 +140,9 @@ private:
|
||||
nsIUrlClassifierCallback* c,
|
||||
bool forceCheck, bool *didCheck);
|
||||
|
||||
+ // Post an event to worker thread to release objects when receive 'quit-application'
|
||||
+ nsresult PreShutdown();
|
||||
+
|
||||
// Close db connection and join the background thread if it exists.
|
||||
nsresult Shutdown();
|
||||
|
||||
@@ -220,6 +223,8 @@ public:
|
||||
// Provide a way to forcibly close the db connection.
|
||||
nsresult GCC_MANGLING_WORKAROUND CloseDb();
|
||||
|
||||
+ nsresult GCC_MANGLING_WORKAROUND PreShutdown();
|
||||
+
|
||||
nsresult CacheCompletions(CacheResultArray * aEntries);
|
||||
|
||||
// Used to probe the state of the worker thread. When the update begins,
|
||||
diff --git toolkit/components/url-classifier/nsUrlClassifierProxies.cpp toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
|
||||
index 1af4f9266aeb..38e294df7320 100644
|
||||
--- toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
|
||||
+++ toolkit/components/url-classifier/nsUrlClassifierProxies.cpp
|
||||
@@ -214,6 +214,16 @@ UrlClassifierDBServiceWorkerProxy::CloseDb()
|
||||
return DispatchToWorkerThread(r);
|
||||
}
|
||||
|
||||
+nsresult
|
||||
+UrlClassifierDBServiceWorkerProxy::PreShutdown()
|
||||
+{
|
||||
+ nsCOMPtr<nsIRunnable> r =
|
||||
+ NewRunnableMethod("nsUrlClassifierDBServiceWorker::PreShutdown",
|
||||
+ mTarget,
|
||||
+ &nsUrlClassifierDBServiceWorker::PreShutdown);
|
||||
+ return DispatchToWorkerThread(r);
|
||||
+}
|
||||
+
|
||||
nsresult
|
||||
UrlClassifierDBServiceWorkerProxy::CacheCompletions(CacheResultArray * aEntries)
|
||||
{
|
||||
diff --git toolkit/components/url-classifier/nsUrlClassifierProxies.h toolkit/components/url-classifier/nsUrlClassifierProxies.h
|
||||
index f8cf5229e1ca..39cf47f837a2 100644
|
||||
--- toolkit/components/url-classifier/nsUrlClassifierProxies.h
|
||||
+++ toolkit/components/url-classifier/nsUrlClassifierProxies.h
|
||||
@@ -229,6 +229,7 @@ public:
|
||||
|
||||
nsresult OpenDb();
|
||||
nsresult CloseDb();
|
||||
+ nsresult PreShutdown();
|
||||
|
||||
nsresult CacheCompletions(mozilla::safebrowsing::CacheResultArray * aEntries);
|
||||
|
161
www/waterfox/files/patch-bug1409449
Normal file
161
www/waterfox/files/patch-bug1409449
Normal file
@ -0,0 +1,161 @@
|
||||
commit 0f648a99db03
|
||||
Author: Dragana Damjanovic <dd.mozilla@gmail.com>
|
||||
Date: Mon Jan 8 16:57:48 2018 +0200
|
||||
|
||||
Bug 1409449 - Do not show auth-dialog for triggeringPrincipal==SystemPrincipal. r=ckerschb r=valentin r=francois a=gchang
|
||||
|
||||
--HG--
|
||||
extra : amend_source : ca9c12183a4c25d451bb6ec2cc4b6ed25327d1ff
|
||||
---
|
||||
modules/libpref/init/all.js | 5 ++++
|
||||
.../protocol/http/nsHttpChannelAuthProvider.cpp | 35 +++++++++++++++++-----
|
||||
netwerk/protocol/http/nsHttpChannelAuthProvider.h | 1 +
|
||||
toolkit/components/telemetry/Histograms.json | 8 ++---
|
||||
4 files changed, 38 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git modules/libpref/init/all.js modules/libpref/init/all.js
|
||||
index c06f1d869c0f..a1e8e7054e4d 100644
|
||||
--- modules/libpref/init/all.js
|
||||
+++ modules/libpref/init/all.js
|
||||
@@ -2229,6 +2229,11 @@ pref("network.auth.subresource-http-auth-allow", 2);
|
||||
// have any effect.
|
||||
pref("network.auth.subresource-img-cross-origin-http-auth-allow", true);
|
||||
|
||||
+// Resources that are triggered by some non-web-content:
|
||||
+// true - they are allow to present http auth. dialog
|
||||
+// false - they are not allow to present http auth. dialog.
|
||||
+pref("network.auth.non-web-content-triggered-resources-http-auth-allow", false);
|
||||
+
|
||||
// This preference controls whether to allow sending default credentials (SSO) to
|
||||
// NTLM/Negotiate servers allowed in the "trusted uri" list when navigating them
|
||||
// in a Private Browsing window.
|
||||
diff --git netwerk/protocol/http/nsHttpChannelAuthProvider.cpp netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
|
||||
index 92abed30355a..c70eb9455adb 100644
|
||||
--- netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
|
||||
+++ netwerk/protocol/http/nsHttpChannelAuthProvider.cpp
|
||||
@@ -42,6 +42,7 @@ namespace net {
|
||||
#define HTTP_AUTH_DIALOG_TOP_LEVEL_DOC 29
|
||||
#define HTTP_AUTH_DIALOG_SAME_ORIGIN_SUBRESOURCE 30
|
||||
#define HTTP_AUTH_DIALOG_SAME_ORIGIN_XHR 31
|
||||
+#define HTTP_AUTH_DIALOG_NON_WEB_CONTENT 32
|
||||
|
||||
#define HTTP_AUTH_BASIC_INSECURE 0
|
||||
#define HTTP_AUTH_BASIC_SECURE 1
|
||||
@@ -95,6 +96,7 @@ uint32_t nsHttpChannelAuthProvider::sAuthAllowPref =
|
||||
SUBRESOURCE_AUTH_DIALOG_ALLOW_ALL;
|
||||
|
||||
bool nsHttpChannelAuthProvider::sImgCrossOriginAuthAllowPref = true;
|
||||
+bool nsHttpChannelAuthProvider::sNonWebContentTriggeredAuthAllow = false;
|
||||
|
||||
void
|
||||
nsHttpChannelAuthProvider::InitializePrefs()
|
||||
@@ -106,6 +108,9 @@ nsHttpChannelAuthProvider::InitializePrefs()
|
||||
mozilla::Preferences::AddBoolVarCache(&sImgCrossOriginAuthAllowPref,
|
||||
"network.auth.subresource-img-cross-origin-http-auth-allow",
|
||||
true);
|
||||
+ mozilla::Preferences::AddBoolVarCache(&sNonWebContentTriggeredAuthAllow,
|
||||
+ "network.auth.non-web-content-triggered-resources-http-auth-allow",
|
||||
+ false);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
@@ -912,8 +917,10 @@ nsHttpChannelAuthProvider::GetCredentialsForChallenge(const char *challenge,
|
||||
// BlockPrompt will set mCrossOrigin parameter as well.
|
||||
if (BlockPrompt()) {
|
||||
LOG(("nsHttpChannelAuthProvider::GetCredentialsForChallenge: "
|
||||
- "Prompt is blocked [this=%p pref=%d img-pref=%d]\n",
|
||||
- this, sAuthAllowPref, sImgCrossOriginAuthAllowPref));
|
||||
+ "Prompt is blocked [this=%p pref=%d img-pref=%d "
|
||||
+ "non-web-content-triggered-pref=%d]\n",
|
||||
+ this, sAuthAllowPref, sImgCrossOriginAuthAllowPref,
|
||||
+ sNonWebContentTriggeredAuthAllow));
|
||||
return NS_ERROR_ABORT;
|
||||
}
|
||||
|
||||
@@ -983,8 +990,15 @@ nsHttpChannelAuthProvider::BlockPrompt()
|
||||
// We will treat loads w/o loadInfo as a top level document.
|
||||
bool topDoc = true;
|
||||
bool xhr = false;
|
||||
+ bool nonWebContent = false;
|
||||
|
||||
if (loadInfo) {
|
||||
+ nsCOMPtr<nsIPrincipal> triggeringPrinc =
|
||||
+ loadInfo->TriggeringPrincipal();
|
||||
+ if (nsContentUtils::IsSystemPrincipal(triggeringPrinc)) {
|
||||
+ nonWebContent = true;
|
||||
+ }
|
||||
+
|
||||
if (loadInfo->GetExternalContentPolicyType() !=
|
||||
nsIContentPolicy::TYPE_DOCUMENT) {
|
||||
topDoc = false;
|
||||
@@ -1013,23 +1027,30 @@ nsHttpChannelAuthProvider::BlockPrompt()
|
||||
}
|
||||
|
||||
if (gHttpHandler->IsTelemetryEnabled()) {
|
||||
- if (topDoc) {
|
||||
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_2,
|
||||
+ if (nonWebContent) {
|
||||
+ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
|
||||
+ HTTP_AUTH_DIALOG_NON_WEB_CONTENT);
|
||||
+ } else if (topDoc) {
|
||||
+ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
|
||||
HTTP_AUTH_DIALOG_TOP_LEVEL_DOC);
|
||||
} else if (!mCrossOrigin) {
|
||||
if (xhr) {
|
||||
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_2,
|
||||
+ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
|
||||
HTTP_AUTH_DIALOG_SAME_ORIGIN_XHR);
|
||||
} else {
|
||||
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_2,
|
||||
+ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
|
||||
HTTP_AUTH_DIALOG_SAME_ORIGIN_SUBRESOURCE);
|
||||
}
|
||||
} else {
|
||||
- Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_2,
|
||||
+ Telemetry::Accumulate(Telemetry::HTTP_AUTH_DIALOG_STATS_3,
|
||||
loadInfo->GetExternalContentPolicyType());
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!sNonWebContentTriggeredAuthAllow && nonWebContent) {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
switch (sAuthAllowPref) {
|
||||
case SUBRESOURCE_AUTH_DIALOG_DISALLOW_ALL:
|
||||
// Do not open the http-authentication credentials dialog for
|
||||
diff --git netwerk/protocol/http/nsHttpChannelAuthProvider.h netwerk/protocol/http/nsHttpChannelAuthProvider.h
|
||||
index 4cf61c5a5881..01c536a8be25 100644
|
||||
--- netwerk/protocol/http/nsHttpChannelAuthProvider.h
|
||||
+++ netwerk/protocol/http/nsHttpChannelAuthProvider.h
|
||||
@@ -187,6 +187,7 @@ private:
|
||||
// sub-resources.
|
||||
static uint32_t sAuthAllowPref;
|
||||
static bool sImgCrossOriginAuthAllowPref;
|
||||
+ static bool sNonWebContentTriggeredAuthAllow;
|
||||
nsCOMPtr<nsICancelable> mGenerateCredentialsCancelable;
|
||||
};
|
||||
|
||||
diff --git toolkit/components/telemetry/Histograms.json toolkit/components/telemetry/Histograms.json
|
||||
index 41678ec2d2cf..dfc2183420a5 100644
|
||||
--- toolkit/components/telemetry/Histograms.json
|
||||
+++ toolkit/components/telemetry/Histograms.json
|
||||
@@ -2427,14 +2427,14 @@
|
||||
"labels": ["NotSent", "CachedContentUsed", "CachedContentNotUsed"],
|
||||
"description": "Stats for validation requests when cache won the race."
|
||||
},
|
||||
- "HTTP_AUTH_DIALOG_STATS_2": {
|
||||
+ "HTTP_AUTH_DIALOG_STATS_3": {
|
||||
"record_in_processes": ["main", "content"],
|
||||
"expires_in_version": "61",
|
||||
- "alert_emails": ["necko@mozilla.com"],
|
||||
+ "alert_emails": ["necko@mozilla.com", "ddamjanovic@mozilla.com"],
|
||||
"bug_numbers": [1357835],
|
||||
"kind": "enumerated",
|
||||
- "n_values": 32,
|
||||
- "description": "Stats about what kind of resource requested http authentication. (29=top-level doc, 30=same origin subresources, 31=same origin xhr, (nsIContentPolicy type)=cross-origin subresources per nsIContentPolicy type)"
|
||||
+ "n_values": 64,
|
||||
+ "description": "Stats about what kind of resource requested http authentication. (29=top-level doc, 30=same origin subresources, 31=same origin xhr, 32=non-web-content, (nsIContentPolicy type)=cross-origin subresources per nsIContentPolicy type)"
|
||||
},
|
||||
"HTTP_AUTH_TYPE_STATS": {
|
||||
"record_in_processes": ["main", "content"],
|
26
www/waterfox/files/patch-bug1411745
Normal file
26
www/waterfox/files/patch-bug1411745
Normal file
@ -0,0 +1,26 @@
|
||||
commit 4bd747285cad
|
||||
Author: Magnus Melin <mkmelin+mozilla@iki.fi>
|
||||
Date: Sat Dec 9 16:43:16 2017 +0200
|
||||
|
||||
Bug 1411745 - crash for svg linking to mailbox URI. r=smaug a=gchang
|
||||
|
||||
--HG--
|
||||
extra : source : 2a01f65ec8af02827f0621f86e501ad236431415
|
||||
---
|
||||
dom/base/nsDocument.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git dom/base/nsDocument.cpp dom/base/nsDocument.cpp
|
||||
index fe44e902241f..ce511f50e9de 100644
|
||||
--- dom/base/nsDocument.cpp
|
||||
+++ dom/base/nsDocument.cpp
|
||||
@@ -1233,7 +1233,8 @@ nsExternalResourceMap::PendingLoad::OnDataAvailable(nsIRequest* aRequest,
|
||||
uint64_t aOffset,
|
||||
uint32_t aCount)
|
||||
{
|
||||
- NS_PRECONDITION(mTargetListener, "Shouldn't be getting called!");
|
||||
+ // mTargetListener might be null if SetupViewer or AddExternalResource failed.
|
||||
+ NS_ENSURE_TRUE(mTargetListener, NS_ERROR_FAILURE);
|
||||
if (mDisplayDocument->ExternalResourceMap().HaveShutDown()) {
|
||||
return NS_BINDING_ABORTED;
|
||||
}
|
162
www/waterfox/files/patch-bug1412646
Normal file
162
www/waterfox/files/patch-bug1412646
Normal file
@ -0,0 +1,162 @@
|
||||
commit 0e19989ae721
|
||||
Author: Tristan Bourvon <tbourvon@mozilla.com>
|
||||
Date: Tue Oct 31 11:04:40 2017 +0100
|
||||
|
||||
Bug 1412646 - Initialize some uninitialized fields in security/manager/ r=keeler a=jcristau
|
||||
|
||||
MozReview-Commit-ID: HGj8xw5Uq6j
|
||||
|
||||
--HG--
|
||||
extra : rebase_source : 320cb43e17001f33137fdd1e7a49be8cbf0a4b24
|
||||
extra : source : 202ff4e53892c94131974daf3b9637fac064e558
|
||||
---
|
||||
security/manager/ssl/DataStorage.cpp | 1 +
|
||||
security/manager/ssl/ScopedNSSTypes.h | 1 +
|
||||
security/manager/ssl/SharedSSLState.cpp | 1 +
|
||||
security/manager/ssl/nsCertOverrideService.h | 1 +
|
||||
security/manager/ssl/nsCertTree.cpp | 5 ++++-
|
||||
security/manager/ssl/nsNSSCallbacks.cpp | 4 +++-
|
||||
security/manager/ssl/nsNSSCertValidity.cpp | 4 +++-
|
||||
security/manager/ssl/nsNTLMAuthModule.h | 2 +-
|
||||
security/manager/ssl/nsSecurityHeaderParser.cpp | 1 +
|
||||
security/manager/ssl/nsSiteSecurityService.cpp | 1 +
|
||||
10 files changed, 17 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git security/manager/ssl/DataStorage.cpp security/manager/ssl/DataStorage.cpp
|
||||
index 808b2392b518..5e43ec5dcc6d 100644
|
||||
--- security/manager/ssl/DataStorage.cpp
|
||||
+++ security/manager/ssl/DataStorage.cpp
|
||||
@@ -73,6 +73,7 @@ StaticAutoPtr<DataStorage::DataStorages> DataStorage::sDataStorages;
|
||||
|
||||
DataStorage::DataStorage(const nsString& aFilename)
|
||||
: mMutex("DataStorage::mMutex")
|
||||
+ , mTimerDelay(sDataStorageDefaultTimerDelay)
|
||||
, mPendingWrite(false)
|
||||
, mShuttingDown(false)
|
||||
, mInitCalled(false)
|
||||
diff --git security/manager/ssl/ScopedNSSTypes.h security/manager/ssl/ScopedNSSTypes.h
|
||||
index 34aa229cc247..e91e9b40ec41 100644
|
||||
--- security/manager/ssl/ScopedNSSTypes.h
|
||||
+++ security/manager/ssl/ScopedNSSTypes.h
|
||||
@@ -108,6 +108,7 @@ class Digest
|
||||
{
|
||||
public:
|
||||
Digest()
|
||||
+ : mItemBuf()
|
||||
{
|
||||
mItem.type = siBuffer;
|
||||
mItem.data = mItemBuf;
|
||||
diff --git security/manager/ssl/SharedSSLState.cpp security/manager/ssl/SharedSSLState.cpp
|
||||
index c97687541326..df9d36369c0a 100644
|
||||
--- security/manager/ssl/SharedSSLState.cpp
|
||||
+++ security/manager/ssl/SharedSSLState.cpp
|
||||
@@ -123,6 +123,7 @@ SharedSSLState::SharedSSLState()
|
||||
, mSocketCreated(false)
|
||||
, mOCSPStaplingEnabled(false)
|
||||
, mOCSPMustStapleEnabled(false)
|
||||
+, mSignedCertTimestampsEnabled(false)
|
||||
{
|
||||
mIOLayerHelpers.Init();
|
||||
mClientAuthRemember->Init();
|
||||
diff --git security/manager/ssl/nsCertOverrideService.h security/manager/ssl/nsCertOverrideService.h
|
||||
index 9f60aab37079..57992241c8d9 100644
|
||||
--- security/manager/ssl/nsCertOverrideService.h
|
||||
+++ security/manager/ssl/nsCertOverrideService.h
|
||||
@@ -29,6 +29,7 @@ public:
|
||||
|
||||
nsCertOverride()
|
||||
: mPort(-1)
|
||||
+ , mIsTemporary(false)
|
||||
, mOverrideBits(OverrideBits::None)
|
||||
{
|
||||
}
|
||||
diff --git security/manager/ssl/nsCertTree.cpp security/manager/ssl/nsCertTree.cpp
|
||||
index f58323ed4485..6fa9080de812 100644
|
||||
--- security/manager/ssl/nsCertTree.cpp
|
||||
+++ security/manager/ssl/nsCertTree.cpp
|
||||
@@ -55,7 +55,8 @@ CompareCacheHashEntryPtr::~CompareCacheHashEntryPtr()
|
||||
}
|
||||
|
||||
CompareCacheHashEntry::CompareCacheHashEntry()
|
||||
-:key(nullptr)
|
||||
+ : key(nullptr)
|
||||
+ , mCritInit()
|
||||
{
|
||||
for (int i = 0; i < max_criterions; ++i) {
|
||||
mCritInit[i] = false;
|
||||
@@ -152,6 +153,8 @@ NS_IMPL_ISUPPORTS(nsCertTree, nsICertTree, nsITreeView)
|
||||
|
||||
nsCertTree::nsCertTree()
|
||||
: mTreeArray(nullptr)
|
||||
+ , mNumOrgs(0)
|
||||
+ , mNumRows(0)
|
||||
, mCompareCache(&gMapOps, sizeof(CompareCacheHashEntryPtr),
|
||||
kInitialCacheLength)
|
||||
{
|
||||
diff --git security/manager/ssl/nsNSSCallbacks.cpp security/manager/ssl/nsNSSCallbacks.cpp
|
||||
index 480210836c18..bb81a5772a4b 100644
|
||||
--- security/manager/ssl/nsNSSCallbacks.cpp
|
||||
+++ security/manager/ssl/nsNSSCallbacks.cpp
|
||||
@@ -546,7 +546,9 @@ nsNSSHttpRequestSession::~nsNSSHttpRequestSession()
|
||||
}
|
||||
|
||||
nsHTTPListener::nsHTTPListener()
|
||||
-: mResultData(nullptr),
|
||||
+: mHttpRequestSucceeded(false),
|
||||
+ mHttpResponseCode(0),
|
||||
+ mResultData(nullptr),
|
||||
mResultLen(0),
|
||||
mLock("nsHTTPListener.mLock"),
|
||||
mCondition(mLock, "nsHTTPListener.mCondition"),
|
||||
diff --git security/manager/ssl/nsNSSCertValidity.cpp security/manager/ssl/nsNSSCertValidity.cpp
|
||||
index d983df2cf6cf..62c0c4bb7e8a 100644
|
||||
--- security/manager/ssl/nsNSSCertValidity.cpp
|
||||
+++ security/manager/ssl/nsNSSCertValidity.cpp
|
||||
@@ -13,7 +13,9 @@
|
||||
NS_IMPL_ISUPPORTS(nsX509CertValidity, nsIX509CertValidity)
|
||||
|
||||
nsX509CertValidity::nsX509CertValidity(const mozilla::UniqueCERTCertificate& cert)
|
||||
- : mTimesInitialized(false)
|
||||
+ : mNotBefore(0)
|
||||
+ , mNotAfter(0)
|
||||
+ , mTimesInitialized(false)
|
||||
{
|
||||
MOZ_ASSERT(cert);
|
||||
if (!cert) {
|
||||
diff --git security/manager/ssl/nsNTLMAuthModule.h security/manager/ssl/nsNTLMAuthModule.h
|
||||
index 27bf2999f01b..0b0bfa505959 100644
|
||||
--- security/manager/ssl/nsNTLMAuthModule.h
|
||||
+++ security/manager/ssl/nsNTLMAuthModule.h
|
||||
@@ -15,7 +15,7 @@ public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIAUTHMODULE
|
||||
|
||||
- nsNTLMAuthModule() {}
|
||||
+ nsNTLMAuthModule() : mNTLMNegotiateSent(false) {}
|
||||
|
||||
nsresult InitTest();
|
||||
|
||||
diff --git security/manager/ssl/nsSecurityHeaderParser.cpp security/manager/ssl/nsSecurityHeaderParser.cpp
|
||||
index b0bff007203f..d6b65e3b2a5b 100644
|
||||
--- security/manager/ssl/nsSecurityHeaderParser.cpp
|
||||
+++ security/manager/ssl/nsSecurityHeaderParser.cpp
|
||||
@@ -52,6 +52,7 @@ static mozilla::LazyLogModule sSHParserLog("nsSecurityHeaderParser");
|
||||
|
||||
nsSecurityHeaderParser::nsSecurityHeaderParser(const nsCString& aHeader)
|
||||
: mCursor(aHeader.get())
|
||||
+ , mDirective(nullptr)
|
||||
, mError(false)
|
||||
{
|
||||
}
|
||||
diff --git security/manager/ssl/nsSiteSecurityService.cpp security/manager/ssl/nsSiteSecurityService.cpp
|
||||
index 237efc715f86..f39e34db6569 100644
|
||||
--- security/manager/ssl/nsSiteSecurityService.cpp
|
||||
+++ security/manager/ssl/nsSiteSecurityService.cpp
|
||||
@@ -495,6 +495,7 @@ nsSiteSecurityService::nsSiteSecurityService()
|
||||
: mMaxMaxAge(kSixtyDaysInSeconds)
|
||||
, mUsePreloadList(true)
|
||||
, mPreloadListTimeOffset(0)
|
||||
+ , mProcessPKPHeadersFromNonBuiltInRoots(false)
|
||||
{
|
||||
}
|
||||
|
232
www/waterfox/files/patch-bug1418966
Normal file
232
www/waterfox/files/patch-bug1418966
Normal file
@ -0,0 +1,232 @@
|
||||
commit 229898bfe36d
|
||||
Author: Jan de Mooij <jdemooij@mozilla.com>
|
||||
Date: Wed Dec 13 14:13:43 2017 -0600
|
||||
|
||||
Bug 1418966 - Pin TypeScripts better when doing Baseline debug mode OSR. r=bhackett a=ritu
|
||||
|
||||
--HG--
|
||||
extra : source : f5ea86116d56e8e90689ec325061c948869159ba
|
||||
---
|
||||
js/src/jit/BaselineCompiler.cpp | 4 +++-
|
||||
js/src/jit/BaselineDebugModeOSR.cpp | 2 ++
|
||||
js/src/jit/IonAnalysis.cpp | 3 ++-
|
||||
js/src/jit/VMFunctions.cpp | 3 ++-
|
||||
js/src/jsscript.h | 2 +-
|
||||
js/src/vm/EnvironmentObject.cpp | 4 +++-
|
||||
js/src/vm/TypeInference-inl.h | 17 ++++++++++++++++-
|
||||
js/src/vm/TypeInference.cpp | 3 +++
|
||||
js/src/vm/TypeInference.h | 19 +++++++++++++++++++
|
||||
9 files changed, 51 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git js/src/jit/BaselineCompiler.cpp js/src/jit/BaselineCompiler.cpp
|
||||
index fe02710d0105..5d1d7956bda3 100644
|
||||
--- js/src/jit/BaselineCompiler.cpp
|
||||
+++ js/src/jit/BaselineCompiler.cpp
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
#include "vm/Interpreter-inl.h"
|
||||
#include "vm/NativeObject-inl.h"
|
||||
+#include "vm/TypeInference-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::jit;
|
||||
@@ -98,7 +99,8 @@ BaselineCompiler::compile()
|
||||
AutoTraceLog logScript(logger, scriptEvent);
|
||||
AutoTraceLog logCompile(logger, TraceLogger_BaselineCompilation);
|
||||
|
||||
- if (!script->ensureHasTypes(cx) || !script->ensureHasAnalyzedArgsUsage(cx))
|
||||
+ AutoKeepTypeScripts keepTypes(cx);
|
||||
+ if (!script->ensureHasTypes(cx, keepTypes) || !script->ensureHasAnalyzedArgsUsage(cx))
|
||||
return Method_Error;
|
||||
|
||||
// When code coverage is only enabled for optimizations, or when a Debugger
|
||||
diff --git js/src/jit/BaselineDebugModeOSR.cpp js/src/jit/BaselineDebugModeOSR.cpp
|
||||
index e4f0a87d4fe0..f8ff5f237fd0 100644
|
||||
--- js/src/jit/BaselineDebugModeOSR.cpp
|
||||
+++ js/src/jit/BaselineDebugModeOSR.cpp
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "jit/JitFrames-inl.h"
|
||||
#include "jit/MacroAssembler-inl.h"
|
||||
#include "vm/Stack-inl.h"
|
||||
+#include "vm/TypeInference-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::jit;
|
||||
@@ -673,6 +674,7 @@ RecompileBaselineScriptForDebugMode(JSContext* cx, JSScript* script,
|
||||
JitSpew(JitSpew_BaselineDebugModeOSR, "Recompiling (%s:%zu) for %s",
|
||||
script->filename(), script->lineno(), observing ? "DEBUGGING" : "NORMAL EXECUTION");
|
||||
|
||||
+ AutoKeepTypeScripts keepTypes(cx);
|
||||
script->setBaselineScript(cx->runtime(), nullptr);
|
||||
|
||||
MethodStatus status = BaselineCompile(cx, script, /* forceDebugMode = */ observing);
|
||||
diff --git js/src/jit/IonAnalysis.cpp js/src/jit/IonAnalysis.cpp
|
||||
index 72055a41c485..2191bbdea906 100644
|
||||
--- js/src/jit/IonAnalysis.cpp
|
||||
+++ js/src/jit/IonAnalysis.cpp
|
||||
@@ -4430,7 +4430,8 @@ jit::AnalyzeArgumentsUsage(JSContext* cx, JSScript* scriptArg)
|
||||
if (script->length() > MAX_SCRIPT_SIZE)
|
||||
return true;
|
||||
|
||||
- if (!script->ensureHasTypes(cx))
|
||||
+ AutoKeepTypeScripts keepTypes(cx);
|
||||
+ if (!script->ensureHasTypes(cx, keepTypes))
|
||||
return false;
|
||||
|
||||
TraceLoggerThread* logger = TraceLoggerForCurrentThread(cx);
|
||||
diff --git js/src/jit/VMFunctions.cpp js/src/jit/VMFunctions.cpp
|
||||
index bb47eb548f00..1baa93c0d063 100644
|
||||
--- js/src/jit/VMFunctions.cpp
|
||||
+++ js/src/jit/VMFunctions.cpp
|
||||
@@ -624,7 +624,8 @@ CreateThis(JSContext* cx, HandleObject callee, HandleObject newTarget, MutableHa
|
||||
RootedFunction fun(cx, &callee->as<JSFunction>());
|
||||
if (fun->isInterpreted() && fun->isConstructor()) {
|
||||
JSScript* script = JSFunction::getOrCreateScript(cx, fun);
|
||||
- if (!script || !script->ensureHasTypes(cx))
|
||||
+ AutoKeepTypeScripts keepTypes(cx);
|
||||
+ if (!script || !script->ensureHasTypes(cx, keepTypes))
|
||||
return false;
|
||||
if (!js::CreateThis(cx, fun, script, newTarget, GenericObject, rval))
|
||||
return false;
|
||||
diff --git js/src/jsscript.h js/src/jsscript.h
|
||||
index b4ce7dc694b7..3611aa701424 100644
|
||||
--- js/src/jsscript.h
|
||||
+++ js/src/jsscript.h
|
||||
@@ -1709,7 +1709,7 @@ class JSScript : public js::gc::TenuredCell
|
||||
bool isTopLevel() { return code() && !functionNonDelazifying(); }
|
||||
|
||||
/* Ensure the script has a TypeScript. */
|
||||
- inline bool ensureHasTypes(JSContext* cx);
|
||||
+ inline bool ensureHasTypes(JSContext* cx, js::AutoKeepTypeScripts&);
|
||||
|
||||
inline js::TypeScript* types();
|
||||
|
||||
diff --git js/src/vm/EnvironmentObject.cpp js/src/vm/EnvironmentObject.cpp
|
||||
index 11f9015ddcfb..ee256b4a59c6 100644
|
||||
--- js/src/vm/EnvironmentObject.cpp
|
||||
+++ js/src/vm/EnvironmentObject.cpp
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "gc/Marking-inl.h"
|
||||
#include "vm/NativeObject-inl.h"
|
||||
#include "vm/Stack-inl.h"
|
||||
+#include "vm/TypeInference-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::gc;
|
||||
@@ -1506,7 +1507,8 @@ class DebugEnvironmentProxyHandler : public BaseProxyHandler
|
||||
CallObject& callobj = env->as<CallObject>();
|
||||
RootedFunction fun(cx, &callobj.callee());
|
||||
RootedScript script(cx, JSFunction::getOrCreateScript(cx, fun));
|
||||
- if (!script->ensureHasTypes(cx) || !script->ensureHasAnalyzedArgsUsage(cx))
|
||||
+ AutoKeepTypeScripts keepTypes(cx);
|
||||
+ if (!script->ensureHasTypes(cx, keepTypes) || !script->ensureHasAnalyzedArgsUsage(cx))
|
||||
return false;
|
||||
|
||||
BindingIter bi(script);
|
||||
diff --git js/src/vm/TypeInference-inl.h js/src/vm/TypeInference-inl.h
|
||||
index eb50e3d4b258..ea6e2492a113 100644
|
||||
--- js/src/vm/TypeInference-inl.h
|
||||
+++ js/src/vm/TypeInference-inl.h
|
||||
@@ -683,6 +683,21 @@ TypeScript::SetArgument(JSContext* cx, JSScript* script, unsigned arg, const js:
|
||||
SetArgument(cx, script, arg, TypeSet::GetValueType(value));
|
||||
}
|
||||
|
||||
+inline
|
||||
+AutoKeepTypeScripts::AutoKeepTypeScripts(JSContext* cx)
|
||||
+ : zone_(cx->zone()->types),
|
||||
+ prev_(zone_.keepTypeScripts)
|
||||
+{
|
||||
+ zone_.keepTypeScripts = true;
|
||||
+}
|
||||
+
|
||||
+inline
|
||||
+AutoKeepTypeScripts::~AutoKeepTypeScripts()
|
||||
+{
|
||||
+ MOZ_ASSERT(zone_.keepTypeScripts);
|
||||
+ zone_.keepTypeScripts = prev_;
|
||||
+}
|
||||
+
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
// TypeHashSet
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@ -1202,7 +1217,7 @@ JSScript::types()
|
||||
}
|
||||
|
||||
inline bool
|
||||
-JSScript::ensureHasTypes(JSContext* cx)
|
||||
+JSScript::ensureHasTypes(JSContext* cx, js::AutoKeepTypeScripts&)
|
||||
{
|
||||
return types() || makeTypes(cx);
|
||||
}
|
||||
diff --git js/src/vm/TypeInference.cpp js/src/vm/TypeInference.cpp
|
||||
index 10fc2391f3df..ecd83f47c8ec 100644
|
||||
--- js/src/vm/TypeInference.cpp
|
||||
+++ js/src/vm/TypeInference.cpp
|
||||
@@ -4442,6 +4442,7 @@ JSScript::maybeSweepTypes(AutoClearTypeInferenceStateOnOOM* oom)
|
||||
// only do this if nothing has been compiled for the script, which will be
|
||||
// the case unless the script has been compiled since we started sweeping.
|
||||
if (types.sweepReleaseTypes &&
|
||||
+ !types.keepTypeScripts &&
|
||||
!hasBaselineScript() &&
|
||||
!hasIonScript())
|
||||
{
|
||||
@@ -4509,6 +4510,7 @@ TypeZone::TypeZone(Zone* zone)
|
||||
sweepCompilerOutputs(zone->group(), nullptr),
|
||||
sweepReleaseTypes(zone->group(), false),
|
||||
sweepingTypes(zone->group(), false),
|
||||
+ keepTypeScripts(zone->group(), false),
|
||||
activeAnalysis(zone->group(), nullptr)
|
||||
{
|
||||
}
|
||||
@@ -4518,6 +4520,7 @@ TypeZone::~TypeZone()
|
||||
js_delete(compilerOutputs.ref());
|
||||
js_delete(sweepCompilerOutputs.ref());
|
||||
MOZ_RELEASE_ASSERT(!sweepingTypes);
|
||||
+ MOZ_ASSERT(!keepTypeScripts);
|
||||
}
|
||||
|
||||
void
|
||||
diff --git js/src/vm/TypeInference.h js/src/vm/TypeInference.h
|
||||
index 0e8e9c27ee12..358ac842f9e8 100644
|
||||
--- js/src/vm/TypeInference.h
|
||||
+++ js/src/vm/TypeInference.h
|
||||
@@ -1286,6 +1286,20 @@ class TypeScript
|
||||
#endif
|
||||
};
|
||||
|
||||
+// Ensures no TypeScripts are purged in the current zone.
|
||||
+class MOZ_RAII AutoKeepTypeScripts
|
||||
+{
|
||||
+ TypeZone& zone_;
|
||||
+ bool prev_;
|
||||
+
|
||||
+ AutoKeepTypeScripts(const AutoKeepTypeScripts&) = delete;
|
||||
+ void operator=(const AutoKeepTypeScripts&) = delete;
|
||||
+
|
||||
+ public:
|
||||
+ explicit inline AutoKeepTypeScripts(JSContext* cx);
|
||||
+ inline ~AutoKeepTypeScripts();
|
||||
+};
|
||||
+
|
||||
void
|
||||
FillBytecodeTypeMap(JSScript* script, uint32_t* bytecodeMap);
|
||||
|
||||
@@ -1360,6 +1374,9 @@ class TypeZone
|
||||
static const size_t TYPE_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 8 * 1024;
|
||||
ZoneGroupData<LifoAlloc> typeLifoAlloc_;
|
||||
|
||||
+ TypeZone(const TypeZone&) = delete;
|
||||
+ void operator=(const TypeZone&) = delete;
|
||||
+
|
||||
public:
|
||||
// Current generation for sweeping.
|
||||
ZoneGroupOrGCTaskOrIonCompileData<uint32_t> generation;
|
||||
@@ -1386,6 +1403,8 @@ class TypeZone
|
||||
|
||||
ZoneGroupData<bool> sweepingTypes;
|
||||
|
||||
+ ZoneGroupData<bool> keepTypeScripts;
|
||||
+
|
||||
// The topmost AutoEnterAnalysis on the stack, if there is one.
|
||||
ZoneGroupData<AutoEnterAnalysis*> activeAnalysis;
|
||||
|
69
www/waterfox/files/patch-bug1419762
Normal file
69
www/waterfox/files/patch-bug1419762
Normal file
@ -0,0 +1,69 @@
|
||||
commit 0f58a35d5cb7
|
||||
Author: Emilio Cobos Álvarez <emilio@crisal.io>
|
||||
Date: Thu Nov 23 01:01:34 2017 +0100
|
||||
|
||||
Bug 1419762 - Return the inline continuation of an IB split when appending. r=mats, a=jcristau
|
||||
|
||||
The only reason not to do that is when there's after content in there. We know
|
||||
that there isn't really any ::after content, since it would've been handled by
|
||||
FindNextSibling, so we know we're performing a real append.
|
||||
|
||||
MozReview-Commit-ID: ExoPolZy4gG
|
||||
|
||||
--HG--
|
||||
extra : source : 333214e07fd463dc1c7db00875bb6dff98eb0cdf
|
||||
---
|
||||
layout/base/crashtests/1419762.html | 15 +++++++++++++++
|
||||
layout/base/crashtests/crashtests.list | 1 +
|
||||
layout/base/nsCSSFrameConstructor.cpp | 7 ++++---
|
||||
3 files changed, 20 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git layout/base/crashtests/1419762.html layout/base/crashtests/1419762.html
|
||||
new file mode 100644
|
||||
index 000000000000..08a56106db93
|
||||
--- /dev/null
|
||||
+++ layout/base/crashtests/1419762.html
|
||||
@@ -0,0 +1,15 @@
|
||||
+<style id='style_1'>
|
||||
+ :first-child { display: table-column-group; }
|
||||
+</style>
|
||||
+<script>
|
||||
+ try { o1 = document.createElement('isindex') } catch(e) { }
|
||||
+ try { o2 = document.createElement('input') } catch(e) { }
|
||||
+ try { o3 = document.createElement('optgroup') } catch(e) { }
|
||||
+ try { o4 = document.createElement('col') } catch(e) { }
|
||||
+ try { document.documentElement.appendChild(o1) } catch(e) { }
|
||||
+ try { o1.appendChild(o2) } catch(e) { }
|
||||
+ try { o1.appendChild(o3) } catch(e) { }
|
||||
+ try { document.documentElement.offsetTop; } catch (e) { }
|
||||
+ try { document.documentElement.appendChild(o4) } catch(e) { }
|
||||
+ try { document.styleSheets[0].insertRule('optgroup::first-line { list-style-type: japanese-formal; }', 0); } catch(e) { }
|
||||
+</script>
|
||||
diff --git layout/base/crashtests/crashtests.list layout/base/crashtests/crashtests.list
|
||||
index 7010ca4f2d3f..ecced042e228 100644
|
||||
--- layout/base/crashtests/crashtests.list
|
||||
+++ layout/base/crashtests/crashtests.list
|
||||
@@ -493,3 +493,4 @@ asserts(0-1) load 1343606.html # bug 1343948
|
||||
load 1352380.html
|
||||
load 1362423-1.html
|
||||
load 1381323.html
|
||||
+load 1419762.html
|
||||
diff --git layout/base/nsCSSFrameConstructor.cpp layout/base/nsCSSFrameConstructor.cpp
|
||||
index bb6da0dba1da..0a1b588c21df 100644
|
||||
--- layout/base/nsCSSFrameConstructor.cpp
|
||||
+++ layout/base/nsCSSFrameConstructor.cpp
|
||||
@@ -7044,10 +7044,11 @@ nsCSSFrameConstructor::GetInsertionPrevSibling(InsertionPoint* aInsertion,
|
||||
*aIsAppend = true;
|
||||
if (IsFramePartOfIBSplit(aInsertion->mParentFrame)) {
|
||||
// Since we're appending, we'll walk to the last anonymous frame
|
||||
- // that was created for the broken inline frame. But don't walk
|
||||
- // to the trailing inline if it's empty; stop at the block.
|
||||
+ // that was created for the broken inline frame. We can walk to the
|
||||
+ // trailing inline, since we know this is a real append, and not an
|
||||
+ // insert (that would've been handled by `FindNextSibling`).
|
||||
aInsertion->mParentFrame =
|
||||
- GetLastIBSplitSibling(aInsertion->mParentFrame, false);
|
||||
+ GetLastIBSplitSibling(aInsertion->mParentFrame, true);
|
||||
}
|
||||
// Get continuation that parents the last child. This MUST be done
|
||||
// before the AdjustAppendParentForAfterContent call.
|
32
www/waterfox/files/patch-bug1420507
Normal file
32
www/waterfox/files/patch-bug1420507
Normal file
@ -0,0 +1,32 @@
|
||||
commit 24b71ccea227
|
||||
Author: Gijs Kruitbosch <gijskruitbosch@gmail.com>
|
||||
Date: Wed Nov 29 17:03:54 2017 +0000
|
||||
|
||||
Bug 1420507, r=freddyb,francois a=gchang
|
||||
|
||||
--HG--
|
||||
extra : source : f3ea44ff63eec1d2e6edafe94c213860a8cfe11f
|
||||
---
|
||||
dom/base/nsTreeSanitizer.cpp | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git dom/base/nsTreeSanitizer.cpp dom/base/nsTreeSanitizer.cpp
|
||||
index 7b567eeed0ed..496cbd37ec88 100644
|
||||
--- dom/base/nsTreeSanitizer.cpp
|
||||
+++ dom/base/nsTreeSanitizer.cpp
|
||||
@@ -172,6 +172,7 @@ nsStaticAtom** const kAttributesHTML[] = {
|
||||
&nsGkAtoms::contextmenu,
|
||||
&nsGkAtoms::controls,
|
||||
&nsGkAtoms::coords,
|
||||
+ &nsGkAtoms::crossorigin,
|
||||
&nsGkAtoms::datetime,
|
||||
&nsGkAtoms::dir,
|
||||
&nsGkAtoms::disabled,
|
||||
@@ -188,6 +189,7 @@ nsStaticAtom** const kAttributesHTML[] = {
|
||||
&nsGkAtoms::hreflang,
|
||||
&nsGkAtoms::icon,
|
||||
&nsGkAtoms::id,
|
||||
+ &nsGkAtoms::integrity,
|
||||
&nsGkAtoms::ismap,
|
||||
&nsGkAtoms::itemid,
|
||||
&nsGkAtoms::itemprop,
|
24
www/waterfox/files/patch-bug1421009
Normal file
24
www/waterfox/files/patch-bug1421009
Normal file
@ -0,0 +1,24 @@
|
||||
commit d4db948c9381
|
||||
Author: Andreas Farre <farre@mozilla.com>
|
||||
Date: Tue Dec 5 04:54:00 2017 -0500
|
||||
|
||||
Bug 1421009 - Don't schedule idle callback if window is shutting down. r=bkelly, a=gchang
|
||||
---
|
||||
dom/base/nsGlobalWindow.cpp | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git dom/base/nsGlobalWindow.cpp dom/base/nsGlobalWindow.cpp
|
||||
index 40b0847e9b1c..bbbc94095896 100644
|
||||
--- dom/base/nsGlobalWindow.cpp
|
||||
+++ dom/base/nsGlobalWindow.cpp
|
||||
@@ -913,6 +913,10 @@ nsGlobalWindow::RequestIdleCallback(JSContext* aCx,
|
||||
MOZ_RELEASE_ASSERT(IsInnerWindow());
|
||||
AssertIsOnMainThread();
|
||||
|
||||
+ if (mInnerObjectsFreed) {
|
||||
+ return 0;
|
||||
+ }
|
||||
+
|
||||
uint32_t handle = mIdleRequestCallbackCounter++;
|
||||
|
||||
RefPtr<IdleRequest> request =
|
27
www/waterfox/files/patch-bug1422518
Normal file
27
www/waterfox/files/patch-bug1422518
Normal file
@ -0,0 +1,27 @@
|
||||
commit 22e0f06767fe
|
||||
Author: Valentin Gosu <valentin.gosu@gmail.com>
|
||||
Date: Tue Dec 5 02:29:41 2017 +0100
|
||||
|
||||
Bug 1422518 - Use LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL for meta refresh r=bz a=gchang
|
||||
MozReview-Commit-ID: H3hnO3NmHYA
|
||||
|
||||
--HG--
|
||||
extra : rebase_source : b9f7cbccdd2f2723e6d66d89f9ac529d462d75dd
|
||||
extra : source : 6f5aec4cde6f874921eaa1b0b9d7e9d4c7feabe0
|
||||
---
|
||||
docshell/base/nsDocShell.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git docshell/base/nsDocShell.cpp docshell/base/nsDocShell.cpp
|
||||
index 83cb87dd8255..31d414d1b57d 100644
|
||||
--- docshell/base/nsDocShell.cpp
|
||||
+++ docshell/base/nsDocShell.cpp
|
||||
@@ -6976,7 +6976,7 @@ nsDocShell::ForceRefreshURI(nsIURI* aURI, nsIPrincipal* aPrincipal, int32_t aDel
|
||||
* LoadURI(...) will cancel all refresh timers... This causes the
|
||||
* Timer and its refreshData instance to be released...
|
||||
*/
|
||||
- LoadURI(aURI, loadInfo, nsIWebNavigation::LOAD_FLAGS_NONE, true);
|
||||
+ LoadURI(aURI, loadInfo, nsIWebNavigation::LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL, true);
|
||||
|
||||
return NS_OK;
|
||||
}
|
38
www/waterfox/files/patch-bug1422545
Normal file
38
www/waterfox/files/patch-bug1422545
Normal file
@ -0,0 +1,38 @@
|
||||
commit d5e722168a84
|
||||
Author: Dragana Damjanovic <dd.mozilla@gmail.com>
|
||||
Date: Wed Dec 20 16:13:36 2017 +0100
|
||||
|
||||
Bug 1422545 - Do not close connection between a httpChannelChild and its httpChannelParent if we need to divert to parent. r=mayhemer, a=jcristau
|
||||
|
||||
If UnknowDecoder is involved and the received content is short we will know whether we need to divert to parent only after OnStartRequest of the listener chain is called. Therefore do not do cleanup if we detect diversion.
|
||||
|
||||
--HG--
|
||||
extra : source : e87b07c9db7c302237fa0adbb68c0f31b1840191
|
||||
---
|
||||
netwerk/protocol/http/HttpChannelChild.cpp | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git netwerk/protocol/http/HttpChannelChild.cpp netwerk/protocol/http/HttpChannelChild.cpp
|
||||
index 18b9fe2de1db..8fc7746a2a42 100644
|
||||
--- netwerk/protocol/http/HttpChannelChild.cpp
|
||||
+++ netwerk/protocol/http/HttpChannelChild.cpp
|
||||
@@ -1100,6 +1100,19 @@ HttpChannelChild::OnStopRequest(const nsresult& channelStatus,
|
||||
// DoOnStopRequest() calls ReleaseListeners()
|
||||
}
|
||||
|
||||
+ // If unknownDecoder is involved and the received content is short we will
|
||||
+ // know whether we need to divert to parent only after OnStopRequest of the
|
||||
+ // listeners chain is called in DoOnStopRequest. At that moment
|
||||
+ // unknownDecoder will call OnStartRequest of the real listeners of the
|
||||
+ // channel including the OnStopRequest of UrlLoader which decides whether we
|
||||
+ // need to divert to parent.
|
||||
+ // If we are diverting to parent we should not do a cleanup.
|
||||
+ if (mDivertingToParent) {
|
||||
+ LOG(("HttpChannelChild::OnStopRequest - We are diverting to parent, "
|
||||
+ "postpone cleaning up."));
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
CleanupBackgroundChannel();
|
||||
|
||||
// If there is a possibility we might want to write alt data to the cache
|
37
www/waterfox/files/patch-bug1423647
Normal file
37
www/waterfox/files/patch-bug1423647
Normal file
@ -0,0 +1,37 @@
|
||||
commit 65de8dd25011
|
||||
Author: Dão Gottwald <dao@mozilla.com>
|
||||
Date: Thu Dec 7 12:25:33 2017 +0100
|
||||
|
||||
Bug 1423647 - Restore border-radius for buttons in the Downloads View in the Library. r=mak, a=jcristau
|
||||
|
||||
MozReview-Commit-ID: 6kkdp8pHAlv
|
||||
|
||||
--HG--
|
||||
extra : source : 1b381ddb9779e2e0bc2be4f9382ca8560862b409
|
||||
---
|
||||
browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css | 5 +----
|
||||
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||
|
||||
diff --git browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css
|
||||
index 063668d48509..663b0893892c 100644
|
||||
--- browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css
|
||||
+++ browser/themes/shared/downloads/allDownloadsViewOverlay.inc.css
|
||||
@@ -80,10 +80,6 @@
|
||||
padding: 0 18px;
|
||||
}
|
||||
|
||||
-.downloadButton:-moz-focusring {
|
||||
- -moz-outline-radius: 50%;
|
||||
-}
|
||||
-
|
||||
.downloadButton > .button-box {
|
||||
-moz-appearance: none;
|
||||
padding: 2px !important;
|
||||
@@ -104,6 +100,7 @@
|
||||
.downloadButton:hover > .button-box {
|
||||
background-color: graytext;
|
||||
color: -moz-field;
|
||||
+ border-radius: 50%;
|
||||
}
|
||||
|
||||
.downloadButton:hover:active > .button-box {
|
139
www/waterfox/files/patch-bug1425000
Normal file
139
www/waterfox/files/patch-bug1425000
Normal file
@ -0,0 +1,139 @@
|
||||
commit 2e3c1926dbbb
|
||||
Author: Cameron McCormack <cam@mcc.id.au>
|
||||
Date: Thu Dec 21 14:07:31 2017 -0500
|
||||
|
||||
Bug 1425000 - Use a consistent window for CSP, etc. for FontFace loads. r=jfkthame, a=abillings
|
||||
|
||||
MozReview-Commit-ID: F2xhsgTBI1V
|
||||
|
||||
--HG--
|
||||
extra : rebase_source : ba02ceab0317edfd9a4dd6c05618c5dbbcc4f830
|
||||
extra : source : c035522097125e8cf8fc8cbbc110be62a12aa055
|
||||
---
|
||||
gfx/thebes/gfxUserFontSet.h | 4 ++++
|
||||
layout/style/FontFace.cpp | 5 +++++
|
||||
layout/style/FontFace.h | 2 ++
|
||||
layout/style/FontFaceSet.cpp | 18 ++++++++++--------
|
||||
layout/style/FontFaceSet.h | 4 ++--
|
||||
5 files changed, 23 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git gfx/thebes/gfxUserFontSet.h gfx/thebes/gfxUserFontSet.h
|
||||
index 076b7c119c6a..beddfc3bc0be 100644
|
||||
--- gfx/thebes/gfxUserFontSet.h
|
||||
+++ gfx/thebes/gfxUserFontSet.h
|
||||
@@ -673,6 +673,10 @@ public:
|
||||
void GetFamilyNameAndURIForLogging(nsACString& aFamilyName,
|
||||
nsACString& aURI);
|
||||
|
||||
+#ifdef DEBUG
|
||||
+ gfxUserFontSet* GetUserFontSet() const { return mFontSet; }
|
||||
+#endif
|
||||
+
|
||||
protected:
|
||||
const uint8_t* SanitizeOpenTypeData(const uint8_t* aData,
|
||||
uint32_t aLength,
|
||||
diff --git layout/style/FontFace.cpp layout/style/FontFace.cpp
|
||||
index 76d26910bb62..eeda8ca5ddb8 100644
|
||||
--- layout/style/FontFace.cpp
|
||||
+++ layout/style/FontFace.cpp
|
||||
@@ -672,6 +672,11 @@ FontFace::SetUserFontEntry(gfxUserFontEntry* aEntry)
|
||||
if (mUserFontEntry) {
|
||||
mUserFontEntry->mFontFaces.AppendElement(this);
|
||||
|
||||
+ MOZ_ASSERT(mUserFontEntry->GetUserFontSet() ==
|
||||
+ mFontFaceSet->GetUserFontSet(),
|
||||
+ "user font entry must be associated with the same user font set "
|
||||
+ "as the FontFace");
|
||||
+
|
||||
// Our newly assigned user font entry might be in the process of or
|
||||
// finished loading, so set our status accordingly. But only do so
|
||||
// if we're not going "backwards" in status, which could otherwise
|
||||
diff --git layout/style/FontFace.h layout/style/FontFace.h
|
||||
index 69e76c9b848a..355b340f9eed 100644
|
||||
--- layout/style/FontFace.h
|
||||
+++ layout/style/FontFace.h
|
||||
@@ -94,6 +94,8 @@ public:
|
||||
void AddFontFaceSet(FontFaceSet* aFontFaceSet);
|
||||
void RemoveFontFaceSet(FontFaceSet* aFontFaceSet);
|
||||
|
||||
+ FontFaceSet* GetPrimaryFontFaceSet() const { return mFontFaceSet; }
|
||||
+
|
||||
/**
|
||||
* Gets the family name of the FontFace as a raw string (such as 'Times', as
|
||||
* opposed to GetFamily, which returns a CSS-escaped string, such as
|
||||
diff --git layout/style/FontFaceSet.cpp layout/style/FontFaceSet.cpp
|
||||
index f5aa30f5d1ca..fe372044f6b5 100644
|
||||
--- layout/style/FontFaceSet.cpp
|
||||
+++ layout/style/FontFaceSet.cpp
|
||||
@@ -983,7 +983,7 @@ FontFaceSet::InsertRuleFontFace(FontFace* aFontFace, SheetType aSheetType,
|
||||
mUserFontSet->AddUserFontEntry(fontfamily, entry);
|
||||
}
|
||||
|
||||
-already_AddRefed<gfxUserFontEntry>
|
||||
+/* static */ already_AddRefed<gfxUserFontEntry>
|
||||
FontFaceSet::FindOrCreateUserFontEntryFromFontFace(FontFace* aFontFace)
|
||||
{
|
||||
nsAutoString fontfamily;
|
||||
@@ -997,11 +997,13 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(FontFace* aFontFace)
|
||||
SheetType::Doc);
|
||||
}
|
||||
|
||||
-already_AddRefed<gfxUserFontEntry>
|
||||
+/* static */ already_AddRefed<gfxUserFontEntry>
|
||||
FontFaceSet::FindOrCreateUserFontEntryFromFontFace(const nsAString& aFamilyName,
|
||||
FontFace* aFontFace,
|
||||
SheetType aSheetType)
|
||||
{
|
||||
+ FontFaceSet* set = aFontFace->GetPrimaryFontFaceSet();
|
||||
+
|
||||
nsCSSValue val;
|
||||
nsCSSUnit unit;
|
||||
|
||||
@@ -1128,7 +1130,7 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(const nsAString& aFamilyName,
|
||||
face->mURI = uri ? new gfxFontSrcURI(uri) : nullptr;
|
||||
URLValue* url = val.GetURLStructValue();
|
||||
face->mReferrer = url->mExtraData->GetReferrer();
|
||||
- face->mReferrerPolicy = mDocument->GetReferrerPolicy();
|
||||
+ face->mReferrerPolicy = set->mDocument->GetReferrerPolicy();
|
||||
face->mOriginPrincipal =
|
||||
new gfxFontSrcPrincipal(url->mExtraData->GetPrincipal());
|
||||
NS_ASSERTION(face->mOriginPrincipal, "null origin principal in @font-face rule");
|
||||
@@ -1195,11 +1197,11 @@ FontFaceSet::FindOrCreateUserFontEntryFromFontFace(const nsAString& aFamilyName,
|
||||
}
|
||||
|
||||
RefPtr<gfxUserFontEntry> entry =
|
||||
- mUserFontSet->FindOrCreateUserFontEntry(aFamilyName, srcArray, weight,
|
||||
- stretch, italicStyle,
|
||||
- featureSettings,
|
||||
- languageOverride,
|
||||
- unicodeRanges, fontDisplay);
|
||||
+ set->mUserFontSet->FindOrCreateUserFontEntry(aFamilyName, srcArray, weight,
|
||||
+ stretch, italicStyle,
|
||||
+ featureSettings,
|
||||
+ languageOverride,
|
||||
+ unicodeRanges, fontDisplay);
|
||||
return entry.forget();
|
||||
}
|
||||
|
||||
diff --git layout/style/FontFaceSet.h layout/style/FontFaceSet.h
|
||||
index a28afe39a13a..46c25087564d 100644
|
||||
--- layout/style/FontFaceSet.h
|
||||
+++ layout/style/FontFaceSet.h
|
||||
@@ -136,7 +136,7 @@ public:
|
||||
* Finds an existing entry in the user font cache or creates a new user
|
||||
* font entry for the given FontFace object.
|
||||
*/
|
||||
- already_AddRefed<gfxUserFontEntry>
|
||||
+ static already_AddRefed<gfxUserFontEntry>
|
||||
FindOrCreateUserFontEntryFromFontFace(FontFace* aFontFace);
|
||||
|
||||
/**
|
||||
@@ -268,7 +268,7 @@ private:
|
||||
bool mLoadEventShouldFire;
|
||||
};
|
||||
|
||||
- already_AddRefed<gfxUserFontEntry> FindOrCreateUserFontEntryFromFontFace(
|
||||
+ static already_AddRefed<gfxUserFontEntry> FindOrCreateUserFontEntryFromFontFace(
|
||||
const nsAString& aFamilyName,
|
||||
FontFace* aFontFace,
|
||||
SheetType aSheetType);
|
43
www/waterfox/files/patch-bug1425107
Normal file
43
www/waterfox/files/patch-bug1425107
Normal file
@ -0,0 +1,43 @@
|
||||
commit 5f4e1908d910
|
||||
Author: Boris Zbarsky <bzbarsky@mit.edu>
|
||||
Date: Thu Dec 14 12:45:37 2017 -0500
|
||||
|
||||
Bug 1425107 - Fix setting scrollTop to 0 on an element with a pending scroll position restore to actually work correctly. r=mats, a=gchang
|
||||
|
||||
MozReview-Commit-ID: 949eBXmKHlA
|
||||
|
||||
--HG--
|
||||
extra : source : 81174f568eaa91aa8f5f65e05f35f4350a8cfb25
|
||||
extra : amend_source : a1142868a5029bcbaea6fc66bc0becd3ef8d6c9b
|
||||
---
|
||||
layout/generic/nsGfxScrollFrame.cpp | 7 ++++++
|
||||
testing/web-platform/meta/MANIFEST.json | 27 +++++++++++++++++++++-
|
||||
.../cssom-view/scrollTop-display-change-ref.html | 8 +++++++
|
||||
.../css/cssom-view/scrollTop-display-change.html | 17 ++++++++++++++
|
||||
4 files changed, 58 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git layout/generic/nsGfxScrollFrame.cpp layout/generic/nsGfxScrollFrame.cpp
|
||||
index 9fee3cc2e502..b1575b214240 100644
|
||||
--- layout/generic/nsGfxScrollFrame.cpp
|
||||
+++ layout/generic/nsGfxScrollFrame.cpp
|
||||
@@ -2272,6 +2272,11 @@ ScrollFrameHelper::ScrollToWithOrigin(nsPoint aScrollPosition,
|
||||
const nsRect* aRange,
|
||||
nsIScrollbarMediator::ScrollSnapMode aSnap)
|
||||
{
|
||||
+ if (aOrigin != nsGkAtoms::restore) {
|
||||
+ // If we're doing a non-restore scroll, we don't want to later
|
||||
+ // override it by restoring our saved scroll position.
|
||||
+ mRestorePos.x = mRestorePos.y = -1;
|
||||
+ }
|
||||
|
||||
if (aSnap == nsIScrollableFrame::ENABLE_SNAP) {
|
||||
GetSnapPointForDestination(nsIScrollableFrame::DEVICE_PIXELS,
|
||||
@@ -4316,6 +4321,8 @@ ScrollFrameHelper::ScrollToRestoredPosition()
|
||||
(mScrollPort.XMost() - scrollToPos.x - mScrolledFrame->GetRect().width);
|
||||
}
|
||||
AutoWeakFrame weakFrame(mOuter);
|
||||
+ // It's very important to pass nsGkAtoms::restore here, so
|
||||
+ // ScrollToWithOrigin won't clear out mRestorePos.
|
||||
ScrollToWithOrigin(scrollToPos, nsIScrollableFrame::INSTANT,
|
||||
nsGkAtoms::restore, nullptr);
|
||||
if (!weakFrame.IsAlive()) {
|
34
www/waterfox/files/patch-bug1425780
Normal file
34
www/waterfox/files/patch-bug1425780
Normal file
@ -0,0 +1,34 @@
|
||||
commit e5fb39219394 (release/branches/default/tip, origin/release)
|
||||
Author: Michael Froman <mfroman@mozilla.com>
|
||||
Date: Thu Jan 11 21:38:36 2018 -0500
|
||||
|
||||
Bug 1425780 - Don't allow queue-jumping for gathering state change events. r=bwc, a=abillings
|
||||
|
||||
--HG--
|
||||
extra : source : 2fa8c2b1c9917c035e0d9cc7f7b18549d67e5ade
|
||||
---
|
||||
.../signaling/src/peerconnection/PeerConnectionImpl.cpp | 11 +++++------
|
||||
1 file changed, 5 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
|
||||
index edb07486b45a..6f9d92cde978 100644
|
||||
--- media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
|
||||
+++ media/webrtc/signaling/src/peerconnection/PeerConnectionImpl.cpp
|
||||
@@ -3585,12 +3585,11 @@ PeerConnectionImpl::IceGatheringStateChange(
|
||||
return;
|
||||
}
|
||||
WrappableJSErrorResult rv;
|
||||
- RUN_ON_THREAD(mThread,
|
||||
- WrapRunnable(pco,
|
||||
- &PeerConnectionObserver::OnStateChange,
|
||||
- PCObserverStateType::IceGatheringState,
|
||||
- rv, static_cast<JSCompartment*>(nullptr)),
|
||||
- NS_DISPATCH_NORMAL);
|
||||
+ mThread->Dispatch(WrapRunnable(pco,
|
||||
+ &PeerConnectionObserver::OnStateChange,
|
||||
+ PCObserverStateType::IceGatheringState,
|
||||
+ rv, static_cast<JSCompartment*>(nullptr)),
|
||||
+ NS_DISPATCH_NORMAL);
|
||||
|
||||
if (mIceGatheringState == PCImplIceGatheringState::Complete) {
|
||||
SendLocalIceCandidateToContent(0, "", "");
|
31
www/waterfox/files/patch-bug1426042
Normal file
31
www/waterfox/files/patch-bug1426042
Normal file
@ -0,0 +1,31 @@
|
||||
commit df0b53a2bec2
|
||||
Author: Jonathan Kew <jkew@mozilla.com>
|
||||
Date: Fri Jan 5 13:58:51 2018 +0000
|
||||
|
||||
Bug 1426042 - Ensure we don't forget to set bidi data when required on a zero-length trailing frame. r=dholbert, a=gchang
|
||||
|
||||
--HG--
|
||||
extra : source : a37695e59774af91ca8e9e50bee369364cf4feaa
|
||||
---
|
||||
layout/base/nsBidiPresUtils.cpp | 7 +++++++
|
||||
layout/reftests/bidi/reftest.list | 2 +-
|
||||
2 files changed, 8 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git layout/base/nsBidiPresUtils.cpp layout/base/nsBidiPresUtils.cpp
|
||||
index 6ac7cf64afe9..3fa6a4e030c9 100644
|
||||
--- layout/base/nsBidiPresUtils.cpp
|
||||
+++ layout/base/nsBidiPresUtils.cpp
|
||||
@@ -888,6 +888,13 @@ nsBidiPresUtils::ResolveParagraph(BidiParagraphData* aBpd)
|
||||
if (runLength <= 0) {
|
||||
// Get the next run of text from the Bidi engine
|
||||
if (++numRun >= runCount) {
|
||||
+ // We've run out of runs of text; but don't forget to store bidi data
|
||||
+ // to the frame before breaking out of the loop (bug 1426042).
|
||||
+ storeBidiDataToFrame();
|
||||
+ if (isTextFrame) {
|
||||
+ frame->AdjustOffsetsForBidi(contentOffset,
|
||||
+ contentOffset + fragmentLength);
|
||||
+ }
|
||||
break;
|
||||
}
|
||||
int32_t lineOffset = logicalLimit;
|
38
www/waterfox/files/patch-bug1426801
Normal file
38
www/waterfox/files/patch-bug1426801
Normal file
@ -0,0 +1,38 @@
|
||||
commit 8ef1f1a717cc
|
||||
Author: Andrew McCreight <continuation@gmail.com>
|
||||
Date: Thu Jan 4 14:59:14 2018 -0800
|
||||
|
||||
Bug 1426801 - Clear gFirstIdleTask if we fail to dispatch the runnable. r=mrbkap, a=gchang
|
||||
|
||||
MozReview-Commit-ID: 23f9VDTyyqg
|
||||
|
||||
--HG--
|
||||
extra : source : 1eb22728208e6fc9c785e5cf11bb68929d0a555d
|
||||
---
|
||||
dom/ipc/ContentChild.cpp | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git dom/ipc/ContentChild.cpp dom/ipc/ContentChild.cpp
|
||||
index cc7769daa805..84881a36f04d 100644
|
||||
--- dom/ipc/ContentChild.cpp
|
||||
+++ dom/ipc/ContentChild.cpp
|
||||
@@ -1875,7 +1875,10 @@ ContentChild::RecvPBrowserConstructor(PBrowserChild* aActor,
|
||||
MOZ_ASSERT(!gFirstIdleTask);
|
||||
RefPtr<CancelableRunnable> firstIdleTask = NewCancelableRunnableFunction(FirstIdle);
|
||||
gFirstIdleTask = firstIdleTask;
|
||||
- NS_IdleDispatchToCurrentThread(firstIdleTask.forget());
|
||||
+ if (NS_FAILED(NS_IdleDispatchToCurrentThread(firstIdleTask.forget()))) {
|
||||
+ gFirstIdleTask = nullptr;
|
||||
+ hasRunOnce = false;
|
||||
+ }
|
||||
}
|
||||
|
||||
return nsIContentChild::RecvPBrowserConstructor(aActor,
|
||||
@@ -2397,6 +2400,7 @@ ContentChild::ActorDestroy(ActorDestroyReason why)
|
||||
#else
|
||||
if (gFirstIdleTask) {
|
||||
gFirstIdleTask->Cancel();
|
||||
+ gFirstIdleTask = nullptr;
|
||||
}
|
||||
|
||||
nsHostObjectProtocolHandler::RemoveDataEntries();
|
29
www/waterfox/files/patch-bug1426996
Normal file
29
www/waterfox/files/patch-bug1426996
Normal file
@ -0,0 +1,29 @@
|
||||
commit 8b0d59fb74b5
|
||||
Author: Valentin Gosu <valentin.gosu@gmail.com>
|
||||
Date: Tue Dec 26 21:47:22 2017 +0100
|
||||
|
||||
Bug 1426996 - Use fallible assign in NS_EscapeAndFilterURL r=kershaw a=gchang
|
||||
|
||||
MozReview-Commit-ID: EKVeQb3cboU
|
||||
|
||||
--HG--
|
||||
extra : source : 8af6e9af76052696204adb50eba2b9bdfe81c149
|
||||
---
|
||||
xpcom/io/nsEscape.cpp | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git xpcom/io/nsEscape.cpp xpcom/io/nsEscape.cpp
|
||||
index 7d072399d3cc..d0ce3f649fce 100644
|
||||
--- xpcom/io/nsEscape.cpp
|
||||
+++ xpcom/io/nsEscape.cpp
|
||||
@@ -446,7 +446,9 @@ NS_EscapeAndFilterURL(const nsACString& aStr, uint32_t aFlags,
|
||||
}
|
||||
|
||||
if (!appended) {
|
||||
- aResult = aStr;
|
||||
+ if (!aResult.Assign(aStr, fallible)) {
|
||||
+ return NS_ERROR_OUT_OF_MEMORY;
|
||||
+ }
|
||||
}
|
||||
|
||||
return rv;
|
25
www/waterfox/files/patch-bug1427126
Normal file
25
www/waterfox/files/patch-bug1427126
Normal file
@ -0,0 +1,25 @@
|
||||
commit 5b96c327f3f0
|
||||
Author: Jan de Mooij <jdemooij@mozilla.com>
|
||||
Date: Tue Jan 9 16:37:12 2018 -0500
|
||||
|
||||
Bug 1427126 - Use setElementWithType instead of setElement in AppendToList. r=bhackett, a=gchang
|
||||
|
||||
--HG--
|
||||
extra : source : 6be5a45a855e2af656477c53ee1d6f9a9f518212
|
||||
---
|
||||
js/src/vm/List-inl.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git js/src/builtin/Stream.cpp js/src/builtin/Stream.cpp
|
||||
index 8860c080b3b5..f9dd08642e65 100644
|
||||
--- js/src/builtin/Stream.cpp
|
||||
+++ js/src/builtin/Stream.cpp
|
||||
@@ -334,7 +334,7 @@ AppendToList(JSContext* cx, HandleNativeObject list, HandleValue value)
|
||||
return false;
|
||||
|
||||
list->ensureDenseInitializedLength(cx, length, 1);
|
||||
- list->setDenseElement(length, value);
|
||||
+ list->setDenseElementWithType(cx, length, value);
|
||||
|
||||
return true;
|
||||
}
|
50
www/waterfox/files/patch-bug1428589
Normal file
50
www/waterfox/files/patch-bug1428589
Normal file
@ -0,0 +1,50 @@
|
||||
commit 671dccb84a84
|
||||
Author: Emilio Cobos Álvarez <emilio@crisal.io>
|
||||
Date: Sun Jan 7 01:10:10 2018 +0100
|
||||
|
||||
Bug 1428589: Correctly handle expiring all the cookies in an entry. r=jdm
|
||||
|
||||
MozReview-Commit-ID: 6qaC9yclvP2
|
||||
---
|
||||
netwerk/cookie/nsCookieService.cpp | 13 +++++++++----
|
||||
1 file changed, 9 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git netwerk/cookie/nsCookieService.cpp netwerk/cookie/nsCookieService.cpp
|
||||
index b73aaa2129e3..672ca06be628 100644
|
||||
--- netwerk/cookie/nsCookieService.cpp
|
||||
+++ netwerk/cookie/nsCookieService.cpp
|
||||
@@ -4469,8 +4469,9 @@ nsCookieService::PurgeCookies(int64_t aCurrentTimeInUsec)
|
||||
for (auto iter = mDBState->hostTable.Iter(); !iter.Done(); iter.Next()) {
|
||||
nsCookieEntry* entry = iter.Get();
|
||||
|
||||
- const nsCookieEntry::ArrayType &cookies = entry->GetCookies();
|
||||
- for (nsCookieEntry::IndexType i = 0; i < cookies.Length(); ) {
|
||||
+ const nsCookieEntry::ArrayType& cookies = entry->GetCookies();
|
||||
+ auto length = cookies.Length();
|
||||
+ for (nsCookieEntry::IndexType i = 0; i < length; ) {
|
||||
nsListIter iter(entry, i);
|
||||
nsCookie* cookie = cookies[i];
|
||||
|
||||
@@ -4479,9 +4480,12 @@ nsCookieService::PurgeCookies(int64_t aCurrentTimeInUsec)
|
||||
removedList->AppendElement(cookie);
|
||||
COOKIE_LOGEVICTED(cookie, "Cookie expired");
|
||||
|
||||
- // remove from list; do not increment our iterator
|
||||
+ // remove from list; do not increment our iterator, but stop if we're
|
||||
+ // done already.
|
||||
gCookieService->RemoveCookieFromList(iter, paramsArray);
|
||||
-
|
||||
+ if (i == --length) {
|
||||
+ break;
|
||||
+ }
|
||||
} else {
|
||||
// check if the cookie is over the age limit
|
||||
if (cookie->LastAccessed() <= purgeTime) {
|
||||
@@ -4494,6 +4498,7 @@ nsCookieService::PurgeCookies(int64_t aCurrentTimeInUsec)
|
||||
|
||||
++i;
|
||||
}
|
||||
+ MOZ_ASSERT(length == cookies.Length());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user