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

1570 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 38276f8d99 Bug 766583 part 3. Stop declaring nullable things as const on the stack in bindings code. r=smaug 2013-04-25 19:03:06 -04:00
Boris Zbarsky 158db47252 Bug 766583 part 2. Stop declaring sequences as const on the stack in bindings code. r=smaug 2013-04-25 19:03:06 -04:00
Boris Zbarsky eb318bbb88 Bug 766583 part 1. Stop declaring dictionaries as const on the stack in bindings code. r=smaug 2013-04-25 19:03:06 -04:00
Boris Zbarsky 1ffcf1ad91 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
Andrew McCreight dcaa7d2183 Bug 865544 - Add support for nsIDOMGlobalPropertyInitializer to JS-implemented WebIDL. r=bz 2013-04-25 14:31:42 -07:00
Boris Zbarsky 92c3c727a2 Bug 863898. Add support for dictionary arguments in JS-implemented WebIDL bindings. r=mccr8 2013-04-25 12:29:55 -04:00
Boris Zbarsky 1f2af992c7 Bug 864727 part 7. Make the WebIDL binding Wrap methods take a handle for the scope object and use a Rooted for the parent. r=ms2ger 2013-04-25 12:29:55 -04:00
Boris Zbarsky b834439797 Bug 864727 part 5. Make all the WrapObject methods take a handle for the scope object. r=ms2ger 2013-04-25 12:29:54 -04:00
Boris Zbarsky 47de9d3ebe Bug 864727 part 4. Pass a handle for the scope object to all the various Wrap*Object stuff in BindingUtils. r=ms2ger
Note: The JS::Rooted in CGWrapWithCacheMethod is just there until we start passing a handle to Wrap().
2013-04-25 12:29:53 -04:00
Boris Zbarsky 73485c55dd Bug 864727 part 3. Pass a handle for the parent object to WebIDL dictionary ToObject. r=ms2ger 2013-04-25 12:29:53 -04:00
Boris Zbarsky 395cf489d9 Bug 864727 part 2. Pass a handle for the scope object to union conversions. r=ms2ger,terrence 2013-04-25 12:29:52 -04:00
Andrew McCreight 14a0aa1894 Bug 863880 - Take a less ad hoc approach to forward declarations in bindings generation. r=bz 2013-04-25 08:42:43 -07:00
Andrew McCreight ab223cc59f Bug 863964 - clean up forward class declarations in codegen. r=bz 2013-04-25 08:42:43 -07:00
Boris Zbarsky f760939bec Bug 731746 part 4. When wrapping a JS-implemented webidl object, define the new object as a property on the implementing object. r=mccr8 2013-04-24 22:44:28 -04:00
Boris Zbarsky 45135ea107 Bug 731746 part 3. Change JS-implemented webidl codegen to always invoke the parent constructor if there is a parent interface. r=mccr8 2013-04-24 22:44:28 -04:00
Boris Zbarsky 529764fe78 Bug 731746 part 2. Change JS-implemented webidl codegen to pass an nsPIDOMWindow, not an nsISupports, to the object constructor. r=mccr8 2013-04-24 22:44:27 -04:00
Boris Zbarsky 4672697c11 Bug 862629 part 2. Remove the now-unused scope object bit in js-to-native conversions. r=peterv 2013-04-24 14:59:15 -04:00
Boris Zbarsky f3f44cfa74 Bug 862629 part 1. Stop playing compartment games with WebIDL callbacks and just use the given object as-is. r=peterv 2013-04-24 14:59:15 -04:00
Boris Zbarsky d7b1013b15 Bug 843264. Allow returning sequences of non-primitive types from callback methods. r=mccr8 2013-04-24 14:59:14 -04:00
Boris Zbarsky d9ed7658f1 Bug 864535. Drop some comments from WebIDL proxy [[Delete]] implementations, since the spec has changed. r=waldo 2013-04-24 14:59:14 -04:00
Olli Pettay 0ba15d837e Bug 856338 - Using sequence<foo>? as an argument type crashes when passing non-null value, p=Ms2ger+smaug,r=bz
--HG--
extra : rebase_source : fb54e52db051584333c9430b0b000ee052e5b2d7
2013-04-23 02:49:49 +03:00
Peter Van der Beken bfcf81990d Bug 852094 - Support Unforgeable on proxy-based DOM bindings. r=bz. 2012-12-20 10:56:11 +01:00
Boris Zbarsky 2693eed75f Bug 863386. Add support for nullable enum arguments and return values. r=mccr8
This incidentally fixes bug 843355
2013-04-19 23:04:19 -04:00
David Zbarsky fcdb506b78 Bug 857439 Part 3: Make sure to delete owned interfaces if wrapping fails r=bz 2013-04-19 04:49:21 -04:00
David Zbarsky 70c70c7290 Bug 857439 Part 2: Cleanup example codegen a bit r=bz 2013-04-19 04:49:21 -04:00
David Zbarsky 4352afa5a1 Bug 857439 Part 1: Disallow owned interfaces from having parents or children r=bz 2013-04-19 04:49:21 -04:00
David Zbarsky 935d63e47c Bug 857439 Part 0: Allow creators to return raw pointers for owned objects r=bz 2013-04-19 04:49:20 -04:00
Olli Pettay e086f4c1c6 Bug 863094 - Infinity/-Infinity/NaN defaults for unrestricted types, r=bz
--HG--
extra : rebase_source : c2495008be9b084656222e6a0773c72d5224e9cc
2013-04-18 19:58:01 +03:00
Boris Zbarsky 5508e4bd90 Bug 862610. When we have named constructors, make sure we managed to set up an interface object before looking for them. r=peterv 2013-04-18 01:21:46 -04:00
Olli Pettay 238dddc9f6 Bug 862991 - If dictionary member needs cx, so should dictionary itself, r=bz
--HG--
extra : rebase_source : a495d79df021e896d3b7695a7d11da8d52559c28
2013-04-17 23:40:54 +03:00
Jeff Walden 763718651b Bug 858677 - Fix up code not built by SpiderMonkey to use the newly-changed deletion signatures. r=bholley, r=billm 2013-04-05 21:22:55 -07:00
Boris Zbarsky b261dcddc5 Bug 861064. Root WebIDL dictionary Init. r=smaug,terrence 2013-04-12 23:34:22 -04:00
Reuben Morais 7fe9a1d13e Bug 861032 - Fix -Wreinterpret-base-class warning on Codegen.py. r=bz
--HG--
extra : rebase_source : c05d51d8aeed182b85333a347f0b1dfb5d6b1ef9
2013-04-11 19:29:50 -07:00
Jacek Szpot a38774d086 Bug 854503 - Rename JS unwrapping functions. r=bholley 2013-04-11 11:50:18 -07:00
Boris Zbarsky a364a66c5b Bug 860551. Fix instanceof for prototype-less interface objects to be saner. r=dzbarsky 2013-04-11 14:31:06 -04:00
Boris Zbarsky 4351dd0aa6 Bug 860473 part 2. Root WebIDL dictionary ToObject. r=evilpie,smaug 2013-04-11 14:31:06 -04:00
Boris Zbarsky 3987fa669a Bug 860473 part 1. Root WebIDL dictionary ParseJSON. r=evilpie, smaug 2013-04-11 14:31:05 -04:00
Boris Zbarsky 19bcd12b01 Bug 857417. Trigger a fatal assertion when wrapping a wrappercached and nsISupports WebIDL object which has the wrapper cache before the nsISupports in its object layout. r=khuey 2013-04-08 17:04:21 -04:00
Ehsan Akhgari dd2b8fecee Backed out changeset d0d75e76d41f (bug 857417) for crashes during tests 2013-04-08 18:48:38 -04:00
Boris Zbarsky 147a9ec190 Bug 857417. Trigger a fatal assertion when wrapping a wrappercached and nsISupports WebIDL object which has the wrapper cache before the nsISupports in its object layout. r=khuey 2013-04-08 17:04:21 -04:00
Boris Zbarsky 0fb62d62f7 Bug 688691. Warn when LenientThis actually causes us to not throw. r=ms2ger 2013-04-08 17:04:21 -04:00
Ryan VanderMeulen 4df26dd5ac Backed out changeset a85d21e394c0 (bug 854503) for bustage. 2013-04-06 14:37:33 -04:00
Jacek Szpot ab74228011 Bug 854503 - Rename JS unwrapping functions. r=bholley 2013-04-04 12:14:32 +02:00
Nathan Froyd 2a3d90721f Bug 857254 - add CGTemplatedType and use it everywhere; r=bz 2013-04-02 15:29:03 -04:00
Nathan Froyd 5db1cc6540 Bug 857254 - use CGIfWrapper more consistently; r=bz 2013-04-02 15:09:16 -04:00
Boris Zbarsky 33622efb8b Bug 856819 part 2. Sort js-implemented interfaces in a given file so that the declarations in C++ come in the right order. r=mccr8 2013-04-03 22:22:16 -04:00
Boris Zbarsky 7879480d35 Bug 856819 part 1. Refactor the dependency-sorting we do for dictionaries so that we can also use it for JS-implemented interfaces. r=mccr8 2013-04-03 22:22:16 -04:00
Boris Zbarsky b6f5bb741b Bug 856841. Don't pass in an implicit JSContext based on argument or return value types for JS-implemented interfaces. r=mccr8 2013-04-03 22:22:16 -04:00
Boris Zbarsky 48d68f9676 Bug 852219 part 6. Handle cases when the C++ class we want to actually inherit from is not the one that the WebIDL interface is mapped to. r=mccr8 2013-04-03 22:22:16 -04:00
Boris Zbarsky 94f45fb924 Bug 852219 part 4. Fix forward-declarations and includes for JS-implemented interfaces. r=mccr8 2013-04-03 22:22:15 -04:00
Boris Zbarsky 793e37ca3f Bug 852219 part 3. Handle JS-implemented interfaces having a parent interface. r=mccr8 2013-04-03 22:22:15 -04:00
Boris Zbarsky d21bd00b48 Bug 852219 part 2. Add an infallible constructor for CallbackObjects which are already in the right compartment and use this to simplify construction of the autogenerated implementation of a JS-implemented WebIDL binding. r=mccr8 2013-04-03 22:22:15 -04:00
Boris Zbarsky 38246c449e Bug 852219 part 1. Don't mark JS-implemented interfaces with descendant interfaces as final. r=khuey,mccr8 2013-04-03 22:22:15 -04:00
Boris Zbarsky 142568ca7e Bug 854532. Make _asInstance codegen always produce code in the same order. r=khuey
Also fixes whitespace in _hasInstance and makes sure the .pp files are always in the same order
2013-04-03 22:22:14 -04:00
Boris Zbarsky 203cd29378 Bug 855582 part 2. Make the bindings' various spec arrays const, and make the jitinfo structs static. r=khuey 2013-04-02 20:20:38 -04:00
Boris Zbarsky 60943bc7bb Bug 856215. Fix conversion of sequences of sequences to JS to not screw up its indexing. r=khuey 2013-04-02 20:20:38 -04:00
Boris Zbarsky f9be62fa75 Bug 841429. Fix callback codegen for optional arguments with default values. r=mccr8
The change to enum wrapping is just to fix an indentation bug I ran into while reading the generated code for some of these test methods.
2013-04-01 17:17:17 -04:00
Boris Zbarsky 6020a94656 Bug 855025. Always do Xrays for DOM interface objects. r=peterv 2013-03-27 22:47:25 -04:00
Boris Zbarsky 57ca2ed5ab Bug 851162. Make the auto-generated WrapObject in JS-implemented WebIDL codegen MOZ_OVERRIDE. r=mccr8 2013-03-26 11:31:54 -04:00
Terrence Cole a7eafe32dc Bug 841059 - Do not use the ArenaHeader for getAllocKind on JSObject; r=billm 2013-02-14 14:51:07 -08:00
Tom Schuster a1663a0e87 Bug 828462 - Root Proxy/Wrapper in the browser. r=terrence,bz 2013-03-21 23:23:48 +01:00
Tom Schuster 787f786f96 Bug 828462 - Root Proxy/Wrapper delete. r=terrence 2013-03-21 23:23:48 +01:00
Tom Schuster b6725433ce Bug 828462 - Root Proxy/Wrapper getOwnPropertyNames and keys. r=terrence 2013-03-21 23:23:47 +01:00
Tom Schuster aaa3687e9b Bug 828462 - Root Proxy/Wrapper defineProperty. r=terrence 2013-03-21 23:23:47 +01:00
Tom Schuster 950e87f7e8 Bug 828462 - Root Proxy/Wrapper get(Own)PropertyDescriptor. r=terrence 2013-03-21 23:23:47 +01:00
David Zbarsky 455f0cd757 [Bug 852843] SVGZoomAndPan interface object not being instantiated r=bz 2013-03-21 01:33:56 -04:00
Ralph Giles 9ece62c4ba Bug 852350 - Support [Pref] decorator on interfaces. r=bz
Generate a check calling Preferences::GetBool() directly
from the binding's PrefEnabled so the wrapped class doesn't
need to implement it.

This allows defining the preference directly in webidl.

Assumes only one preference value is set. Also removes pointless
override methods which just call the superclass.
---
 dom/bindings/Codegen.py | 37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

Generate a check calling Preferences::GetBool() directly
from the binding's PrefEnabled so the wrapped class doesn't
need to implement it.

This allows defining the preference directly in webidl.

Assumes only one preference value is set. Also removes pointless
override methods which just call the superclass.
---
 dom/bindings/Codegen.py | 37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)
2013-03-20 11:18:00 -07:00
Boris Zbarsky a804a3767b Bug 848386 part 1. Don't preserve our wrapper until we have one so unforgeable property setup won't try to preserve it. r=peterv 2013-03-20 12:22:26 -04:00
Boris Zbarsky d0b977f25f Bug 851584. Don't generate a Length() on our C++ example class to handle our indexed getter if we already have a 'length' attribute in the WebIDL. r=jst 2013-03-19 21:47:47 -04:00
Ryan VanderMeulen 4de0c7f60e Merge m-c to inbound. 2013-03-19 18:01:10 -04:00
Peter Van der Beken 9843ac8fc6 Fix for bug 850847 (Fix dictionary in generated example for workers). r=bz.
--HG--
extra : rebase_source : 75117320f23b5af82eb0ee7648c3e0dd876fe19e
2012-12-17 15:32:10 +01:00
Peter Van der Beken 5db19d4269 Bug 812617 - Provide a JSBindingFinalized hook for the native classes using Web IDL bindings to know when their JS wrapper has been finalized; r=bzbarsky
--HG--
extra : rebase_source : bb5059a170f3c2f4aa977190fceea421b41b5e58
2013-03-17 21:47:12 -04:00
David Zbarsky d4058ab34c Bug 850958 - Implement instanceof without relying on nsIDOM interfaces r=bz 2013-03-18 19:14:39 -04:00
Andrew McCreight b605a583db Bug 827486, part 6 - generate headers and code for JS implemented WebIDL classes. r=bz 2013-03-18 16:05:51 -07:00
Andrew McCreight 45987003c3 Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-18 16:05:38 -07:00
Andrew McCreight 931c15530b Bug 827486, part 4: copy parts of example generator to JS impl generator. r=bz 2013-03-18 16:05:23 -07:00
Andrew McCreight 585f8be54d Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-18 16:05:06 -07:00
Andrew McCreight 80a04eadae Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-18 16:04:46 -07:00
Kyle Huey 5a7ceaeb53 Back out Bug 827486 for PGO bustage. CLOSED TREE 2013-03-18 13:00:00 -07:00
Andrew McCreight b6112c1005 Bug 827486, part 6 - generate headers and code for JS implemented WebIDL classes. r=bz 2013-03-18 10:19:42 -07:00
Andrew McCreight f84f3b2688 Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-18 10:19:42 -07:00
Andrew McCreight d93d2f6cc8 Bug 827486, part 4: copy parts of example generator to JS impl generator. r=bz 2013-03-18 10:19:41 -07:00
Andrew McCreight a810b1c341 Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-18 10:19:41 -07:00
Andrew McCreight d97d8b5610 Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-18 10:19:41 -07:00
Phil Ringnalda 8d356d6b0e Back out 2ea5f267af77:218356c595fc (bug 827486) for Windows builds dying with an obscure "MemoryError"
CLOSED TREE
2013-03-17 16:40:54 -07:00
Andrew McCreight 046b780f2e Bug 827486, part 6 - generate headers and code for JS implemented WebIDL classes. r=bz 2013-03-17 09:56:13 -07:00
Andrew McCreight 182c832b0b Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-17 09:56:05 -07:00
Andrew McCreight 3fcbfc94da Bug 827486, part 4: copy parts of example generator to JS impl generator. r=bz 2013-03-17 09:55:55 -07:00
Andrew McCreight 0e5992d000 Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-17 09:55:42 -07:00
Andrew McCreight 3193b58d5e Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-17 09:55:29 -07:00
Phil Ringnalda e9aaf10590 Back out f408dd29944c:db5c280d1907 (bug 827486) for probably having needed a clobber
CLOSED TREE
2013-03-16 18:16:37 -07:00
Andrew McCreight 4ed2fd027f Bug 827486, part 6 - generate headers and code for JS implemented WebIDL classes. r=bz 2013-03-16 16:22:23 -07:00
Andrew McCreight 0c7cb96db4 Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-16 16:22:22 -07:00
Andrew McCreight f4a6a8f0f7 Bug 827486, part 4: copy parts of example generator to JS impl generator. r=bz 2013-03-16 16:22:22 -07:00
Andrew McCreight 8ae5c0b2fe Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-16 16:22:22 -07:00
Andrew McCreight cb69938131 Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-16 16:22:22 -07:00
Boris Zbarsky 4d57b7da94 Bug 849307. When generating code for a WebIDL dictionary with interface members, include the relevant headers for those interfaces in the binding header file, not just the binding implementation file. r=peterv
An alternative would be using out-of-line constructors and destructors for such dictionaries.
2013-03-14 15:42:59 -04:00
David Zbarsky 2eed062df0 Bug 842201 - SVGUnitTypes interface object is not being instantiated r=bz 2013-03-13 14:07:49 -04:00
Masatoshi Kimura 23ba391ec1 Bug 848339 - Remove the vestigial boolean outparam from nsWrapperCache::WrapObject. r=bz 2013-03-12 08:03:47 +09:00
Jon Coppeard a0a3f88913 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 3a53c22824 Backed out changeset 28ef4bdff455 (bug 848395) 2013-03-07 13:03:35 +00:00
Jon Coppeard 57f723252d Bug 841801 - Allow proxies to be finalized in the background r=billm
--HG--
extra : rebase_source : 48da96daddf75f505bf90c8e2ce2cdd6daf04cc5
2013-02-21 10:19:17 +00:00
Jon Coppeard 6a98a4532a 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
Masatoshi Kimura 0b2426e59c Bug 841289 - Remove prefable option from WebIDL codegen. r=bz 2013-03-06 07:09:38 +09:00
Boris Zbarsky 5fa6e7d0ec Bug 827158 part 9. Implement support for having a NewResolve hook in WebIDL. r=peterv 2013-03-04 14:08:24 -05:00
Boris Zbarsky ed13d9dc98 Bug 827158 part 8. Implement legacycaller support in WebIDL. r=peterv 2013-03-04 14:08:24 -05:00
Johnny Stenback 703f4bdd82 Fixing bug 852435. Make the bindings example generator use the native type name. r=bz 2013-03-16 01:39:56 -07:00
Andrew McCreight 368d40c518 Bug 846955 - Codegen Argument definitions using .define() in ClassDestructor::define. r=bz 2013-03-01 16:32:24 -08:00
Boris Zbarsky 6149d2c515 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
Peter Van der Beken 025766cbf0 Fix for bug 842799 (|Document.prototype instanceof Node| inside <script> returns false). r=bz. 2013-02-22 10:25:24 +01:00
Boris Zbarsky 3988338337 Bug 843261. Add support for sequence<DOMString> arguments in WebIDL callbacks. r=peterv
This does allow people to accidentally hit the slower path through use
of non-const strings, but I think that's OK now that we're mostly
autogenerating this stuff
2013-02-28 12:56:41 -05:00
Ryan VanderMeulen c952e87e03 Backed out 7 changesets (bug 832920, bug 776536, bug 843261) for mochitest-a11y assertions on a CLOSED TREE.
--HG--
rename : content/base/src/NodeIterator.cpp => content/base/src/nsNodeIterator.cpp
rename : content/base/src/NodeIterator.h => content/base/src/nsNodeIterator.h
rename : content/base/src/TreeWalker.cpp => content/base/src/nsTreeWalker.cpp
rename : content/base/src/TreeWalker.h => content/base/src/nsTreeWalker.h
2013-02-28 14:41:30 -05:00
Boris Zbarsky 1e89bd52ab Bug 843261. Add support for sequence<DOMString> arguments in WebIDL callbacks. r=peterv
This does allow people to accidentally hit the slower path through use
of non-const strings, but I think that's OK now that we're mostly
autogenerating this stuff
2013-02-28 12:56:41 -05:00
Boris Zbarsky 0bc630a626 Bug 838686 part 2. Use NodeFilterHolder in treewalker and nodeiterator and start using WebIDL codegen for NodeFilter. r=peterv 2013-02-26 15:10:15 -05:00
Boris Zbarsky da7352fc49 Back out changeset 1c851a5bbc9f (bug 838686) because it depends on a changeset gcc doesn't like 2013-02-26 15:34:25 -05:00
Boris Zbarsky 247b3cc18a Bug 838686 part 2. Use NodeFilterHolder in treewalker and nodeiterator and start using WebIDL codegen for NodeFilter. r=peterv 2013-02-26 15:10:15 -05:00
Peter Van der Beken 07afde82fb Fix for bug 844559 (Crash [@ mozilla::dom::XrayResolveNativeProperty]). r=bz.
--HG--
extra : rebase_source : 85b3d0ee270f24847b9425cda9f8b56a494f2546
2013-02-25 20:39:15 +01:00
Kyle Huey 2c8d7046c5 Bug 784812: Implement real dependencies for WebIDL bindings. r=bz,ted 2013-02-24 12:36:44 -08:00
Phil Ringnalda cd3ba96b65 Back out cd8481cc4a32 (bug 784812) for make check failures 2013-02-24 14:10:48 -08:00
Kyle Huey 63884b088c Bug 784812: Implement real dependencies for WebIDL bindings. r=bz,ted CLOSED TREE 2013-02-24 12:36:44 -08:00
Kyle Huey 41104cbff1 Backed out changeset a71766c2c85d 2013-02-24 12:33:36 -08:00
Kyle Huey 75d88ff353 Bug 784812: Implement real dependencies for WebIDL bindings. r=bz,ted 2013-02-24 12:03:03 -08:00
Boris Zbarsky beb08b6c9d Bug 842561. Assert that our inheritance chain is correct for WebIDL objects. r=peterv
We could drop the descriptor for Text if we changed nsIDocument::CreateTextNode
to return an already_AddRefed<Text>, but then we'd need more casting in
nsDocument.cpp for the XPCOM CreateTextNode.  Not sure which way is better,
really.
2013-02-22 09:56:29 -05:00
Ryan VanderMeulen b30facb288 Backed out 6 changesets (bug 832920, bug 825341, bug 838582, bug 842726, bug 629801, bug 842561) for Linux32 debug mochitest-2 and Windows/OSX mochitest-browser-chrome failures on a CLOSED TREE. 2013-02-22 15:30:06 -05:00
Boris Zbarsky 725363bffa Bug 842561. Assert that our inheritance chain is correct for WebIDL objects. r=peterv
We could drop the descriptor for Text if we changed nsIDocument::CreateTextNode
to return an already_AddRefed<Text>, but then we'd need more casting in
nsDocument.cpp for the XPCOM CreateTextNode.  Not sure which way is better,
really.
2013-02-22 09:56:29 -05:00
Peter Van der Beken b17c86c836 Fix for bug 825628 (Implement NamedConstructor) - add codegen support for NamedConstructor. r=bz.
--HG--
extra : rebase_source : 8393995dca6f65cb49512874c1916ee745436638
2013-01-22 11:51:15 +01:00
Boris Zbarsky e55647f4f1 Bug 838691 part 3. Switch touch event handler attributes to using a function to check whether they're enabled. r=peterv 2013-02-19 11:54:41 -05:00
Boris Zbarsky 75ae65a1d1 Bug 838691 part 2. Add codegen support for calling a function to determine whether a property should be exposed in a WebIDL binding. r=peterv 2013-02-19 11:54:40 -05:00
Boris Zbarsky e6e9097009 Bug 838691 part 1. Add support in Prefable for calling a function to determine whether a property should be exposed in a WebIDL binding. r=peterv 2013-02-19 11:54:40 -05:00
Boris Zbarsky 0ae0788482 Bug 839088 part 3. Add a way for callers of callback methods to ask for any exceptions from the callback to be rethrown on the ErrorResult. r=peterv 2013-02-19 11:54:40 -05:00
Boris Zbarsky 624e0560d5 Bug 839088 part 2. Add way to indicate to a CallSetup that it should propagate any exceptions thrown during the call out to the ErrorResult for the call. r=peterv 2013-02-19 11:54:40 -05:00
Boris Zbarsky ea45d30665 Bug 839088 part 1. Add a way to throw a JS::Value on an ErrorResult. r=peterv 2013-02-19 11:54:40 -05:00
Boris Zbarsky 83a7dcbda5 Bug 841404. Make sure that we treat dictionaries inside sequence and array members of a dictionary as dependencies for it. r=peterv 2013-02-17 11:22:11 -05:00
Peter Van der Beken 6ac60724ce Fix for bug 838269 (Support cross-global |... instanceof DOMInterface|). r=bz.
--HG--
extra : rebase_source : e5ad1d7da8029394e3ecb38909eca406a675dbe9
2013-01-08 19:05:36 +01:00
Boris Zbarsky 2c2153865c Bug 836850. Allow a single C++ class to implement multiple WebIDL interfaces. r=peterv
--HG--
rename : content/html/content/test/test_li_attributes_reflection.html => content/html/content/test/test_dl_attributes_reflection.html
rename : content/html/content/test/test_li_attributes_reflection.html => content/html/content/test/test_ul_attributes_reflection.html
2013-02-08 12:20:11 +00:00
Peter Van der Beken ce4e224f4b Fix for bug 838228 (toString on an Xray for an interface object should stringify like Function.prototype.toString). r=bz.
--HG--
rename : content/html/content/test/test_map_attributes_reflection.html => content/html/content/test/test_ol_attributes_reflection.html
extra : rebase_source : 9bd7efb927e4eac96569ed629ee230dbf555fb63
2013-02-01 15:33:58 +01:00
Boris Zbarsky c68a618b49 Bug 837645. Support 'any' values in sequences and dictionaries. r=smaug,peterv 2013-02-06 14:23:45 +00:00
Boris Zbarsky 82c6f6b490 Bug 830992 part 2. Switch DOMTransaction to WebIDL codegen. r=wchen,peterv 2013-02-06 09:42:33 +00:00
Robert O'Callahan 67fcb56293 Bug 832788. Part 5: Add suffixes for large integer literals. r=bz
--HG--
extra : rebase_source : 9555960acea609a3e4a3deaacd468e64435f5ff2
2013-01-30 18:20:53 +13:00
Boris Zbarsky afda50b640 Bug 835417 part 2. Implement WebIDL parser and codegen support for marking things pure. r=peterv 2013-01-29 17:53:53 -05:00
Boris Zbarsky c2a3b9aca3 Bug 834877 part 2. Start using DOMString as the return value for strings. r=peterv 2013-01-29 09:42:14 -05:00
Boris Zbarsky fe29b143cd Bug 829252 part 3. When wrapping things with an nsISupports in XPCWrappedJS for WebIDL callback interfaces, use the aggregated version. r=peterv 2013-01-29 08:44:01 -05:00
Boris Zbarsky c6638a677b Bug 830099. Flag WebIDL dictionaries and callbacks with some information indicating whether we need main-thread and worker codegen for them and then use that information to skip unneccessary codegen. r=peterv 2013-01-28 23:30:17 -05:00
Phil Ringnalda 426c47cdf0 Back out c5238879470f and b3cabb259af7 (bug 830099) for bustage 2013-01-28 22:36:59 -08:00
Boris Zbarsky 719c7bf030 Bug 830099. Flag WebIDL dictionaries and callbacks with some information indicating whether we need main-thread and worker codegen for them and then use that information to skip unneccessary codegen. r=peterv 2013-01-28 23:30:17 -05:00
Boris Zbarsky 8ccc3897f4 Bug 795896. Speed up UnwrapProxy, since we know what we have there is either an Xray or our proxy. r=peterv 2013-01-28 23:29:25 -05:00
Ehsan Akhgari 6146dcbc98 Backed out changeset 19b9f064d8eb (bug 795896) because of build bustage 2013-01-28 23:51:11 -05:00
Ehsan Akhgari 728d7beaad Backed out changeset 32786d29daf8 (bug 830099) because of build bustage 2013-01-28 23:51:03 -05:00
Boris Zbarsky f5b233966e Bug 830099. Flag WebIDL dictionaries and callbacks with some information indicating whether we need main-thread and worker codegen for them and then use that information to skip unneccessary codegen. r=peterv 2013-01-28 23:30:17 -05:00
Boris Zbarsky 22e57505d0 Bug 795896. Speed up UnwrapProxy, since we know what we have there is either an Xray or our proxy. r=peterv 2013-01-28 23:29:25 -05:00
Peter Van der Beken c553f8a73e 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
Boris Zbarsky 2234eada00 Bug 822470 part 7. Use new callback codegen for conversion to and from JS. r=peterv
NodeFilter, EventListener, and DOMTransaction will be updated to use the new codegen once we've fixed the consumers.
2013-01-28 08:34:31 -05:00
Boris Zbarsky a836dfc369 Bug 822470 part 6. Hook up callback interface codegen. r=peterv 2013-01-28 08:34:30 -05:00
Boris Zbarsky a6ee53ef28 Bug 822470 part 5. Refactor callback codegen so it can be reused for callback interfaces too. r=peterv 2013-01-28 08:34:30 -05:00
Boris Zbarsky c4cfde47b5 Bug 822470 part 3. Include headers as needed for callback interfaces. r=peterv 2013-01-28 08:34:30 -05:00
Boris Zbarsky 4d02c18a08 Bug 822470 part 1. Factor out the code that callback functions and callback interfaces will be able to share into a CallbackObject class. r=peterv
--HG--
rename : dom/bindings/CallbackFunction.cpp => dom/bindings/CallbackObject.cpp
rename : dom/bindings/CallbackFunction.h => dom/bindings/CallbackObject.h
2013-01-28 08:34:29 -05:00
Ed Morley 9474e07ea6 Backout f3c145bd1dd2 & 5075690572a9 for OS X startup failures 2013-01-28 11:08:21 +00:00
Peter Van der Beken 6b094e2955 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
Steve Fink 9effec722d Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence 2012-12-31 12:40:21 -08:00
Steve Fink d8da3e7b9a Backed out changeset fce4e0f8a553 (bug 828753) for breaking windows warnings-as-errors (stop adding JSObject forward decls, please!) 2013-01-18 13:20:21 -08:00
Steve Fink 0dee2fb42d Bug 828753 - jsid rooting, mostly in jsinfer.*. Also switch JSObject from struct to class. r=terrence
--HG--
extra : rebase_source : c8806b27677594925ad0e6b54c47af5cf17e1153
2012-12-31 12:40:21 -08:00
Boris Zbarsky e1197ccff3 Bug 830614. Wrapping a wrappercached WebIDL object should watch out for reentry via WrapNativeParent. r=peterv 2013-01-15 14:04:24 -05:00
Mats Palmgren b7ae90666d Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan 2013-01-15 13:22:03 +01:00
Ehsan Akhgari 9eeab1abce Bug 828000 - Don't generate the `isNull' local variable if it's not needed; r=bzbarsky 2013-01-08 16:29:52 -05:00
Jeff Walden a127013839 Bug 826447 - Change all the proxy API signatures to take unsigned flags, rather than bool set, so that it's easier to find all tests of JSRESOLVE_ASSIGNING. r=bz
--HG--
extra : rebase_source : 3b88b411965087984d7973a90f8fa1b06457a6ce
2013-01-03 15:31:36 -06:00
Boris Zbarsky 8bd1686555 Bug 824823 part 7. Implement WebIDL CharacterData API on nsGenericDOMDataNode. r=peterv 2013-01-04 12:02:14 -05:00
Boris Zbarsky 4d733dc0e1 Bug 820665 part 3. WebIDL spec updates to changes in how callback interfaces work. r=khuey
Specifically, any object that's not a Date or RegExp can implement a callback interface.
2013-01-03 14:03:11 -05:00
Boris Zbarsky 248f730e6a Bug 820665 part 2. WebIDL spec updates to changes in how callback functions work. r=khuey
Specifically, all callables can be converted to a callback, including
in overload resolution and union conversions.  We already did this for
normal callback arguments, but not the overload/union case.
2013-01-03 14:03:06 -05:00
Boris Zbarsky 20d4a061d6 Bug 820665 part 1. More WebIDL spec updates to changes in how dictionaries work. r=khuey
Specifically, the following changes:

1) A union that includes a dictionary and is the last non-optional
   argument must actually be marked optional, just like a dictionary
   argument.
2) Disallow a union from containing both a nullable type and a dictionary.
3) Now all non-Date and non-RegExp objects can be used as dictionaries,
   including from overload resolution and union conversion.

We don't support dictionaries inside unions yet, or unions as
distinguishing args, so the spec changes to do with converting null to
dictionaries inside a union or picking the union overload if there is
a union containing a dictionary and null is the distinguishing arg
value are not relevant to us so far.
2013-01-03 14:03:00 -05:00
Boris Zbarsky 1c97d54111 Bug 818050. Teach the JIT about DOM method and getter return types so that it doesn't have to type-guard when unboxing the boxed value in many cases. r=jandem,peterv 2013-01-03 14:02:52 -05:00
Boris Zbarsky 7edf1854ef Bug 821177. [TreatNonCallableAsNull] should only affect attribute setters. r=khuey 2013-01-02 22:03:25 -05:00
Boris Zbarsky eabd327329 Bug 819845. Update WebIDL bindings to spec change: sequences/arrays are no longer distinguishable from dictionaries, and conversion to a sequence works on arbitrary objects. r=khuey 2013-01-02 22:03:25 -05:00
Masatoshi Kimura b27f3c82dc Bug 824247 - Part 2: Fix common source of warning span (dom/bindings). r=khuey 2013-01-03 00:55:55 +09:00
Boris Zbarsky 4bebfa7b67 Bug 824824. Add support for passing multiple touches as arguments to createTouchList. r=mbrubeck,peterv 2012-12-31 10:37:22 -08:00
Boris Zbarsky 6378ed05fd Bug 825025. MaybeWrapValue should work with all gcthings. r=peterv 2012-12-29 22:13:26 -08:00
Jeff Walden c4fadd1981 Bug 823283 - Remove all remaining uses of JSRESOLVE_QUALIFIED, and the few remaining tests (which were pretty much purely diagnostic). r=luke
--HG--
extra : rebase_source : 51e2ac7ccc76be84d12600baeb6d458c2927bea7
2012-09-15 11:19:55 -07:00
Boris Zbarsky a3b4bd9774 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
Ms2ger 8dd150af35 Merge PGO-green changeset from inbound to m-c. 2012-12-22 12:06:37 +01:00
Ms2ger 1e109fdaab Bug 823088 - Add a static assertion that bindings with descriptor.nativeOwnership == 'nsisupports' inherit from nsISupports; r=bz 2012-12-22 09:18:11 +01:00
Ms2ger f11ed9361b Bug 793151 - Change the length property of a WebIDL method to the mimimum number of arguments, instead of the maximum; r=bz 2012-12-22 09:04:17 +01:00
Peter Van der Beken 893e85fa56 Fix for bug 820577 (Support reparenting for new DOM binding objects). r=bholley/bz.
--HG--
extra : rebase_source : 66dad56b8f543790ffa7e595ccd684c4673403df
2012-09-26 16:17:46 +02:00
Jeff Walden fd8f198826 Bug 822350 - Make generated bindings include mozilla/FloatingPoint.h directly if they use it. r=bz
--HG--
extra : rebase_source : 7271aea09f40dee8d418ddd17c8f43559262a0d2
2012-12-17 17:21:26 -05:00
William Chen a5b66f6cc6 Bug 820957 - Support object members in WebIDL dictionary. r=bz 2012-12-17 13:44:13 -08:00
William Chen c3b4bdb077 Bug 820544 - Prefix WebIDL dictionary native member names to avoid C++ keywords. r=bz 2012-12-17 13:44:04 -08:00
Peter Van der Beken 6f6a341ee2 Fix for bug 815149 (Add support for SOWs and XBL bindings in new DOM bindings). r=bz.
--HG--
extra : rebase_source : c24544fd3d1c99651e279e687a07a02c5b994323
2012-09-12 22:29:30 +02:00
Boris Zbarsky 0c1ffdfca7 Bug 821760. Properly handle compartments in WebIDL static operation bindings. r=peterv 2012-12-14 14:11:23 -05:00
Boris Zbarsky 916ce462a6 Bug 819904. Throw from WebIDL setters called with no arguments, per spec change. r=peterv 2012-12-14 14:10:49 -05:00
Boris Zbarsky a1a7cade04 Bug 816375. Switch NodeFilter to WebIDL bindings. r=peterv 2012-12-14 14:10:49 -05:00
Ed Morley fbf6fab8e8 Backout 67d84be0cc83 (bug 820544) for bustage 2012-12-14 16:58:51 +00:00
William Chen 45b4ea581a Bug 820544 - Prefix webidl dictionary native members names to avoid C++ keywords. r=bz 2012-12-11 16:05:46 -08:00
Boris Zbarsky aad442ab75 Bug 820862. JSJitInfo should say what sort of function it is. r=jandem 2012-12-13 17:08:43 -05:00
Nathan Froyd 548f77a633 Bug 821317 - reduce the size of DOMClass.mInterfaceChain to something reasonable; r=bz 2012-12-13 11:01:00 -05:00
Nathan Froyd a25af0c2e0 Bug 821324 - actually return a success value from replaceFileIfChanged; r=bz 2012-12-13 11:26:33 -05:00
Boris Zbarsky d4de9b2c67 Bug 815502. Implement support for variadic arguments in WebIDL. r=peterv 2012-12-11 17:50:56 -05:00
Peter Van der Beken ea0c0a9788 Fix for bug 818219 (Replace HTMLElement quickstubs with new binding methods). r=bz.
--HG--
rename : layout/reftests/backgrounds/background-referrer-ref.html => image/test/reftest/generic/accept-image-catchall-ref.html
rename : layout/reftests/backgrounds/background-referrer.html => image/test/reftest/generic/accept-image-catchall.html
rename : layout/reftests/backgrounds/background-referrer.sjs => image/test/reftest/generic/check-header.sjs
rename : layout/reftests/backgrounds/background-referrer-image.png => image/test/reftest/generic/green.png
rename : toolkit/components/places/tests/browser/browser_favicon_setAndFetchFaviconForPage.js => toolkit/components/places/tests/favicons/test_setAndFetchFaviconForPage.js
extra : rebase_source : 45715d6abe3155a6bcd1d21e5cc3f7b048180eb6
2012-11-26 15:19:02 +01:00
Boris Zbarsky f490c53f7d Bug 815803. Now that JSSLOT_PROXY_PRIVATE == 0, simplify binding code that had to deal with different slot indices on proxy and non-proxy objects. r=peterv 2012-12-06 15:21:19 -05:00
Boris Zbarsky 90caf3e264 Bug 816376. Create vanilla objects for the interface object of callback interfaces. r=peterv 2012-12-06 15:21:18 -05:00
Peter Van der Beken e484d3351f Fix for bug 818219 (Replace HTMLElement quickstubs with new binding methods) - Add a constructor to callbacks to allow conversion between callback types. r=bz.
--HG--
extra : rebase_source : 6c55316f374ef1654f0b77b782500fc52a78881a
2012-12-06 11:41:14 +01:00
Peter Van der Beken 5d8ad95b2d Fix for bug 818219 (Replace HTMLElement quickstubs with new binding methods) - Remove hardcoded interface list in workers. r=bz.
--HG--
extra : rebase_source : 87b106b79f8e5912f10a603e407da1c93be4ed5d
2012-12-06 11:41:14 +01:00
Peter Van der Beken aeb1d53352 Fix for bug 818219 (Replace HTMLElement quickstubs with new binding methods) - Support castable types in unions. r=bz.
--HG--
extra : rebase_source : 633d2b350be0cf11ac0bb010a0ad427b10863ef4
2012-12-06 11:41:14 +01:00
Boris Zbarsky 8a1132df5e Bug 816160. Don't require 'castable':False for prefable bindings with hasXPConnectImpls, and don't require hasXPConnectImpls bindings to be prefable. r=peterv 2012-12-03 11:46:03 -05:00
Ms2ger 910e6a92cd Merge m-c to m-i. 2012-12-02 11:32:57 +01:00
Ms2ger 90dc2a2c97 Bug 802163 - Fix pyflakes warnings in bindings python; r=peterv 2012-12-02 09:59:08 +01:00
Masatoshi Kimura ede8ebce3e Bug 816487 - Allow all ASCII characters for WebIDL enum. r=bz 2012-12-01 21:23:26 -05:00
Benoit Jacob b7633de200 Bug 816187 - make WebIDL accept nullable dictionary retvals; let getContextAttributes's retval be nullable - r=bz 2012-11-30 18:30:05 -05:00
Boris Zbarsky 5eab6d42fb Bug 812783. Add support for flagging callbacks as worker-only. r=khuey 2012-11-29 11:14:40 -05:00
Eric Faust c4df170bbd Bug 747289 - Part 1/2 - Update Paris bindings to expose DOM constants. r=bz 2012-11-28 16:28:36 -05:00
Boris Zbarsky 864866eb21 Fix up indentation of the generated code for event handler return values. No bug. 2012-11-28 02:33:50 -05:00
Boris Zbarsky 127a0152d5 Bug 767933 part 4. Make 'float' and 'double' types throw on non-finite values. r=khuey,ehsan,bas 2012-11-27 15:32:05 -05:00
Boris Zbarsky 4edad4b6bf Bug 767933 part 2. Implement codegen for 'unrestricted float' and 'unrestricted double', as aliases for float and double for now. r=khuey 2012-11-27 15:32:05 -05:00
Boris Zbarsky e248bf75cd Bug 812742. Fix sequence codegen to not do AppendElement multiple times by accident. r=peterv 2012-11-27 15:20:40 -05:00
Boris Zbarsky a8de827765 Bug 810641. Implement support for variadic callback arguments in WebIDL. r=peterv 2012-11-26 21:14:45 -05:00
Boris Zbarsky 9cfc646682 Bug 813623. Fix Xrays to actually work correctly for static methods and properties. r=peterv 2012-11-26 21:14:45 -05:00
Peter Van der Beken dd5db5a970 Fix for bug 814022 (Make instanceof for new DOM bindings work across scopes). r=bz. 2012-11-19 11:59:13 +01:00
Daniel Holbert 10928a1716 Bug 811057: Make DeferredFinalizeFunction take a uint32 instead of an int32 as its "slice" parameter. r=peterv 2012-11-21 10:20:32 -08:00
Bobby Holley 7c36e30523 Bug 800915 - Remove the cx parameter and simplify various APIs. r=sfink,bz
If callers want to throw, it's now their responsibility.
2012-11-14 09:56:26 -08:00
Boris Zbarsky 2f3202994d Bug 810520. Correctly handle static methods and attributes in the NativeProperties structs that Xrays use. r=peterv
Note that at this point we actaully do Xrays for all of our various
property types, except in worker code.  The real substantive change
here is the change to what usedForXrays returns.  The rest is minor
cleanup.
2012-11-13 00:26:55 -08:00
Ryan VanderMeulen 5f0fd7aeda Backed out de9fff3a523, c567df2244f5, 8e3d976d5dc5, and c7499faaec23 (bug 800915) for bustage.
--HG--
extra : rebase_source : c823063bfa31d59d32b3402bd4b458b84b703cd5
2012-11-12 21:43:39 -05:00
Bobby Holley 2e39ac86be Bug 800915 - Remove the cx parameter and simplify various APIs. r=sfink,bz
If callers want to throw, it's now their responsibility.
2012-11-12 17:35:32 -08:00
Andrew McCreight 1826aafc95 Bug 792090 - Ignore unused result in CGProxy...PresenceChecker. r=bz 2012-11-12 14:21:46 -08:00
Boris Zbarsky dd34c2210e Bug 809260. Example codegen should include ErrorResult.h in the header. r=mccr8 2012-11-09 08:24:32 -08:00
Boris Zbarsky b1b218160a Bug 808698. Set up example codegen for proxy bindings to work correctly. r=jst 2012-11-09 08:24:32 -08:00
Boris Zbarsky 8d6ac8d253 Bug 796983 followup to address peterv's comments. r=presumably-peterv 2012-11-09 08:24:32 -08:00
Boris Zbarsky 7ef67e09cd Bug 807224 followup to address review comments. r=presumably-peterv 2012-11-09 08:24:31 -08:00
Boris Zbarsky a6d1aea15e Bug 807226 part 8. Remove the exceptions for EventHandler in WebIDL codegen. r=smaug 2012-11-09 08:00:25 -08:00
Boris Zbarsky 529460c9c6 Bug 807224. Implement native-to-JS conversion for WebIDL unions. r=peterv 2012-11-09 07:59:33 -08:00
Boris Zbarsky 969b8c6b33 Bug 779048 followup. Add a comment that explains why the assert about exceptionCode being default when invalidEnumValueFatal is false is an ok thing to assert. r=peterv, DONTBUILD 2012-11-09 07:58:33 -08:00
Boris Zbarsky d8fee95886 Bug 779048 part 10. Start using the new callback codegen in argument and return value conversion. r=peterv,smaug 2012-11-09 07:43:58 -08:00
Boris Zbarsky c2e7420950 Bug 779048 part 9. Give JS-to-native conversion an object pointer to work with so it can convert callback objects. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky 272331140d Bug 779048 part 8. Handling of arguments for callbacks. r=peterv
Note that we're now using the array object as the "obj" when wrapping
sequence members, because we don't have an 'obj' around in our
code... and every single existing sequence-of-interfaces consumer
relied on there being an 'obj' floating about.

Also note that I needed to rearrange the various wrapping helpers so
that we can wrap things that are hanging out in const smartpointers or
in const OwningNonNull or in plain object references.
2012-11-09 07:43:58 -08:00
Boris Zbarsky a4a4a10299 Bug 779048 part 7. Make native-to-JS conversion support doing something other than "return false" on JS exceptions. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky 1649f6c386 Bug 779048 part 6. Handling of return values for callbacks. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky 4779ff59ef Bug 779048 part 5. Make js-to-native conversion support doing something other than "return false" on JS exceptions. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky 7752f218bb Bug 779048 part 4. Implement basic codegen for callbacks, without handling of arguments or return values yet. r=peterv 2012-11-09 07:43:57 -08:00
Boris Zbarsky a04350646a Bug 779048 part 3. Refactor the code we use for generating example declarations a bit so we can reuse it for callbacks. r=peterv 2012-11-09 07:43:57 -08:00
Boris Zbarsky c238a8e902 Bug 779048 part 2. Rearrange how we do our includes and forward-declares to actually work with callbacks and dictionaries sanely. r=peterv 2012-11-09 07:43:57 -08:00
Boris Zbarsky f16bb7b8a1 Bug 808991. Named getters should get called for indexed properties on objects that don't support indexed properties. r=peterv 2012-11-08 23:48:42 -08:00
Robert O'Callahan ab861f5738 Bug 792675. Part 1: Make the URL interface use WebIDL. r=bz
--HG--
extra : rebase_source : dbb7a3158b71446930400ad523a2896b6306de40
2012-09-25 15:24:43 +12:00
Robert O'Callahan 9a6a3bf063 Bug 792675. Part 0.6: Handle empty dictionary types in WebIDL bindings. r=bz
--HG--
extra : rebase_source : a38a2405d32b76bdef9095398c759346cfc28282
2012-11-07 17:56:55 -05:00
Robert O'Callahan fbac0e8161 Bug 792765. Part 0.5: Fix WebIDL codegen to avoid emitting QueryInterface when there is no interface prototype object. r=bz
--HG--
extra : rebase_source : 7e1df198548d8a4f1b2f2a045f637412a5fe8450
2012-09-25 15:24:43 +12:00
Boris Zbarsky 84f0ae1e42 Bug 804738 part 2. Fix codegen for indexed operations to be consistent about the naming of the index argument. r=peterv 2012-11-06 08:01:49 -08:00
Boris Zbarsky f7a97d85d7 Bug 804738 part 1. Fix codegen for named operations to be consistent about the naming of the string argument. r=peterv 2012-11-06 08:00:57 -08:00
Boris Zbarsky f74ea18279 Bug 804635. Make codegen deal with Document not being an external interface but not available in workers even though XMLHttpRequest (which can return or accept Document) is available there. r=peterv 2012-11-05 11:58:04 -05:00
Boris Zbarsky 2f46bbb1cd Bug 803519. Require indexed/named getters if we have creators/deleters/setters. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky 750dec5380 Bug 772869. Make getOwnPropertyNames work correctly for WebIDL proxy bindings. r=peterv,ms2ger 2012-11-05 11:58:03 -05:00
Boris Zbarsky 8038e06ced Bug 803306. Calling a named creator should not define an expando. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky b93a1ba901 Bug 788225. Implement WebIDL deleters. r=peterv 2012-11-05 11:58:02 -05:00
Boris Zbarsky a5b199957d Bug 749866 part 4. Generate slightly better code when we know we're null or undefined. r=khuey 2012-11-05 11:58:02 -05:00
Boris Zbarsky 5efe42ad3d Bug 749866 part 3. Rejigger overload resolution a bit more so we can tell argument conversion that we know the argument is null or undefined. r=khuey 2012-11-05 11:58:02 -05:00
Boris Zbarsky e3d33d83c4 Bug 749866 part 2. Simplify the code generated by overload resolution a bit when we have sequences or dates at our distinguishing index. r=khuey 2012-11-05 11:58:02 -05:00
Boris Zbarsky 677b9b7b1a Bug 749866 part 1. Add support for failureCode for sequence unwrapping. r=khuey 2012-11-05 11:58:02 -05:00
William Chen 4b7833d1f9 Bug 807034 - Fix WebIDL codegen for static readonly attributes. r=bz 2012-10-30 11:38:58 -07:00
Vendelin Ruzicka 661a8ea230 Bug 806184 - Can't use 'delete' method in WebIDL. r=bz 2012-10-31 13:36:20 +01:00
Peter Van der Beken 80ecd8538f Fix for bug 763643 (Implement static operations and attributes for WebIDL). r=bz.
--HG--
extra : rebase_source : d9dd5450af5d2b1f3e7e3a738ec2efdc7f7053da
2012-10-19 09:34:28 +02:00
Peter Van der Beken 669602b5e0 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript). r=bz.
Switch from using the interface objects from the Xrays compartment to wrapping
interface objects and interface prototype objects in Xrays. Make dom binding
Xrays deal with both instance objects and interface and interface prototype
objects.
2012-10-09 20:50:27 +02:00
Peter Van der Beken 2412de3249 Fix for bug 785277 (Implement PutForwards in the new DOM bindings). r=bz.
--HG--
extra : rebase_source : 5153ebab17a9637946d0f0c322997c0c3d118190
2012-08-13 14:20:49 +02:00
Peter Van der Beken 2d58c35ce6 Fix for bug 778152 (Content window does not have an XMLHttpRequest property when accessed via an Xray wrapper in a subscript) - rename ProtoOrIfaceArray. r=bz.
--HG--
extra : rebase_source : c426270fc1ebee818629bd94dfc8d11af59bfc00
2012-10-09 20:50:27 +02:00
Bobby Holley 2afd934910 Bug 797821 - Address Ms2ger's review comments. r=me 2012-10-25 17:01:09 +02:00
Bobby Holley 0cdf333aaa Bug 797821 - Replace usage of XPCWrappedNativeScope::FindInJSObjectScope(ccx, obj) with GetObjectScope(obj). r=mrbkap 2012-10-25 17:01:08 +02:00
Boris Zbarsky b129ae95fc Bug 804725. Use the right type name for interface arguments for binding example codegen. r=jst 2012-10-24 16:10:49 -04:00
Boris Zbarsky fbeee7dfd0 Bug 793267. Add support for [Unforgeable] in WebIDL. r=peterv
Unforgeable attributes are defined directly on the object, not on the
prototype.  So we keep them in a separate spec array and define them
during object creation as needed.

This means that we have to pass that separate spec array to the Xray
helpers, unfortunately, which somewhat complicates those.
2012-10-24 16:10:49 -04:00
Boris Zbarsky a1676d115c Bug 798187 even more followup. Disable broken WebGL test, and update to Peter's review comments. r=peterv 2012-10-22 15:14:30 -04:00
Boris Zbarsky 45679a6c81 Bug 798187 followup. Actually return our newly-created object from dictionary ToObject. r=peterv 2012-10-22 14:35:08 -04:00
Boris Zbarsky 2a8465582e Bug 798187 part 1. Add support for dictionary return values. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky e435c28e4e Bug 798151. Support stringifier operations (but not yet attributes!) on non-proxy bindings, and fix Object.prototype.toString for proxy bindings. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky 800cb6581d Bug 801712 part 3. Make object return values faster by only doing the JS_WrapValue if needed. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky 6fc1e2797b Bug 802636. Add a test that makes sure that codegen and example generation agree with each other. r=jst 2012-10-17 21:17:16 -04:00
Boris Zbarsky dd82a0d964 Bug 796983 part 2. Add a way to generate an example class declaration for a given WebIDL interface. r=jst
We mark constructors as static in the parser because they are.  This
allows us to just use the isStatic() for the IDLMember to mark our
declarations static.

To generate an example interface implementation, just "make
interfacename-example" in $objdir/dom/bindings.  This will place files
called interfacename-example.h and interfacename-example.cpp in that
directory.  For example, "make XMLHttpRequest-example" will get you
$objdir/dom/bindings/XMLHttpRequest-example.h and
$objdir/dom/bindings/XMLHttpRequest-example.cpp.

Attribute getters currently default to const methods, while setters
and operations default to non-const methods.

--HG--
rename : dom/bindings/BindingGen.py => dom/bindings/ExampleGen.py
2012-10-17 17:01:55 -04:00
Boris Zbarsky 0d788a841d Bug 796983 part 1. Switch nullable primitives to using a const Nullable. r=jst 2012-10-17 17:01:55 -04:00
Ehsan Akhgari 75ecc91244 Merge mozilla-central into mozilla-inbound 2012-10-16 20:43:47 -04:00
Olli Pettay dd922cba69 Bug 797806 - Helper method to handle stringified JSON in C++, part2, r=khuey 2012-10-16 18:37:44 +03:00
Olli Pettay 39ef9c4b1c Bug 797806 - Helper method to handle stringified JSON in C++, r=khuey 2012-10-16 17:52:10 +03:00
Peter Van der Beken 7964385bcb Fix for bug 798264 (Split property tables). r=bz.
--HG--
extra : rebase_source : 71456ae48d3d3e6014e8095837f7942cfe733a37
2012-10-09 20:50:05 +02:00
Peter Van der Beken b981fdd138 Fix for bug 799465 (Add complete support for non-nsISupports objects in new DOM bindings) - fix CC traversal and wrapper preservation. r=bz.
--HG--
rename : dom/tests/mochitest/chrome/file_bug800817.xul => dom/tests/mochitest/chrome/file_bug799299.xul
rename : dom/tests/mochitest/chrome/test_bug800817.xul => dom/tests/mochitest/chrome/test_bug799299.xul
extra : rebase_source : bed68ffa15fe5933994c33fbd94ad2b597b5b1b9
2012-09-26 20:12:15 +02:00
Trevor Saunders 85dfb659cf Bug 742191 - Part d: Throw TypeErrors for Paris binding exceptions; r=bz 2012-10-16 14:06:10 -04:00
Boris Zbarsky e743742df1 Bug 792890. Fix JS-wrapping of callback interfaces to just return the underlying JS object. r=peterv
There are several changes here:

1) When wrapping a callback interface object for JS, just extract the
   underlying JSObject from inside it and hand that object out.

2) Flag callback interface descriptors as "not concrete" (only matters
   for cases when they have constants on the interface object) and not
   wrappercached (will catch bugs if someone tries to treat them as a
   Gecko object).

3) Fix a preexisting bug in sequence wrapping where we'd try to
   JS_DefineElement twice if we were wrapping a null value for a
   sequence of nullable interface objects.
2012-10-10 15:57:57 -04:00
Boris Zbarsky 7f28e933c6 Bug 792137. [TreatNonCallableAsNull] lives on the callback type now. r=peterv 2012-10-10 15:53:02 -04:00
Bobby Holley 3dee0ce8e2 Bug 761695 - Implement expando traps for ProxyXrayTraits DOMXrayTraits. r=peterv
For new DOM proxies, we could probably use the Xray expando machinery for the
regular expando object as well, and free up one of the reserved slots. That's
more than I want to bite off for the moment, though.

I also decided not to block on bug 760095 and just kick the problem of globals
with new binding down the road a little bit.
2012-10-05 18:59:23 +02:00
Peter Van der Beken 6cf9f896da Fix for bug 791774 (Hook DOM lists up to the new DOM bindings). r=bz.
--HG--
extra : rebase_source : 873020edd9cd3defc932d77bd26b5d65ebf263cb
2012-06-13 17:18:30 +02:00
Peter Van der Beken 2a69cd7f71 Fix for bug 794959 (Use the right cast in GetAs* functions of union types in new DOM bindings). r=bz.
--HG--
extra : rebase_source : 051181aa319edd386679119846fd61c574957b54
2012-09-26 16:17:46 +02:00
Peter Van der Beken 96b3ddd3e3 Fix for bug 791347 (Support non-nsISupports refcounted natives and non-refcounted natives in new DOM bindings). r=bz/smaug.
--HG--
extra : rebase_source : cd6d98461d7fa3a07fa1361b4d840448122b6655
2012-09-19 15:02:37 +02:00
Terrence Cole 3eda1202a1 Bug 791322 - Move Rooted to js:: namespace; r=billm
These should not be part of the public API.

--HG--
extra : rebase_source : 00a69ee54f06e3f557cd9ec2f3b059df10aa32df
2012-09-24 18:08:22 -07:00
Bill McCloskey c53e57f4b2 Bug 787856 - Convert JS_GetPrototype to support lazy protos (r=bhackett) 2012-09-03 16:42:17 -07:00
Bill McCloskey 1f195f679b Bug 787856 - Convert js::GetObjectProto to support lazy protos (r=bhackett) 2012-09-03 16:42:10 -07:00
Kyle Huey 5e093ffe72 Bug 793025: Convert FileReaderSync to WebIDL bindings. r=bz 2012-09-20 19:47:47 -07:00
Boris Zbarsky 90c9f1e64d Bug 790975. Support sequences as dictionary members in WebIDL. r=peterv 2012-09-18 23:24:27 -04:00
Peter Van der Beken 925c413cca Fix for bug 791345 (Support non-wrappercached objects in proxy-based bindings). r=bz.
--HG--
extra : rebase_source : 884073cf7dccc2e9d1fa1769b00d5ee581d22573
2012-09-17 11:44:59 +02:00
Peter Van der Beken f3ef69a188 Fix for bug 768684 (Fix sequence<any> return type in WebIDL). r=bz.
--HG--
extra : rebase_source : acbd2ce77f62146e9bd7fc285a8042073ed95722
2012-06-13 17:15:05 +02:00
Boris Zbarsky 0334fe32b0 Bug 790273. Add support for [LenientThis] in WebIDL. r=peterv 2012-09-12 17:24:58 +01:00
Boris Zbarsky b97e3a8dcd Bug 787554. Don't prefix WebIDL getters names with a Get if they look like simple member access on the C++ side. r=peterv 2012-09-11 20:08:24 +01:00
Boris Zbarsky 3d77a4f3b0 Bug 789636. Make getInterface on XHR and QueryInterface on all WebIDL objects be [ChromeOnly]. r=peterv 2012-09-11 20:08:24 +01:00
Boris Zbarsky 6189923bf7 Bug 790123. Make sure to not lose a single trailing newline in stripTrailingWhitespace. r=mats 2012-09-11 18:37:22 +01:00
Terrence Cole aed2094b1c Bug 787580 - Root all jsval at the API surface; r=sfink sr=dmandelin
--HG--
rename : layout/reftests/text-decoration/underline-select-2-ref.html => layout/reftests/text-decoration/underline-button-1-ref.html
rename : layout/reftests/text-decoration/underline-select-2.html => layout/reftests/text-decoration/underline-button-1.html
extra : rebase_source : 008f2bab76a005947a4c0bd10b6d9ea8531ea6d0
2012-09-04 16:40:12 -07:00
Ed Morley 52ba5e1f2e Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-09-06 10:19:16 +01:00
Ms2ger 797a567f66 Bug 763367 - Add support for [EnforceRange] and [Clamp]; r=bz 2012-09-06 09:25:03 +02:00
Ms2ger 07775477a5 Bug 768793 - Remove DOMJSClass::mGetWrapperCacheVTableOffset; r=khuey 2012-09-06 09:14:49 +02:00
Ms2ger 1d0f7da440 Bug 788211 - Fix a few bugs in CGDOMJSProxyHandler_defineProperty; r=bz 2012-09-06 09:14:48 +02:00
Nathan Froyd 05a2ad176a Bug 774757 - don't generate static initializers with new bindings; r=bz 2012-08-29 17:16:23 -04:00
Boris Zbarsky 00e03faa6d Bug 778044. Add a way to pref off Paris binding constructor objects. r=peterv 2012-09-05 13:37:28 -04:00
Boris Zbarsky 65e4105d26 Bug 788149. Don't use jsids in worker code in bindings, because those are runtime-specific and workers can run on multiple runtimes. r=peterv 2012-09-05 13:37:27 -04:00
Boris Zbarsky 7a3efb15c4 Bug 778150 part 2. Default methods to infallible. Allow annotation of fallible methods in WebIDL using [Throws]. r=peterv
[Throws] can either take no value, or can take MainThread or Workers if the
throwing behavior is only happening on main thread or in workers.
2012-09-05 09:21:33 -04:00
Boris Zbarsky bca38b3571 Bug 778150 part 1. Remove the vestigial ability to specify infallibility stuff in the conf file. r=peterv 2012-09-05 09:21:33 -04:00
Eric Faust c14c8ad7e4 Bug 781387 - Codegen infallibility data for Paris bindings methods. (r=peterv) 2012-09-04 14:46:38 -04:00
Boris Zbarsky 27ee186b67 Bug 786105. Setting inline style properties to null should remove them, just like setting them to empty string does. r=peterv 2012-08-31 20:59:46 -04:00
Boris Zbarsky c6e1a39316 Bug 774970. Add the ability to generate code for dealing with an XPConnect 'this' object in some cases. r=peterv 2012-08-28 13:10:09 -04:00
Boris Zbarsky 7919784ad2 Bug 767930. Add support for typed array return values (as just JSObject*) in WebIDL bindings. r=peterv 2012-08-28 13:10:09 -04:00
Peter Van der Beken b77fe91531 Fix for bug 742195 (Implement the extended attributes for null and undefined handling on strings in Paris bindings). r=bz. 2012-07-12 15:55:30 +02:00
Peter Van der Beken cb66e04e69 Fix for bug 785188 (Make Xrays work with newest DOM list bindings). r=mrbkap. 2012-06-06 21:52:26 +02:00
Luke Wagner ad90af9ca5 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley)
--HG--
extra : rebase_source : 12acf2288285f5caefd7fecea8207de3a47eab5b
2012-08-21 18:42:53 -07:00
Peter Van der Beken ee9eae3141 Fix for bug 768692 (Move DOM list binding generation to the new DOM binding codegen). r=bzbarsky.
--HG--
extra : rebase_source : 651a0fac4c9a87ef1c0a9cd91588c6421fd050c4
2012-05-22 15:46:20 +02:00
Eric Faust 8c6597d1c4 Bug 773546 - Part 2: Centralize Paris binding accessor and method top halves. (r=peterv) 2012-08-07 22:26:20 -07:00
Eric Faust c0dee00d6e Bug 775289 - Remove generateNativeAccessors branching from Paris binding codegen. (r=peterv) 2012-08-07 22:26:19 -07:00
Eric Faust 429e3ddab2 Bug 773548 - Part 2: Pass the generated JSJitInfos into JSFunctionSpec. (r=peterv) 2012-08-07 22:26:19 -07:00
Eric Faust d50fdfb27d Bug 773548 - Part 1: Modify Paris bindings to specialize methods. (r=peterv) 2012-08-07 22:26:19 -07:00
Boris Zbarsky 10c9046c35 Bug 747287 - Part 3: Add callback interface to allow JIT to interrogate DOM. (r=peterv) 2012-08-07 22:26:18 -07:00
Eric Faust 54f8c4dcea Bug 747287 - Part 2: Generate infalliblity data for further JIT optimization. (r=peterv) 2012-08-07 22:26:18 -07:00
Eric Faust fe56a76a4c Bug 747287 - Part 1: Generate JSJitInfos and specialized accessors for Paris bindings. (r=peterv) 2012-08-07 22:26:18 -07:00
Ms2ger 9cf3772f54 Bug 776224 - CheckPref should always initialize its outparam; r=peterv 2012-08-04 09:44:00 +02:00
Ms2ger 71696aa0f2 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 f4181983a1 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 917dc99198 Bug 776224 - CheckPref should always initialize its outparam; r=peterv 2012-08-04 09:44:00 +02:00
Ms2ger 86de6cd109 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
William Chen 103cc37839 Bug 779573 - Fix generated code for empty string as default dictionary member in WebIDL. r=khuey 2012-08-01 14:34:36 -04:00
Eric Faust b0323e13a7 Bug 752223 - Implement JS_NumberValue(), replacing JS_NewNumberValue(). (r=luke) 2012-08-01 17:59:47 -07:00
Nicholas Cameron f642f5c9cd Bug 776685; throw TypeError exceptions from Azure canvas bindings. r=bz 2012-07-26 14:31:26 +12:00
Eric Faust e8f3c9fa98 Bug 749535 - Part 3: Remove JS_Is*Array() from Paris Binding argument unwrapping. (r=bz) 2012-07-31 20:45:22 -07:00
Eric Faust 28008c2879 Backout changesets 6e78bc0145ee, 97a1463cde9c, and 9097d0b3acc6 (Bug 749535) for
erroneous bug number (r=me).
2012-07-31 20:24:32 -07:00
Eric Faust 6b9e8ebd2b Bug 749535 - Part 3: Remove JS_Is*Array() from Paris Binding argument unwrapping. (r=bz) 2012-07-31 20:07:55 -07:00
Boris Zbarsky 423774779f Bug 771636 part 3. Implement default values for WebIDL strings. r=peterv 2012-07-31 00:22:23 -04:00
Boris Zbarsky 1b273923c5 Bug 771636 part 2. Implement default values for WebIDL enums. r=peterv 2012-07-31 00:22:23 -04:00
Boris Zbarsky d988f0953a Bug 771636 part 1. Rearrange default-value handling so we actually set C++ values directly instead of round-tripping through jsval. r=peterv 2012-07-31 00:22:22 -04:00
Brian Hackett aa69831ee5 Use HandleValue and MutableHandleValue in API hooks where possible, bug 776579. r=billm, sr=dmandelin 2012-07-30 05:19:09 -06:00
Boris Zbarsky ac47d48b17 Bug 777438. Make sure our C++ declarations are in the right order when a dictionary has a dictionary member. r=khuey 2012-07-27 00:09:10 -04:00
Boris Zbarsky 4a5cf6f5f8 Bug 775844. Make sure to examine constructor signatures when looking for union types. r=peterv 2012-07-27 00:09:10 -04:00
Boris Zbarsky c0bcbf7068 Bug 775845. Fail codegen for variadic arguments until we add support for them. r=peterv 2012-07-27 00:09:09 -04:00
Boris Zbarsky cf68660a3b Bug 775852. Actually follow the WebIDL spec for creating JS representations of sequences. r=khuey 2012-07-27 00:09:09 -04:00
Boris Zbarsky 8024ef90c6 Bug 764456 part 5. Actually look at hasConcreteDescendant in hasInterfacePrototypeObject() so that we can avoid codegen for [NoInterfaceObject] interfaces hat are only implemented via "implements". r=peterv 2012-07-19 14:48:58 -04:00
Boris Zbarsky 061fe4e429 Bug 764456 part 4. Make sure consequential interface used as arguments are non-castable. r=peterv 2012-07-19 14:48:58 -04:00
Boris Zbarsky 2032b1ade1 Bug 764456 part 3. Clean up meaning of 'castable' and use thereof a bit. r=peterv 2012-07-19 14:48:58 -04:00
Peter Van der Beken a02b1d7ffe 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
Peter Van der Beken a64f14f7ef Fix for bug 774775 (XRayWrapper does not handle new bindings constants). r=bz.
--HG--
extra : rebase_source : fef985d0417c394ae5997b4450c7076005bdf870
2012-07-17 22:54:25 +02:00
Ed Morley fcaa2b9642 Merge last PGO-green changeset of mozilla-inbound to mozilla-central 2012-07-18 13:32:24 +01:00
Ms2ger 23b178ab1f Bug 765464 - Part c: Throw some TypeErrors; r=khuey 2012-07-18 12:36:08 +02:00
Boris Zbarsky ca83439a51 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
Boris Zbarsky 3951284caf Bug 768537 part 2. Allow dictionaries to be initialized with null or undefined, and treat them as dictionaries in which everything has its default value. r=peterv 2012-07-17 12:18:53 -04:00
Ed Morley c9624f0f7a Backout 9deb8edb5070 (bug 773519), ea5a243a60f1 & 0cad1e553bea (bug 768537) for compilation failures 2012-07-17 17:48:11 +01:00
Boris Zbarsky 98cd60772a 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
Boris Zbarsky 25b0c7ad78 Bug 768537 part 2. Allow dictionaries to be initialized with null or undefined, and treat them as dictionaries in which everything has its default value. r=peterv 2012-07-17 12:18:53 -04:00
Peter Van der Beken 8d3d9a8f02 Fix for bug 762280 (Use nsContentUtils::PreserveWrapper for preserving expandos). r=bz.
--HG--
extra : rebase_source : cd426b3c3b987d8e39196e1dd1e468bc87e87f53
2012-07-16 16:52:53 +02:00
Peter Van der Beken 356f838036 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
Boris Zbarsky 5b15dd6b04 Bug 742152. Move distinguishing index determination and verification of type-identity of preceding arguments out of codegen and into the WebIDL parser. r=jlebar 2012-06-22 16:18:50 -04:00
Boris Zbarsky 73dde405dc Bug 764456 part 1. Flag consequential interfaces in the WebIDL data model. r=khuey 2012-06-22 16:18:50 -04:00
Boris Zbarsky 470005a7fe Bug 764698. Fix isDistinguishableFrom for dictionaries to work right. r=peterv 2012-06-21 12:29:11 -04:00
Ms2ger e95346bfd1 Bug 766615 - Fix nullable WebIDL dictionaries; r=bz 2012-06-21 09:21:53 +02:00
Ms2ger 1f50252f6b Bug 764539 - Stringify the prototype class in Paris bindings to "InterfacePrototype" instead of "Interface Prototype"; r=bz 2012-06-21 09:20:28 +02:00
Ms2ger 8448d8d0e6 Bug 765704 - Don't throw when setting XHR.responseType to an invalid value; r=bz 2012-06-21 09:11:07 +02:00
Boris Zbarsky 03bc840cdd Bug 763911. Add support for interface members of dictionaries. r=khuey 2012-06-19 12:09:37 -04:00
Boris Zbarsky 04c02edf69 Bug 764420. Fix ArrayBufferView unwrapping to allow DataViews. r=khuey 2012-06-19 12:08:39 -04:00
Boris Zbarsky 7a4efcd545 Bug 746570. Get rid of bogus uses of rstrip() that are leaving random trailing spaces in the middle of our string. r=peterv 2012-06-15 16:25:51 -04:00
Boris Zbarsky 24593505c7 Bug 764104. Avoid collisions with C++ reserved words by using initial-caps for WebIDL enum values. r=peterv 2012-06-15 16:25:51 -04:00
Boris Zbarsky ed0d831772 Bug 750297 part 2. Switch WebGLUniformLocation to Paris bindings. r=peterv, bjacob 2012-06-15 16:25:51 -04:00
Boris Zbarsky 41725e7de3 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
Boris Zbarsky cf8f8a0d31 Bug 742153 part 4. Allow strings inside sequences and dictionaries. r=peterv 2012-06-12 10:22:05 -04:00
Boris Zbarsky 6c6503abf1 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 d28264d74e Bug 742153 part 2. Rename isSequenceMember to isMember, since it will apply to both sequences and dictionaries. r=peterv 2012-06-12 10:22:05 -04:00
Kyle Huey c8d931afa8 Bug 763573: Don't export PrimitiveConversions.h. r=bz 2012-06-11 13:04:34 -07:00
Boris Zbarsky 809a53856c Bug 761707 part 2. Drop the vestigial jsclass argument to UnwrapDOMObject. r=bholley 2012-06-06 15:59:46 -04:00
Boris Zbarsky eab358758b 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 ac1bfb338d Bug 748266. Switch the WebGL canvas context to new DOM bindings. r=peterv 2012-05-31 14:16:48 -04:00
Boris Zbarsky 464164e820 Backed out changeset f96e0f078b49 (bug 748266) because the test suite is bogus and we're failing a crashtest too. 2012-05-31 16:20:49 -04:00
Boris Zbarsky 6af95f383e Bug 748266. Switch the WebGL canvas context to new DOM bindings. r=peterv 2012-05-31 14:16:48 -04:00
Peter Van der Beken 38bb1a2e8b Fix for bug 759275 (Specialize unwrapping to HTML elements in dom bindings). r=bz.
--HG--
extra : rebase_source : f676440e468c23e6c1e9458f6d75a615b9a6b8d7
2012-05-21 23:29:58 +02:00
Peter Van der Beken 1b4c59974f Fix for bug 759278 (Support binarynames for attributes too in new DOM bindings). r=bz.
--HG--
extra : rebase_source : 352a4d33db77dd80915700db335799bb8c19ac72
2012-05-18 23:25:47 +02:00
Boris Zbarsky 3a0b916088 Bug 743906 part 3. Stop listing default values for optional arguments with no defaults, now that we're guaranteed to only examine such values if argc is big enough. r=peterv 2012-05-29 23:45:18 -04:00
Boris Zbarsky 702a4a496f 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 f99c90e58c 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 1981fc313b Bug 755636 part 1. Convert sequence argument codegen to dom::Sequence. r=peterv 2012-05-25 01:08:22 -04:00
Boris Zbarsky cd87a47887 Bug 749864. Codegen for typed array and arraybuffer arguments. r=peterv 2012-05-25 01:07:03 -04:00
Boris Zbarsky 9e219fea4c Bug 753642. Rip out the codegen for the Xray-related bits of worker bindings, since we don't have Xrays in workers. r=peterv 2012-05-23 12:44:48 -04:00
Boris Zbarsky 1c6835bea3 Bug 755080 part 1. Add infrastructure for binding codegen tests. r=khuey,peterv 2012-05-23 12:44:48 -04:00
Boris Zbarsky 52ec2f0360 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 19fdb1c069 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
Peter Van der Beken d9ad90ef1d Fix for bug 756256 (Add support for object arguments and return types in new DOM bindings). r=bz.
--HG--
extra : rebase_source : ceffb38d662395c6aa8e02281fe6e07925fc2362
2012-04-26 23:44:28 +02:00
Peter Van der Beken a3602dd3ac Fix for bug 756251 (Pass extendedAttributes to CGCallGenerator). r=bz.
--HG--
extra : rebase_source : ceb7b4516b8ddfed63e2abada2cff5222f4f6973
2012-04-26 23:44:28 +02:00
Peter Van der Beken 4f600a235e Fix for bug 756231 (Remove NativeToSupports, replace with reinterpret_cast). r=bz.
--HG--
extra : rebase_source : b7a2e204b9db7457312af6179aa516f4849c7f92
2012-04-26 23:44:28 +02:00
Peter Van der Beken 17560044ee Fix for bug 756225 (Make CGNamespace.build respect declareOnly). r=bz.
--HG--
extra : rebase_source : 77729639e018cef8aef04ecb3f3cc0f818cb560c
2012-04-26 23:44:28 +02:00
Peter Van der Beken ebb9ed75cf Fix for bug 741263 (Paris bindings constructors shouldn't abuse reserved identifiers). r=bz.
--HG--
extra : rebase_source : cec6a0ffc58f3d7d262dc9658d52aac424ec715a
2012-04-26 22:57:33 +02:00
Brian Hackett d55ff730fa Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 15:03:45 -07:00
Brian Hackett 66d81d0a7e Backed out changeset 5fc7462dd394 for android orange. 2012-05-19 11:52:55 -07:00
Brian Hackett 7235558c07 Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 09:48:09 -07:00
Boris Zbarsky 834a627f02 Bug 748267 part 3. Codegen for sequence return values. r=peterv
The big block in getRetvalDeclarationForType is just direct cut/paste from CGCallGenerator plus the addition of the sequence case.  The IDL parser changes were OKed by khuey; they're needed so that we don't have to worry about the ordering of sequence with conversions for strings and primitives.
2012-05-15 14:23:29 -04:00
Boris Zbarsky d985ce38f4 Bug 748267 part 2. Implement codegen for dealing with sequence arguments. r=peterv 2012-05-15 14:23:29 -04:00
Boris Zbarsky 21f19a6619 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
Peter Van der Beken 713cbc71b5 Fix for bug 752042 (Support running code after successful wrapping in Paris bindings). r=bz. 2012-04-26 23:44:24 +02:00
Luke Wagner 05a5a19152 Bug 747617 - fix document.all and swap JSClass::{construct,hasInstance} so this doesn't happen again (r=bz)
--HG--
extra : rebase_source : 036acbd046ff8b42f81e63933901b6aaaa595a76
2012-05-07 12:44:08 -07:00
Boris Zbarsky 73485dea64 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 15ea61df18 Back out 1907bf7e6d7c (bug 749485) for build bustage 2012-05-05 20:33:59 -07:00
Boris Zbarsky d6697e4410 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 c248872f5e 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 5b65f56e64 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 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