Commit Graph

47 Commits

Author SHA1 Message Date
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
Boris Zbarsky
2bed717c4f Bug 748637. Refactor argument conversion to primitive values to make it easier to extend in the future. r=peterv 2012-05-04 12:38:48 -04:00
Boris Zbarsky
25cfe62d86 Bug 747827. Add some structs that can be used to represent typed arrays in DOM bindings. r=peterv 2012-05-04 12:36:56 -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
ed885d50a9 Fix for bug 741367 (Creating second XMLHttpRequest via Components.Constructor throws NS_ERROR_FAILURE): don't overwrite content-defined properties. r=bz.
--HG--
extra : rebase_source : f9c7fe34d4cde28cafea0536e305704e2dc04ff7
2012-04-27 09:57:09 +02:00
Peter Van der Beken
7eb62e9704 Fix for bug 742156 (Stringifying EventTarget throws): implement a toString method for interface objects. r=bz.
--HG--
extra : rebase_source : cd692b5231e4d183e0bbd368965e704ede54661f
2012-05-02 15:28:17 +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
Kyle Huey
e69d4afe08 Sync webidl-parser to m-c to pick up Bug 742141. r=me a=me 2012-05-01 23:23:45 -04:00
Peter Van der Beken
7d387b6e1a Fix for bug 741267 (UserScript's XMLHttpRequest is undefined in 20120401 nightly).
Pass two objects when creating a DOM interface object, the global used to cache
the DOM interface objects and a receiver object on which the named property is
that points to the DOM interface object.

--HG--
extra : rebase_source : b462393e7376fdb68f3b279ccd08b3ab25ac154a
2012-04-23 16:10:56 +02:00
Boris Zbarsky
8037497b41 Bug 747826. Return the value inside a Nullable by reference, not by value, so Nullable around some sort of complex type works sanely. r=peterv 2012-04-26 00:42:37 -04:00
Boris Zbarsky
b12a3e7927 Bug 747819. When wrapping non-prefable objects, don't generate a fallback-to-XPConnect codepath. r=peterv 2012-04-26 00:42:20 -04:00
Boris Zbarsky
e2ed0fe94a Bug 747815. Use const strings for arguments in DOM bindings. r=peterv 2012-04-26 00:42:03 -04:00
Masatoshi Kimura
0452126e19 Bug 744910 - Remove FileException from workers. r=bent 2012-04-24 19:50:00 -04:00
Matt Brubeck
2993d5d45a Back out a0bc511b1d75 (bug 744910) and c85d6a254baa (bug 673752) on suspicion of causing Win debug "make check" hangs 2012-04-24 20:47:13 -07:00
Ehsan Akhgari
a992263c77 Merge mozilla-central into mozilla-inbound 2012-04-24 21:29:44 -04:00
Ehsan Akhgari
06098487ea Merge mozilla-central into birch 2012-04-22 16:10:35 -04:00
Boris Zbarsky
28bff92675 Bug 742197. Make unannotated non-nullable string arguments stringify null and undefined in the webidl bindings. r=peterv 2012-04-18 15:28:01 -04:00
Boris Zbarsky
1bf290b35e Bug 742422. Make DOM prototypes more typeinference-friendly. r=peterv 2012-04-18 12:11:55 -04:00
Boris Zbarsky
a21ade7908 Bug 742425. Remove the extra compartment-entering code we don't need. r=peterv 2012-04-18 12:11:33 -04:00
Boris Zbarsky
b0927ddc59 Bug 742170. Use CGThings in CGCreateInterfaceObjectsMethod more. r=peterv 2012-04-18 12:10:48 -04:00
Boris Zbarsky
e6901a65af Bug 742168. Refer to experimental bindings, not Paris bindings, in the pref code, since it will only control a subset of the Paris bindings. r=peterv 2012-04-18 12:02:04 -04:00
Boris Zbarsky
a804cbf55a Bug 745899. Make it easier to use Nullable for non-primitive types. r=peterv 2012-04-18 12:01:18 -04:00
Ms2ger
1de8ab38d4 Bug 742893 - Part a: Make xpc_qsValueTo{Uint,Int}64 public; r=bholley 2012-04-14 15:07:31 +02:00
Ms2ger
8299fe6b09 Backing out bf0a78471e5e:dc7022e2d807 for inexplicable windows crashes. 2012-04-14 17:52:34 +02:00
Ms2ger
7164d44025 Bug 742893 - Part a: Make xpc_qsValueTo{Uint,Int}64 public; r=bholley 2012-04-14 15:07:31 +02:00
Masatoshi Kimura
7a010701c4 Bug 744910 - Remove FileException from workers. r=bent 2012-04-24 19:50:00 -04:00
Boris Zbarsky
427126be53 Bug 743820. Update to the changes to WebIDL that made interfaces with indexed properties distinguishable from array and sequence. r=khuey
There are two parts to this change:
1)  Sequences and arrays are now distinguishable from all non-callback interfaces.
2)  To handle that change, overload resolution first tries to convert to the exact
    interface, and only if that fails tries to convert things with indexed properties
    to sequences or arrays.
2012-04-13 13:52:21 -04:00
Kyle Huey
4c09299fd0 Bug 741125: Update WebIDL parser. 2012-04-12 15:14:10 -07:00
Boris Zbarsky
271e803092 Bug 742184. Use CGThings for whitespace munging in CGNativeToSupportsMethod. r=peterv 2012-04-10 12:40:12 -04:00
Boris Zbarsky
bd8ddda62a Bug 742200. Use JSVAL_VOID, not JSVAL_NULL, as the default value for optional arguments that are not specified. r=peterv 2012-04-10 12:40:12 -04:00
Boris Zbarsky
0744334b26 Bug 742167. Give extendedAttribute() a better name. r=khuey 2012-04-10 12:40:12 -04:00
Kyle Huey
14ec5a7315 Refix bug 741248. r=me 2012-04-09 13:48:44 -07:00
Takanori MATSUURA
6ba21f9576 Bug 737006 - Use internal ply only if needed. r=khuey 2012-04-06 14:06:52 -04:00
Ehsan Akhgari
b74a7df1cf Merge mozilla-inbound and mozilla-central 2012-04-05 13:41:51 -04:00
Ehsan Akhgari
e130fd8945 Merge the last green PGO changeset from mozilla-inbound to mozilla-central 2012-04-05 13:40:53 -04:00
Boris Zbarsky
2d4ce165e0 Bug 742222. Make sure to JS_WrapValue values being returned for callback types and 'any' types. r=peterv 2012-04-05 13:14:54 -04:00
Kyle Huey
1b361b0c81 Bug 741248: Attempt a fix by twiddling the makefile a bit. r=me 2012-04-04 19:11:30 -07:00
Kyle Huey
64746c0dee Backed out changeset 3a0940f90455 2012-04-04 13:42:12 -07:00
Kyle Huey
4a035a99ee Bug 741125: Update WebIDL parser. 2012-04-04 12:07:28 -07:00
Peter Van der Beken
c2e642fbcc Fix for bug 740069 (Generate JS bindings in C++ with a python script for DOM objects on the main thread and in workers. Infrastructure and new bindings for XMLHttpRequest). Patch by bent/bz/bholley/jst/khuey/peterv, r=bent/bz/bholley/jlebar/khuey/peterv/sicking/smaug.
--HG--
rename : js/xpconnect/tests/mochitest/test_bug462428.html => dom/bindings/test/test_lookupGetter.html
2012-03-30 21:42:20 -07:00
Igor Bukanov
83623b313c Bug 737365 - stop using the cx during finalization, part 1.
This part changes the signatures for various finalization API to take
not JSContext* but rather either JSFreeOp structure or its
library-private counterpart FreeOp. These structures wrap parameters
that are passed to the finalizers removing most of explicit dependencies
on JSContext in the finalization code.
2012-03-19 15:34:55 +01:00
Tom Schuster
fef9c89dba Bug 711843 - Update JSAPI for typed arrays, remove uses of jstypedarray.h outside the engine [r=Waldo,bz,Ms2ger,bholley,bjacob,philikon,evilpie,bent,yourmama] [a=mfinkle thanks to gkw] 2012-01-14 09:43:00 -08:00