Sylvestre Ledru
03c8e8c2dd
Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
...
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D26098
--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Csoregi Natalia
ba58e936bd
Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE
2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603
Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
...
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D26098
--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
24dbe577a5
Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE
2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe
Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
...
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D26098
--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Ehsan Akhgari
e5e885ae31
Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
...
# ignore-this-changeset
--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Jean-Yves Avenard
cdec3ff52a
Bug 1512456 - P9. Re-enable assertion. r=gerald
...
Depends on D14032
Differential Revision: https://phabricator.services.mozilla.com/D14138
--HG--
extra : moz-landing-system : lando
2018-12-11 17:43:19 +00:00
Jean-Yves Avenard
38ed72f936
Bug 1512456 - P2. Make GenericPromise exclusive. r=gerald
...
We introduce GenericNonExclusivePromise that can be used to explicitly state than non-exclusive use is needed
We temporarily disable the assertion ensuring a promise is used exclusively when needed to allow for things to settle.
Differential Revision: https://phabricator.services.mozilla.com/D14025
--HG--
extra : moz-landing-system : lando
2018-12-11 10:46:17 +00:00
Jean-Yves Avenard
44594dd77a
Bug 1510265 - P1. Enforce template-parameter classes restrictions in MozPromise. r=gerald
...
And some required fixes to make things compile.
Differential Revision: https://phabricator.services.mozilla.com/D13868
--HG--
extra : moz-landing-system : lando
2018-12-06 16:26:01 +00:00
Sylvestre Ledru
265e672179
Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
...
# ignore-this-changeset
--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jean-Yves Avenard
31ed9de297
Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald
...
Make thorough use of move semantic for MozPromise using nsTArray
Differential Revision: https://phabricator.services.mozilla.com/D11346
--HG--
extra : moz-landing-system : lando
2018-11-09 15:45:31 +00:00
Dorel Luca
c34d2cd0fa
Backed out changeset 157be32d85fe (bug 1504643) for conflicts while backing out bug 1471535
2018-11-09 12:13:54 +02:00
Jean-Yves Avenard
c30e8ca9f0
Bug 1504643 - Enforce template-parameter classes restrictions in MozPromise. r=gerald
...
Make thorough use of move semantic for MozPromise using nsTArray
Differential Revision: https://phabricator.services.mozilla.com/D11346
--HG--
extra : moz-landing-system : lando
2018-11-09 08:41:45 +00:00
Jean-Yves Avenard
91dbdb0a68
Bug 1504531 - P2. Add MozPromiseHolder::ResolveOrReject methods. r=gerald
...
Depends on D10833
Differential Revision: https://phabricator.services.mozilla.com/D10834
--HG--
extra : moz-landing-system : lando
2018-11-04 22:36:43 +00:00
Jean-Yves Avenard
6f99745b62
Bug 1504531 - P1. Use forward references in MozPromiseHolder. r=gerald
...
Differential Revision: https://phabricator.services.mozilla.com/D10833
--HG--
extra : moz-landing-system : lando
2018-11-05 14:26:23 +00:00
Jean-Yves Avenard
46cc265bba
Bug 1468241 - P1. Add MozPromise::CreateAndResolveOrReject method r=gerald
...
Useful when using promise chaining in combination with MozPromise::ResolveOrRejectValue parameter.
MozReview-Commit-ID: F8qMh7yFnHQ
Differential Revision: https://phabricator.services.mozilla.com/D1726
2018-06-20 22:14:05 +00:00
Emilio Cobos Álvarez
1e9c395548
Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
...
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:
s/mozilla::Forward/std::forward/
s/Forward</std::forward</
The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)
MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +02:00
Emilio Cobos Álvarez
fffb25b74f
Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
...
This was done automatically replacing:
s/mozilla::Move/std::move/
s/ Move(/ std::move(/
s/(Move(/(std::move(/
Removing the 'using mozilla::Move;' lines.
And then with a few manual fixups, see the bug for the split series..
MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Tom Bannister
988d18881f
Bug 1434710 - Replaced all instances of mozilla::IndexSequence, mozilla::MakeIndexSequence and mozilla::IndexSequenceFor with std::index_sequence, std::make_index_sequence and std::index_sequence_for and removed mfbt/IndexSequence.h. r=botond
...
MozReview-Commit-ID: 1Ema7TUNr5v
--HG--
extra : rebase_source : e5bb164dbe19993214e8c16f92b0a1f5d2ff3fa1
2018-04-09 21:12:13 +10:00
Sebastian Hengst
0819f35e51
Backed out 4 changesets (bug 525063) on request from Andi. a=backout
...
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312
Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan
2018-04-10 21:11:02 +02:00
Jan-Ivar Bruaroey
2a02bb226b
Bug 1445533 - Use for(:) in MozPromise code. r=gerald
...
MozReview-Commit-ID: BsKR2o25hIQ
--HG--
extra : rebase_source : b150952128e9e7ad3ccc6603b1584dde40b82c5f
2018-03-13 19:13:18 -04:00
Jan-Ivar Bruaroey
608cdac3cb
Bug 1445533 - Remove a refcount in MozPromise::Steal(), and use MakeRefPtr a few places. r=gerald
...
MozReview-Commit-ID: 2jFzxiqBVpc
--HG--
extra : rebase_source : 54947af96e3fc6abb51e73e1ace4b49a6a95fc46
2018-03-13 09:55:01 -04:00
Jean-Yves Avenard
a1172cfb0e
Bug 1424647: Prevent race on AllPromiseHolder::mPromise. r=jwwang
...
If any of the promises gets resolved/rejected prior MozPromise::All completing, it would return nullptr
MozReview-Commit-ID: Lqhv2t2upvF
--HG--
extra : rebase_source : 0c85172958c00a2ac3aa0bd33e4e50dd1893c3ba
2017-12-10 23:31:04 +01:00
Chris Pearce
f2902bdf82
Bug 1390406 - Remove unnecessary includes in dom/media/mediasource. r=jya
...
MozReview-Commit-ID: 1aTncGfBicu
--HG--
extra : rebase_source : 8ad085eb81d195732c385718c283b4752e5e3c80
2017-08-15 16:13:00 +12:00
JW Wang
8a5ba394b7
Bug 1371982 - Use a RefPtr<> to hold the MozPromise. r=gerald
2017-06-26 20:13:27 -04: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
Bill McCloskey
c85ab6308c
Bug 1366072 - Change promises to take nsISerialEventTarget instead of AbstractThread (r=jwwang)
...
MozReview-Commit-ID: 4azUhSB6whu
2017-06-13 14:51:01 -07:00
Bill McCloskey
90c9540b82
Bug 1366072 - Remove useless ThenCommand::mResponseThread field (r=jwwang)
...
MozReview-Commit-ID: F9shMirkSiu
2017-06-13 14:50:56 -07:00
Gerald Squelart
9438822797
Bug 1371880 - Use Variant with indexed access in MozPromise::ResolveOrRejectValue - r=jwwang
...
MozReview-Commit-ID: 4vobU19ebaX
--HG--
extra : rebase_source : fe1e73a3fdf3a5d612a41b53aca9c9f2ea363456
2017-06-12 11:19:58 +12:00
JW Wang
24a19f81e0
Bug 1370453 - fix potential race condition in ThenCommand<>::Track(). r=gerald
...
http://searchfox.org/mozilla-central/rev/d441cb24482c2e5448accaf07379445059937080/xpcom/threads/MozPromise.h#953-958
MozPromiseRequestHolder is not thread-safe and it is possible for
mReceiver->ThenInternal() to trigger resolve/reject callbacks before
aRequestHolder.Track() is run. We should call aRequestHolder.Track()
before mReceiver->ThenInternal() to avoid the race condition.
MozReview-Commit-ID: K2R09m9UFBF
--HG--
extra : rebase_source : d656498e74d470fdbb82e7525d82af5fb3100735
2017-06-06 14:19:59 +08:00
Sylvestre Ledru
aa1c00fb9f
Bug 1370369 - Use the new MOZ_DIAGNOSTIC_ASSERT_ENABLED instead of several defines - follow up patch r=froydnj
...
MozReview-Commit-ID: I4ffmvKClc6
--HG--
extra : rebase_source : 0039cd09dfb199f77a1cbdca3bfdbcab21cc0049
2017-06-05 23:43:34 +02:00
JW Wang
531fbb106b
Bug 1367679. P4 - specialize the type of mCompletionPromise according to whether chaining is supported. r=gerald
...
MozReview-Commit-ID: 8dPXiGl5njE
--HG--
extra : rebase_source : f38a5ddfcf9789d623e2de7776ae4e8a33448225
extra : intermediate-source : d3447a672312867335e5e7a5ee320b34f7f91ead
extra : source : ec5fa27b3c4f65acc7719ffaa9931bd4a5476a47
2017-06-02 10:16:31 +08:00
JW Wang
c6caf473c8
Bug 1367679. P3 - pass mCompletionPromise to InvokeCallbackMethod(). r=gerald
...
This reduces duplicate code by handling promise chaining in one place.
MozReview-Commit-ID: 474T5hvf9oM
--HG--
extra : rebase_source : b8de5bad5597234654d476b93c0c89abc5215073
extra : intermediate-source : b0f3d3fef28646c31c87acfbfbf36ec9329e7a6c
extra : source : 89aab3206558922271aff1d611f029aed3910acf
2017-05-31 17:28:09 +08:00
JW Wang
c58f498b84
Bug 1367679. P2 - overload InvokeCallbackMethod() according to whether promise-chaining is supported. r=gerald
...
This patch fixes InvokeCallbackMethod() which should return null
if promise-chaining is not supported.
Before this patch, it could return non-null if one of the resolve/reject callbacks
returns a MozPromise while the other not.
MozReview-Commit-ID: 7YKNvRKEHQx
--HG--
extra : rebase_source : 6429d9eef35efa0128e8b5967097850e6f4a4325
extra : intermediate-source : 6f73de7d2d5fb01be19fdf7d7037b506425eab18
extra : source : a1849e24b09b0b4e986ffaef14d2602541c1c6e8
2017-05-31 17:08:08 +08:00
JW Wang
71260a8c0f
Bug 1367679. P1 - refactor InvokeCallbackMethod() to deal with one concern at a time. r=gerald
...
InvokeMethod() handles optional arguments.
InvokeCallbackMethod() handles optional return value.
MozReview-Commit-ID: AyT6TEKRqbs
--HG--
extra : rebase_source : 9327dfe75f4cb0a23925aaa7dd939b8a2ae1a95d
extra : intermediate-source : cc1df19154f7371bd6ab98ef490e1ad10c3c0ea9
extra : source : 719d64b06a0e9a345f402b8c721d08ff511a5c1b
2017-05-26 00:12:29 +08:00
JW Wang
ea2f8c0d3a
Bug 1370005. P1 - backout bug 1367679. r=gerald
...
MozReview-Commit-ID: 4SUCinaz3Cj
--HG--
extra : rebase_source : 2d6f7fec44a8fb4dd3a526ec6bd2cd5737c93727
2017-06-05 14:03:34 +08:00
JW Wang
225cfa5af7
Bug 1367679. P4 - specialize the type of mCompletionPromise according to whether chaining is supported. r=gerald
...
MozReview-Commit-ID: 8dPXiGl5njE
--HG--
extra : rebase_source : f38a5ddfcf9789d623e2de7776ae4e8a33448225
extra : intermediate-source : d3447a672312867335e5e7a5ee320b34f7f91ead
extra : source : ec5fa27b3c4f65acc7719ffaa9931bd4a5476a47
2017-06-02 10:16:31 +08:00
JW Wang
6b6056f02f
Bug 1367679. P3 - pass mCompletionPromise to InvokeCallbackMethod(). r=gerald
...
This reduces duplicate code by handling promise chaining in one place.
MozReview-Commit-ID: 474T5hvf9oM
--HG--
extra : rebase_source : b8de5bad5597234654d476b93c0c89abc5215073
extra : intermediate-source : b0f3d3fef28646c31c87acfbfbf36ec9329e7a6c
extra : source : 89aab3206558922271aff1d611f029aed3910acf
2017-05-31 17:28:09 +08:00
JW Wang
2bc689b541
Bug 1367679. P2 - overload InvokeCallbackMethod() according to whether promise-chaining is supported. r=gerald
...
This patch fixes InvokeCallbackMethod() which should return null
if promise-chaining is not supported.
Before this patch, it could return non-null if one of the resolve/reject callbacks
returns a MozPromise while the other not.
MozReview-Commit-ID: 7YKNvRKEHQx
--HG--
extra : rebase_source : 6429d9eef35efa0128e8b5967097850e6f4a4325
extra : intermediate-source : 6f73de7d2d5fb01be19fdf7d7037b506425eab18
extra : source : a1849e24b09b0b4e986ffaef14d2602541c1c6e8
2017-05-31 17:08:08 +08:00
JW Wang
b5d3112f74
Bug 1367679. P1 - refactor InvokeCallbackMethod() to deal with one concern at a time. r=gerald
...
InvokeMethod() handles optional arguments.
InvokeCallbackMethod() handles optional return value.
MozReview-Commit-ID: AyT6TEKRqbs
--HG--
extra : rebase_source : 9327dfe75f4cb0a23925aaa7dd939b8a2ae1a95d
extra : intermediate-source : cc1df19154f7371bd6ab98ef490e1ad10c3c0ea9
extra : source : 719d64b06a0e9a345f402b8c721d08ff511a5c1b
2017-05-26 00:12:29 +08:00
JW Wang
99328fb386
Bug 1368382. P4 - move mCompletionPromise down the class hierarchy so it can store a different promise type. r=gerald
...
MozReview-Commit-ID: 4beSwBzN8b3
--HG--
extra : rebase_source : 109738143300a47525b8e1bb4d0a5df3aa0f956c
extra : intermediate-source : b979cb04a83f427baa8b0c3d27a98a29baa45a24
extra : source : 4fb388fafec2e572e5755c8ea8d0420a819a5909
2017-05-25 17:35:47 +08:00
JW Wang
ec61811621
Bug 1368382. P3 - remove 2 overloads of Then() using variadic template. r=gerald
...
MozReview-Commit-ID: 9KzYGnrFoQN
--HG--
extra : rebase_source : a80bf6107950dec868d314c0c4426b46439b7969
extra : source : e8c1b29f65f594d7a32ce9557e2c1c915f68373c
2017-05-31 16:10:17 +08:00
JW Wang
138c302d05
Bug 1368382. P2 - let ThenCommand reference the sub-type of ThenValueBase. r=gerald
...
Since we will store mCompletionPromise in the sub-class of ThenValueBase,
ThenCommand needs to reference the sub-type in order to access mCompletionPromise.
MozReview-Commit-ID: BUi7jElOhP7
--HG--
extra : rebase_source : e94c7da8488bb51e543740149925c4cb6514ad54
extra : source : 21dc7e0202dcc64a781c1d92d4d1b7988b5d37a2
2017-05-31 15:23:43 +08:00
JW Wang
8d1189611e
Bug 1368382. P1 - rename and make MethodThenValue/FunctionValue specializations of ThenValue<>. r=gerald
...
This allows us to remove 2 overloads of MozPromise::Then() using variadic template.
MozReview-Commit-ID: 5LHwDhIhh8e
--HG--
extra : rebase_source : 9b84a92858736b389bd2e60aa7392bfec526ab72
extra : source : 3cdd047583693a7abf479dd75620d1c7d07da70d
2017-05-31 07:44:53 +08:00
JW Wang
80a1b6063a
Bug 1367674. P2 - remove unused code. r=gerald
...
MozReview-Commit-ID: 5OHWP5rpiff
--HG--
extra : rebase_source : 723d07adf131912a73b81738b0b43e9d67673c6c
2017-05-25 15:42:35 +08:00