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

79 Коммитов

Автор SHA1 Сообщение Дата
Till Schneidereit 069b390f89 Bug 911216 - Part 11: Implement all Promise inspection functionality as Debugger getters. r=shu,fitzgen
--HG--
rename : dom/promise/tests/test_dependentPromises.html => js/src/tests/ecma_6/Promise/dependent-promises.js
extra : rebase_source : af4f22cb26a42d3e6262e7fe582ea301c9055a70
2016-02-10 23:10:08 +01:00
Kyle Huey 9eea75a6f5 Bug 1252268: If the slow script dialog aborts an interval timer callback, don't schedule it again. r=bz 2016-03-10 01:50:56 -08:00
Till Schneidereit 393e292822 Bug 911216 - Part 1: Add tests directly testing content Promise constructor resolved with chrome Promise. r=bz 2016-02-07 20:05:37 +01:00
Paolo Amadini 8b8676204b Bug 989960 - Unhandled rejections in DOM Promises should cause xpcshell tests to fail. r=Yoric
--HG--
extra : commitid : yWjnDGhk9j
extra : rebase_source : 24228660defd6971a621d52eee0b79be823c6926
extra : amend_source : ef8de24265fa9026b0f764a63453b816442f7232
extra : source : 3958782fe187026cbc3755ad6eae6920e67fa7d2
2016-02-03 12:58:03 +00:00
Wes Kocher 1b65a8ee2f Backed out changeset e8148cda7d85 (bug 989960) for xpcshell bustage
--HG--
extra : commitid : Bxwy5tzArNN
extra : rebase_source : a15513777534e54d05fda5037f24e15ac089b313
2016-02-01 08:25:19 -08:00
Paolo Amadini ecd744bdef Bug 989960 - Unhandled rejections in DOM Promises should cause xpcshell tests to fail. r=Yoric
--HG--
extra : commitid : 6aGIHyyYqSo
extra : rebase_source : 38fbf5e49d06970555a088c5ea3f8379e2064767
extra : source : 3958782fe187026cbc3755ad6eae6920e67fa7d2
2016-01-30 18:53:56 +00:00
Phil Ringnalda d42eb10039 Back out 3958782fe187 (bug 989960) for Android crashes in test_watchdog_default.js 2016-01-29 20:12:44 -08:00
Paolo Amadini aceee7aafc Bug 989960 - Unhandled rejections in DOM Promises should cause xpcshell tests to fail. r=Yoric
--HG--
extra : commitid : IkcxJUamV6B
extra : rebase_source : 07255457ec607c45037f832ca44a01f17a00da78
2016-01-29 13:19:53 +00:00
Boris Zbarsky d4db9bedd0 Bug 1242054. Get rid of AbortablePromise, so we can move Promise into SpiderMonkey more easily. r=khuey 2016-01-23 00:37:44 -05:00
Shu-yu Guo 1768759efb Bug 1220564 - Update chrome code uses of genexprs and legacy comprehensions. (r=billm) 2016-01-06 16:02:16 -08:00
Boris Zbarsky 4cb14db1a1 Bug 1170760 part 13. Add subclassing support to Promise::Then/Catch. r=baku,efaust 2015-11-25 15:48:10 -05:00
Boris Zbarsky 5d774c82cc Bug 1170760 part 11. Add subclassing support to Promise::Reject. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky 0baeed7ed3 Bug 1170760 part 10. Add subclassing support to Promise::Resolve. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky 53b93863f6 Bug 1170760 part 8. Add subclassing support to Promise::All. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky 7c7786c7ac Bug 1170760 part 7. Add subclassing support to Promise::Race. r=baku,efaust
Note that the web platform tests don't actually have quite the behavior they're
expected to per the spec yet.  They will get adjusted later on as we add
subclassing support to Promise.resolve and Promise.prototype.then.
2015-11-25 15:48:09 -05:00
Boris Zbarsky 7229385d25 Bug 1170760 part 3. Add an @@species getter on Promise. r=peterv 2015-11-25 15:48:08 -05:00
Phil Ringnalda 53745073f0 Back out 13 changesets (bug 1170760) for Gu bustage in homescreen/test/unit/apps_test.js
CLOSED TREE

Backed out changeset 5d84599a8846 (bug 1170760)
Backed out changeset 6104fe33d5f5 (bug 1170760)
Backed out changeset 1dfb229da01d (bug 1170760)
Backed out changeset f380faddfdd8 (bug 1170760)
Backed out changeset 541831dc6b57 (bug 1170760)
Backed out changeset 6a5b7dfab882 (bug 1170760)
Backed out changeset ee514a256922 (bug 1170760)
Backed out changeset 3c2c1acc34ee (bug 1170760)
Backed out changeset dc2a7f5dc5d6 (bug 1170760)
Backed out changeset b312a08fbab5 (bug 1170760)
Backed out changeset cb6aba9b8497 (bug 1170760)
Backed out changeset 39e4f5b1ba40 (bug 1170760)
Backed out changeset 7d79cce3630a (bug 1170760)
2015-11-25 21:02:55 -08:00
Boris Zbarsky d71fb767c8 Bug 1170760 part 13. Add subclassing support to Promise::Then/Catch. r=baku,efaust 2015-11-25 15:48:10 -05:00
Boris Zbarsky 0bbce93c83 Bug 1170760 part 11. Add subclassing support to Promise::Reject. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky 93faa5b1b0 Bug 1170760 part 10. Add subclassing support to Promise::Resolve. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky 66b2d1a604 Bug 1170760 part 8. Add subclassing support to Promise::All. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky df222dfc09 Bug 1170760 part 7. Add subclassing support to Promise::Race. r=baku,efaust
Note that the web platform tests don't actually have quite the behavior they're
expected to per the spec yet.  They will get adjusted later on as we add
subclassing support to Promise.resolve and Promise.prototype.then.
2015-11-25 15:48:09 -05:00
Boris Zbarsky c1ba24a868 Bug 1170760 part 3. Add an @@species getter on Promise. r=peterv 2015-11-25 15:48:08 -05:00
Carsten "Tomcat" Book 08997000eb Backed out 2 changesets (bug 1202902) to recking bug 1202902 to be able to reopen inbound on a CLOSED TREE
Backed out changeset 647025383676 (bug 1202902)
Backed out changeset d70c7fe532c6 (bug 1202902)
2015-10-07 14:03:21 +02:00
Carsten "Tomcat" Book e7ef778c9d Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)

--HG--
extra : rebase_source : 5d3db72337754bc7ab0ed0c30b2896100411ff92
2015-10-07 12:13:45 +02:00
Shu-yu Guo d06b6030f6 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07: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
David Rajchenbach-Teller 8da3b34de1 Bug 1157714 - Move browser_monitorUncaught to a xpcshell test. r=self
--HG--
rename : dom/promise/tests/browser_monitorUncaught.js => dom/promise/tests/unit/test_monitor_uncaught.js
extra : transplant_source : jb%BC%D9b%F70%2B%60h%AE%AC%13%87%84%BEG%FA%BE%23
2015-05-19 12:21:28 +02:00
Ehsan Akhgari 1a03395848 Bug 1154275 - Remove ise() in favor of is(); r=Ms2ger 2015-05-13 14:31:58 -04:00
Boris Zbarsky 59ea7eac31 Bug 1162013. Process the Promise queue between adjacent setTimeout callback invocations when we're going through the callback list without returning to the event loop. r=smaug 2015-05-07 14:49:31 -04:00
Wes Kocher f15282bf26 Backed out changeset 57f0b16030e9 (bug 1162013) for m-oth and m-dt3 bustage CLOSED TREE 2015-05-07 13:37:27 -07:00
Boris Zbarsky 0c6597b3e0 Bug 1162013. Process the Promise queue between adjacent setTimeout callback invocations when we're going through the callback list without returning to the event loop. r=smaug 2015-05-07 14:49:31 -04:00
Boris Zbarsky f785c39c1e Bug 1152902 part 2. Add a fast path for the case when a Promise is resolved with another Promise. r=nsm 2015-04-17 22:01:02 -04:00
David Rajchenbach-Teller b08ce98d2a Bug 1083361 - Exposing a PromiseDebugging API to monitor uncaught DOM Promise. r=bz
--HG--
extra : rebase_source : cba2fc37d263d431c3008739a89a4fe47d10b7da
2015-04-10 17:27:57 +02:00
Jonathan Griffin d1c61bc9b6 Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Boris Zbarsky 9e129add69 Bug 1120235. Various promise resolve/reject functions should actually return undefined instead of ending up accidentally returning their callee. r=nsm 2015-01-12 22:35:33 -05:00
Ehsan Akhgari 09a262787c Bug 649012 - Fail mochitest-plains which use flaky timeouts (setTimeout(x) for x > 0); r=ted
We are white-listing the existing set of tests that use setTimeout
like this.  Hopefully these tests will be investigated and fixed
in the future, so that we can narrow down the white-list.

This check is only turned on for mochitest-plain for now.
2014-12-11 13:34:40 -05:00
Carsten "Tomcat" Book b742ef4f34 Backed out changeset 73c4111cab17 (bug 1083361) for bustage 2014-11-20 09:51:03 +01:00
David Rajchenbach-Teller b71d04be6e Bug 1083361 - Exposing a PromiseDebugging API to monitor uncaught DOM Promise. r=bz 2014-11-19 14:31:06 +01:00
Nick Fitzgerald cde18cdd55 Bug 1084065 - Part 2: Make DOM Promise call the JS::dbg::onPromiseSettled hook; r=bz 2014-11-17 10:44:00 +01:00
Nick Fitzgerald 8100009108 Bug 1083210 - Part 2: Make DOM Promise call the JS::dbg::onNewPromise hook. r=bz 2014-11-17 10:42:00 +01:00
Paolo Amadini e1e4b620e8 Bug 1013625 - Process Promise resolution runnables outside of main event queue. r=bz,khuey 2014-10-28 12:08:19 +00:00
Paolo Amadini 63d57bf61d Bug 1083783 - Move Promise.cpp to a model where settlement immediately queues the invocation of "then" callbacks. r=bz 2014-10-28 12:08:19 +00:00
Boris Zbarsky fdaecfb699 Bug 1083950. Add a way to get the promises that depend on a given promise via PromiseDebugging. r=nsm 2014-10-19 22:27:36 -04:00
Nikhil Marathe 8864b64406 Bug 1062323 - Chained promises should resolve asynchronously. r=bz
--HG--
extra : transplant_source : %0C%E0%D2%0FEI/%D8s%E2%D07%8B%DE%25g%96%85%22r
2014-09-23 22:00:58 -07:00
Ryan VanderMeulen 16e1505ea9 Backed out changeset ebd8df8e8631 (bug 1062323) for Gaia unit test failures. 2014-09-24 17:08:28 -04:00
Nikhil Marathe 95c8c96ad5 Bug 1062323 - Chained promises should resolve asynchronously. r=bz 2014-09-22 16:37:40 -07:00
Yuan Xulei fcfee0071f Bug 1035060 - Implement AbortablePromise. r=bz 2014-09-12 10:18:49 +08:00
Ms2ger d8c0b17d7d Bug 1043963 - Collapse test-only moz.build files under dom/ into ancestor moz.build files; r=ted
There is very little benefit to having another layer of moz.build files, and
removing them will speed up the build a minimal amount. It also paves the way
for removing TEST_DIRS, which could simplify the build system somewhat.
2014-07-26 08:17:24 +02:00
Nikhil Marathe 161ca62afd Bug 1023547 - Fix intermittent dom/workers/test/test_promise.html failure. r=bz
--HG--
extra : transplant_source : %F5%A9%DER%BA%11%E3%2C%E3R%C8%40%F3%5E%D5%C3%A6%FE%9D%90
2014-07-18 18:13:47 -07:00