Backed out changeset 19fbc34f239c (bug 1374629)
authorWes Kocher <wkocher@mozilla.com>
Wed, 21 Jun 2017 15:50:52 -0700
changeset 416503 dc422ed66f91e7ee67b3f36ca59cbf3e0c38cfd9
parent 416502 34248d40b52f3ec5882846b42aedbbb2f9be85bf
child 416504 77c937a09a97d006b959b838a8d64bd401a3851b
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1374629
milestone56.0a1
backs out19fbc34f239c240ce6c7261c160dd3dcf68742b6
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 19fbc34f239c (bug 1374629) MozReview-Commit-ID: KPYcFSnOpU8
dom/base/FormData.cpp
dom/html/HTMLFormSubmission.cpp
intl/Encoding.h
intl/gtest/TestEncoding.cpp
--- a/dom/base/FormData.cpp
+++ b/dom/base/FormData.cpp
@@ -13,17 +13,17 @@
 #include "mozilla/Encoding.h"
 
 #include "MultipartBlobImpl.h"
 
 using namespace mozilla;
 using namespace mozilla::dom;
 
 FormData::FormData(nsISupports* aOwner)
-  : HTMLFormSubmission(UTF_8_ENCODING, nullptr)
+  : HTMLFormSubmission(WrapNotNull(UTF_8_ENCODING), nullptr)
   , mOwner(aOwner)
 {
 }
 
 namespace {
 
 already_AddRefed<File>
 GetOrCreateFileCalledBlob(Blob& aBlob, ErrorResult& aRv)
@@ -397,17 +397,17 @@ FormData::Constructor(const GlobalObject
 
 // -------------------------------------------------------------------------
 // nsIXHRSendable
 
 NS_IMETHODIMP
 FormData::GetSendInfo(nsIInputStream** aBody, uint64_t* aContentLength,
                       nsACString& aContentTypeWithCharset, nsACString& aCharset)
 {
-  FSMultipartFormData fs(UTF_8_ENCODING, nullptr);
+  FSMultipartFormData fs(WrapNotNull(UTF_8_ENCODING), nullptr);
 
   for (uint32_t i = 0; i < mFormData.Length(); ++i) {
     if (mFormData[i].wasNullBlob) {
       MOZ_ASSERT(mFormData[i].value.IsUSVString());
       fs.AddNameBlobOrNullPair(mFormData[i].name, nullptr);
     } else if (mFormData[i].value.IsUSVString()) {
       fs.AddNameValuePair(mFormData[i].name,
                           mFormData[i].value.GetAsUSVString());
--- a/dom/html/HTMLFormSubmission.cpp
+++ b/dom/html/HTMLFormSubmission.cpp
@@ -884,17 +884,17 @@ GetSubmitEncoding(nsGenericHTMLElement* 
     } while (spPos != -1);
   }
   // if there are no accept-charset or all the charset are not supported
   // Get the charset from document
   nsIDocument* doc = aForm->GetComposedDoc();
   if (doc) {
     return Encoding::ForName(doc->GetDocumentCharacterSet());
   }
-  return UTF_8_ENCODING;
+  return WrapNotNull(UTF_8_ENCODING);
 }
 
 void
 GetEnumAttr(nsGenericHTMLElement* aContent,
             nsIAtom* atom, int32_t* aValue)
 {
   const nsAttrValue* value = aContent->GetParsedAttr(atom);
   if (value && value->Type() == nsAttrValue::eEnum) {
--- a/intl/Encoding.h
+++ b/intl/Encoding.h
@@ -22,17 +22,16 @@
 
 namespace mozilla {
 class Encoding;
 class Decoder;
 class Encoder;
 }; // namespace mozilla
 
 #define ENCODING_RS_ENCODING mozilla::Encoding
-#define ENCODING_RS_NOT_NULL_CONST_ENCODING_PTR mozilla::NotNull<const mozilla::Encoding*>
 #define ENCODING_RS_ENCODER mozilla::Encoder
 #define ENCODING_RS_DECODER mozilla::Decoder
 
 #include "encoding_rs.h"
 
 extern "C" {
 
 nsresult
--- a/intl/gtest/TestEncoding.cpp
+++ b/intl/gtest/TestEncoding.cpp
@@ -1,25 +1,19 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 #include "gtest/gtest.h"
 
 #include "mozilla/Encoding.h"
-#include <type_traits>
 
 #define ENCODING_TEST(name) TEST(EncodingTest, name)
 
 using namespace mozilla;
 
-static_assert(std::is_trivially_copyable<NotNull<const Encoding*>>::value,
-              "NotNull<const Encoding*> must be trivially copyable.");
-static_assert(std::is_standard_layout<NotNull<const Encoding*>>::value,
-              "NotNull<const Encoding*> must be a standard layout type.");
-
 // These tests mainly test that the C++ interface seems to
 // reach the Rust code. More thorough testing of the back
 // end is done in Rust.
 
 ENCODING_TEST(ForLabel)
 {
   nsAutoCString label("  uTf-8   ");
   ASSERT_EQ(Encoding::ForLabel(label), UTF_8_ENCODING);