Commit Graph

44 Commits

Author SHA1 Message Date
Boris Zbarsky
0cc3917135 Bug 915368. Give dictionaries copy constructors and assignment operators when it's safe. r=khuey 2013-09-13 13:21:59 -04:00
Ehsan Akhgari
11c7d05ca8 Bug 914621 - #include OwningNonNull.h in BindingDeclarations.h; r=bzbarsky 2013-09-10 18:06:46 +02:00
Nicholas Nethercote
d74157039d Bug 911020 - Introduce js/TypeDecls.h, which holds very commonly used type declarations from the JS engine. r=luke.
--HG--
extra : rebase_source : 008ef689989f93b46627b8be8608bdbc544ca3a2
2013-08-27 19:59:14 -07:00
Nicholas Nethercote
1317c34f0a Bug 909514 (follow-up) - Remove unnecessary |#include "jsapi.h"| from BindingDeclarations.h. r=bz.
--HG--
extra : rebase_source : 10c9aa3cb7cdc0892c5c07d93adfc23a0bec904d
2013-08-28 02:37:08 -07:00
Justin Lebar
4aeeb65d91 Bug 909514 - Include <new> before mozilla::Maybe (and move Maybe into mfbt/Maybe.h). r=waldo
--HG--
rename : mfbt/Util.h => mfbt/Maybe.h
2013-08-27 15:10:28 -07:00
Kyle Huey
bf31d78a83 Bug 903772: Part 3 - Refactor GlobalObject. r=peterv 2013-08-22 22:17:08 -07:00
Ms2ger
4af9d89266 Merge m-c to inbound 2013-08-22 10:38:48 +02:00
Ms2ger
c590a6ce46 Bug 903778 - Move dom::Date into its own files; r=khuey 2013-08-22 08:30:38 +02:00
Nicholas Nethercote
b89a8ac1c0 Bug 905017 (part 1) - Minimize inclusions of JS engine headers in .h and .idl files. r=billm.
--HG--
extra : rebase_source : 984c61ab12f46be0509b1ce0d458d9a6e5841c64
2013-08-17 15:50:18 -07:00
Boris Zbarsky
504726dd7e Bug 901531. Remove the unused RootedJSValue class. r=ms2ger 2013-08-09 22:01:45 -04:00
Boris Zbarsky
3a9063d67a Bug 900898 part 4. Support typed arrays inside sequences and variadics. r=smaug 2013-08-05 13:40:02 -04:00
Boris Zbarsky
508d09f9f8 Bug 883827. Make Optional<NonNull<T>> and Optional<OwningNonNull<T>> nicer to use by having their const Value() method return a T&. r=peterv 2013-06-19 14:48:43 -04:00
Andrea Marchesini
cac6aa669b Bug 841442 - Move HTMLFormElement to WebIDL, r=bz 2013-06-19 10:24:37 -04:00
Andrea Marchesini
939f013b5f Bug 856410 - Implement futures - Part 1: Constructor, webidl, Done(). r=mounir, r=bz 2013-06-11 21:41:21 -04:00
Boris Zbarsky
9f09fecc19 Bug 877281 part 6. Replace ${jsvalPtr} with a MutableHandle ${jsvalHandle}. r=peterv
It's a little unfortunate that we need both ${jsvalHandle} and
${jsvalRef}, but the only other option is to consistently have a
MutableHandle in this code.  If the thing we have to work with is a
Rooted, that means doing JS::MutableHandle<JS::Value>(&myRooted) as
the thing to substitute for ${jsvalHandle}.  Just using "&myRooted"
doesn't work, because things like "&myRooted.set()" or
"&myRooted.address()" fail, even if parenthesized as
"(&myRooted).set()", because &myRooted is actually a Rooted*, not a
MutableHandle.

We could go the JS::MutableHandle<JS::Value>(&myRooted) route if
desired; it would primarily uglify dictionary and sequence to-js
conversions.  With the setup in this patch, ideally it looks pretty
idiomatic except for the use of .set() instead of operator= on Rooted.
2013-06-07 22:45:46 -04:00
Boris Zbarsky
df4472c441 Bug 874154. Make sure we don't end up with uninitialized JSObject* or JS::Value in dictionaries. r=ms2ger 2013-05-21 14:15:30 -04:00
Boris Zbarsky
05015ca6da Bug 868715 part 10. Create specializations of Optional for 'any' and 'object' types so that we can have those look like Optional<Handle<Value> > and Optional<Handle<JSObject*> > respectively. r=peterv,sfink 2013-05-16 12:36:56 -04:00
Boris Zbarsky
acedcb302c Bug 868715 part 7. Add tracing to dictionaries. r=peterv 2013-05-16 12:36:55 -04:00
Boris Zbarsky
6299c3cb16 Bug 868715 part 5. Give all dictionaries a single base class so we can tell when template arguments are dictionaries. r=peterv 2013-05-16 12:36:55 -04:00
Bobby Holley
e77e3c4631 Bug 868637 - Simplify DOM Bindings JSON parsing. r=bz
At this point we could really just hoist the JSAPI call, but it's just
cumbersome enough with all the casts that I don't really want to stick
it in the codegen.
2013-05-07 14:18:03 -07:00
Boris Zbarsky
b8d3b00c5d Bug 865969 part 2. Better rooting in bindings for 'any' arguments. r=smaug 2013-05-03 19:29:07 -04:00
Boris Zbarsky
964948a44a Bug 865969 part 1. Better rooting in bindings for 'object' arguments, as well as for worker interface arguments passed as JSObject*. r=smaug 2013-05-03 19:29:07 -04:00
Boris Zbarsky
7cd15f8898 Bug 742206 part 1. Introduce a simple mozilla::dom::Date for use in WebIDL bindings. r=smaug 2013-05-02 14:38:19 -04:00
Boris Zbarsky
99df5f95ad Bug 865940. Remove AsMutable now that our binding stack variables aren't const. r=bholley 2013-04-25 22:46:18 -04:00
Boris Zbarsky
7041704c76 Bug 861493. When passing arguments to an Xray for a WebIDL constructor, make sure to do the argument unwrapping before entering the content compartment. r=bholley,waldo
There are several changes here:

1) Adds some MutableThis methods to Optional, Nullable, and dictionaries to
   effectively allow doing a const_cast without knowing the actual type being
   templated over.  I needed this because I do not in fact know that type in
   the relevant code.  I'm open to suggestions for a better name for this
   method.
2) Adds some operator& to RootedJSValue to make it look more like a JS::Value,
   and in particular so I can JS_WrapValue the thing in it.
3) Adds a Slot() method to NonNullLazyRootedObject, just like NonNull has.
4) Adds an operator& to LazyRootedObject to make it look more like JSObject* so
   I can JS_WrapObject the thing in it.
5) Implements the actual rewrapping of the arguments into the content compartment.
6) Fixes a small preexisting bug in which we didn't look at named constructors
   in getTypesFromDescriptor (this was causing my tests to not compile).
7) Changes Xrays to not enter the content compartment when calling a WebIDL
   constructor.
8) Adds some friend API to report things as not being functions.
2013-04-25 19:03:05 -04:00
Boris Zbarsky
901d98713c Bug 863898. Add support for dictionary arguments in JS-implemented WebIDL bindings. r=mccr8 2013-04-25 12:29:55 -04:00
Andrea Marchesini
f51b402829 Bug 864747 - Optional<T&> should be able to receive a value in the constructor. r=bz 2013-04-24 08:36:10 -04:00
Olli Pettay
4619ac286d Bug 862987 - Include nsAutoPtr.h in BindingDeclarations.h, r=bz
--HG--
extra : rebase_source : b3059811b16fa5a2bec070176a276ece18178baf
2013-04-17 23:17:44 +03:00
Joshua Cranmer
292c1594b0 Bug 856108 - Port static analyses to clang, part 2b: use MOZ_STACK_CLASS in dom. r=Ms2ger 2013-04-11 22:20:18 -05:00
Boris Zbarsky
79d7391b5b Bug 860473 part 1. Root WebIDL dictionary ParseJSON. r=evilpie, smaug 2013-04-11 14:31:05 -04:00
Boris Zbarsky
9482e7c07a Bug 846972 part 2. Add the WebIDL APIs for StyleSheet and CSSStyleSheet. r=peterv 2013-03-17 10:42:59 -04:00
Jon Coppeard
f85957ecb3 Bug 848395 - GC: Move Rooted to JS namespace - rename js::Rooted to JS::Rooted outside SpiderMonkey r=terrence
--HG--
extra : rebase_source : 35cbf3cc4da4598c2e9e6975028ef397718849db
2013-03-06 16:41:43 +00:00
Ed Morley
0887cddaa0 Backed out changeset 28ef4bdff455 (bug 848395) 2013-03-07 13:03:35 +00:00
Jon Coppeard
19ed4f05c2 Bug 848395 - GC: Move Rooted to JS namespace - rename js::Rooted to JS::Rooted outside SpiderMonkey r=terrence
--HG--
extra : rebase_source : 866879df05e3ec3f8e93570eb3f6b71103636b41
2013-03-06 16:41:43 +00:00
Boris Zbarsky
31abf66ed4 Bug 845666. Add support for sequences containing other sequences (or dictionaries containing sequences) to WebIDL. r=peterv
This keeps simple sequence arguments and variadics using an auto array, while everything else uses a non-auto array.
2013-03-02 01:07:43 -05:00
Boris Zbarsky
b93c5f76e5 Bug 837645. Support 'any' values in sequences and dictionaries. r=smaug,peterv 2013-02-06 14:23:45 +00:00
Boris Zbarsky
6436114c6f Bug 836920 followup. Fix warnins-as-errors bustage. r=tree-is-aflame-dance-around-it 2013-02-06 10:21:50 +00:00
Boris Zbarsky
eb1ea6872b Bug 836920. Move dom::Optional<> and dom::Sequence to BindingDeclarations.h so using dictionaries in interfaces whose name comes before 'PrimitiveConversions' alphabetically does not break. r=peterv
All the code is just moving except the Optional<nsAString>::operator=
that takes a FakeDependentString.  That had to be changed so it has no
dependency on the actual definition of FakeDependentString.
2013-02-06 09:56:15 +00:00
Boris Zbarsky
d96de5c466 Fix comment. Followup for bug 834877. DONTBUILD 2013-01-29 10:31:34 -05:00
Boris Zbarsky
85ef1adf0d Bug 834877 part 1. Add a DOMString struct to use for binding return values. r=peterv 2013-01-29 09:42:14 -05:00
Peter Van der Beken
bfc9de7860 Fix for bug 816088 (webIDL bindings try to extract nsISupports from the global object in static properties in workers). r=bz.
--HG--
extra : rebase_source : 5668d9e01bff0fe7831d98018428856e5940a620
2012-12-03 17:07:49 +01:00
Ed Morley
19dd19ed37 Backout f3c145bd1dd2 & 5075690572a9 for OS X startup failures 2013-01-28 11:08:21 +00:00
Peter Van der Beken
70a2f7c413 Fix for bug 816088 (webIDL bindings try to extract nsISupports from the global object in static properties in workers). r=bz.
--HG--
extra : rebase_source : 68e5630591f6209e2af9c5cd2321fed8edd3de24
2012-12-03 17:07:49 +01:00
Boris Zbarsky
cd2c495c6c Bug 816421. Make Document.visibilityState a WebIDL enum. r=peterv
A lot of the changes here are just so I can actually build after including DocumentBinding.h in nsIDocument.h
2012-12-25 14:00:15 -08:00