Commit Graph

24 Commits

Author SHA1 Message Date
Boris Zbarsky
ed9806944a Bug 1176800 part 2. Add a ToJSValue overload for owning unions. r=peterv 2015-07-01 00:15:30 -04:00
Kyle Machulis
dd19729534 Bug 1123516 - Implement maplike/setlike in WebIDL Codegen; r=bz 2015-06-29 15:38:53 -07:00
Andrea Marchesini
99c17a8938 Bug 1163388 - patch 2 - get rid of nsIDOMFile, r=ehsan 2015-05-18 14:52:26 +01:00
Andrew McCreight
92010d3e4c Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04:00
Ehsan Akhgari
0e14d50aae Bug 1151884 - Enable the uint32_t overload of ToJSValue; r=smaug 2015-04-08 21:58:07 -04:00
Boris Zbarsky
33f3efd014 Bug 1146333. Get rid of WrapCallThisValue and just use ToJSValue, now that we have it. r=peterv 2015-03-30 23:43:45 -04:00
Tom Tromey
007c9945b7 Bug 1095728 - Mark ToJSValue with MOZ_WARN_UNUSED_RESULT. r=bz 2014-12-09 14:45:00 -05:00
Boris Zbarsky
ffbd31df6a 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
Paul Adenot
c6ee8e7bb8 Bug 1000264 - Allow an object that inherits from nsWrapperCache but not nsISupports to be passed as a Promise::MaybeResolve argument. r=bz 2014-10-22 19:26:10 +02:00
Ryan VanderMeulen
4b2ccd0aba Backed out changesets 0c9407b0e481, c2c37b2e9fac, and 488700194519 (bug 1000264) for e10s test failures.
CLOSED TREE
2014-11-13 12:40:15 -05:00
Paul Adenot
e1e10d6ef0 Bug 1000264 - Allow an object that inherits from nsWrapperCache but not nsISupports to be passed as a Promise::MaybeResolve argument. r=bz 2014-10-22 19:26:10 +02:00
Ben Kelly
f7766f01e7 Bug 1091091: Support ErrorResult in Promise::MaybeReject(). r=bz 2014-10-30 11:12:09 -04:00
Ehsan Akhgari
3a4242c619 Bug 839838 - Implement DOMRequest.then; r=sicking,bzbarsky
This is implemented by creating a Promise object internally and
forwarding the .then() call to it. Any further callbacks passed to
future .then() calls will be added as callbacks on the same internal
promise object. We also take care of resolving or rejecting the promise
if the success/error event of the DOMRequest object has been fired
before .then() is called.
2014-10-11 09:46:01 -04:00
Kyle Huey
3227013532 Bug 1031051: Part 13 - Support ToJSValue()ing CallbackObjects and nsTArrays of raw pointers. r=bz
Without special handling CallbackObject subclasses will fall into the "nsISupports but not nsWrapperCache" case which goes through an XPConnect wrapping path that has no idea how to cope with a CallbackObject.  We need both the CallbackObject overload and the EnableIf bit in the template because the template will bind to the subclass and thus be preferred to the CallbackObject overload which requires an implicit conversion to the base class.

Before this patch nsTArray<T*> will eventually try to ToJSValue a T* which will select the boolean overload.  Thanks C++!  The new template overload that takes a T and attempts to dereference it will be preferred because it can bind to the type directly and does not require the implicit (and terrible!) conversion to bool.  This template is written in terms of T and not T* so we can test to see if T is a pointer type (and not merely something that can be coerced to a T*, such as a T[N]).
2014-06-30 16:02:03 -07:00
Olli Pettay
69617f14f7 Bug 1023280 - Rename dictionary.ToObject to ToObjectInternal, r=bz 2014-06-11 22:38:55 +03:00
Michael Shuen
f7ea3d18e8 Bug 972385 - Make JS::AutoValueVector subscript operator return handles. r=jonco, smaug 2014-04-28 16:53:00 +02:00
Boris Zbarsky
7fe5d9f4a0 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
a1e80b1589 Bug 996474. Add a ToJSValue overload that takes a Handle<Value>. r=bholley 2014-04-16 15:13:41 -04:00
Ryan VanderMeulen
e917377eca 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
74e1cbe3d8 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
fd25ec1427 Bug 996474. Add a ToJSValue overload that takes a Handle<Value>. r=bholley 2014-04-16 15:13:41 -04:00
Boris Zbarsky
af8878e7c5 Bug 994811 part 1. Add a ToJSValue overload for dictionary types. r=bholley 2014-04-11 22:20:52 -04:00
Boris Zbarsky
6e71f18890 Bug 994793. Make the array bits of ToJSValue nicer. r=bholley 2014-04-10 14:57:42 -04:00
Boris Zbarsky
0ca109ca20 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