Browse Source

backports

Frank-Rainer Grahl 7 months ago
parent
commit
4854aceb7e

+ 30 - 0
mozilla-release/patches/1517237-66a1.patch

@@ -0,0 +1,30 @@
+# HG changeset patch
+# User Olli Pettay <Olli.Pettay@helsinki.fi>
+# Date 1546458272 -7200
+# Node ID b3acccbde849d18bf5302a545bc005a13e1a1432
+# Parent  c6a9481bc1d47a758d1da08331e2af1ed9dcee57
+Bug 1517237 - Make move assignment of RefPtr to have the same behavior as nsCOMPtr's, r=froydnj
+
+diff --git a/mfbt/RefPtr.h b/mfbt/RefPtr.h
+--- a/mfbt/RefPtr.h
++++ b/mfbt/RefPtr.h
+@@ -213,18 +213,17 @@ public:
+   }
+ 
+   RefPtr<T>& operator=(const nsQueryReferent& aQueryReferent);
+   RefPtr<T>& operator=(const nsCOMPtr_helper& aHelper);
+ 
+   RefPtr<T>&
+   operator=(RefPtr<T> && aRefPtr)
+   {
+-    assign_assuming_AddRef(aRefPtr.mRawPtr);
+-    aRefPtr.mRawPtr = nullptr;
++    assign_assuming_AddRef(aRefPtr.forget().take());
+     return *this;
+   }
+ 
+   // Defined in OwningNonNull.h
+   template<class U>
+   RefPtr<T>&
+   operator=(const mozilla::OwningNonNull<U>& aOther);
+ 

+ 46 - 0
mozilla-release/patches/1871112-124a1.patch

@@ -0,0 +1,46 @@
+# HG changeset patch
+# User Tom Schuster <tschuster@mozilla.com>
+# Date 1707915342 0
+# Node ID 12e5815ccf55470884c97422356d765c37aaeb2c
+# Parent  bdeb1b5088193969288d344b7491287e4cc5c5e4
+Bug 1871112 - Specialize AddAttributes for <html>/<body>. r=hsivonen
+
+Differential Revision: https://phabricator.services.mozilla.com/D201562
+
+diff --git a/parser/html/nsHtml5TreeOperation.cpp b/parser/html/nsHtml5TreeOperation.cpp
+--- a/parser/html/nsHtml5TreeOperation.cpp
++++ b/parser/html/nsHtml5TreeOperation.cpp
+@@ -298,29 +298,32 @@ nsHtml5TreeOperation::FosterParent(nsICo
+   return Append(aNode, aParent, aBuilder);
+ }
+ 
+ nsresult
+ nsHtml5TreeOperation::AddAttributes(nsIContent* aNode,
+                                     nsHtml5HtmlAttributes* aAttributes,
+                                     nsHtml5DocumentBuilder* aBuilder)
+ {
++  MOZ_ASSERT(aNode->IsAnyOfHTMLElements(nsGkAtoms::body, nsGkAtoms::html));
++
+   dom::Element* node = aNode->AsElement();
+   nsHtml5OtherDocUpdate update(node->OwnerDoc(),
+                                aBuilder->GetDocument());
+ 
+   int32_t len = aAttributes->getLength();
+   for (int32_t i = len; i > 0;) {
+     --i;
+     // prefix doesn't need regetting. it is always null or a static atom
+     // local name is never null
+     nsCOMPtr<nsIAtom> localName =
+       Reget(aAttributes->getLocalNameNoBoundsCheck(i));
+     int32_t nsuri = aAttributes->getURINoBoundsCheck(i);
+-    if (!node->HasAttr(nsuri, localName)) {
++    if (!node->HasAttr(nsuri, localName) &&
++        !(nsuri == kNameSpaceID_None && localName == nsGkAtoms::nonce)) {
+       // prefix doesn't need regetting. it is always null or a static atom
+       // local name is never null
+       nsString value; // Not Auto, because using it to hold nsStringBuffer*
+       aAttributes->getValueNoBoundsCheck(i).ToString(value);
+       node->SetAttr(
+         nsuri, localName, aAttributes->getPrefixNoBoundsCheck(i), value, true);
+       // XXX what to do with nsresult?
+     }

+ 2 - 0
mozilla-release/patches/series

@@ -6618,8 +6618,10 @@ TOP-NOBUG-REGEXP-43-1691184-88a1-25318.patch
 TOP-NOBUG-REGEXP-44-irregexp-25318.patch
 TOP-NOBUG-REGEXP-45-final-25318.patch
 TOP-NOBUG-REGEXP-46-fixes-25318.patch
+1517237-66a1.patch
 1864385-PARTIAL-11508.patch
 1867982-124a1.patch
 1878211-11508.patch
+1871112-124a1.patch
 1881093-11509.patch
 TOP-1880562-NSS3902-11509.patch