Backed out changeset 8010e0cbd228 (bug 1177871) for Windows debug test_geolocation_provider_timeout.js crashes.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 31 Jul 2015 15:00:12 -0400
changeset 287340 eefa8e4699d25f050b7abdd7e7207ca84d093e85
parent 287339 48510c8af0bece2184c78b07e6d173a54ddf3581
child 287341 aeb85029c3b3b594d96a9c72d04b8e971e1bdf5b
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1177871
milestone42.0a1
backs out8010e0cbd2288eb3846533febcd6d523c573d667
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 8010e0cbd228 (bug 1177871) for Windows debug test_geolocation_provider_timeout.js crashes. CLOSED TREE
dom/system/NetworkGeolocationProvider.js
dom/tests/unit/test_geolocation_provider_timeout.js
dom/tests/unit/xpcshell.ini
modules/libpref/init/all.js
--- a/dom/system/NetworkGeolocationProvider.js
+++ b/dom/system/NetworkGeolocationProvider.js
@@ -500,22 +500,16 @@ WifiGeoPositionProvider.prototype = {
       this.notifyListener("notifyError",
                           [POSITION_UNAVAILABLE]);
       return;
     }
     xhr.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
     xhr.responseType = "json";
     xhr.mozBackgroundRequest = true;
     xhr.channel.loadFlags = Ci.nsIChannel.LOAD_ANONYMOUS;
-    xhr.timeout = Services.prefs.getIntPref("geo.wifi.xhr.timeout");
-    xhr.ontimeout = (function() {
-      LOG("Location request XHR timed out.")
-      this.notifyListener("notifyError",
-                          [POSITION_UNAVAILABLE]);
-    }).bind(this);
     xhr.onerror = (function() {
       this.notifyListener("notifyError",
                           [POSITION_UNAVAILABLE]);
     }).bind(this);
     xhr.onload = (function() {
       LOG("server returned status: " + xhr.status + " --> " +  JSON.stringify(xhr.response));
       if ((xhr.channel instanceof Ci.nsIHttpChannel && xhr.status != 200) ||
           !xhr.response || !xhr.response.location) {
deleted file mode 100644
--- a/dom/tests/unit/test_geolocation_provider_timeout.js
+++ /dev/null
@@ -1,48 +0,0 @@
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-const Cu = Components.utils;
-
-Cu.import("resource://testing-common/httpd.js");
-
-var httpserver = null;
-var geolocation = null;
-
-function geoHandler(metadata, response)
-{
-  response.processAsync();
-}
-
-function successCallback() {
-  // The call shouldn't be sucessful.
-  do_check_true(false);
-  do_test_finished();
-}
-
-function errorCallback() {
-  do_check_true(true);
-  do_test_finished();
-}
-
-function run_test()
-{
-  do_test_pending();
-
-  // XPCShell does not get a profile by default. The geolocation service
-  // depends on the settings service which uses IndexedDB and IndexedDB
-  // needs a place where it can store databases.
-  do_get_profile();
-
-  httpserver = new HttpServer();
-  httpserver.registerPathHandler("/geo", geoHandler);
-  httpserver.start(-1);
-  var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
-  prefs.setCharPref("geo.wifi.uri", "http://localhost:" +
-                      httpserver.identity.primaryPort + "/geo");
-  prefs.setBoolPref("dom.testing.ignore_ipc_principal", true);
-
-  // Setting timeout to a very low value to ensure time out will happen.
-  prefs.setIntPref("geo.wifi.xhr.timeout", 5);
-
-  geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
-  geolocation.getCurrentPosition(successCallback, errorCallback);
-}
--- a/dom/tests/unit/xpcshell.ini
+++ b/dom/tests/unit/xpcshell.ini
@@ -19,10 +19,8 @@ skip-if = os == "android"
 [test_geolocation_reset_accuracy_wrap.js]
 skip-if = os == "mac" || os == "android"
 [test_geolocation_position_unavailable.js]
 skip-if = os == "android"
 [test_geolocation_position_unavailable_wrap.js]
 skip-if = os == "mac" || os == "android"
 [test_PromiseDebugging.js]
 [test_xhr_init.js]
-[test_geolocation_provider_timeout.js]
-skip-if = os == "android"
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -4330,19 +4330,16 @@ pref("layers.force-active", false);
 pref("layers.gralloc.disable", false);
 
 // Don't use compositor-lru on this platform
 pref("layers.compositor-lru-size", 0);
 
 // Enable/Disable the geolocation API for content
 pref("geo.enabled", true);
 
-// Timeout for outbound network geolocation provider XHR
-pref("geo.wifi.xhr.timeout", 60000);
-
 // Enable/Disable the orientation API for content
 pref("device.sensors.enabled", true);
 
 // Enable/Disable the device storage API for content
 pref("device.storage.enabled", false);
 
 // Toggle which thread the HTML5 parser uses for stream parsing
 pref("html5.offmainthread", true);