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

439 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini 45087a7970 Bug 1269154 - Get rid of WorkerFeature: WorkerHolder, r=khuey
--HG--
rename : dom/cache/Feature.cpp => dom/cache/CacheWorkerHolder.cpp
rename : dom/cache/Feature.h => dom/cache/CacheWorkerHolder.h
rename : dom/workers/WorkerFeature.h => dom/workers/WorkerHolder.h
2016-06-22 17:24:35 +02:00
Kaku Kuo 487b3fb191 Bug 1276272 - part 1 - add Promise::MaybeRejectWithVode() utility method; r=ehsan
MozReview-Commit-ID: 4bBGsUNKbQS

--HG--
extra : rebase_source : 471c57479c41a0626a05df9aee5cb7027e352904
2016-06-09 20:26:47 +01:00
Till Schneidereit b0d2250794 Bug 911216 - Part 24: Use promise rejection tracking to report unhandled rejections to the console. r=bz,Paolo 2016-03-22 16:22:24 +01:00
Boris Zbarsky 21c063a375 Bug 1278996. Move the support-files bit for test_promise_xrays.html into chrome.ini so running that one test via mach mochitest works. r=chmanchester 2016-06-09 14:49:21 -04:00
Jan de Mooij 66faed38af Bug 1277278 part 1 - Remove ContextOptions and make autoJSAPIOwnsErrorReporting the default. r=luke
--HG--
extra : rebase_source : aa1dcba100a3bb7a5057b07284cf4a99353afe5a
2016-06-07 20:30:48 +02:00
Andrea Marchesini 5a24e4a0ff Bug 1265767 - Subset of Blink FileSystem API - patch 4 - DirectoryEntry methods, r=smaug 2016-06-07 00:55:17 +02:00
Boris Zbarsky 42a30322ba Bug 1276400 part 1. Get rid of AutoDontReportUncaught and its one consumer. r=bkelly 2016-05-31 22:00:17 -04:00
Till Schneidereit 385d8245b5 Bug 911216 - Part 16: Use new Promise inspection Debugger getters to implement legacy functions on PromiseDebugging. r=bz 2016-05-26 16:13:47 +02:00
Chris Peterson 353ee65255 Bug 1272513 - Part 1: Suppress -Wshadow warnings-as-errors in some directories. r=glandium 2016-05-11 00:00:01 -07:00
Kyle Huey c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Paul Adenot 0b33e8847a Bug 1267096 - Return early if we have no global when creating a Promise. r=smaug
MozReview-Commit-ID: LQeFGaRRAVq

--HG--
extra : rebase_source : 679009e7b26ddffe64fb2c746a187f63c7448e11
2016-04-25 11:06:30 +02:00
Olli Pettay cc6d1d9827 Bug 1257096, don't try to report about unusual unhandled rejected Promises, r=bz,waldo
--HG--
extra : rebase_source : a53d6853feeae3c54f307cef71edcdba4f771803
2016-04-20 02:29:21 +03:00
Kyle Huey 2709afd167 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Wes Kocher 7d2cebe912 Backed out 3 changesets (bug 1263311) for Windows build failures in ServiceWorkerPrivate.cpp CLOSED TREE
Backed out changeset 0434a548e1fe (bug 1263311)
Backed out changeset 60b1be29446c (bug 1263311)
Backed out changeset 18132498bc40 (bug 1263311)

MozReview-Commit-ID: LPEa05QobdQ
2016-04-11 12:50:56 -07:00
Kyle Huey d200ed89d0 Bug 1263311: Part 3 - s/nsCancelableRunnable/CancelableRunnable/g. r=froydnj 2016-04-11 11:40:06 -07:00
Shawn Huang 90e33b02c1 Bug 1146418 - Promise API entry points should use NS_ASSERT_OWNINGTHREAD, r=baku 2016-04-11 23:16:26 +08:00
Kris Maglione 355e3293b3 Bug 1262069: Wrap promise resolution values before storing. r=bz
MozReview-Commit-ID: GRKOBucpacE

--HG--
extra : rebase_source : 18715f7db974122c32c0e12ec9010494e493977a
2016-04-07 13:33:50 -07:00
Nathan Froyd cccdd9fbca Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Kyle Huey fe5f7b4105 Bug 1259290: Part 5 - Remove the cx from WorkerFeature::Notify. r=bz 2016-03-28 10:28:14 -07:00
Wes Kocher ea76ed99d7 Backed out changeset 95494e68c722 (bug 1177488) for crashes in test_bug732665.xul CLOSED TREE
MozReview-Commit-ID: IFUHUBUCnCD
2016-03-25 12:11:48 -07:00
Nathan Froyd 418aa2af4f Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string. We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-23 10:40:53 -04:00
Eddy Bruel 3e2cb55980 Bug 1229769 - We should be able to use DOM promises in the worker debugger;r=khuey 2016-03-24 16:12:00 +01:00
Boris Zbarsky e3b2de6aa9 Bug 1255817 part 2. Get rid of AutoJSAPI::OwnsErrorReporting and AutoJSAPI::TakeOwnershipOfErrorReporting. r=bholley 2016-03-23 11:44:54 -04:00
Boris Zbarsky 7d81d282f7 Bug 1257725 part 3. Get rid of ThreadsafeAutoJSContext usage in Promise code. r=bholley 2016-03-23 11:02:57 -04:00
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
Boris Zbarsky ce7543e0ed Bug 1256424 followup to actually address the review comments 2016-03-14 20:53:36 -04:00
Boris Zbarsky 3ff438ab43 Bug 1256424. Get rid of ThreadsafeAutoSafeJSContext. r=bholley 2016-03-14 20:48:39 -04:00
Wes Kocher 168746512d Backed out changeset ee3c99e6f676 (bug 1177488) for LeakSanitizer failures
MozReview-Commit-ID: FFfF4u2vOrS

--HG--
extra : rebase_source : 0c7f5e290b388b2f35837a5f757f2d962b973da3
2016-03-14 13:15:21 -07:00
Nathan Froyd 6b6c2a1fcd Bug 1177488 - use |const char*| for representing async call reasons; r=bz,fitzgen
Using a simple |const char*| is more memory-efficient than allocating a
JS string.  We still have to allocate the JS string for passing things
into JS, but ideally we will be able to move the point of allocation
much closer to where it's actually needed, rather than indiscriminantly
doing it all the time.
2016-03-08 16:29:25 -05: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
Jonathan Watt a73bd8c354 Bug 1253094, part 1 - Stop using DebugOnly for class/struct members in dom/. r=baku
MozReview-Commit-ID: ErWZs9oV4WS
2016-02-26 15:52:06 +00:00
Boris Zbarsky f47268eca8 Bug 1252127. Remove unnecessary JSContext argument from PromiseWorkerProxy::CleanUp. r=khuey 2016-02-29 14:52:42 -05:00
Boris Zbarsky 663b9bd562 Bug 1252091. Add/RemoveFeature don't need a JSContext argument. r=khuey 2016-02-29 14:52:42 -05:00
Boris Zbarsky 7345c5edb1 Bug 1251045 part 4. Remove the JSContext argument of WorkerRunnable::Dispatch. r=khuey 2016-02-26 15:23:12 -05:00
Andrew McCreight b80e656e9e Bug 1247679, part 3 - Replace NS_IMPL_CYCLE_COLLECTION_TRACE_JSVAL_MEMBER_CALLBACK with JS_MEMBER. r=smaug 2016-02-22 10:11:02 -08:00
Boris Zbarsky 24566ec012 Bug 1243001 part 7. Stop wrappercaching dom::Promise when SPIDERMONKEY_PROMISE is defined. r=peterv
nsWrapperCache expects the object it stores to have an ObjectMoved op that will
notify the wrapper cache when the object is moved.  SpiderMonkey promises don't
have a way to do this.

The XPCConvert changes are needed to allow code that passes around Promise
objects as nsISupports to continue working instead of ending up with
double-wrapped nsISupports (XPCWrappedNative for an nsISupports XPCWrappedJS)
around the SpiderMonkey Promise.
2016-02-09 17:40:31 -05:00
Boris Zbarsky fbe6dcf99f Bug 1243001 part 6. Implement Promise::AppendNativeHandler in the SPIDERMONKEY_PROMISE world. r=peterv
This patch introduces a fake IDL interface just to get the benefits of
cycle collection for the JS-to-C++ link we now need for PromiseNativeHandler
(because the SpiderMonkey Promise somehow needs to point to the
PromiseNativeHandler).  Now in practice a bunch of our PromiseNativeHandlers
are not cycle collected.  That kinda freaks me out, but spot-checking a few
suggests they do not in fact leak (either because they don't form cycles or
because the Promise they're observing always settles and then releases them).
Either way, that's a problem that exists with or without this patch...
2016-02-09 17:40:31 -05:00
Boris Zbarsky 3366af6c39 Bug 1243001 part 5. Get rid of most of the dom::Promise methods when SPIDERMONKEY_PROMISE is defined, and reimplement the rest in terms of SpiderMonkey Promise. r=peterv
This is the bulk of the new dom::Promise implementation.  It's using the APIs
that bug 911216 part 1 adds.
2016-02-09 17:40:31 -05:00
Boris Zbarsky a78653548f Bug 1243001 part 4. Switch to using MaybeResolve/MaybeReject instead of ResolveInternal/RejectInternal for PromiseWorkerProxy. r=peterv
This is the one part of this set of patches that is actually a substantive change
even without SPIDERMONKEY_PROMISE defined.  This is being done because I don't
want to create ResolveInternal/RejectInternal methods on dom::Promise in the
new world.

In practice, the difference between MaybeResolve/Reject and
ResolveInternal/RejectInternal is that the former will do nothing if the
Promise is "resolved" in terms of spec terminology: either settled or locked in
to track another Promise.  A resolved but still pending Promise can still get
fulfilled (what we call ResolveInternal) or rejected when the promise it's
tracking settles.

So the difference only matters if PromiseWorkerProxy can be working with a
"resolved" Promise (in which case what it's doing now would settle it, while
what I'm switching to would not).  But I don't believe PromiseWorkerProxy ever
points to a "resolved" Promise.
2016-02-09 17:40:31 -05:00
Boris Zbarsky a1f6df215a Bug 1243001 part 3. Turn off the IDL bits of PromiseDebugging when SPIDERMONKEY_PROMISE is defined. r=peterv
These are basically the minimal changes needed to make PromiseDebugging compile
in the new world.  It will NOT function correctly (see the XXX comments); Till
will be fixing it up more in bug 911216 as he transitions the relevant bits in
our devtools to work on top of SpiderMonkey promises.
2016-02-09 17:40:31 -05:00
Boris Zbarsky 7fd3989391 Bug 1243001 part 2. Make Promise an empty [NoInterfaceObject] interface when SPIDERMONKEY_PROMISE is defined. r=peterv
The idea is to not define a "Promise" property on the global and not generate
any of the methods, since SpiderMonkey will implement all of those, but to keep
some of the conversion to/from JS logic and the IDL parser validation bits that
we have right now.  Once we can assume SPIDERMONKEY_PROMISE we can probably
change how the "Promise" identifier is handled by the IDL parser and how the
resulting type is handled by codegen, but for now we're aiming for minimal
changes.
2016-02-09 17:40:30 -05:00
Boris Zbarsky 33b6989098 Bug 1243001 part 1. Remove the dead WrappedWorkerRunnable class from Promise code. r=peterv 2016-02-09 17:40:30 -05: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
Boris Zbarsky a7640491d9 Bug 1245674. Null-check mGlobal before dereferencing it in one more place in Promise code. r=smaug 2016-02-05 13:12:52 -05: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
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Jeff Walden 50cb5c44d6 Bug 1243114 - Convert PromiseCapability::mPromise to a rooted JSObject* instead of a rooted JS::Value. r=bz
--HG--
extra : rebase_source : bf3b1439951699ddb117070dff71198b1569ccf8
2016-01-26 23:26:39 -08:00
Kaku Kuo e3bc6c71ea Bug 1239300 - reject promise with null while creating imagebitmap from empty blob; r=smaug 2016-01-19 14:35:01 +08:00
simplyblue 4a7674779d Bug 1212533 - Change the out-param of js/JS::Construct from MutableHandleValue to MutableHandleObject. r=arai, r=jorendorff
--HG--
extra : rebase_source : 04e0ec01701a1c55b5589b36576b7bab433feafd
2015-10-28 16:38:27 +05:30
Phil Ringnalda 6aeccf0426 Merge f-t to m-c, a=merge 2016-01-23 18:11:37 -08: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
Tom Tromey 5412728905 Bug 757969 - use __thread in ThreadLocal; r=froydnj 2016-01-22 10:33:44 -07: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 a999ef253a 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 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 bc6a0c8f1c 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 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 52d7142a8e 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 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 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 c9985b9298 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 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 f1d0f460ff 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 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 a623100bc3 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 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 56a0511eb4 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 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
Boris Zbarsky c3bc1cdc40 Bug 1224007 part 5. Get rid of ErrorResult::StealJSException. r=peterv 2015-11-20 16:29:41 -05:00
Edwin Flores 2a1f5c4acb Bug 1226003 - Stop using MaybeRejectBrokenly in DetailedPromise - r=bz 2015-11-20 13:21:48 +00:00
Boris Zbarsky a2b3913ec9 Bug 1182197 workaround. Add a null-check for mGlobal in Promise::Settle. r=mccr8 2015-09-11 21:59:43 -04: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
Andrea Marchesini 0d7595b59b Bug 1214300 - AsyncErrorReporter doesn't use JSRuntime param., r=smaug 2015-10-14 11:29:55 +01:00
Boris Zbarsky 6a503bcc2a 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 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
Andrea Marchesini 7373ebaca0 Bug 1209919 - Improving naming and comments in StructuredCloneHelper, r=smaug
--HG--
rename : dom/base/StructuredCloneHelper.cpp => dom/base/StructuredCloneHolder.cpp
rename : dom/base/StructuredCloneHelper.h => dom/base/StructuredCloneHolder.h
2015-09-30 13:22:08 +01:00
Boris Zbarsky 79699c0eed 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 138287abda Bug 1182197 workaround. Add a null-check for mGlobal for now. r=nsm 2015-09-11 21:59:43 -04:00
Andrew McCreight 379988acc8 Bug 1203289 - PromiseCallback subclasses should unmark gray JS they run. r=bz 2015-09-10 11:34:10 -07:00
Boris Zbarsky c9f137eef4 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 893e3bb469 Bug 1198814 - Use StructuredCloneHelper in PromiseWorkerProxy, r=smaug 2015-09-05 12:22:13 +03:00
Nikhil Marathe 548809dc68 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.

--HG--
extra : commitid : BnnijSibVYe
extra : rebase_source : 15f6810dfbd0c88a983196de401c55e782b1d1d8
2015-09-02 10:07:26 -07:00
Andrea Marchesini efd3b25c78 Bug 1198795 - ipc/StructuredCloneUtils should be merged with StructuredCloneHelper, r=smaug
--HG--
rename : dom/ipc/StructuredCloneUtils.cpp => dom/ipc/StructuredCloneIPCHelper.cpp
rename : dom/ipc/StructuredCloneUtils.h => dom/ipc/StructuredCloneIPCHelper.h
2015-09-02 17:20:30 +01:00
Nicholas Nethercote f44287005f 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.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Nikhil Marathe 88eb19683a Bug 1162333 - Fix windows bustage. a=bustage CLOSED TREE
--HG--
extra : commitid : JQslbB96EhG
extra : rebase_source : 9893be5fadeab5c26ead032cbca24acf3f6049c7
2015-08-18 10:00:35 -07:00
Jinank Jain f67a04e158 Bug 1162333 - Add stronger assertions to PromiseWorkerProxy in debug builds. r=catalinb
--HG--
extra : commitid : 2jVPtywuF92
extra : rebase_source : 85d8854a7f3eec8c1fd31ed0e57f33d3b83a2d04
2015-06-11 00:35:18 +02: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
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
Aryeh Gregor 2311382621 Bug 1191305 - Alphabetize some includes; r=froydnj 2015-08-06 15:45:21 +03:00
Aryeh Gregor 80ea0a3e53 Bug 1190823 - Move OwningNonNull.h to xpcom/base/; r=froydnj
--HG--
rename : dom/bindings/OwningNonNull.h => xpcom/base/OwningNonNull.h
2015-08-05 15:28:27 +03: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
James Cheng 2f40ed3c09 Bug 975246 - Part3 - Using nsRefPtr->* operator. r=nfroyd 2015-07-28 23:08:00 +02:00
Bobby Holley 97b9240b34 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Tom Tromey a37b7fa928 Bug 1148593 - Pass JSContext to CallbackObject constructor. r=bz
--HG--
extra : rebase_source : 5c4c1b8dc646fc76bda37a8c6e35a6494d0800b8
2015-07-24 07:00:00 -04:00
Ryan VanderMeulen b171b787bd Backed out changesets fa9fe193778f and 3eaf867930dd (bug 1148593) for test_async_setTimeout_stack.html and test_async_setTimeout_stack_across_globals.html failures. 2015-07-17 12:37:24 -04:00
Tom Tromey 2bbc02624b Bug 1148593 - Pass JSContext to CallbackObject constructor. r=bz 2015-07-17 07:47:00 -04:00
Nikhil Marathe c8a46b6965 Bug 1114554 - Patch 5 - getNotifications() on worker thread. r=wchen
--HG--
extra : rebase_source : 7d42bf40e9228d3729e0a269d66fa427db3eb38f
2015-06-25 18:50:25 -07:00
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Michael Layzell 562c0a00bc Bug 1181321 - Eliminate duplicate mRefCnt members in PromiseNativeHandler subclasses. r=baku
--HG--
extra : rebase_source : 64348ca27d2f70dc116856dd4f9271e1fb63a467
2015-07-09 08:56:00 +02:00
Randell Jesup 238677c2c0 Bug 1155059: Patch 3&7 - fix leaks in Promise, ConsoleService and JS Finalize r=froydnj 2015-07-09 23:21:46 -04:00
Randell Jesup c87c478f4f Bug 1155059: Patch 1&2 - Convert Dispatch() and friends to already_AddRefed<> r=froydnj
Modify Dispatch IDL and code to deal with MSVC issues with overloaded templates r=froydnj
2015-07-09 23:21:46 -04:00
Michael Layzell 9cea8f483b Bug 1167597 - Mark PromiseReportRejectFeature::mPromise as MOZ_NON_OWNING_REF. r=ehsan 2015-05-22 07:17:00 +02:00
Juan Gomez 258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Ryan VanderMeulen 84d140a54b Backed out 11 changesets (bug 916893, bug 1114554) for various mochitest and Gij failures.
Backed out changeset 247ca4bf258e (bug 1114554)
Backed out changeset 5578d5c280a6 (bug 1114554)
Backed out changeset 404830c1ecf7 (bug 1114554)
Backed out changeset 15bdf9c78e6e (bug 1114554)
Backed out changeset f92abe5ec784 (bug 1114554)
Backed out changeset 75324b6862a8 (bug 1114554)
Backed out changeset ce8a768782f2 (bug 1114554)
Backed out changeset 0d860fd12534 (bug 1114554)
Backed out changeset 7dc2448065a9 (bug 916893)
Backed out changeset c3b07f0d1a60 (bug 916893)
Backed out changeset 61c3f24cc908 (bug 916893)

CLOSED TREE
2015-06-25 19:52:40 -04:00
Ryan VanderMeulen 5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Nikhil Marathe 811edc788a Bug 1114554 - Patch 5 - getNotifications() on worker thread. r=wchen
--HG--
extra : rebase_source : b3f68e725be5cbfedc2995c9b20450e4bcaa1aae
2015-05-04 09:04:25 -04:00
Juan Gomez 702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Edwin Flores d0bfa9bf80 Bug 1160445 - Add detailed logging for EME promise failures - r=cpearce,bholley 2015-06-03 13:42:50 +12: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
Terrence Cole 161a4c26ba Bug 1164602 - Replace js::NullPtr and JS::NullPtr with nullptr_t; r=sfink 2015-05-13 14:07:34 -07: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
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Boris Zbarsky b8ba520783 Bug 1087330. Make the data structure we use for our promise microtask queue have O(1) first element removal, not O(N). r=khuey 2015-05-01 22:33:01 -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
Nikhil Marathe 828e83e703 Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley
--HG--
extra : rebase_source : 001f43d9e08768111f8ece44f79ae3ab689e2fb6
extra : amend_source : 8b89c86ded224c90aa428cdfb24d25959c87b32b
2015-04-27 12:00:41 -07:00
Ryan VanderMeulen cb4391caa6 Backed out changeset c839f283bf28 (bug 1058695) for bustage.
CLOSED TREE
2015-04-27 14:04:24 -04:00
Nikhil Marathe 6e7fc932d3 Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley
--HG--
extra : rebase_source : 3b3909b843efa2150edfcd79a6399535a12bd5aa
2015-04-22 16:34:21 -07:00
Andrew McCreight 0c176ddcff Bug 1062479 - Use static strings for WeakReference type names. r=ehsan 2015-04-24 09:43:01 -07:00
Nikhil Marathe d1232d5041 Backed out changeset cb59db723d15 (Bug 1058695) for bustage on CLOSED TREE
--HG--
extra : amend_source : 273b62b6c171f65718e8c59e833ba30f6ea96a05
2015-04-23 09:46:52 -07:00
Nikhil Marathe 8bec017e97 Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley 2015-04-22 16:34:21 -07:00
Nikhil Marathe 75b0dfb4c7 Backed out changeset 527cd70f241f (Bug 1058695) for bustage 2015-04-23 09:07:16 -07:00
Nikhil Marathe e653803d27 Bug 1058695 - Add member to nsIGlobalObject to detect it is going away. Make promises use it. r=bholley
--HG--
extra : transplant_source : %86%8A%E1%E1%98c%E9w%81%3DS%84%B1%3A%02bU%8D%7B%C7
2015-04-22 16:34:21 -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
Phil Ringnalda 11411ee0a4 Back out 2 changesets (bug 1152902) for Gu bustage
CLOSED TREE

Backed out changeset 462f2f668259 (bug 1152902)
Backed out changeset 1c5ed66652c3 (bug 1152902)
2015-04-18 15:30:17 -07:00
Boris Zbarsky e5d918e74e 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
Jim Blandy ebd83c9a61 Bug 1152577: Add 'aReason' argument to AutoEntryScript constructor, and provide plausible names for its instantiations. r=bholley
--HG--
extra : rebase_source : 8ab7a3628a5b4d94b957f24e23e4c5c7871db97c
2015-04-08 21:23:48 -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
Catalin Badea 8d978700de Bug 1130686 - Refactor PromiseHolder in the service worker clients code. r=nsm 2015-04-07 16:25:08 +03:00