Backed out changeset 23974693ffc5 (bug 1187157) for failing test_formSubmission.html on Mulet Linux x64 opt. r=backout
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 06 Jan 2016 18:06:26 +0100
changeset 278845 43f10b226ee119c05a39edc775c7ac0c6cdeeeee
parent 278844 c6a34418d8552d966960bbdd49e9a39b4706c2b8
child 278846 59f19aec5c4e1d1eccc5f54711bd6e7c0fe7821b
push id29860
push usercbook@mozilla.com
push dateThu, 07 Jan 2016 10:51:20 +0000
treeherdermozilla-central@e0bcd16e1d4b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1187157
milestone46.0a1
backs out23974693ffc5f51babf58313b1327da89a38e8a1
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 23974693ffc5 (bug 1187157) for failing test_formSubmission.html on Mulet Linux x64 opt. r=backout
dom/base/nsFormData.cpp
dom/base/nsFormData.h
dom/base/test/mochitest.ini
dom/base/test/test_bug1187157.html
--- a/dom/base/nsFormData.cpp
+++ b/dom/base/nsFormData.cpp
@@ -251,40 +251,16 @@ nsFormData::GetKeyAtIndex(uint32_t aInde
 
 const OwningFileOrUSVString&
 nsFormData::GetValueAtIndex(uint32_t aIndex) const
 {
   MOZ_ASSERT(aIndex < mFormData.Length());
   return mFormData[aIndex].value;
 }
 
-void
-nsFormData::SetNameValuePair(FormDataTuple* aData,
-                             const nsAString& aName,
-                             const nsAString& aValue)
-{
-  MOZ_ASSERT(aData);
-  aData->name = aName;
-  aData->value.SetAsUSVString() = aValue;
-}
-
-void
-nsFormData::SetNameFilePair(FormDataTuple* aData,
-                            const nsAString& aName,
-                            File* aFile)
-{
-  MOZ_ASSERT(aData);
-  aData->name = aName;
-  if (aFile) {
-    aData->value.SetAsFile() = aFile;
-  } else {
-    aData->value.SetAsUSVString() = EmptyString();
-  }
-}
-
 // -------------------------------------------------------------------------
 // nsIDOMFormData
 
 NS_IMETHODIMP
 nsFormData::Append(const nsAString& aName, nsIVariant* aValue)
 {
   uint16_t dataType;
   nsresult rv = aValue->GetDataType(&dataType);
--- a/dom/base/nsFormData.h
+++ b/dom/base/nsFormData.h
@@ -47,21 +47,33 @@ private:
 
   // Returns the FormDataTuple to modify. This may be null, in which case
   // no element with aName was found.
   FormDataTuple*
   RemoveAllOthersAndGetFirstFormDataTuple(const nsAString& aName);
 
   void SetNameValuePair(FormDataTuple* aData,
                         const nsAString& aName,
-                        const nsAString& aValue);
+                        const nsAString& aValue)
+  {
+    MOZ_ASSERT(aData);
+    aData->name = aName;
+    aData->value.SetAsUSVString() = aValue;
+  }
 
   void SetNameFilePair(FormDataTuple* aData,
                        const nsAString& aName,
-                       File* aFile);
+                       File* aFile)
+  {
+    MOZ_ASSERT(aData);
+    aData->name = aName;
+    if (aFile) {
+      aData->value.SetAsFile() = aFile;
+    }
+  }
 
 public:
   explicit nsFormData(nsISupports* aOwner = nullptr);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsFormData,
                                                          nsIDOMFormData)
 
--- a/dom/base/test/mochitest.ini
+++ b/dom/base/test/mochitest.ini
@@ -857,9 +857,8 @@ support-files = worker_postMessages.js
 [test_frameLoader_switchProcess.html]
 skip-if = e10s || os != 'linux' || buildapp != 'browser'
 [test_explicit_user_agent.html]
 [test_change_policy.html]
 skip-if = buildapp == 'b2g' #no ssl support
 [test_document.all_iteration.html]
 [test_performance_translate.html]
 [test_bug1198095.html]
-[test_bug1187157.html]
deleted file mode 100644
--- a/dom/base/test/test_bug1187157.html
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=789315
--->
-<head>
-  <meta charset="utf-8">
-  <title>Test for Bug 789315</title>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=789315">Mozilla Bug 789315</a>
-<form id="a"><input name="b" type="file"/></form>
-
-<script type="text/javascript">
-  is(new FormData(document.getElementById('a')).get('b'), "", "This should return an empty string.");
-</script>
-
-</body>
-</html>