Commit Graph

284 Commits

Author SHA1 Message Date
Boris Zbarsky
c6b82d315e Bug 1230704. Change AbortablePromise::DoAbort to not worry about the result of calling its callback. r=smaug 2015-12-07 18:41:41 -05:00
Boris Zbarsky
7429891baf Bug 1170760 part 13. Add subclassing support to Promise::Then/Catch. r=baku,efaust 2015-11-25 15:48:10 -05:00
Boris Zbarsky
3b6bc23534 Bug 1170760 part 12. Rip out the promise-resolved-with-promise fast path. r=baku 2015-11-25 15:48:09 -05:00
Boris Zbarsky
63805f4fe4 Bug 1170760 part 11. Add subclassing support to Promise::Reject. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky
7e39e88786 Bug 1170760 part 10. Add subclassing support to Promise::Resolve. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky
1169315411 Bug 1170760 part 9. Stop using Promise::Resolve in the bindings for PromiseDebugging. r=baku 2015-11-25 15:48:09 -05:00
Boris Zbarsky
bfcda805d1 Bug 1170760 part 8. Add subclassing support to Promise::All. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky
54541df8b3 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
f350c4ef12 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
ce7052ac40 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
cfaa3b6dd3 Bug 1170760 part 4. Change Promise::Constructor to run in the Xray compartment when new Promise happens over Xrays. r=peterv 2015-11-25 15:48:08 -05:00
Boris Zbarsky
cd3eff21f4 Bug 1170760 part 3. Add an @@species getter on Promise. r=peterv 2015-11-25 15:48:08 -05:00
Boris Zbarsky
6a4cd2a0cf 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
3630c9e53b Bug 1170760 part 1. Introduce a PromiseCapability struct. r=baku,efaust 2015-11-25 15:48:08 -05:00
Phil Ringnalda
6d7dff3e17 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
460dc3f4c2 Bug 1170760 part 13. Add subclassing support to Promise::Then/Catch. r=baku,efaust 2015-11-25 15:48:10 -05:00
Boris Zbarsky
17ad92c3ea Bug 1170760 part 12. Rip out the promise-resolved-with-promise fast path. r=baku 2015-11-25 15:48:09 -05:00
Boris Zbarsky
acda3407a4 Bug 1170760 part 11. Add subclassing support to Promise::Reject. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky
8d146a8c92 Bug 1170760 part 10. Add subclassing support to Promise::Resolve. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky
f62263c95b Bug 1170760 part 9. Stop using Promise::Resolve in the bindings for PromiseDebugging. r=baku 2015-11-25 15:48:09 -05:00
Boris Zbarsky
bad1610f54 Bug 1170760 part 8. Add subclassing support to Promise::All. r=baku,efaust 2015-11-25 15:48:09 -05:00
Boris Zbarsky
f8429e1bff 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
6335d8d0d1 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
e55382b49a 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
b4e7de16a9 Bug 1170760 part 4. Change Promise::Constructor to run in the Xray compartment when new Promise happens over Xrays. r=peterv 2015-11-25 15:48:08 -05:00
Boris Zbarsky
25597445e9 Bug 1170760 part 3. Add an @@species getter on Promise. r=peterv 2015-11-25 15:48:08 -05:00
Boris Zbarsky
fd292c84c6 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
6f334bf3c3 Bug 1170760 part 1. Introduce a PromiseCapability struct. r=baku,efaust 2015-11-25 15:48:08 -05:00
Boris Zbarsky
ef284c00d0 Bug 1224007 part 5. Get rid of ErrorResult::StealJSException. r=peterv 2015-11-20 16:29:41 -05:00
Edwin Flores
1e88742bab Bug 1226003 - Stop using MaybeRejectBrokenly in DetailedPromise - r=bz 2015-11-20 13:21:48 +00:00
Boris Zbarsky
e1ebcf8d87 Bug 1182197 workaround. Add a null-check for mGlobal in Promise::Settle. r=mccr8 2015-09-11 21:59:43 -04:00
Nathan Froyd
e4e2da55c9 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
2015-10-18 01:24:48 -04:00
Andrea Marchesini
457a61c7ea Bug 1214300 - AsyncErrorReporter doesn't use JSRuntime param., r=smaug 2015-10-14 11:29:55 +01:00
Boris Zbarsky
753f764a70 Bug 1213391. Unmark gray things before putting them into function reserved slots in Promise code. r=mccr8 2015-10-09 16:48:10 -04:00
Carsten "Tomcat" Book
d7f143eaad 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
b9e5717f50 Backed out 1 changesets (bug 1202902) for causing merge conflicts to mozilla-central
Backed out changeset cfc1820361f5 (bug 1202902)
2015-10-07 12:13:45 +02:00
Shu-yu Guo
b5f316de44 Bug 1202902 - Scripted fix the world. 2015-10-06 14:00:31 -07:00
Andrea Marchesini
89c14c0dbe Bug 1209919 - Improving naming and comments in StructuredCloneHelper, r=smaug 2015-09-30 13:22:08 +01:00
Boris Zbarsky
84dd49c9f3 Back out the null-check workaround for bug 1182197 on trunk, so we can see what the stacks look like after all via crash-stats data on nightly and dev channel. 2015-09-18 13:38:42 -04:00
Boris Zbarsky
5388d1602c Bug 1182197 workaround. Add a null-check for mGlobal for now. r=nsm 2015-09-11 21:59:43 -04:00
Andrew McCreight
636b3902e5 Bug 1203289 - PromiseCallback subclasses should unmark gray JS they run. r=bz 2015-09-10 11:34:10 -07:00
Boris Zbarsky
e1525beaca Bug 1182197 investigation patch. Log the stack at promise fulfillment on a CCed promise into the crash reporter data. r=dmajor,nsm 2015-09-08 21:23:55 -04:00
Andrea Marchesini
3fd0f70ba7 Bug 1198814 - Use StructuredCloneHelper in PromiseWorkerProxy, r=smaug 2015-09-05 12:22:13 +03:00
Nikhil Marathe
17f9c6955f Bug 1197421 - Fix promise worker proxy cleanup and update callers. r=catalinb
Get rid of having users dispatch control runnables. It was error prone and
required too much reasoning. It was also possible to end up in a state where
callers would dispatch a WorkerRunnable, which would succeed, so they would not
dispatch a WorkerControlRunnable. Then the worker would stop Running,
canceling and releasing the runnable leading to releasing the proxy in an
unclean state. Instead, we AddRef() and add the feature and remove the feature
and Release() on Notify(). If callers successfully run a WorkerRunnable they
clean the proxy. If not, the proxy stays alive until the worker switches to
Canceling state.
2015-09-02 10:07:26 -07:00
Andrea Marchesini
fa931b8f4f Bug 1198795 - ipc/StructuredCloneUtils should be merged with StructuredCloneHelper, r=smaug 2015-09-02 17:20:30 +01:00
Nicholas Nethercote
69d088e45f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.
2015-08-27 20:44:53 -07:00
Nikhil Marathe
5461fe9ec1 Bug 1162333 - Fix windows bustage. a=bustage CLOSED TREE 2015-08-18 10:00:35 -07:00
Jinank Jain
1a9fe78707 Bug 1162333 - Add stronger assertions to PromiseWorkerProxy in debug builds. r=catalinb 2015-06-11 00:35:18 +02:00
Alpha A.
d2c0fcc803 Bug 1086627 - Rename Promise constructs to more closely match the specification. r=nsm,jst 2015-08-06 17:18:30 +02:00
Alpha A.
2b09672a62 Bug 1086627 - Rename ThenableResolverTask to PromiseResolveThenableJob to more closely match Promise spec. r=nsm 2015-08-03 18:48:34 +02:00