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

462 Коммитов

Автор SHA1 Сообщение Дата
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