Commit Graph

65 Commits

Author SHA1 Message Date
Andrea Marchesini
042b7cf53f Bug 1047398 - ServiceWorker should use WeakRef instead nsTWeakRef, r=smaug 2014-08-01 17:42:19 +01:00
Boris Zbarsky
c03ab46f93 Bug 1040263. Eagerly create and preserve Promise reflectors so we always have them available during unlink. r=nsm,bholley. 2014-07-18 21:31:11 -04:00
Boris Zbarsky
e2f0608365 Bug 966471. Add some facilities for examining the state of a promise via a PromiseDebugging utility namespace. r=nsm,peterv 2014-07-02 00:19:48 -04:00
Nikhil Marathe
81a3fad979 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
8ece823137 Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey 2014-07-01 16:43:13 -07:00
Ryan VanderMeulen
6b74ec8899 Backed out changesets bacfdc83424a and 7d12b5d7446f (bug 984048) for crashes. 2014-06-30 17:22:47 -04:00
Nikhil Marathe
40400978a6 Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey
--HG--
extra : rebase_source : 9cc36dea950be96fba079877c2d67b76f8383635
2014-06-30 13:31:02 -07:00
Ben Kelly
fa96ef9593 Bug 1025973 - Part 2: Do not pass JSContext to static webidl methods in non-worker case. r=bz 2014-06-16 12:52:00 -04:00
Boris Zbarsky
ce7efbba1f Bug 1016560. Remove the footgun of rejecting promises with arbitrary objects. r=khuey 2014-06-03 11:38:38 -04:00
Ryan VanderMeulen
a1fd06248a Backed out changesets 6d1c36585219 and bd403a727849 (bug 1016560) for mochitest-other failures.
CLOSED TREE
2014-06-03 13:48:49 -04:00
Boris Zbarsky
59db282a5f Bug 1016560. Remove the footgun of rejecting promises with arbitrary objects. r=khuey 2014-06-03 11:38:38 -04:00
Nikhil Marathe
7f1cb23bae Bug 1009569 - Promise then() must be called on a clean stack. r=bz 2014-05-20 14:21:13 -07:00
Gene Lian
84c4e2d3fc Bug 949325 - C++ wrapper to support DataStore API on the worker (part 2-1, provide a proxy to resolve/reject Promise on workers). r=baku,nsm,khuey 2014-02-24 21:56:54 +08:00
Boris Zbarsky
04d5a7c98d Bug 996831. Add a ToJSValue overload for nsresult, to allow rejecting promises from C++ more easily. r=bholley 2014-04-16 15:13:41 -04:00
Ryan VanderMeulen
1829e78b29 Backed out 3 changesets (bug 996474, bug 996831) for B2G bustage on a CLOSED TREE.
Backed out changeset 8f98a4c2257f (bug 996831)
Backed out changeset 7acce569bd84 (bug 996831)
Backed out changeset 1845b09c7578 (bug 996474)
2014-04-16 19:31:41 -04:00
Boris Zbarsky
e152157843 Bug 996831. Add a ToJSValue overload for nsresult, to allow rejecting promises from C++ more easily. r=bholley 2014-04-16 15:13:41 -04:00
Boris Zbarsky
e862c92db8 Bug 994453 part 1. Factor out the to-JS conversions from Promise.h into mozilla::dom::ToJSValue methods. r=bholley
Apart from moving the methods, I made the following changes:

1)  Renamed them to ToJSValue.
2)  Inlined the boolean overload.
3)  Added overloads that take integer types.
4)  Changed the order of the aCx and aArgument arguments so aCx comes first.
5)  Renamed "abv" to "obj" in the typed array overload.
2014-04-10 14:57:07 -04:00
Boris Zbarsky
96db362740 Bug 991080. Add an overload of Promise::ArgumentToJSValue that lets callers pass in an nsTArray to MaybeResolve() a promise with a JS array. r=khuey 2014-04-10 00:58:43 -04:00
Boris Zbarsky
3738611b99 Bug 993889 part 1. Remove "scope" argument from nsContentUtils::WrapNative. r=bholley 2014-04-10 00:58:41 -04:00
Andrea Marchesini
f8f47ff494 Bug 974893 - Remove EnterCompartment and keep the global with the value in Promise, r=bz 2014-04-09 09:30:24 +01:00
Ed Morley
423901664f Backed out changeset 7fa9564a2486 (bug 974893) for build failures 2014-04-09 09:08:39 +01:00
Andrea Marchesini
47d3ae2f7e Bug 974893 - Remove EnterCompartment and keep the global with the value in Promise, r=bz 2014-04-09 08:32:46 +01:00
Boris Zbarsky
dfd0a0d909 Bug 991742 part 10. Remove the "aScope" argument from the Promise ArgumentToJSValue() methods. r=bholley 2014-04-08 18:27:19 -04:00
Boris Zbarsky
a0c3167371 Bug 991742 part 9. Remove the "scope" argument of WrapNewBindingObject. r=bholley 2014-04-08 18:27:19 -04:00
Boris Zbarsky
35fca5eeeb Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00
Nikhil Marathe
9892fb5884 Bug 956197 - Tests to check Promises can accept iterators. r=bz
--HG--
extra : amend_source : 7989612b44c67393de7f74fdd0054587722cc79a
2014-03-28 08:17:53 -07:00
Yuan Xulei
be52e2973e Bug 934368 - Extend Promise#MaybeResolve to receive boolean value. r=smaug 2014-02-26 16:18:34 +08:00
Yuan Xulei
858942196b Bug 910412 - Implement |getRoot|, |createDirectory| and |get| for Directory. r=dhylands, r=smaug 2014-03-05 11:25:40 +08:00
Nikhil Marathe
64ce0e2c51 Bug 967005 - Report rejected promises when worker stops running. r=bent
--HG--
extra : rebase_source : 3f569387061151b1afb5f09a8d1ca04e85e376e1
2014-03-12 07:31:03 -07:00
Wes Kocher
6d09c880fc Backed out changeset 716ba77a9d0a (bug 967005) for ASAN m-4 failures 2014-03-11 17:23:35 -07:00
Nikhil Marathe
6df7889086 Bug 967005 - Report rejected promises when worker stops running. r=bent 2014-03-11 16:10:41 -07:00
Ryan VanderMeulen
5099e8a290 Backed out 5 changesets (bug 910412) for intermittent crash whack-a-mole.
Backed out changeset e3eb9463b3e1 (bug 910412)
Backed out changeset d5863d302bde (bug 910412)
Backed out changeset 422b66d4b1ca (bug 910412)
Backed out changeset 3431d59d752e (bug 910412)
Backed out changeset b1c0310cdac1 (bug 910412)
2014-03-11 12:17:03 -04:00
Richard Barnes
31c4799582 Bug 978435 - Add ArgumentToJSVal overload for typed arrays. r=bz 2014-03-10 08:55:46 -04:00
Yuan Xulei
260442ce9a Bug 910412 - Implement |getRoot|, |createDirectory| and |get| for Directory. r=dhylands, r=smaug 2014-03-05 11:25:40 +08:00
Kyle Huey
566ed0b282 Bug 974120: Add helpers for using Promse::MaybeResolve/MaybeReject from C++. r=bz
Using JSAPI is tedious and error-prone.  It's much better to handle that once in the Promise code and allow callers to pass C++ objects.
2014-02-25 13:34:55 -08:00
Boris Zbarsky
2166b04394 Bug 970764. Remove support for non-optional "any" arguments values, since "any" needs to be able to include undefined anyway. Have "any" arguments and dictionary entries default to undefined unless the IDL explicitly says "= null". r=khuey 2014-02-19 10:13:38 -05:00
Nikhil Marathe
dee9164b47 Bug 966348 - Rename Promise.cast to Promise.resolve. r=bz 2014-02-10 09:27:02 -08:00
Nikhil Marathe
48b814058b Bug 918806 - Enable DOM Promises. sr=bz
--HG--
extra : rebase_source : dbc7ef836fe7c2a71f38fedda004d7f988361a85
2014-01-30 13:14:00 -08:00
Ryan VanderMeulen
3a41ee3937 Backed out changesets 6db8b08a3aea and 1d7c2025bb56 (bug 918806) for B2G mochitest failures. 2014-01-30 14:46:36 -05:00
Nikhil Marathe
b3f7079a6c Bug 918806 - Enable DOM Promises. sr=bz 2014-01-30 09:41:43 -08:00
Nikhil Marathe
fcd51ca0c7 Bug 945766 - DOM Promise should pass Promise/A+ tests. r=bz
--HG--
extra : rebase_source : efd56968e490fcde3ede6535002864104511a1d1
2014-01-28 10:14:57 -08:00
Nikhil Marathe
03ce85caaf Bug 939332 - Implement Promise.all, Promise.cast, Promise.race. r=bz
--HG--
extra : rebase_source : 72c1a87a6352005765442ea8903cfa16da8608fd
extra : amend_source : 71b6af7c8446cd501bc337d50a345f24814f20db
2013-11-19 13:53:00 -08:00
Nikhil Marathe
bb153a3ce5 Bug 879245 - Implement thenables for Promises. r=bz
--HG--
extra : rebase_source : cde27792ae58b13c88367df7a99fc8981097eedd
2014-01-23 10:47:29 -08:00
Nikhil Marathe
dd90f29f30 Bug 959375 - Add Promise Resolve/Reject overloads accepting a window. r=baku 2014-01-13 14:36:03 -08:00
Nikhil Marathe
2b1b97f534 Bug 915233 - DOM Promises on Workers. r=baku,bent,smaug,bz sr=sicking 2013-11-24 11:26:07 -08:00
Nikhil Marathe
6e731c5183 Bug 939906 - Make Promise.resolve(), Promise.reject(), Promise.prototype.then() and Promise.prototype.catch() spec compliant. r=baku
--HG--
extra : rebase_source : 7f32dd1222e4ab04f3f0cb4f450b734a4014c805
2013-11-19 13:29:47 -08:00
Nikhil Marathe
297a29ac6d Bug 882076 - C++ callbacks to DOM Promises. r=baku,mccr8 2013-11-19 10:43:51 -08:00
Nikhil Marathe
53df8db426 Bug 939909 - Get rid of Optional<> from internal Promise functions. r=bz
--HG--
extra : rebase_source : bcf49b1b593504aeb619f4bbd16028e57861641b
2013-11-19 10:39:51 -08:00
Michael Henretty
c7c6c3fbad Bug 899574 - Add public API for resolving promises in C++. r=baku 2013-09-26 11:09:16 -07:00
Reuben Morais
6d37cb18c3 Backed out 2 changesets (bug 899574) for breaking Gaia tests
--HG--
rename : dom/tests/mochitest/notification/desktop-notification/create_notification.html => dom/tests/mochitest/notification/create_notification.html
rename : dom/tests/mochitest/notification/desktop-notification/notification_common.js => dom/tests/mochitest/notification/notification_common.js
rename : dom/tests/mochitest/notification/desktop-notification/test_basic_notification.html => dom/tests/mochitest/notification/test_basic_notification.html
rename : dom/tests/mochitest/notification/desktop-notification/test_basic_notification_click.html => dom/tests/mochitest/notification/test_basic_notification_click.html
rename : dom/tests/mochitest/notification/desktop-notification/test_leak_windowClose.html => dom/tests/mochitest/notification/test_leak_windowClose.html
rename : dom/tests/mochitest/notification/desktop-notification/test_notification_tag.html => dom/tests/mochitest/notification/test_notification_tag.html
rename : dom/tests/mochitest/notification/desktop-notification/test_system_principal.xul => dom/tests/mochitest/notification/test_system_principal.xul
2013-10-07 14:41:13 -04:00