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
2296e841e7
Bug 1170760 part 6. Fix GetDependentPromise to deal with a situation when someone called then() and passed it the resolve/reject functions that come from a promise's constructor. r=baku
2015-11-25 15:48:09 -05:00
Boris Zbarsky
7e919bdf2d
Bug 1170760 part 5. Implement NewPromiseCapability which can either return a PromiseCapability as in the spec, or one that has a native promise and maybe resolve/reject functions if the consumer asked for them. r=baku,efaust
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
Boris Zbarsky
64186b5b76
Bug 1170760 part 2. Pass in the 'this' value to Promise static methods. r=peterv
2015-11-25 15:48:08 -05:00
Boris Zbarsky
ee1e77dfe3
Bug 1170760 part 1. Introduce a PromiseCapability struct. r=baku,efaust
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
608e75a0b6
Bug 1170760 part 6. Fix GetDependentPromise to deal with a situation when someone called then() and passed it the resolve/reject functions that come from a promise's constructor. r=baku
2015-11-25 15:48:09 -05:00
Boris Zbarsky
aaff15aaaa
Bug 1170760 part 5. Implement NewPromiseCapability which can either return a PromiseCapability as in the spec, or one that has a native promise and maybe resolve/reject functions if the consumer asked for them. r=baku,efaust
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
Boris Zbarsky
b4cbee7794
Bug 1170760 part 2. Pass in the 'this' value to Promise static methods. r=peterv
2015-11-25 15:48:08 -05:00
Boris Zbarsky
1e0e4345bd
Bug 1170760 part 1. Introduce a PromiseCapability struct. r=baku,efaust
2015-11-25 15:48:08 -05: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
Alpha A.
b44082538c
Bug 1086627 - Rename Promise constructs to more closely match the specification. r=nsm,jst
...
--HG--
extra : commitid : 86J3tVySqhI
extra : rebase_source : cccb777a893cc44c2edece078e5861aa25f3f52b
extra : amend_source : 02c64f4e5ba42d2aa77776826af80927bd231f00
2015-08-06 17:18:30 +02:00
Alpha A.
09f58572fa
Bug 1086627 - Rename ThenableResolverTask to PromiseResolveThenableJob to more closely match Promise spec. r=nsm
...
--HG--
extra : commitid : 70Le0IGETaD
extra : rebase_source : ef42276c4125f91d69c271cb19319c9d995f1826
2015-08-03 18:48:34 +02:00
Boris Zbarsky
57621e1167
Bug 1135961. Implement subclassing of DOM objects. r=peterv
2015-07-31 13:30:55 -04:00
Hiroyuki Ikezoe
39455891a5
Bug 1178665 - Part 1: Make Promise::DispatchToMicroTask public. r=khuey
2015-07-14 21:44:00 +02:00
Michael Layzell
9cea8f483b
Bug 1167597 - Mark PromiseReportRejectFeature::mPromise as MOZ_NON_OWNING_REF. r=ehsan
2015-05-22 07:17:00 +02:00
Andrew McCreight
9e8f4b219e
Bug 1152551, part 2 - Fix mode lines in dom/. r=jst
2015-05-03 15:32:37 -04:00
Ben Kelly
f062a9c6ca
Bug 1120501 P1 Make it easier to use Promise::All() from C++ code. r=nsm
2015-04-29 08:59:43 -07:00
Andrew McCreight
0c176ddcff
Bug 1062479 - Use static strings for WeakReference type names. r=ehsan
2015-04-24 09:43:01 -07: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
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
Boris Zbarsky
dc24477d79
Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
...
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp. The
rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Wes Kocher
8e389f1730
Merge inbound to m-c a=merge CLOSED TREE
2015-03-09 18:27:28 -07:00
Boris Zbarsky
cc3b42e52a
Bug 1140573 part 3. Drop the parent argument from js::NewFunctionWithReserved. r=waldo
2015-03-09 12:50:07 -04:00
Paolo Amadini
e5306bdeb5
Bug 1140472 - Set an async stack when invoking promise handlers. r=bz
2015-03-09 12:36:29 +00:00
Olli Pettay
ed036ca142
Bug 1136357 - Make Promise skippable, r=mccr8
...
--HG--
extra : rebase_source : e9679e163117aeabb69e3d919a1eaaba5b02b28c
2015-02-25 00:24:45 +02:00
Boris Zbarsky
24431c3a52
Bug 1107953 part 3. Make Promise pass in their object compartment when calling their various callbacks. r=bholley
...
--HG--
rename : dom/bindings/test/test_exception_options_from_jsimplemented.html => dom/bindings/test/test_promise_rejections_from_jsimplemented.html
2015-01-15 17:39:02 -05:00
Ms2ger
b83d21c58c
Bug 914067 - Remove JSVAL_VOID from dom/; r=jst
2015-01-14 08:59:06 +01:00
Edgar Chen
10ca187446
Bug 1112471 - Part 2: DOM Changes for getting icc service state API. r=smaug
2014-12-26 10:11:20 +08: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
Paolo Amadini
6ff08403e2
Bug 1095443 - Ensure processNextEvent never blocks after processing a Promise microtask. r=bz
2014-11-11 13:47:28 +00:00
Ben Kelly
600ab9bfb9
Bug 1091091: Support ErrorResult in Promise::MaybeReject(). r=bz
2014-10-30 11:12:09 -04:00
Jan-Ivar Bruaroey
9a214e3d2f
Bug 1033885 - add mediaDevices.getUserMedia with promises. r=bz, r=jesup
2014-09-20 02:20:41 -04: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
ec85f9090b
Bug 1084030. Store the promise creation and settlement timestamps and expose that information via PromiseDebugging. r=nsm
2014-10-20 13:02:21 -04: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
Boris Zbarsky
37b389182b
Bug 1083851 part 3. Capture stacks at promise fulfillment time. r=nsm
2014-10-19 22:27:12 -04:00
Boris Zbarsky
3f89b93b91
Bug 1083851 part 2. Capture stacks at promise rejection time. r=nsm
2014-10-19 22:27:12 -04:00
Boris Zbarsky
f7f99c8c9b
Bug 1083851 part 1. Capture allocation stacks at promise creation time. r=nsm
2014-10-19 22:27:12 -04:00