Commit Graph

620 Commits

Author SHA1 Message Date
Ryan VanderMeulen
01613554be Backed out 4 changesets (bug 869195, bug 870845, bug 872043, bug 862825) for mochitest b-c, mochitest-other, and xpcshell orange on a CLOSED TREE.
Backed out changeset 049889b25a79 (bug 869195)
Backed out changeset fc0bef5a2cfd (bug 862825)
Backed out changeset 267fe0d9c201 (bug 870845)
Backed out changeset 7b06b9d1acb2 (bug 872043)
2013-05-14 16:40:26 -04:00
Boris Zbarsky
1a05e187ae Bug 869195. Make QueryInterface be exposed for both chrome and xbl scopes, not just in chrome. r=bholley,peterv 2013-05-14 14:24:48 -04:00
Nathan Froyd
a37eccb382 Bug 870959 - don't include Preferences.h or NonRefcountedDOMObject.h in bindings unless necessary; r=bz 2013-05-10 15:44:19 -04:00
Boris Zbarsky
12dabc04a4 Bug 870219 part 1. Fix the chrome-scope checking for workers to work even if we incorrectly set up worker interface objects on the main thread. r=bent 2013-05-09 22:23:28 -04:00
Ryan VanderMeulen
1b533138b8 Backed out 6 changesets (bug 868996, bug 867903, bug 869014, bug 870219, bug 861587) for PGO bustage.
CLOSED TREE
2013-05-09 17:11:59 -04:00
Boris Zbarsky
bd9f9292cf Bug 861587. Rejigger the WebIDL binding build system to do all binding codegen in a single python process while still using our dependency tracking for bindings to minimize the number of bindings we try to regenerate. r=khuey 2013-05-09 13:05:33 -04:00
Nathan Froyd
eba34f22d7 Bug 858131 - rewrite FloatingPoint.h to be C++-only instead of C-compatible C++; r+original-author=Waldo 2013-05-01 16:55:13 -04:00
Andrew McCreight
bd6c7a1d67 Bug 851178 - Add support for JS-implemented WebIDL constructors with arguments. r=bz 2013-05-02 18:00:50 -07:00
Boris Zbarsky
299d72713e Bug 867863. Be a little more careful in GlobalObject initialization. r=peterv 2013-05-08 15:50:58 -04:00
Boris Zbarsky
a5a8ddd238 Bug 868102. Don't swallow exceptions from the XPCOM/XPConnect goop when setting up a js-implemented webidl object. r=mccr8 2013-05-07 22:34:56 -04:00
Bobby Holley
609401db48 Bug 868637 - Simplify DOM Bindings JSON parsing. r=bz
At this point we could really just hoist the JSAPI call, but it's just
cumbersome enough with all the casts that I don't really want to stick
it in the codegen.
2013-05-07 14:18:03 -07:00
Nathan Froyd
dc3bfcbc39 Bug 869073 - make WebIDL enums enum classes instead of plain enums; r=bz 2013-05-06 15:28:13 -04:00
Boris Zbarsky
859a9538b1 Bug 868448. Fix the successCode in dictionary to-js conversions to actually work right, and document the requirements on successCode better. r=smaug 2013-05-06 08:31:01 -04:00
Boris Zbarsky
eca92dda6d Bug 867844 part 1. Fix rooting hazards in LegacyCall. r=smaug 2013-05-06 08:30:40 -04:00
Cameron McCormack
416ec8db14 Bug 868805 - [LenientThis] attribute's setter should return undefined. r=bz 2013-05-06 12:36:38 +10:00
Phil Ringnalda
fedf6c0df7 Merge m-c to m-i 2013-05-05 12:17:07 -07:00
Ms2ger
634a0652fb Bug 868411 - Handlify js::GetObjectProto; r=bz 2013-05-05 09:03:14 +02:00
Boris Zbarsky
bd5b3b40e8 Bug 865785 part 2. Fix rooting issues in JS-implemented webidl. r=mccr8 2013-05-04 21:44:10 -04:00
Boris Zbarsky
4061685759 Bug 865785 part 1. Go back to passing a JSContext* to the constructors for JS-implemented interfaces. r=mccr8 2013-05-04 21:43:58 -04:00
Boris Zbarsky
34bb423d34 Bug 865969 part 9. Remaining miscellaneous rooting fixes in WebIDL bindings. r=ms2ger 2013-05-03 19:29:09 -04:00
Boris Zbarsky
d058ab83b1 Bug 865969 part 8. Fix rooting hazards in CallbackObject. r=ms2ger 2013-05-03 19:29:09 -04:00
Boris Zbarsky
fba1502aa7 Bug 865969 part 6. Fix rooting hazards in BindingUtils.cpp. r=smaug 2013-05-03 19:29:08 -04:00
Boris Zbarsky
9122c4fa70 Bug 865969 part 5. Root the id argument of WebIDL DefineInterface methods. r=smaug 2013-05-03 19:29:08 -04:00
Boris Zbarsky
3200d7e8dc Bug 865969 part 4. Pass handles to WebIDL dictionary init. r=smaug,terrence 2013-05-03 19:29:08 -04:00
Boris Zbarsky
bb2222c08c Bug 865969 part 2. Better rooting in bindings for 'any' arguments. r=smaug 2013-05-03 19:29:07 -04:00
Boris Zbarsky
4d5cf6450f Bug 865969 part 1. Better rooting in bindings for 'object' arguments, as well as for worker interface arguments passed as JSObject*. r=smaug 2013-05-03 19:29:07 -04:00
Peter Van der Beken
93361c60c0 Bug 820846 - Modify the ListBase IC to work with [OverrideBuiltins] bindings, codegen changes and make HTMLDocument OverrideBuiltins. r=bz. 2013-04-20 18:04:09 +02:00
Ehsan Akhgari
5005320e02 Backed out 3 changesets (bug 855971, bug 820846) because of browser-chrome test failures
Backed out changeset a2245b038bcc (bug 855971)
Backed out changeset 2a999f8ee317 (bug 820846)
Backed out changeset 6dba144500f3 (bug 820846)
2013-05-04 19:27:20 -04:00
Peter Van der Beken
d6053b1cd0 Bug 820846 - Modify the ListBase IC to work with [OverrideBuiltins] bindings, codegen changes and make HTMLDocument OverrideBuiltins. r=bz.
--HG--
extra : rebase_source : 12dbaff8dd2acfeee87bdfa738a013344cb1977a
2013-04-20 18:04:09 +02:00
David Zbarsky
0082e64bc2 Bug 866450 Part 4: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Boris Zbarsky
89ac81bbf5 Bug 742206 part 3. Implement type conversions for Date in WebIDL. r=smaug 2013-05-02 14:38:20 -04:00
Boris Zbarsky
c192be59aa Bug 742206 part 2. Implement WebIDL parser support for Date. r=smaug,khuey 2013-05-02 14:38:19 -04:00
Boris Zbarsky
d0cb8316ab Bug 860841. Hook up the proto chain of a WebIDL interface object to the interface object of its nearest ancestor interface that has one, as if these were ES6 classes. r=peterv 2013-05-02 14:38:19 -04:00
Aryeh Gregor
ff1be59383 Bug 866059 - Don't implicitly convert to already_AddRefed in Codegen.py; r=bz 2013-04-22 14:21:23 +03:00
Ed Morley
ab34455a28 Backed out changeset a1e877fa8d67 (bug 866450) 2013-05-02 11:57:07 +01:00
David Zbarsky
46581d1a20 Bug 866450 Part 4: Fix rooting hazards under content/ and dom/ r=bz 2013-05-02 05:12:46 -04:00
Boris Zbarsky
583e53379d Bug 861022 part 2. Root the global object in WebIDL prototype and interface object setup. r=peterv,terrence 2013-05-01 23:44:12 -04:00
Boris Zbarsky
e418358f16 Bug 861022 part 1. Root the non-globals in WebIDL prototype and interface object setup. r=peterv,terrence 2013-05-01 23:44:11 -04:00
Kyle Huey
6f329825e4 Bug 866918: Don't include WorkerPrivate.h in all the binding code. r=bz 2013-05-01 13:24:19 -07:00
Jim Blandy
7b5a4624a3 Bug 862531: Replace BaseProxyHandler::obj_toString with className. r=jorendorff 2013-04-30 14:44:50 -07:00
Andrew McCreight
61027ffc0b Bug 851639 - Allow JS implemented WebIDL to be registered on window.navigator. r=bz 2013-04-30 13:30:25 -07:00
Terrence Cole
e417ffe01a Bug 860050 - Remove JSMutableHandleObject typedef; r=bz,jonco 2013-04-16 16:20:44 -07:00
Boris Zbarsky
8003a22424 Bug 717637. Stop using non-global parent objects for everything that's not an element, since having a mix of parent objects makes us fail shape guards in the JIT. r=peterv 2013-04-29 17:33:41 -04:00
Boris Zbarsky
683e6f1ac6 Bug 865975. Better rooting for the 'this', 'callable', and 'rval' values in WebIDL callbacks. r=bholley 2013-04-26 13:41:21 -04:00
Boris Zbarsky
e9fca1d653 Bug 865964. Remove dead WrapCallbackInterface code. r=smaug 2013-04-26 13:41:21 -04:00
Boris Zbarsky
88d9554942 Bug 865940. Remove AsMutable now that our binding stack variables aren't const. r=bholley 2013-04-25 22:46:18 -04:00
Boris Zbarsky
1684007f9e Bug 766583 part 7. Stop declaring variadic arguments as const on the stack in bindings code. r=smaug 2013-04-25 19:03:07 -04:00
Boris Zbarsky
aa284f1a66 Bug 766583 part 6. Stop declaring unions as const on the stack in bindings code. r=smaug 2013-04-25 19:03:07 -04:00
Boris Zbarsky
080775af23 Bug 766583 part 5. Stop declaring optional arguments as const on the stack in bindings code. r=smaug 2013-04-25 19:03:06 -04:00
Boris Zbarsky
3d72fdf114 Bug 766583 part 4. Stop declaring strings as const on the stack in bindings code. r=smaug 2013-04-25 19:03:06 -04:00
Boris Zbarsky
a4e95d314b 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
b10373cda6 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
9ba2beac5c 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
7a5392b28d 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
cd4ebfbb80 Bug 865544 - Add support for nsIDOMGlobalPropertyInitializer to JS-implemented WebIDL. r=bz 2013-04-25 14:31:42 -07:00
Boris Zbarsky
3da96fa3de Bug 863898. Add support for dictionary arguments in JS-implemented WebIDL bindings. r=mccr8 2013-04-25 12:29:55 -04:00
Boris Zbarsky
56032cd132 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
9c1973b5d2 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
0b6ba06beb 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
817ad5a3ec 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
37c0b22339 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
e8ee5e30f6 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
c87f07b4ce Bug 863964 - clean up forward class declarations in codegen. r=bz 2013-04-25 08:42:43 -07:00
Boris Zbarsky
c6af618fd5 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
de9b7862dc 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
2f17e61fc4 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
20ab2b6db5 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
87e77a2b99 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
560478bb6b Bug 843264. Allow returning sequences of non-primitive types from callback methods. r=mccr8 2013-04-24 14:59:14 -04:00
Boris Zbarsky
8406904ff2 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
f7b5debcae 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
bd68680410 Bug 852094 - Support Unforgeable on proxy-based DOM bindings. r=bz. 2012-12-20 10:56:11 +01:00
Boris Zbarsky
18e59668bd 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
8ce74aae9d 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
f5022bb55c Bug 857439 Part 2: Cleanup example codegen a bit r=bz 2013-04-19 04:49:21 -04:00
David Zbarsky
01f59de8e2 Bug 857439 Part 1: Disallow owned interfaces from having parents or children r=bz 2013-04-19 04:49:21 -04:00
David Zbarsky
ef87d4f932 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
b1ddad7f2c 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
0adaab0902 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
568cea39db 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
f9d3bc73ed 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
c72e933878 Bug 861064. Root WebIDL dictionary Init. r=smaug,terrence 2013-04-12 23:34:22 -04:00
Reuben Morais
a366543483 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
514f40e52a Bug 854503 - Rename JS unwrapping functions. r=bholley 2013-04-11 11:50:18 -07:00
Boris Zbarsky
536f3cb891 Bug 860551. Fix instanceof for prototype-less interface objects to be saner. r=dzbarsky 2013-04-11 14:31:06 -04:00
Boris Zbarsky
9c6066c314 Bug 860473 part 2. Root WebIDL dictionary ToObject. r=evilpie,smaug 2013-04-11 14:31:06 -04:00
Boris Zbarsky
4cf80a8cde Bug 860473 part 1. Root WebIDL dictionary ParseJSON. r=evilpie, smaug 2013-04-11 14:31:05 -04:00
Boris Zbarsky
a3971c86de 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
a8ee3411c7 Backed out changeset d0d75e76d41f (bug 857417) for crashes during tests 2013-04-08 18:48:38 -04:00
Boris Zbarsky
3eba25eee5 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
ecc404d587 Bug 688691. Warn when LenientThis actually causes us to not throw. r=ms2ger 2013-04-08 17:04:21 -04:00
Ryan VanderMeulen
24a4c17eff Backed out changeset a85d21e394c0 (bug 854503) for bustage. 2013-04-06 14:37:33 -04:00
Jacek Szpot
8ce12e971c Bug 854503 - Rename JS unwrapping functions. r=bholley 2013-04-04 12:14:32 +02:00
Nathan Froyd
c9dfdcad2f Bug 857254 - add CGTemplatedType and use it everywhere; r=bz 2013-04-02 15:29:03 -04:00
Nathan Froyd
c741af4b3b Bug 857254 - use CGIfWrapper more consistently; r=bz 2013-04-02 15:09:16 -04:00
Boris Zbarsky
6d1fe7f08a 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
5f998ce2a9 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
0bbbeb9739 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
d1d7bbfca7 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
0b155803de 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
abe07c4a46 Bug 852219 part 3. Handle JS-implemented interfaces having a parent interface. r=mccr8 2013-04-03 22:22:15 -04:00
Boris Zbarsky
e46eb7751d 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
f1a792a7a7 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
e46a3bd2f6 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
b105f502e9 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
1f72f2ad4e 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
436faf79ed 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
863287ea09 Bug 855025. Always do Xrays for DOM interface objects. r=peterv 2013-03-27 22:47:25 -04:00
Boris Zbarsky
eb4fad3022 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
20501c8c5a Bug 841059 - Do not use the ArenaHeader for getAllocKind on JSObject; r=billm 2013-02-14 14:51:07 -08:00
Tom Schuster
045cb0fba7 Bug 828462 - Root Proxy/Wrapper in the browser. r=terrence,bz 2013-03-21 23:23:48 +01:00
Tom Schuster
b8e3b65fa7 Bug 828462 - Root Proxy/Wrapper delete. r=terrence 2013-03-21 23:23:48 +01:00
Tom Schuster
097f3a1110 Bug 828462 - Root Proxy/Wrapper getOwnPropertyNames and keys. r=terrence 2013-03-21 23:23:47 +01:00
Tom Schuster
5a05e27565 Bug 828462 - Root Proxy/Wrapper defineProperty. r=terrence 2013-03-21 23:23:47 +01:00
Tom Schuster
b67362a266 Bug 828462 - Root Proxy/Wrapper get(Own)PropertyDescriptor. r=terrence 2013-03-21 23:23:47 +01:00
David Zbarsky
dddd48eaf4 [Bug 852843] SVGZoomAndPan interface object not being instantiated r=bz 2013-03-21 01:33:56 -04:00
Ralph Giles
53a5230fc8 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
e03d4dbee4 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
a296f060db 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
186e10f5d2 Merge m-c to inbound. 2013-03-19 18:01:10 -04:00
Peter Van der Beken
4ce9ea964b 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
5cf619c9f2 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
389d008544 Bug 850958 - Implement instanceof without relying on nsIDOM interfaces r=bz 2013-03-18 19:14:39 -04:00
Andrew McCreight
b35d925658 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
c32fccc952 Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-18 16:05:38 -07:00
Andrew McCreight
eb93cdc9ad 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
cb4fc817c0 Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-18 16:05:06 -07:00
Andrew McCreight
e00f4bc0d2 Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-18 16:04:46 -07:00
Kyle Huey
75a0778ab2 Back out Bug 827486 for PGO bustage. CLOSED TREE 2013-03-18 13:00:00 -07:00
Andrew McCreight
778d3abc1c 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
3344412262 Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-18 10:19:42 -07:00
Andrew McCreight
50e5e4bede 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
5df573f3a1 Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-18 10:19:41 -07:00
Andrew McCreight
f46f1584c9 Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-18 10:19:41 -07:00
Phil Ringnalda
e2fa3980d3 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
9889557035 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
4eb4b866dd Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-17 09:56:05 -07:00
Andrew McCreight
2455aa8e05 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
5edf63081d Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-17 09:55:42 -07:00
Andrew McCreight
783748c6ea Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-17 09:55:29 -07:00
Phil Ringnalda
48a37ae4ea Back out f408dd29944c:db5c280d1907 (bug 827486) for probably having needed a clobber
CLOSED TREE
2013-03-16 18:16:37 -07:00
Andrew McCreight
d5fd7d6d1b 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
d1fdac2bc2 Bug 827486, part 5: add the main JS impl code gen. r=bz 2013-03-16 16:22:22 -07:00
Andrew McCreight
714b6cbafe 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
32edce4df6 Bug 827486, part 3 - add dependencies for CGBindingImplClass. r=bz 2013-03-16 16:22:22 -07:00
Andrew McCreight
657ceaa9fd Bug 827486, part 2 - Refactor example class codegen into common base class. r=bz 2013-03-16 16:22:22 -07:00
Boris Zbarsky
1c9b3c0388 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
3bec068502 Bug 842201 - SVGUnitTypes interface object is not being instantiated r=bz 2013-03-13 14:07:49 -04:00
Masatoshi Kimura
e5e5a90814 Bug 848339 - Remove the vestigial boolean outparam from nsWrapperCache::WrapObject. r=bz 2013-03-12 08:03:47 +09:00
Jon Coppeard
8d5fd16382 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
fe417ad697 Backed out changeset 28ef4bdff455 (bug 848395) 2013-03-07 13:03:35 +00:00
Jon Coppeard
82b2b286dc 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
fa71007e65 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
dd29852063 Bug 841289 - Remove prefable option from WebIDL codegen. r=bz 2013-03-06 07:09:38 +09:00
Boris Zbarsky
14a3ce5958 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
c6e9532834 Bug 827158 part 8. Implement legacycaller support in WebIDL. r=peterv 2013-03-04 14:08:24 -05:00
Johnny Stenback
ac2cf83a26 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
26dc82f3a1 Bug 846955 - Codegen Argument definitions using .define() in ClassDestructor::define. r=bz 2013-03-01 16:32:24 -08:00
Boris Zbarsky
09a15646fc 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
74a5cb5265 Fix for bug 842799 (|Document.prototype instanceof Node| inside <script> returns false). r=bz. 2013-02-22 10:25:24 +01:00
Boris Zbarsky
09556095dd 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
ebcc7ae06a 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
7015a00262 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
51b8917bbc 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
8f45a6f4d4 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
e68a91179b 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
48eb0c311a 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
36a231a8ac Bug 784812: Implement real dependencies for WebIDL bindings. r=bz,ted 2013-02-24 12:36:44 -08:00
Phil Ringnalda
ba3b771a25 Back out cd8481cc4a32 (bug 784812) for make check failures 2013-02-24 14:10:48 -08:00
Kyle Huey
60fb1c5ce1 Bug 784812: Implement real dependencies for WebIDL bindings. r=bz,ted CLOSED TREE 2013-02-24 12:36:44 -08:00
Kyle Huey
6fcbeaafcc Backed out changeset a71766c2c85d 2013-02-24 12:33:36 -08:00
Kyle Huey
de0e5888ec Bug 784812: Implement real dependencies for WebIDL bindings. r=bz,ted 2013-02-24 12:03:03 -08:00
Boris Zbarsky
d917523d97 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
858de2ee46 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
90617e5775 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
c485f6afee 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
bfd75418fd 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
09220020af 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
5cee1946fc 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
83d171d0c3 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
e66e7b9631 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
25deb6d78c 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
d37856e270 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
d07b3d8eef 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
24d9f6a70b 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
e07d1dcdb8 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
09e1ed17ee Bug 837645. Support 'any' values in sequences and dictionaries. r=smaug,peterv 2013-02-06 14:23:45 +00:00
Boris Zbarsky
50ced00d20 Bug 830992 part 2. Switch DOMTransaction to WebIDL codegen. r=wchen,peterv 2013-02-06 09:42:33 +00:00
Robert O'Callahan
85e24bcae8 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
89d5ad423c 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
b937359c37 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
9754a0cf18 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
fbda957199 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
7250370ce6 Back out c5238879470f and b3cabb259af7 (bug 830099) for bustage 2013-01-28 22:36:59 -08:00
Boris Zbarsky
023ecd137e 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
0f2911aa31 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
91e8405a19 Backed out changeset 19b9f064d8eb (bug 795896) because of build bustage 2013-01-28 23:51:11 -05:00
Ehsan Akhgari
00eafdea81 Backed out changeset 32786d29daf8 (bug 830099) because of build bustage 2013-01-28 23:51:03 -05:00
Boris Zbarsky
002da9ef93 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
1cc6ea039c 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