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

83 Коммитов

Автор SHA1 Сообщение Дата
Bill McCloskey c6c1f4bbc9 Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm)
This parameter isn't used by any implementation of onDispatchedEvent,
and keeping the parameter makes later refactorings in this bug more difficult.

MozReview-Commit-ID: 90VY2vYtwCW
2017-07-28 13:09:06 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Randall Barker dd0237f451 Bug 1319850 - part 1, Add MessagePumpForAndroidUI r=nfroyd 2016-12-23 09:08:27 -08:00
Wes Kocher 0992df4676 Backed out 4 changesets (bug 1319850) for android xpcshell bustage a=backout
Backed out changeset 15b92bb6d810 (bug 1319850)
Backed out changeset e31107c3f677 (bug 1319850)
Backed out changeset 2a8012945a74 (bug 1319850)
Backed out changeset 8717bea884c9 (bug 1319850)
2016-12-22 18:16:34 -08:00
Randall Barker 2832f3da83 Bug 1319850 - part 1, Add MessagePumpForAndroidUI r=nfroyd 2016-12-22 16:15:14 -08:00
Alexandre Lissy 0af5b943b6 Bug 1284674 - Remove NUWA r=cyu
MozReview-Commit-ID: GyMRNzOBKw6

--HG--
extra : rebase_source : 293af1cd55f2035ce6a99f4ebf144059c32a2b8f
2016-08-02 14:54:00 +02:00
Andrew McCreight 5848fe3b73 Bug 1276318, part 2 - Fix mode lines in ipc/glue. r=billm
MessageChannel.{h,cpp}, MessageLink.{h,cpp}, and ProtocolUtils.h are
using 4-space indent so I left those alone.
2016-05-27 14:54:31 -07:00
Andrew McCreight 9449c5e62d Bug 1276318, part 1 - Fix leading tabs in ipc/glue. r=billm
Also remove a weird mode line so the script can fix it more easily in
the next part.
2016-05-27 14:54:30 -07:00
Kyle Huey 223dd41b6f Bug 1269056: Part 3 - Consolidate XPCOM and chromium event queues for the main thread. r=froydnj 2016-05-12 15:15:43 -07:00
Kyle Huey 3425031e06 Bug 1269056: Part 2 - Consolidate XPCOM and chromium event queues for non-main nsThreads. r=froydnj 2016-05-12 15:15:43 -07:00
Kyle Huey d3cc4b02b6 Bug 1268160: Assert that PostIdleTask is only used on the main thread. r=jld 2016-05-12 15:15:43 -07:00
Kyle Huey 2709afd167 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey 1cc02aa8c6 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Wes Kocher 7d2cebe912 Backed out 3 changesets (bug 1263311) for Windows build failures in ServiceWorkerPrivate.cpp CLOSED TREE
Backed out changeset 0434a548e1fe (bug 1263311)
Backed out changeset 60b1be29446c (bug 1263311)
Backed out changeset 18132498bc40 (bug 1263311)

MozReview-Commit-ID: LPEa05QobdQ
2016-04-11 12:50:56 -07:00
Kyle Huey d200ed89d0 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Kyle Huey f13a6fc866 Bug 1263311: Part 1 - Change the nsICancelableRunnable interface. r=froydnj 2016-04-11 11:40:06 -07:00
Kartikaya Gupta f6b5ae39ac Bug 1257862 - Allow running things from the delayed work queue during a nested event loop. r=khuey,dvander
MozReview-Commit-ID: BmLM6j9yFEK
2016-04-01 08:25:40 -04:00
Bill McCloskey f29390f263 Bug 1222101 - Reorder some thread code (r=jld) a=kwierso
MozReview-Commit-ID: Alg40mu9aU3
2016-03-30 12:20:20 -07:00
Kyle Huey d9265a3eaf Bug 1259294: Part 2 - Use MOZ_ALWAYS_SUCCEEDS. r=froydnj 2016-03-28 10:28:15 -07:00
Jonathan Watt 3d09b32ad7 Bug 1253094, part 3 - Stop using DebugOnly for class/struct members in ipc/. r=billm
MozReview-Commit-ID: L16CD7xtn3V
2016-02-26 15:52:07 +00:00
Nathan Froyd 90918b40e9 Bug 1243430 - remove stray carriage returns from MessagePump.cpp; r=me
DONTBUILD because whitespace-only changes are trivial.
2016-01-26 11:30:03 -05:00
Kyle Huey 76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -07:00
Jim Chen 23ba47d9f1 Bug 1157908 - Give Gecko thread Looper low priority; r=snorp 2015-04-27 20:52:52 -04:00
Ryan VanderMeulen b350674885 Backed out changesets a486dcc9c233 and 7164a2488b28 (bug 1157908) for various Android test failures.
CLOSED TREE
2015-04-24 16:01:17 -04:00
Jim Chen 5864b21201 Bug 1157908 - Give Gecko thread Looper low priority; r=snorp 2015-04-24 14:40:55 -04:00
Andrea Marchesini e6f385fb3d Bug 1148527 - Indentation fix after bug 1145631, r=ehsan 2015-03-27 18:52:19 +00:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Jim Chen db34c64f29 Bug 1116589 - Use templated JNI classes in generated bindings; r=snorp 2015-01-09 19:33:57 -05:00
Jim Mathies 9d266c73b6 Bug 1060738 - Implement MessagePumpForNonMainUIThreads for Windows, a xpcom compatible subclass of chromium's MessagePumpForUI. r=tabraldes 2014-09-12 09:49:38 -05:00
Ehsan Akhgari 8e138d4419 Bug 1060997 - Fix more bad implicit constructors in IPC; r=smaug 2014-08-31 21:12:55 -04:00
Ben Kelly 9538652bf1 Bug 1013571 Reland support for PBackground on workers. r=bent 2014-07-09 17:39:18 -04:00
Wes Kocher 25c80c8653 Backed out changeset 725b7db309c3 (bug 1013571) for causing the failures in 1032783 2014-07-08 14:43:46 -07:00
Ben Kelly 273b405632 Bug 1013571 Reland support for PBackground on workers. r=bent 2014-07-08 14:57:16 -04:00
Ben Kelly 442902ef98 Backout 303027a0da95 (bug 1013571) due to persistent oranges (bug 1032011, bug 1032605, bug 1032783) 2014-07-04 00:31:59 -04:00
Ben Kelly af266f98f6 Bug 1013571 Support PBackground on workers. r=bent 2014-06-27 13:36:25 -07:00
Kyle Huey 8c5cca136c Bug 996133: Remove unnecessary NS_DISPATCH_NORMAL arguments to NS_DispatchToMainThread. r=ehsan 2014-05-23 12:53:17 -07:00
Birunthan Mohanathas 5f1fde8824 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
snigdha 9cc482da68 Bug 798033 - Headers should generally not do "using namespace" at file scope. r=jib, r=jmathies, r=rjesup, r=ekr, r=ncameron, r=blassey 2014-04-01 08:29:25 -04:00
Josh Aas 5e8b893a0b Bug 987923: Add autorelease pool locally in GetTempDir on OS X, and also to non-main-thread event loop. r=smichaud,bent 2014-03-25 15:27:12 -05:00
Ryan VanderMeulen 0d7b59001e Backed out changeset 6f05267b4afc (bug 798033) for Android bustage. 2014-03-05 09:55:52 -05:00
snigdha a441998156 Bug 798033 - Headers should generally not do "using namespace" at file scope. r=jib, r=jmathies, r=rjesup, r=ekr, r=ncameron, r=blassey 2014-03-05 08:47:45 -05:00
Jim Chen 9a3802b401 Bug 959237 - Add AndroidBridge::HasEnv checks; r=blassey
For certain tests, the AndroidBridge is not initialized, but some GeckoAppShell functions are still called indirectly. For now, this patch adds checks to skip these calls if there's no AndroidBridge. However, in the future, most of the affected code should be refactored to not require these checks.
2014-01-17 23:32:24 -06:00
Ben Turner ae412f7c08 Bug 939182 - Prevent mock timers from interfering with the message pump machinery, r=bsmedberg.
--HG--
extra : transplant_source : %2AEm%1D%2C%0Abd%83%B6%BEO%96%D4%BB%13%29%82%9D4
2013-12-09 11:57:29 -08:00
Ben Turner 057f369312 Bug 939182 - Integrate the chromium MessageLoop into nsThread, r=bsmedberg.
--HG--
extra : transplant_source : %82%D3%C5%E1%A4%E5%00%1C%C3%82%97v%7F%BA%20Ja%AA%C7%E5
2013-10-23 05:01:24 -07:00
Ben Turner 436bc9d8e6 Bug 939182 - Clean up message loop code, r=bsmedberg.
--HG--
extra : transplant_source : -v1T%0A%B7%FC%B3q%CE//%D7%EB%3C%2C1%B4%F8%F1
2013-10-23 01:28:24 -07:00
Chris Kitching 36c7d139c0 Bug 913985: Part 5 - Refactor the Bridge to use the generated code. r=kats 2013-11-12 10:41:01 -08:00