Commit Graph

106 Commits

Author SHA1 Message Date
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
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
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
Boris Zbarsky
4cca89431c Bug 1135961. Implement subclassing of DOM objects. r=peterv 2015-07-31 13:30:55 -04:00
Hiroyuki Ikezoe
74faa5038a Bug 1178665 - Part 1: Make Promise::DispatchToMicroTask public. r=khuey 2015-07-14 21:44:00 +02:00
Michael Layzell
ea83d86bc3 Bug 1167597 - Mark PromiseReportRejectFeature::mPromise as MOZ_NON_OWNING_REF. r=ehsan 2015-05-22 07:17:00 +02:00
Andrew McCreight
c979f253c0 Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Ben Kelly
03d50f7e11 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
3af0e9963c Bug 1062479 - Use static strings for WeakReference type names. r=ehsan 2015-04-24 09:43:01 -07:00
Boris Zbarsky
f9d2845925 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
ec109a7a89 Bug 1083361 - Exposing a PromiseDebugging API to monitor uncaught DOM Promise. r=bz 2015-04-10 17:27:57 +02:00
Ehsan Akhgari
5cccea6f0f 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
988b8e01be 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
482a0ab48f Merge inbound to m-c a=merge CLOSED TREE 2015-03-09 18:27:28 -07:00
Boris Zbarsky
47026f3bb1 Bug 1140573 part 3. Drop the parent argument from js::NewFunctionWithReserved. r=waldo 2015-03-09 12:50:07 -04:00
Paolo Amadini
c8a6a10fae Bug 1140472 - Set an async stack when invoking promise handlers. r=bz 2015-03-09 12:36:29 +00:00
Olli Pettay
203320e684 Bug 1136357 - Make Promise skippable, r=mccr8 2015-02-25 00:24:45 +02:00
Boris Zbarsky
4c59201b62 Bug 1107953 part 3. Make Promise pass in their object compartment when calling their various callbacks. r=bholley 2015-01-15 17:39:02 -05:00
Ms2ger
ab12074deb Bug 914067 - Remove JSVAL_VOID from dom/; r=jst 2015-01-14 08:59:06 +01:00
Edgar Chen
91b0a87032 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
c11edbfdb0 Backed out changeset 73c4111cab17 (bug 1083361) for bustage 2014-11-20 09:51:03 +01:00
David Rajchenbach-Teller
78ace752f9 Bug 1083361 - Exposing a PromiseDebugging API to monitor uncaught DOM Promise. r=bz 2014-11-19 14:31:06 +01:00
Nick Fitzgerald
24bd59394c 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
ab285c7c14 Bug 1095443 - Ensure processNextEvent never blocks after processing a Promise microtask. r=bz 2014-11-11 13:47:28 +00:00
Ben Kelly
bf78db5269 Bug 1091091: Support ErrorResult in Promise::MaybeReject(). r=bz 2014-10-30 11:12:09 -04:00
Jan-Ivar Bruaroey
94d8f2565d Bug 1033885 - add mediaDevices.getUserMedia with promises. r=bz, r=jesup 2014-09-20 02:20:41 -04:00
Paolo Amadini
96847247ea Bug 1013625 - Process Promise resolution runnables outside of main event queue. r=bz,khuey 2014-10-28 12:08:19 +00:00
Paolo Amadini
2e5156a4d8 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
3924fce69b 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
0d9ab82c4b 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
65952abced Bug 1083851 part 3. Capture stacks at promise fulfillment time. r=nsm 2014-10-19 22:27:12 -04:00
Boris Zbarsky
291eec377f Bug 1083851 part 2. Capture stacks at promise rejection time. r=nsm 2014-10-19 22:27:12 -04:00
Boris Zbarsky
e9c2a91b2f Bug 1083851 part 1. Capture allocation stacks at promise creation time. r=nsm 2014-10-19 22:27:12 -04:00
Yuan Xulei
5eb5a12967 Bug 1035060 - Implement AbortablePromise. r=bz 2014-09-12 10:18:49 +08:00
Ehsan Akhgari
f45a3fcf07 Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : 01709017e97fdc96d1d53eb881efc1792118edc4
2014-09-01 20:49:25 -04:00
Phil Ringnalda
e2e326a9c4 Backed out 6 changesets (bug 1060982, bug 1061058, bug 1060987, bug 1061060, bug 1060930) for build bustage
CLOSED TREE

Backed out changeset c23b8418e6be (bug 1060987)
Backed out changeset a8cddc6bdffc (bug 1061060)
Backed out changeset b5af5cbdac3f (bug 1060982)
Backed out changeset 4912d451011a (bug 1060930)
Backed out changeset bdacbf453238 (bug 1061058)
Backed out changeset da6c71a8f5ae (bug 1060987)
2014-09-01 16:48:51 -07:00
Ehsan Akhgari
3fc836363c Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku 2014-09-01 18:00:53 -04:00
Yuan Xulei
3baf570af3 Bug 1055925 - Refactor promise to merge main thread and worker thread tasks into a single task. r=nsm 2014-08-19 18:39:56 +08:00
Andrea Marchesini
0833f1ffe4 Bug 1047398 - ServiceWorker should use WeakRef instead nsTWeakRef, r=smaug 2014-08-01 17:42:19 +01:00
Boris Zbarsky
0b86f5635c Bug 1040263. Eagerly create and preserve Promise reflectors so we always have them available during unlink. r=nsm,bholley. 2014-07-18 21:31:11 -04:00
Boris Zbarsky
5118eea016 Bug 966471. Add some facilities for examining the state of a promise via a PromiseDebugging utility namespace. r=nsm,peterv 2014-07-02 00:19:48 -04:00
Nikhil Marathe
1b42d15b04 Bug 984048 - Promise::MaybeReject ErrorEvent overload no longer needed. Fix compile error. r=bustage
--HG--
extra : amend_source : 5fcbc1c3912503e98f36fce514ddc2433da31a3e
2014-07-01 17:07:47 -07:00
Nikhil Marathe
77b17981a3 Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey 2014-07-01 16:43:13 -07:00
Ryan VanderMeulen
1c2cc9d12b Backed out changesets bacfdc83424a and 7d12b5d7446f (bug 984048) for crashes. 2014-06-30 17:22:47 -04:00
Nikhil Marathe
b8acd50491 Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey
--HG--
extra : rebase_source : 9cc36dea950be96fba079877c2d67b76f8383635
2014-06-30 13:31:02 -07:00
Ben Kelly
935db1e193 Bug 1025973 - Part 2: Do not pass JSContext to static webidl methods in non-worker case. r=bz 2014-06-16 12:52:00 -04:00
Boris Zbarsky
253e2d6c68 Bug 1016560. Remove the footgun of rejecting promises with arbitrary objects. r=khuey 2014-06-03 11:38:38 -04:00