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

563 Коммитов

Автор SHA1 Сообщение Дата
Luke Wagner 0b570ff235 Bug 1299356 - Baldr: change handling of when not HaveCompilerSupport (r=bbouvier)
MozReview-Commit-ID: 7eCwuhhbsR
2016-08-31 22:35:55 -05:00
Dimo 71e7008950 Bug 1287967 - Baldr: Add current_memory and grow_memory (r=luke,sunfish)
MozReview-Commit-ID: 8whwVTSYV9a
2016-08-29 21:30:04 -05:00
Luke Wagner cc5c2c3ffc Bug 1283924 - Implement AsyncTask hooks for worker thread JSContexts (r=bkelly)
MozReview-Commit-ID: CU4tiYaREik

--HG--
extra : rebase_source : 35a1017de6844af78ec124ef84f355727f19cd80
2016-08-19 14:00:53 -05:00
Luke Wagner 44699344bb Backed out changeset b6cf6d7a95f9
MozReview-Commit-ID: JtuQh7USSWX

--HG--
extra : rebase_source : 19e2f58ab5d26e36b24d0d5a80e1805f013f67d5
2016-08-19 17:09:56 -05:00
Luke Wagner 9003b8a8b4 Bug 1283924 - Implement AsyncTask hooks for worker thread JSContexts (r=bkelly)
MozReview-Commit-ID: F31bzEH5rPR

--HG--
extra : rebase_source : ef27bc3fdc7aae1a5882672a50e0be802dffdf4e
2016-08-19 14:00:53 -05:00
Luke Wagner 78e6c55df9 Bug 1283924 - Implement AsyncTask hooks for main thread JSContext (r=bkelly)
MozReview-Commit-ID: DCrbDDgbUYd

--HG--
extra : rebase_source : 2d85b7eb5635740ba8a34b6deeb0c76bf96376e7
2016-08-19 13:41:55 -05:00
Ben Kelly 9d7b33a00b Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-18 07:11:04 -07:00
Phil Ringnalda 4083fafafc Backed out 10 changesets (bug 1290116, bug 1293690) for build bustage
CLOSED TREE

Backed out changeset bbc14d107fca (bug 1290116)
Backed out changeset a81b6ce5c25f (bug 1290116)
Backed out changeset e0b9c25b6125 (bug 1290116)
Backed out changeset 8e9a9ba04ce5 (bug 1290116)
Backed out changeset 2d5ad5e9ed20 (bug 1290116)
Backed out changeset eb7da0dbfc72 (bug 1290116)
Backed out changeset 6a4e8c92faae (bug 1290116)
Backed out changeset 0342d98afa10 (bug 1293690)
Backed out changeset d84b0768f0ce (bug 1293690)
Backed out changeset f9f62ade9508 (bug 1293690)
2016-08-17 21:16:43 -07:00
Ben Kelly fa520e1fdd Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-17 20:01:35 -07:00
Kaku Kuo 4f8950408b Bug 1293878 part 2 - remove not used Promise::MaybeRejectWithNull() utility; r=smaug
MozReview-Commit-ID: 2vlqZRyjc9i

--HG--
extra : rebase_source : fd7dbb36243ba3eb27fbac999962e5988d671173
2016-08-16 11:03:41 +08:00
Kaku Kuo 55ce6396ad Bug 1292091 - Part 1 - add Promise::MaybeResolveWithUndefined() utility method; r=bz
MozReview-Commit-ID: 41737NOQoH4

--HG--
extra : transplant_source : %9D%D6%FBW%0F-%E1%3C%BE%9F%2C%7B%27%A6%D8g%27%EA%28%F2
2016-08-10 10:07:42 +08:00
Nicholas Nethercote e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Olli Pettay 06c2ac8e59 Bug 1292699 - Add a small helper to deal with cases when native side needs to ensure that slow script dialog shows up, r=bholley
--HG--
extra : rebase_source : ab0fc332e5b54921d7a05e0c008c65b29947ee27
2016-08-08 23:29:05 +03:00
Boris Zbarsky d7821950f4 Bug 1278583 part 5. Switch DOM code from using hasInstance class hooks to using Symbol.hasInstance. r=peterv 2016-08-03 18:32:07 -07:00
Tom Tromey 5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Andrea Marchesini 96a5167026 Bug 1282026 - Add assertions in the DTOR of WorkerHolder - part 3 - PromiseWorkerProxy, r=bkelly 2016-07-18 09:14:14 +02:00
Nicholas Nethercote 2ebfc5116b Bug 1197973 - Use MOZ_MUST_USE in AutoJSAPI. r=bz. 2016-07-14 13:18:11 +10:00
Andrea Marchesini c0a8e7cf34 Bug 1287313 - get rid of 'workers::' in Promise.cpp, r=smaug 2016-07-17 16:48:58 +02:00
Boris Zbarsky efc4dcf284 Bug 1275315 part 2. Use the new Realm getters in binding code. r=peterv 2016-07-09 00:19:52 -04:00
Boris Zbarsky bcb0a973fb Bug 1279313 part 2. Use an AutoEntryScript when resolving or rejecting a Promise from C++, in case we are resolving with an object and plan to call the "then" getter. 2016-07-07 20:08:25 -04:00
Nathan Froyd 2c2b9296bc Bug 1283616 - part 2 - micro-optimize inserting microtask runnables into the queue; r=khuey
We can save an AddRef/Release pair by passing in the reference to the queue.
2016-07-05 18:49:06 -04:00
Nathan Froyd 985851ccca Bug 1283616 - part 1 - micro-optimize removing microtask runnables from the queue; r=khuey
We can just extract the reference we want from the queue since we're
about to remove it; no sense in performing extra refcounting if we don't
need to.
2016-07-05 18:49:06 -04:00
Andrea Marchesini aac2306f2c 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-23 10:53:14 +02:00
Carsten "Tomcat" Book 47aeb86e2c Backed out changeset 1c5d78c7ba43 (bug 1269154) for bustage on a CLOSED TREE
--HG--
rename : dom/cache/CacheWorkerHolder.cpp => dom/cache/Feature.cpp
rename : dom/cache/CacheWorkerHolder.h => dom/cache/Feature.h
rename : dom/workers/WorkerHolder.h => dom/workers/WorkerFeature.h
extra : rebase_source : 49f9e9ce0500ac441fe97878cf9308804926544f
2016-06-23 10:13:54 +02:00
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
Nick Fitzgerald 43962cb694 Bug 1038238 - Part 1: Make Error instances use SavedFrame objects for their
stacks; r=jorendorff
2015-03-27 13:08:46 -07:00
Kyle Huey 04d1520cc7 No bug: fix typo. DONTBUILD 2015-03-21 10:43:15 -07: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
Daniel Holbert 082fd9cd7f Bug 1142841: Convert all nsRefPtr<nsIRunnable> to nsCOMPtr<nsIRunnable>. r=ehsan
This patch was generated by a script.  Here's the source of the script for
future reference:

find . \( -iname "*.cpp" -o -iname "*.h" \) | \
  xargs -n 1 sed -i "s/nsRefPtr<nsIRunnable>/nsCOMPtr<nsIRunnable>/g"
2015-03-17 09:29:17 -07:00
Ben Kelly 92143814c0 Bug 1110487 P1 Fix some non-unified bustage before adding new code. r=ehsan 2015-03-16 07:10:36 -07:00
Jonathan Griffin d1c61bc9b6 Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08: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
Boris Zbarsky e0532c037e Bug 1122238 part 3. Drop all the DOMException-cloning and sanitization gunk we added in bug 1107592 and bug 1107953 and bug 1117242 . r=bholley 2015-03-06 01:08:06 -05: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 6a93d5c443 Bug 1107953 part 5. Add tests for promise rejections with content-side DOMExceptions, and fix the promise code so those tests actually pass. r=bholley 2015-01-15 17:39:02 -05: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
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
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
Ehsan Akhgari 3ca715b071 Bug 1118612 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/promise; r=baku 2015-01-07 11:51:28 -05:00
Andrea Marchesini 8e36934a09 Bug 1057994 - DataStore should not dispatch runnables in a worker when it is shutting down, r=bent
--HG--
rename : dom/datastore/tests/file_basic_worker.html => dom/datastore/tests/file_worker_close.html
rename : dom/datastore/tests/test_basic_worker.html => dom/datastore/tests/test_worker_close.html
2014-12-17 14:49:36 +00:00
Dan Gohman 8bacfeb968 Bug 1054671 - Constify static callback arrays r=ehsan 2014-12-16 16:30:39 -08:00
Nigel Babu b91168c141 Backed out changeset 6a3a0e3bfaf6 (bug 1054671) for B2G emulator build bustage on CLOSED TREE 2014-12-16 11:24:15 +05:30
Dan Gohman d791adb2b0 Bug 1054671 - Constify static callback arrays r=ehsan 2014-12-15 20:53:58 -08: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
Boris Zbarsky 8ec9d58716 Bug 1087851 part 1. Rename WrapNewBindingObject to GetOrCreateDOMReflector to make it clearer what it does. r=peterv for the idea; patch itself is just search-and-replace 2014-11-26 14:25:20 -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 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
Nikhil Marathe 36db9eff13 Bug 1039846 - Patch 4: FetchDriver with about:, blob: and data: fetching. r=baku
--HG--
extra : transplant_source : o%29%0E%5D%90%11%FA%1ExO%26%7E%9D_%F2%E7%0B%FE%21%B2
2014-10-06 11:01:20 -07: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 ea1a6ff5e4 Bug 1083851 part 4. Expose promise stacks on PromiseDebugging. 2014-10-19 22:27:12 -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
Tom Schuster bf9324688d Bug 1069694 - Remove OldDebugAPI from the browser. r=shu 2014-10-12 19:37:41 +02:00
Peter Van der Beken dcda2ba9bb Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove nsWrapperCache::SetIsDOMBinding. r=bz.
--HG--
extra : rebase_source : 89c476cd9436530b2df5acc903909e34188417a0
2014-10-07 11:44:49 +02:00
Bobby Holley 94bd419133 Bug 1070842 - Remove ambiguous globals from xpc::ErrorReporter and make meanings explicit. r=bz 2014-09-29 15:34:20 +02: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
Bobby Holley db168e5cde Bug 1065811 - Expose isCallable()/isConstructor() in JS_PUBLIC_API. r=billm 2014-09-25 13:13:28 +02: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
Bobby Holley e3eca2660e Bug 1070696 - Rename xpc::GetNativeForGlobal to xpc::NativeGlobal and make it accept non-global JSObjects. r=smaug
The method is infallible, and making the callers invoke
js::GetGlobalForObjectCrossCompartment manually is dumb.
2014-09-21 21:31:53 +02:00
Ehsan Akhgari 8908aea348 Bug 1068020 - Fix more bad implicit constructors in DOM; r=baku 2014-09-17 17:53:42 -04:00
Yuan Xulei fcfee0071f Bug 1035060 - Implement AbortablePromise. r=bz 2014-09-12 10:18:49 +08:00
Bobby Holley e85bd78d5d Bug 1062077 - Introduce xpc::ErrorReport. r=bz
I've got it! Let's just wrap the JS thing in an XPCOM thing that duplicates
its fields with a different ownership model! We totally need another one of
those, right? And we could even stick it in XPConnect! </sarcasm>

In seriousness - the code to own, format, and display error reports is
currently spread between the JS engine, JSErrorReporters, an async Runnable
abstraction, and elsewhere. We need to condense it somewhere to start chipping
away at this mess.
2014-09-08 16:30:10 -07:00
Ehsan Akhgari 1b1d6ffebf Bug 1061023 - Fix more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : c80c5f9d7ae28286513cdb52ad76b46c240bdd5d
2014-09-01 18:26:43 -04:00
Ehsan Akhgari 0653303071 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 117bb1a341 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 6c932dea6c Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku 2014-09-01 18:00:53 -04:00
Yuan Xulei 6fda146273 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 60e99f3cd4 Bug 1047398 - ServiceWorker should use WeakRef instead nsTWeakRef, r=smaug 2014-08-01 17:42:19 +01:00
Ehsan Akhgari 3fa82c9346 Bug 1045436 - Fix more bad implicit constructors in XPCOM; r=froydnj 2014-07-29 20:43:56 -04: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
Mike Hommey bc5d6801bb Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09: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
Ryan VanderMeulen 712ba6cabb Backed out changeset 38bfa2af2bd8 (bug 1023547) for making test_promise.html perma-fail. 2014-07-20 15:39:04 -04:00
Nikhil Marathe c152f140c3 Bug 1023547 - Fix intermittent dom/workers/test/test_promise.html failure. r=bz 2014-07-18 18:13:47 -07:00
Boris Zbarsky 0106bd027b Bug 966452 part 2. Report all unhandled Promise rejections. r=nsm,bholley 2014-07-04 01:24:59 -04:00
Boris Zbarsky 92fb7dde3a 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
Benoit Girard 1465e09a99 Bug 1037691 - Fix instances where refcounted classes expose a public destructor. r=ehsan,bent,mayhemer,jrmuizel 2014-07-15 11:37:45 -04:00
Benoit Jacob 18c3e0073a Bug 1035394 - Fix dangerous public destructors in dom - r=ehsan 2014-07-08 17:23:17 -04:00
Carsten "Tomcat" Book 673c436cdb Backed out changeset 42f348168125 (bug 966452) 2014-07-04 08:23:38 +02:00
Boris Zbarsky 2a36000fa7 Bug 966452 part 2. Report all unhandled Promise rejections. r=nsm 2014-07-04 01:24:59 -04:00
Nikhil Marathe a58ac47144 Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey
--HG--
extra : rebase_source : 463146233c874c2f2c63c018f2a43a66ca9ea49a
2014-07-02 17:48:35 -07:00
Boris Zbarsky e6f74ae48b 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
Wes Kocher 40b922a6e4 Backed out 3 changesets (bug 984048) for breaking hazard builds.
Backed out changeset 2d0c34b7045f (bug 984048)
Backed out changeset c18211a2afa1 (bug 984048)
Backed out changeset 30fa36882d57 (bug 984048)
2014-07-01 20:29:08 -07:00
Nikhil Marathe 01ba86a01d Bug 965644 - Fix intermittent oranges on promise tests. r=bz 2014-07-01 17:33:00 -07:00
Nikhil Marathe 9fdd7f0e9a 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 80b377d13a Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey 2014-07-01 16:43:13 -07:00
Ryan VanderMeulen a510b05849 Backed out changesets bacfdc83424a and 7d12b5d7446f (bug 984048) for crashes. 2014-06-30 17:22:47 -04:00