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

228 Коммитов

Автор SHA1 Сообщение Дата
Carsten "Tomcat" Book 2666074aa0 merge mozilla-inbound to mozilla-central a=merge 2016-04-28 16:30:24 +02:00
Jan Henning 23cbd57568 Bug 1263110 - Part 3 - Remove the remains of the old crash loop detection. r=mfinkle r=sebastian
The number of recent successive crashes is now tracked wholly within Java, so we can remove the old Gecko pref and the associated reset code.

MozReview-Commit-ID: 7bR9wqJsLoi

--HG--
extra : transplant_source : %A3%9C%89%87%E9Z%9B%C6%900%23%27%C1%CF%B7%DD1D%DD%FC
2016-04-09 17:51:57 +02:00
Kyle Huey 7579799b01 Bug 1266595: Replace Chromium Task with Runnable. r=froydnj 2016-04-27 17:06:05 -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
Nathan Froyd 745c937285 Bug 1266401 - stop constructing temporary strings in Android's appshell; r=snorp
We don't have to construct temporary strings to get at the raw
characters of a string.
2016-04-21 12:52:42 -04:00
Jim Chen dc18692d89 Bug 1252650 - Add intent to create XPCOM services in GeckoService; r=snorp
Add support for Intents that launch GeckoService and create services
based on a category registered with the category manager.
2016-04-20 15:06:13 -04:00
Shatur 31ec617e18 Bug 1250387 - Kill GckoConnectivityReceiver.java and improve GeckoNetworkManager.java r=grisha 2016-04-19 06:31:17 +05:30
Nathan Froyd 9fb29c89bf Bug 1263708 - remove unused gWidgetLog in Android's nsAppShell; r=snorp 2016-04-12 10:48:24 -04:00
Jim Chen 8af38dfebc Bug 1260243 - Remove sendEventToGeckoSync and related code; r=me
We can remove GeckoAppShell.sendEventToGeckoSync and related code
because GeckoThread.waitOnGecko is replacing it.
2016-04-05 21:43:41 -04:00
Jim Chen 2bb3a5b2e1 Bug 1260243 - Convert backgrounding/foregrounding GeckoEvent to native calls; r=snorp
Convert APP_BACKGROUNDING and APP_FOREGROUNDING events in GeckoEvent to
native calls onPause and onResume in GeckoThread, respectively.
2016-04-05 21:43:41 -04:00
Jim Chen 8318ca75b7 Bug 1260243 - Add GeckoThread.waitOnGecko; r=snorp
GeckoThread.waitOnGecko blocks the current thread and waits for previous
events on the Gecko thread to finish executing before continuing. This
is implemented by synchronously running a dummy event on the Gecko
thread. This patch also lets us get rid of sendEventToGeckoSync in
GeckoAppShell.
2016-04-05 21:43:40 -04:00
James Willcox 0391aa89f2 Bug 1222098 - Devicemotion event timestamp should return values from Android sensor API and not Gecko. r:smaug 2016-04-04 12:22:59 -05:00
Jim Chen bcb596d239 Bug 1257319 - Remove BROADCAST GeckoEvent; r=me
Remove the now-obsolete BROADCAST GeckoEvent.
2016-03-23 14:42:38 -04:00
Jim Chen 84972cba31 Bug 1257319 - Add notifyObservers methods to GeckoAppShell; r=snorp
Add notifyObservers and the synchronous syncNotifyObservers methods to
GeckoAppShell to replace the BROADCAST event.
2016-03-23 14:42:38 -04:00
Carsten "Tomcat" Book 0f5bdcdccf Backed out changeset 0b0b229e5968 (bug 1257319) for causing merge conflicts when uplifting to mozilla-central 2016-03-23 10:55:31 +01:00
Carsten "Tomcat" Book 15ef5dbe45 Backed out changeset 48d6faa3bf0f (bug 1257319) 2016-03-23 10:55:06 +01:00
Jim Chen 126366bd4a Bug 1257319 - Remove BROADCAST GeckoEvent; r=me
Remove the now-obsolete BROADCAST GeckoEvent.
2016-03-22 22:24:32 -04:00
Jim Chen 2025f2f89b Bug 1257319 - Add notifyObservers methods to GeckoAppShell; r=snorp
Add notifyObservers and the synchronous syncNotifyObservers methods to
GeckoAppShell to replace the BROADCAST event.
2016-03-22 22:24:31 -04:00
Jim Chen f0b94011a2 Bug 1248695 - Check for null browser app object when handling UI telemetry events; r=snorp
The nsAppShell mBrowserApp object may not have been initialized when
handling UI telemetry events. In that case, we should bail instead of
crashing.
2016-02-16 16:57:49 -05:00
Jim Chen cea91f9d3e Bug 1244875 - Update JNI usages; r=snorp
Update JNI usages to match the changes in JNI templates.
2016-02-09 17:27:28 -05:00
Birunthan Mohanathas d7371d07d0 Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-02-02 17:36:30 +02:00
Jim Chen 6c833a3654 Bug 1243070 - Remove obsolete size-change code; r=snorp
Remove obsolete SIZE_CHANGED event and its handler in nsWindow. Also
remove some other supporting code (such as gAndroidBounds and the
FORCED_RESIZE event) that should be unnecessary by now.
2016-02-01 17:38:14 -05:00
Jim Chen 5e98c7369d Bug 1243069 - Control GeckoThread state entirely from C++ code; r=snorp
Right now, we rely on browser.js sending Gecko:Ready, to set the
GeckoThread state to RUNNING upon receiving Gecko:Ready. This patch
gets rid of this dependency on browser.js and Gecko:Ready.
2016-02-01 17:38:14 -05:00
Jim Chen 2b4561b520 Bug 1243049 - Implement new PrefsHelper native methods; r=snorp
Implement the PrefsHelper native methods. The previous browser.js
implementation supported "pseudo-prefs" that did not exist as actual
prefs, but was accessible through PrefsHelper. In order to accommodate
these pseudo-prefs, we send observer notifications in order to
communicate with browser.js about prefs that we don't support.
2016-02-01 17:38:13 -05:00
Phil Ringnalda d381b4bca6 Back out 7 changesets (bug 1235261) for cpptest failures in TestTArray
CLOSED TREE

Backed out changeset d66c3f19a210 (bug 1235261)
Backed out changeset 467d945426bb (bug 1235261)
Backed out changeset 32b61df13142 (bug 1235261)
Backed out changeset c50bb8ed4196 (bug 1235261)
Backed out changeset 0ff0fa6fe81f (bug 1235261)
Backed out changeset df70e89669da (bug 1235261)
Backed out changeset 064969357fc9 (bug 1235261)
2016-01-31 10:10:57 -08:00
Birunthan Mohanathas 373593275e Bug 1235261 - Part 1: Rename nsAutoTArray to AutoTArray. r=froydnj 2016-01-31 17:12:12 +02:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Jim Chen 85514b694a Bug 1237690 - Fix possible deadlock in nsAppShell::SyncRunEvent; r=snorp
In order to prevent the deadlock, we need to release sAppShellLock when
we start waiting in SyncRunEvent. However, we cannot simply unlock it
before the wait because that introduces an out-of-order unlocking wrt
mSyncRunMonitor, which can cause further deadlocks. So this patch
converts mSyncRunMoitor to a condvar and make it use sAppShellLock. That
then involves making aAppShellLock a Mutex instead of a StaticMutex. The
final result is having one lock (sAppShellLock), which supports any
other condvars that we have like mSyncRunFinished.
2016-01-13 14:35:27 -05:00
Jim Chen c42db7f1e4 Bug 1233812 - Move SyncRunEvent to nsAppShell; r=snorp
This patch moves the SyncRunEvent logic from GLControllerSupport to
nsAppShell, as it could be useful elsewhere. This patch fixes a race
condition related to shutdown, where a deadlock could occur if Gecko
shuts down when another thread is waiting for a synchronous event to
finish running. This patch also fixes a crash on shutdown when we tried
to create a mutex after the deadlock detector has shut down.
2015-12-23 22:03:35 -05:00
Jim Chen 008886b9a1 Bug 1233812 - Fix possible race in accessing nsAppShell instance; r=snorp
When getting nsAppShell from another thread, there could be a race with
nsAppShell being destroyed on the main thread. This patch makes the raw
nsAppShell pointer only accessible from the main thread, and use a
static mutex to coordinate accessing nsAppShell from other threads.
2015-12-23 22:03:35 -05:00
Jim Chen 61ae086c99 Bug 1227706 - Remove unused GLController calls and events; r=snorp
Remove GLController calls and events in GeckoAppShell and GeckoEvent
that were made obsolete by the new native calls.
2015-12-23 22:03:34 -05:00
Jim Chen 94b3e4800e Bug 1227727 - Remove geckoConnected method in LayerView; r=snorp
Right now LayerView depends on geckoConnected being called by GeckoApp
or GeckoView during its initialization. However, we can get rid of it
and let LayerView handle the task itself. As part of this change, screen
depth overriding is moved to native code in nsAppShell.
2015-12-23 22:03:33 -05:00
Jim Chen ed2c2e5b1c Bug 1227604 - Fix compositor event order; r=snorp
When the queue only contains compositor events, a compositor event
should go to the back of the queue to maintain order.

--HG--
extra : commitid : I7bHvJCe68o
2015-12-01 13:48:18 -08:00
Jim Chen 4bce9b46f1 Bug 1211704 - Count key and IME events as UI events; r=esawin
GeckoEvent.KEY_EVENT and GeckoEvent.IME_EVENT used to count as UI events
for the hang monitor. We should count the new native calls as native
events too through this patch.
2015-10-22 17:45:47 -04: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
Jim Chen 13b339824b Bug 1211919 - Allow quitting when asked explicitly; r=snorp
Right now we don't allow quitting Fennec when the last nsWindow closes
(e.g. when the last GeckoView is destroyed) because we want to keep the
Gecko thread running throughout the app process lifetime. However, when
we are asked to quit explicitly through nsIAppStartup::Quit, we should
release the hold on nsAppStartup and allow quitting to continue.
2015-10-15 15:49:48 -04:00
Wes Kocher 45375c9d90 Merge m-c to inbound, a=merge 2015-10-08 14:35:43 -07:00
Jim Chen e924946ea2 Bug 1200426 - Convert PROCESS_OBJECT GeckoEvent to native call; r=snorp
The PROCESS_OBJECT GeckoEvent is used to set the layer client object in
Gecko once Gecko is done loading. This patch converts it to a native
call in GeckoView.Window.
2015-10-08 15:25:49 -04:00
Ahmed Khalil 3f5aa180f0 Bug 1201926 - Add support for keyed histograms to Fennec's Telemetry module, r=nalexander 2015-10-08 11:32:52 +05:30
Carsten "Tomcat" Book 049a35a49c Backed out changeset 2e8206d7352e (bug 1200426) for Android Perma Failures 2015-10-08 10:07:11 +02:00
Jim Chen c05389afcc Bug 1200426 - Convert PROCESS_OBJECT GeckoEvent to native call; r=snorp
The PROCESS_OBJECT GeckoEvent is used to set the layer client object in
Gecko once Gecko is done loading. This patch converts it to a native
call in GeckoView.Window.
2015-10-08 01:12:57 -04:00
Wes Kocher d31f5415b2 Backed out 2 changesets (bug 1200426) for android tpn bustage
Backed out changeset 4dcc2fb45208 (bug 1200426)
Backed out changeset 2dea192c7f33 (bug 1200426)
2015-10-07 09:05:01 -07:00
Jim Chen 0f413bc2a3 Bug 1200426 - Convert PROCESS_OBJECT GeckoEvent to native call; r=snorp
The PROCESS_OBJECT GeckoEvent is used to set the layer client object in
Gecko once Gecko is done loading. This patch converts it to a native
call in GeckoView.Window.
2015-10-07 08:57:30 -04:00
Jim Chen 08e3d9ccd5 Bug 1200343 - Implment PrefsHelper native calls; r=snorp
This patch implements the PrefsHelper native calls for getting prefs;
2015-09-28 12:07:10 -04:00
Jim Chen eb87f7d742 Bug 1200343 - Remove pref events from GeckoEvent; r=snorp
Now that we use native calls, we can remove the pref-related events from
GeckoEvent.
2015-09-28 12:07:09 -04:00
Jim Chen 3d7c253ff0 Bug 1208041 - Fix race condition when coalescing viewport events; r=snorp
We have a pretty messy system of coalescing viewport events that
introduced a race condition during the recent JNI refactoring. This
patch makes that code simpler and fixes the race condition. Instead of
keeping track of a previous viewport event, we now scan the event queue
for previous viewport events. This shouldn't be a perf concern because
we only scan the queue for viewport and native callback events, and stop
scanning as soon as we find another kind of event.
2015-09-28 12:07:09 -04:00
Wes Kocher e143a6410c Backed out 4 changesets (bug 1200343) for android talos failures
Backed out changeset 67dc42cbf02b (bug 1200343)
Backed out changeset b077acafcebb (bug 1200343)
Backed out changeset e115ca114601 (bug 1200343)
Backed out changeset 905e1fb54fd4 (bug 1200343)
2015-09-25 13:21:58 -07:00
Jim Chen a0ed6d9e5e Bug 1200343 - Implment PrefsHelper native calls; r=snorp
This patch implements the PrefsHelper native calls for getting prefs;
2015-09-25 15:03:35 -04:00
Jim Chen 83e034c311 Bug 1200343 - Remove pref events from GeckoEvent; r=snorp
Now that we use native calls, we can remove the pref-related events from
GeckoEvent.
2015-09-25 15:03:35 -04:00
Jim Chen e6f22f3cfa Bug 1197957 - Switch PROFILE_READY state to correspond to profile-after-change; r=snorp
Originally, the GeckoThread PROFILE_READY state was chosen to correspond
to the profile-do-change event, to give priority to JNI code (e.g.
window creation) over other events that may be registered under
profile-after-change event. However, this leads to broken tests because
our testing infra expects things like window creation to happen during
profile-after-change at the earliest. This is because we have to wait
for addons like SpecialPowers to be loaded between profile-do-change and
profile-after-change. This patch changes the PROFILE_READY state to
correspond to the profile-after-change event, so things are consistent
again.
2015-09-21 10:13:33 -04:00