Граф коммитов

1570 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 2299a42041 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
Peter Van der Beken 31c0322ee9 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 285863ca2d 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 4399ca73fe Bug 747815. Use const strings for arguments in DOM bindings. r=peterv 2012-04-26 00:42:03 -04:00
Ehsan Akhgari 313c5f8453 Merge mozilla-central into birch 2012-04-22 16:10:35 -04:00
Boris Zbarsky 0f61aa61e2 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 bcae5f47e3 Bug 742425. Remove the extra compartment-entering code we don't need. r=peterv 2012-04-18 12:11:33 -04:00
Boris Zbarsky 396f480085 Bug 742170. Use CGThings in CGCreateInterfaceObjectsMethod more. r=peterv 2012-04-18 12:10:48 -04:00
Boris Zbarsky 1c8d9735f3 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
Ms2ger 1e6a07f994 Bug 742893 - Part a: Make xpc_qsValueTo{Uint,Int}64 public; r=bholley 2012-04-14 15:07:31 +02:00
Ms2ger 77ca860259 Backing out bf0a78471e5e:dc7022e2d807 for inexplicable windows crashes. 2012-04-14 17:52:34 +02:00
Ms2ger 2242d1961b Bug 742893 - Part a: Make xpc_qsValueTo{Uint,Int}64 public; r=bholley 2012-04-14 15:07:31 +02:00
Boris Zbarsky 5863d6acd1 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
Boris Zbarsky 2cec71abc7 Bug 742184. Use CGThings for whitespace munging in CGNativeToSupportsMethod. r=peterv 2012-04-10 12:40:12 -04:00
Boris Zbarsky 75ca9b355f 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 f56e7860e0 Bug 742167. Give extendedAttribute() a better name. r=khuey 2012-04-10 12:40:12 -04:00
Boris Zbarsky 949747f4f6 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
Igor Bukanov 2d04a4fe3d 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
Peter Van der Beken ed510d3506 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
Tom Schuster 886fac49f9 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