Backed out changesets c6380188c418 and cc9ff30e82d6 for possible Android debug asserts/crashes.
authorRyan VanderMeulen <ryanvm@gmail.com>
Mon, 04 May 2015 14:12:37 -0400
changeset 273592 b4ddf5fe16f69c5ebaf63680aa8ab1549d01b169
parent 273591 42152093a51c12cc7ee450631a031d0d4f4667b8
child 273593 642aa49f22cff497d834e0a4066d1473497ecfa4
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone40.0a1
backs outc6380188c418c8ea0c2c0cac4371a68078ea7503
cc9ff30e82d6998e216d27fd66308017068aae6b
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 changesets c6380188c418 and cc9ff30e82d6 for possible Android debug asserts/crashes. CLOSED TREE
browser/components/selfsupport/SelfSupportService.js
browser/components/selfsupport/test/browser_selfsupportAPI.js
dom/webidl/MozSelfSupport.webidl
netwerk/base/nsIBrowserSearchService.idl
testing/modules/Assert.jsm
toolkit/components/search/nsSearchService.js
--- a/browser/components/selfsupport/SelfSupportService.js
+++ b/browser/components/selfsupport/SelfSupportService.js
@@ -63,16 +63,11 @@ MozSelfSupportInterface.prototype = {
         aReject(new Error("No reporter"));
       }
     }.bind(this));
   },
 
   resetPref: function(name) {
     Services.prefs.clearUserPref(name);
   },
-
-  resetSearchEngines: function() {
-    Services.search.restoreDefaultEngines();
-    Services.search.resetToOriginalDefaultEngine();
-  },
 }
 
 this.NSGetFactory = XPCOMUtils.generateNSGetFactory([MozSelfSupportInterface]);
--- a/browser/components/selfsupport/test/browser_selfsupportAPI.js
+++ b/browser/components/selfsupport/test/browser_selfsupportAPI.js
@@ -1,11 +1,11 @@
 Cu.import("resource://gre/modules/Preferences.jsm");
 
-function test_resetPref() {
+function test() {
   const prefNewName = "browser.newpref.fake";
   Assert.ok(!Preferences.has(prefNewName), "pref should not exist");
 
   const prefExistingName = "extensions.hotfix.id";
   Assert.ok(Preferences.has(prefExistingName), "pref should exist");
   Assert.ok(!Preferences.isSet(prefExistingName), "pref should not be user-set");
   let prefExistingOriginalValue = Preferences.get(prefExistingName);
 
@@ -40,49 +40,8 @@ function test_resetPref() {
   Assert.ok(Preferences.has(prefExistingName), "pref should still exist");
   Assert.equal(Preferences.get(prefExistingName), prefExistingOriginalValue, "pref value should be the same as original");
 
   // 5. delete an existing pref
   // deleteBranch is implemented in such a way that
   // clearUserPref can't undo its action
   // see discussion in bug 1075160
 }
-
-function test_resetSearchEngines()
-{
-  const defaultEngineOriginal = Services.search.defaultEngine;
-  const visibleEnginesOriginal = Services.search.getVisibleEngines();
-
-  // 1. do nothing on unchanged search configuration
-  MozSelfSupport.resetSearchEngines();
-  Assert.equal(Services.search.defaultEngine, defaultEngineOriginal, "default engine should be reset");
-  Assert.deepEqual(Services.search.getVisibleEngines(), visibleEnginesOriginal,
-                   "default visible engines set should be reset");
-
-  // 2. change the default search engine
-  const defaultEngineNew = visibleEnginesOriginal[3];
-  Assert.notEqual(defaultEngineOriginal, defaultEngineNew, "new default engine should be different from original");
-  Services.search.defaultEngine = defaultEngineNew;
-  Assert.equal(Services.search.defaultEngine, defaultEngineNew, "default engine should be set to new");
-  MozSelfSupport.resetSearchEngines();
-  Assert.equal(Services.search.defaultEngine, defaultEngineOriginal, "default engine should be reset");
-  Assert.deepEqual(Services.search.getVisibleEngines(), visibleEnginesOriginal,
-                   "default visible engines set should be reset");
-
-  // 3. remove an engine
-  const engineRemoved = visibleEnginesOriginal[2];
-  Services.search.removeEngine(engineRemoved);
-  Assert.ok(Services.search.getVisibleEngines().indexOf(engineRemoved) == -1,
-            "removed engine should not be visible any more");
-  MozSelfSupport.resetSearchEngines();
-  Assert.equal(Services.search.defaultEngine, defaultEngineOriginal, "default engine should be reset");
-  Assert.deepEqual(Services.search.getVisibleEngines(), visibleEnginesOriginal,
-                   "default visible engines set should be reset");
-
-  // 4. add an angine
-  // we don't remove user-added engines as they are only used if selected
-}
-
-function test()
-{
-  test_resetPref();
-  test_resetSearchEngines();
-}
--- a/dom/webidl/MozSelfSupport.webidl
+++ b/dom/webidl/MozSelfSupport.webidl
@@ -45,14 +45,9 @@ interface MozSelfSupport
    * - if there is a default value, then change the value back to default,
    * - if there's no default value, then delete the pref,
    * - no-op otherwise.
    *
    * @param DOMString
    *        The name of the pref to reset.
    */
   void resetPref(DOMString name);
-
-  /**
-   * Resets original search engines, and resets the default one.
-   */
-  void resetSearchEngines();
 };
--- a/netwerk/base/nsIBrowserSearchService.idl
+++ b/netwerk/base/nsIBrowserSearchService.idl
@@ -248,17 +248,17 @@ interface nsIBrowserSearchInitObserver :
   /**
    * Called once initialization of the browser search service is complete.
    *
    * @param aStatus The status of that service.
    */
   void onInitComplete(in nsresult aStatus);
 };
 
-[scriptable, uuid(a982859b-2852-466a-8ed1-9e714c0e65d1)]
+[scriptable, uuid(4a4ce87d-7cb9-4975-a267-345f6a49bb8f)]
 interface nsIBrowserSearchService : nsISupports
 {
   /**
    * Start asynchronous initialization.
    *
    * The callback is triggered once initialization is complete, which may be
    * immediately, if initialization has already been completed by some previous
    * call to this method. The callback is always invoked asynchronously.
@@ -277,21 +277,16 @@ interface nsIBrowserSearchService : nsIS
    * Note that this attribute does not indicate that initialization has succeeded.
    *
    * @return |true| if the search service is now initialized, |false| if
    * initialization has not been triggered yet.
    */
   readonly attribute bool isInitialized;
 
   /**
-   * Resets the default engine to its original value.
-   */
-  void resetToOriginalDefaultEngine();
-
-  /**
    * Adds a new search engine from the file at the supplied URI, optionally
    * asking the user for confirmation first.  If a confirmation dialog is
    * shown, it will offer the option to begin using the newly added engine
    * right away.
    *
    * @param engineURL
    *        The URL to the search engine's description file.
    *
--- a/testing/modules/Assert.jsm
+++ b/testing/modules/Assert.jsm
@@ -269,17 +269,17 @@ proto.deepEqual = function deepEqual(act
  * @param actual
  *        (mixed) Test subject to be evaluated as NOT equivalent to `expected`, including nested properties
  * @param expected
  *        (mixed) Test reference to evaluate against `actual`
  * @param message (optional)
  *        (string) Short explanation of the expected result
  */
 proto.notDeepEqual = function notDeepEqual(actual, expected, message) {
-  this.report(ObjectUtils.deepEqual(actual, expected), actual, expected, message, "notDeepEqual");
+  this.report(_deepEqual(actual, expected), actual, expected, message, "notDeepEqual");
 };
 
 /**
  * 9. The strict equality assertion tests strict equality, as determined by ===.
  * assert.strictEqual(actual, expected, message_opt);
  *
  * @param actual
  *        (mixed) Test subject to be evaluated as strictly equivalent to `expected`
--- a/toolkit/components/search/nsSearchService.js
+++ b/toolkit/components/search/nsSearchService.js
@@ -3299,20 +3299,16 @@ SearchService.prototype = {
       defaultEngine = defaultPrefB.getComplexValue(defPref, nsIPLS).data;
     } catch (ex) {
       // If the default pref is invalid (e.g. an add-on set it to a bogus value)
       // getEngineByName will just return null, which is the best we can do.
     }
     return this.getEngineByName(defaultEngine);
   },
 
-  resetToOriginalDefaultEngine: function SRCH_SVC__resetToOriginalDefaultEngine() {
-    this.defaultEngine = this._originalDefaultEngine;
-  },
-
   _buildCache: function SRCH_SVC__buildCache() {
     if (!getBoolPref(BROWSER_SEARCH_PREF + "cache.enabled", true))
       return;
 
     TelemetryStopwatch.start("SEARCH_SERVICE_BUILD_CACHE_MS");
     let cache = {};
     let locale = getLocale();
     let buildID = Services.appinfo.platformBuildID;