Граф коммитов

83 Коммитов

Автор SHA1 Сообщение Дата
Carsten "Tomcat" Book 8b6316ec5f Merge mozilla-central to mozilla-inbound 2016-07-22 11:59:06 +02:00
Thomas Zimmermann 6c1b3c2bc2 Bug 1250922: Use gpsd for Geolocation, r=jdm,glandium
This patch adds the gpsd location provider to |nsGeolocationService|.

On release builds, the new provider is *not* used by default, as GPS
is slow to start and unreliable indoors. To enable gpsd, users with a
supported GPS receiver must set the preference 'geo.location.use_gpsd'
to 'true'.

On non-release builds, the gpsd location provider is enabled by default
to give it some testing.

MozReview-Commit-ID: I0tj1GmmFNP
2016-07-22 11:52:09 +02:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Chris Peterson b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Jinank Jain d244954843 Bug 1238801 - Don't set a timer for the default geolocation timeout. r=jdm, r=smaug 2016-06-26 10:24:54 -04:00
Fabrice Desré d9ec9e3a4a Bug 1218627 - backout ef8fcd144a50 2016-07-12 14:00:34 -07:00
Benjamin Smedberg bf05496a83 Bug 1282866 - remove widget/qt and other supporting QT code, r=dougt. This patch does not remove all of the checks for MOZ_WIDGET_QT (which are dead code), but that will be a followup mentored bug.
MozReview-Commit-ID: EGqHHhCD7vD

--HG--
extra : rebase_source : a4b9593959dd3ba80189db47eabb056ea207490f
extra : amend_source : a744d833693f0fe7adbea961c00bb5fb55a91580
2016-07-07 12:14:25 -04:00
Michelangelo De Simone 9508c6dd0b Bug 1218627 - Fixing randomly failing test(s) in Geo. r=dougt
MozReview-Commit-ID: LyZVmPBQT84

--HG--
extra : transplant_source : L%0D%F2%BA_%84%8E%B9%B9%7F%E7J%DB%86%8E%B6%83%9B%05%87
2016-07-05 14:46:58 -07:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Michelangelo De Simone b094f2be2a Bug 1278410 - The Geolocation fuzzing implementation has been removed. r=dougt
MozReview-Commit-ID: 6x4Z4IayvCt

--HG--
extra : transplant_source : M%E0%3E%12%84%D7%0DQBT%91%08%7B%D7%8D%7Cyfc%9B
2016-06-06 15:50:12 -07:00
Bill McCloskey 291c555f34 Bug 1262671 - void** -> PickleIterator (r=froydnj) 2016-05-27 09:57:38 -07:00
Chris Peterson 8a9e2d2bd4 Bug 1272513 - Part 2: Remove redundant -Wshadow CXXFLAGS from moz.build files. r=glandium 2016-05-14 00:54:55 -07:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Andrew McCreight f417b18c2b Bug 1263001 - Don't Notify() an unlinked nsGeolocationRequest. r=jdm
If an unlinked nsGeolocationRequest somehow stays alive, then calling
Notify() on it will likely cause a null-deref crash.
2016-04-22 14:15:36 -07:00
Michelangelo De Simone a3019e2338 Bug 1255198 - [Telemetry] Add geolocation Telemetry probes to record fulfilled requests according to document.isVisible. r=jdm, data-review=bsmedberg
MozReview-Commit-ID: 85bsEWEWa3w
2016-03-21 15:42:18 -07:00
Andrew McCreight 1bf6681a43 Bug 1256061 - Hold a strong reference to a request when we call a method on it. r=jdm
I think it is possible for the TimerCallbackHolder to fire off a
Notify() while the geolocation object and the nsGeolocationRequest are
only holding each other alive, so they would be freed by the cycle
collector the next time it runs, but we haven't run the cycle
collector yet. If that happens, then Geolocation::RemoveRequest()
would break the cycle, causing stuff to unravel and bad things to
happen. To fix this, we just hold the request alive in
TimerCallbackHolder::Notify(), which will also ensure that the
geolocation object is alive, hopefully preventing crashes.

This will make the Notify() behavior similar to what it was before bug
1238427, when the nsITimer object would hold a strong reference to the
request when the Notify() was being run.
2016-03-23 12:59:14 -07:00
Andrew McCreight 4e6a34a3d5 Bug 1256061 - Revert patch that didn't do anything. 2016-03-23 12:59:14 -07:00
Andrew McCreight 836b0f5ba3 Bug 1256061 - Actually check if the underlying referent still exists in nsGeolocationRequest::TimerCallbackHolder::Notify(). r=jdm
--HG--
extra : rebase_source : 52973fb4b629156a53b8f071dfbfbbd4b7e163d9
2016-03-16 11:48:00 +01:00
Boris Zbarsky 36d4079be7 Bug 1254847 part 3. Make AutoEntryScript always take ownership of error reporting. r=bholley 2016-03-09 19:02:03 -05:00
Doug Turner 1a1dd4f3c7 Bug 1253159 - Remove locationUpdatePending and restore request timeout. r=jdm 2016-03-02 21:48:00 -05:00
Michelangelo De Simone e6af515748 Bug 1249833 - Typo in nsGeolocation.h. r=jdm
MozReview-Commit-ID: DGg2iUOkSMJ

--HG--
extra : rebase_source : ede2d7058adb979c91af94b2558ee7bb69a4a5b2
2016-02-19 16:30:09 -08:00
ywu 5413221998 Bug 1238873 - Handle the bug that if we take cached data, we might not get any update later. r=kchen. r=jdm. 2016-02-15 17:56:00 +01:00
Andrew McCreight 6256f3a859 Bug 1240906 - Shut down geolocation service at xpcom-shutdown instead of quit-application. r=dougt
Also, remove trailing spaces from network_geolocation.sjs.
2016-01-19 14:07:00 +01:00
ywu c155d8d975 Bug 1240664 - Only enable bug 1216148's behavior when there is a wakelock support. r=kanru 2016-02-01 16:40:21 +08:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
ywu 1859d04f33 Bug 1240666 - Follow-up to bug 1216148. r=kchen.
Add a comment to where we resume gps requests from invisible state.
2016-01-26 18:10:00 +01:00
Alphan Chen c5396e386f Bug 858827 - [Geolocation] Add a handling for getCurrentLocation when timeout is zero. r=jdm
Follow W3C spec, Error callback should be called when timeout is zero and
  there's no cached position for getCurrentLocation.
2016-01-26 17:11:54 +08:00
Andrew McCreight 9f632b6e53 Bug 1238427 - Avoid a strong reference from the timeout timer to nsGeolocationRequest. r=jdm
The timeout timer of a geolocation request holds a strong reference to
the request. This can cause the window to leak if the request is not
completed before the tab containing the window is closed.

To fix this, I made the timer instead hold a strong reference to a
wrapper class that has only a weak reference to the request. The
request destructor must now cancel the timeout timer.

I also outlined a call to StopTimeoutTimer() in
nsGeolocationRequest::Shutdown().
2016-01-21 09:57:30 -08:00
Phil Ringnalda 8b079b3e4c Back out 0014798942e0 (bug 1238427) for its bad implicit conversion constructor for 'TimerCallbackHolder'
CLOSED TREE
2016-01-20 21:17:44 -08:00
Andrew McCreight c2fbfc9add Bug 1238427 - Avoid a strong reference from the timeout timer to nsGeolocationRequest. r=jdm
The timeout timer of a geolocation request holds a strong reference to
the request. This can cause the window to leak if the request is not
completed before the tab containing the window is closed.

To fix this, I made the timer instead hold a strong reference to a
wrapper class that has only a weak reference to the request. The
request destructor must now cancel the timeout timer.

I also outlined a call to StopTimeoutTimer() in
nsGeolocationRequest::Shutdown().
2016-01-19 14:09:00 -05:00
Tim Taubert a2162b77a7 Bug 1240766 - Fix startup crash in Geolocation::Init() when principal URI is null r=jdm 2016-01-19 22:06:01 +01:00
Tim Taubert d5b3d64a10 Bug 1230209 - Add more telemetry for Geolocation usage f=bsmedberg r=tanvi,rbarnes,jdm 2015-12-03 19:12:11 +01:00
ywu 534e2d442e Bug 1216148 - Handle how geolocation acts when the app's visibility changes. r=kchen.
Add the wake lock api to geolocation.
If your app holds a lock, you can continue use geolocation service when your app is invisible.
Otherwise, your invisible app can't get any updated location.
2016-01-12 00:33:00 +01:00
Andrea Marchesini 83b88d383f Bug 1231378 - part 2 - Fix uninitialized members of classes in dom/*, r=smaug 2016-01-12 18:16:59 +00:00
Carsten "Tomcat" Book 6692893d20 Backed out changeset 5f6a58676e87 (bug 1231378) 2016-01-12 15:48:57 +01:00
Andrea Marchesini 001e241382 Bug 1231378 - part 2 - Fix uninitialized members of classes in dom/*, r=smaug 2016-01-12 13:54:53 +00:00
Bogdan Postelnicu 4d0c1bf1a0 Bug 1227119 - Set a default value for variable ret. r=dougt 2015-11-23 06:03:00 -05:00
Boris Zbarsky 73208ce2f3 Bug 1228707. Add a away to call Web IDL callbacks while ignoring any errors from them, and use it in a few places. r=smaug 2015-11-30 22:04:09 -05:00
Boris Zbarsky b0a1ed59db Bug 1228009. Geolocation code needs to handle failures on its ErrorResults. r=smaug 2015-11-25 15:48:04 -05:00
Dave Huseby 7aa8b55eb3 Bug 1220688 - catch and ignore JS exceptions when working with nsAutoJSString. r=bz 2015-11-12 13:12:00 +01:00
Birunthan Mohanathas 9985829ecc Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Kyle Huey c7d3c4e21a Bug 1216401: Eviscerate nsIDOMWindow, move still needed methods to nsPIDOMWindow. r=bz 2015-10-26 14:37:32 -07:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Bobby Holley 110f12e7ca Bug 1072150 - Use the opt-out for various sloppy consumers. r=bz 2015-09-24 14:02:41 -07:00
Chris Peterson 71920a9550 Bug 1207030 - Enable -Wshadow flag in more directories that have no -Wshadow warnings. r=glandium 2015-09-22 21:39:03 -07:00
Jeff Walden 4046fe1490 Bug 1179003 - Convert the infallible objectClassIs proxy hook into a fallible getBuiltinClass hook that indicates class type via outparam. r=efaust, r=bz on DOM bits, r=billm on IPC bits
--HG--
extra : rebase_source : 6ddc3727c411fdfced6338e5e383a10572575f0f
2015-08-28 21:55:40 -07:00
Nicholas Nethercote f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Terrence Cole de72ab688b Bug 1191529 - Remove JSIdArray and AutoIdArray and replace with Rooted<IdVector>; r=mccr8, r=jonco
* * *
imported patch 2_remove_AutoIdArray_gk

--HG--
extra : rebase_source : f4492f209248c7ae4b74d7d0345c51fa893167da
2015-08-05 11:02:00 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Juan Gomez 258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00