Bug 931930 - Initialize all members of PositionOptions when creating it by hand in the chrome process. r=dougt
authorJosh Matthews <josh@joshmatthews.net>
Tue, 26 Nov 2013 18:25:43 -0500
changeset 157633 a7db5760c6cfcd4d4959033cf2debcc8da167e0e
parent 157632 ab78336d47c63f43afa1fa8693574180a2f27d3a
child 157634 a6a046acc881af9e4879f6d6e180f9e27a3e13ab
child 157718 699c169f9eb8663ecc6d22c1b9689b74e4227fee
push id25717
push userkwierso@gmail.com
push dateWed, 27 Nov 2013 01:34:26 +0000
treeherdermozilla-central@a6a046acc881 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdougt
bugs931930
milestone28.0a1
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
Bug 931930 - Initialize all members of PositionOptions when creating it by hand in the chrome process. r=dougt
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -2822,16 +2822,18 @@ static int32_t
 AddGeolocationListener(nsIDOMGeoPositionCallback* watcher, bool highAccuracy)
 {
   nsCOMPtr<nsIDOMGeoGeolocation> geo = do_GetService("@mozilla.org/geolocation;1");
   if (!geo) {
     return -1;
   }
 
   PositionOptions* options = new PositionOptions();
+  options->mTimeout = 0;
+  options->mMaximumAge = 0;
   options->mEnableHighAccuracy = highAccuracy;
   int32_t retval = 1;
   geo->WatchPosition(watcher, nullptr, options, &retval);
   return retval;
 }
 
 bool
 ContentParent::RecvAddGeolocationListener(const IPC::Principal& aPrincipal,