Commit Graph

43 Commits

Author SHA1 Message Date
Ms2ger
e1e44bb6f1 Bug 774705 - Part b: Throw a TypeError when trying to construct an interface without a constructor; r=bz 2012-08-04 09:44:00 +02:00
Ed Morley
bba173e66e Revert inbound to 3d5d1daa2505 to stop OS X M5 failures (backout not clean/could have been a bad merge) on a CLOSED TREE 2012-08-04 18:05:15 +01:00
Ms2ger
5363dc0480 Bug 774705 - Part b: Throw a TypeError when trying to construct an interface without a constructor; r=bz 2012-08-04 09:44:00 +02:00
Boris Zbarsky
fc2f5cd147 Bug 771636 part 3. Implement default values for WebIDL strings. r=peterv 2012-07-31 00:22:23 -04:00
Peter Van der Beken
d5f4fcc033 Fix for bug 774775 (XRayWrapper does not handle new bindings constants) - refactor code. r=bz.
--HG--
extra : rebase_source : 317d5942dde4427384320cb334f794f7fef37a2e
2012-07-18 13:52:07 +02:00
Ed Morley
ab4a6323cd Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-07-18 13:32:24 +01:00
Ms2ger
2be7de56d2 Bug 765464 - Part c: Throw some TypeErrors; r=khuey 2012-07-18 12:36:08 +02:00
Boris Zbarsky
2be6401141 Bug 773519 followup to make this code deal with silly string consumers too. No review. 2012-07-17 13:20:40 -04:00
Boris Zbarsky
92f87e5c2f Bug 773519. Speed up string argument conversion in DOM bindings by faking an XPCOM string. r=peterv 2012-07-17 12:18:53 -04:00
Ed Morley
8a2ea81bc5 Backout 9deb8edb5070 (bug 773519), ea5a243a60f1 & 0cad1e553bea (bug 768537) for compilation failures 2012-07-17 17:48:11 +01:00
Boris Zbarsky
27e9cc02ef Bug 773519. Speed up string argument conversion in DOM bindings by faking an XPCOM string. r=peterv 2012-07-17 12:18:53 -04:00
Peter Van der Beken
2d6a797659 Fix for bug 762652 (Add the new DOM bindings API to CanvasRenderingContext2D). r=bz. 2012-06-13 17:14:15 +02:00
Matt Brubeck
ae0a175ce7 Back out 438c192e561b and d6f341e77b68 (bug 762652, bug 762654) on suspicion of breaking Windows PGO tests 2012-06-27 16:24:53 -07:00
Peter Van der Beken
74a0543703 Fix for bug 762652 (Add the new DOM bindings API to CanvasRenderingContext2D). r=bz.
--HG--
extra : rebase_source : 8e7a2722aa1fb089baa6c1aa8604dcd0e91c1ff2
2012-06-13 17:14:15 +02:00
Peter Van der Beken
7efab19797 Fix for bug 756258 (Support union types in new DOM bindings). r=bz.
--HG--
extra : rebase_source : 5352801a4eb5085f73a5b6e78aa238c5c9d44179
2012-05-18 23:25:47 +02:00
Ms2ger
52f62c5641 Bug 765704 - Don't throw when setting XHR.responseType to an invalid value; r=bz 2012-06-21 09:11:07 +02:00
Peter Van der Beken
6a7e8ec5a9 Fix for bug 762651 (Add wrappercache to CanvasRenderingContext2D). r=bz. 2012-06-04 21:41:51 +02:00
Bill McCloskey
d6dbf66c3f Bug 765034 - Fix unusual DOM proto array case (r=bz) 2012-06-18 17:04:38 -07:00
Boris Zbarsky
5e2f09ce01 Bug 750297 part 1. Add support for objects that do not have a wrapper cache in WebIDL bindings. r=peterv 2012-06-15 16:25:50 -04:00
Peter Van der Beken
bb67cfb710 Fix for bug 760131 (Quickstub argument unwrapping fails for security-wrapped list proxy and paris binding objects). r=bz.
--HG--
extra : rebase_source : 945d58f3b73f25f05528e6c6d69745215cb4793a
2012-06-01 18:24:52 +02:00
Benoit Jacob
9b17fd0210 Bug 763604 - Use typename for type parameters of template template parameters in BindingUtil.h - r=bz 2012-06-12 17:19:52 -04:00
Boris Zbarsky
cc973eeeb9 Bug 742153 part 3. Implement codegen for dictionary arguments. r=peterv
Another implementation option would be to put all the dictionaries in a single
file and have a static global set of ids which works across all dictionaries
and is initialized once at startup or so.  That would also handle cross-file
dictionary inheritance better.

One problem that remains is the fake descriptor business.  At the moment this
does not allow interface types inside dictionaries.  We could probably work
around this by either refactoring code to make it possible to get the declType
independently of the actual conversion template (whether because it lives in a
separate function or because the conversion template generator knows to just
return an empty string when the fake descriptor provirder is passed) or by
figuring out a way to pass an actual descriptor provider to dictionary codegen.
2012-06-12 10:22:05 -04:00
Boris Zbarsky
bc4e7c1e12 Bug 761707 followup. Restore an assert that should not have gone away. r=ms2ger 2012-06-08 17:42:51 -04:00
Boris Zbarsky
b4e6056558 Bug 761707 part 2. Drop the vestigial jsclass argument to UnwrapDOMObject. r=bholley 2012-06-06 15:59:46 -04:00
Boris Zbarsky
1cf783e451 Bug 761707 part 1. Rip out the various infrastructure for allowing different slot indices on different DOMJSClass instances. r=bholley 2012-06-06 15:59:46 -04:00
Boris Zbarsky
f4767d734a Bug 743906 part 2. Use Optional<> for optional arguments that don't have default values. r=peterv 2012-05-29 23:45:18 -04:00
Boris Zbarsky
c678f9e315 Bug 755636 part 2. Add some tests (not exhaustive!) for sequence codegen and fix the bugs they uncover. r=peterv 2012-05-25 01:08:26 -04:00
Boris Zbarsky
52a20a9207 Bug 755636 part 1. Convert sequence argument codegen to dom::Sequence. r=peterv 2012-05-25 01:08:22 -04:00
Boris Zbarsky
1e84000e3b Bug 753522. Add support for controlling the existence of methods, properties, interface constants, etc with a pref. r=peterv 2012-05-23 12:44:48 -04:00
Peter Van der Beken
edd0f71b9b Fix for bug 756257 (Replace xpc_qsDOMString with a conversion function in new DOM bindings). r=bz.
--HG--
extra : rebase_source : 3f5ac89f72fade970f9f3505b93e51ac44ee7525
2012-05-18 23:25:46 +02:00
Ms2ger
5623a92079 Bug 754968 - Part c: Make BindingUtils.h not require private xpconnect headers; r=bholley 2012-05-18 10:29:40 +02:00
Boris Zbarsky
2e5443afcb Bug 748267 part 2. Implement codegen for dealing with sequence arguments. r=peterv 2012-05-15 14:23:29 -04:00
Boris Zbarsky
47ff20f5dc Bug 748267 part 1. Refactor js-to-native conversion to make it not assume it's only happening on stack arguments. r=peterv
The changes in CastableObjectUnwrapper and CallbackObjectUnwrapper are
basically reindentation.  Similar for the actual conversion changes for all the
non-interface types, though for those the actual declaration of the thing being
converted to has moved out, since we may not be converting onto the stack.
2012-05-15 14:23:29 -04:00
Boris Zbarsky
414c2659a1 Bug 753518. Add an explicit way for GetParentObject to return an (nsISupports*,nsWrapperCache*) pair. r=peterv 2012-05-10 15:24:59 -04:00
David Rajchenbach-Teller
50cef29c5b Bug 739740 - Export libc constants to JS. r=khuey 2012-05-09 12:00:48 +02:00
Boris Zbarsky
90b5c814e8 Bug 749485. Switch new DOM bindings to using a struct for keeping track of failures for fallible methods. r=peterv,bent
ErrorResult is in a separate header file so it can be included from all over the
place without having to pull in mozilla/dom/Utils.h and all the xpconnect gunk
that needs.
2012-05-05 21:15:11 -04:00
Phil Ringnalda
ce8665a6aa Back out 1907bf7e6d7c (bug 749485) for build bustage 2012-05-05 20:33:59 -07:00
Boris Zbarsky
1833a29c14 Bug 749485. Switch new DOM bindings to using a struct for keeping track of failures for fallible methods. r=peterv,bent
ErrorResult is in a separate header file so it can be included from all over the
place without having to pull in mozilla/dom/Utils.h and all the xpconnect gunk
that needs.
2012-05-05 21:15:11 -04:00
Ryan VanderMeulen
270738f819 Back out b5fd22efe23d (bug 739740) due to bustage. r=TryFTW 2012-05-03 18:51:14 -04:00
David Rajchenbach-Teller
256ca5f4b1 Bug 739740 - Export libc constants to JS. r=khuey,glandium 2012-04-30 12:14:38 +02:00
Peter Van der Beken
25970d2711 Fix for bug 744772 (Trace the DOM interface object array). r=bz.
--HG--
extra : rebase_source : c9f27bed0eab0e6db03295050176ef986cf0b59b
2012-05-02 14:49:43 +02:00
Boris Zbarsky
577419e736 Bug 748983. Fix the instanceof behavior for new bindings in situations where we don't need a custom hasInstance hook. r=peterv 2012-05-03 00:35:38 -04:00
Boris Zbarsky
32c7f6e634 Bug 742217. Reduce the use of nested namespaces in our binding code. r=peterv,bent
In the new setup, all per-interface DOM binding files are exported into
mozilla/dom.  General files not specific to an interface are also exported into
mozilla/dom.

In terms of namespaces, most things now live in mozilla::dom.  Each interface
Foo that has generated code has a mozilla::dom::FooBinding namespace for said
generated code (and possibly a mozilla::bindings::FooBinding_workers if there's
separate codegen for workers).

IDL enums are a bit weird: since the name of the enum and the names of its
entries all end up in the same namespace, we still generate a C++ namespace
with the name of the IDL enum type with "Values" appended to it, with a
::valuelist inside for the actual C++ enum.  We then typedef
EnumFooValues::valuelist to EnumFoo.  That makes it a bit more difficult to
refer to the values, but means that values from different enums don't collide
with each other.

The enums with the proto and constructor IDs in them now live under the
mozilla::dom::prototypes and mozilla::dom::constructors namespaces respectively.
Again, this lets us deal sanely with the whole "enum value names are flattened
into the namespace the enum is in" deal.

The main benefit of this setup (and the reason "Binding" got appended to the
per-interface namespaces) is that this way "using mozilla::dom" should Just
Work for consumers and still allow C++ code to sanely use the IDL interface
names for concrete classes, which is fairly desirable.

--HG--
rename : dom/bindings/Utils.cpp => dom/bindings/BindingUtils.cpp
rename : dom/bindings/Utils.h => dom/bindings/BindingUtils.h
2012-05-03 00:35:38 -04:00