Backed out changeset 0b3f53c36016 (bug 890690) for failures in browser_contextSearchTabPosition.js on a CLOSED TREE
authorEd Morley <emorley@mozilla.com>
Thu, 25 Jul 2013 17:41:08 +0100
changeset 152315 b4c4450fd7bfb87c55363a67e22620ff1c12d3c9
parent 152314 5f4b123fbc9962255e95894269c786b7b8645122
child 152316 21f094a18c5c477788288a22dc355fc1448189a1
push id2859
push userakeybl@mozilla.com
push dateMon, 16 Sep 2013 19:14:59 +0000
treeherdermozilla-beta@87d3c51cd2bf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs890690
milestone25.0a1
backs out0b3f53c36016293806f3f9bdd8ca4b082c75a8ed
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 0b3f53c36016 (bug 890690) for failures in browser_contextSearchTabPosition.js on a CLOSED TREE
netwerk/base/public/nsIBrowserSearchService.idl
toolkit/components/search/nsSearchService.js
--- a/netwerk/base/public/nsIBrowserSearchService.idl
+++ b/netwerk/base/public/nsIBrowserSearchService.idl
@@ -2,32 +2,26 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 
 interface nsIURI;
 interface nsIInputStream;
 
-[scriptable, uuid(82ec6ee8-68b5-49ef-87b7-0d5240f8a183)]
+[scriptable, uuid(58e4f602-a7c8-4cd1-9dca-716705e826ef)]
 interface nsISearchSubmission : nsISupports
 {
   /**
    * The POST data associated with a search submission, wrapped in a MIME
    * input stream. May be null.
    */
   readonly attribute nsIInputStream postData;
 
   /**
-   * The POST data associated with a search submission as an
-   * application/x-www-form-urlencoded string. May be null.
-   */
-  readonly attribute AString postDataString;
-
-  /**
    * The URI to submit a search to.
    */
   readonly attribute nsIURI uri;
 };
 
 [scriptable, uuid(ccf6aa20-10a9-4a0c-a81d-31b10ea846de)]
 interface nsISearchEngine : nsISupports
 {
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -926,38 +926,37 @@ EngineURL.prototype = {
         continue;
 
       var value = ParamSubstitution(param.value, aSearchTerms, aEngine);
 
       dataString += (i > 0 ? "&" : "") + param.name + "=" + value;
     }
 
     var postData = null;
-    let postDataString = null;
     if (this.method == "GET") {
       // GET method requests have no post data, and append the encoded
       // query string to the url...
       if (url.indexOf("?") == -1 && dataString)
         url += "?";
       url += dataString;
     } else if (this.method == "POST") {
-      // For POST requests, specify the data as a MIME stream as well as a string.
-      postDataString = dataString;
+      // POST method requests must wrap the encoded text in a MIME
+      // stream and supply that as POSTDATA.
       var stringStream = Cc["@mozilla.org/io/string-input-stream;1"].
                          createInstance(Ci.nsIStringInputStream);
       stringStream.data = dataString;
 
       postData = Cc["@mozilla.org/network/mime-input-stream;1"].
                  createInstance(Ci.nsIMIMEInputStream);
       postData.addHeader("Content-Type", "application/x-www-form-urlencoded");
       postData.addContentLength = true;
       postData.setData(stringStream);
     }
 
-    return new Submission(makeURI(url), postData, postDataString);
+    return new Submission(makeURI(url), postData);
   },
 
   _hasRelation: function SRC_EURL__hasRelation(aRel)
     this.rels.some(function(e) e == aRel.toLowerCase()),
 
   _initWithJSON: function SRC_EURL__initWithJSON(aJson, aEngine) {
     if (!aJson.params)
       return;
@@ -2539,17 +2538,17 @@ Engine.prototype = {
 
     var url = this._getURLOfType(aResponseType);
 
     if (!url)
       return null;
 
     if (!aData) {
       // Return a dummy submission object with our searchForm attribute
-      return new Submission(makeURI(this.searchForm));
+      return new Submission(makeURI(this.searchForm), null);
     }
 
     LOG("getSubmission: In data: \"" + aData + "\"; Purpose: \"" + aPurpose + "\"");
     var textToSubURI = Cc["@mozilla.org/intl/texttosuburi;1"].
                        getService(Ci.nsITextToSubURI);
     var data = "";
     try {
       data = textToSubURI.ConvertAndEscape(this.queryCharset, aData);
@@ -2576,31 +2575,27 @@ Engine.prototype = {
 
   get wrappedJSObject() {
     return this;
   }
 
 };
 
 // nsISearchSubmission
-function Submission(aURI, aPostData = null, aPostDataString = null) {
+function Submission(aURI, aPostData) {
   this._uri = aURI;
   this._postData = aPostData;
-  this._postDataString = aPostDataString;
 }
 Submission.prototype = {
   get uri() {
     return this._uri;
   },
   get postData() {
     return this._postData;
   },
-  get postDataString() {
-    return this._postDataString;
-  },
   QueryInterface: function SRCH_SUBM_QI(aIID) {
     if (aIID.equals(Ci.nsISearchSubmission) ||
         aIID.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 }