Commit Graph

397 Commits

Author SHA1 Message Date
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
Peter Van der Beken
b9d2ae906f 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
fd94476421 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
1ddbf2e612 Bug 822470 part 6. Hook up callback interface codegen. r=peterv 2013-01-28 08:34:30 -05:00
Boris Zbarsky
27fb95d884 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
03ac2ebe1c Bug 822470 part 3. Include headers as needed for callback interfaces. r=peterv 2013-01-28 08:34:30 -05:00
Boris Zbarsky
3349eac0ed 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
bc0702d0d7 Backout f3c145bd1dd2 & 5075690572a9 for OS X startup failures 2013-01-28 11:08:21 +00:00
Peter Van der Beken
b46afdef94 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
57a2c2471b 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
380ecf9335 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
01f8a5b4d8 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
5be1bca34a 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
6c53161814 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
ab034461f2 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
d9889b3184 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
498d64b509 Bug 824823 part 7. Implement WebIDL CharacterData API on nsGenericDOMDataNode. r=peterv 2013-01-04 12:02:14 -05:00
Boris Zbarsky
3bff400090 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
95e6fb6109 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
d19479dcd6 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
d9fac4cef8 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
a491bdc004 Bug 821177. [TreatNonCallableAsNull] should only affect attribute setters. r=khuey 2013-01-02 22:03:25 -05:00
Boris Zbarsky
6ed64d61c5 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
ea8093dad3 Bug 824247 - Part 2: Fix common source of warning span (dom/bindings). r=khuey 2013-01-03 00:55:55 +09:00
Boris Zbarsky
002d1538c2 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
40ae916f86 Bug 825025. MaybeWrapValue should work with all gcthings. r=peterv 2012-12-29 22:13:26 -08:00
Jeff Walden
320df44ab6 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
90a34fb045 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
4e7e2a5d51 Merge PGO-green changeset from inbound to m-c. 2012-12-22 12:06:37 +01:00
Ms2ger
213ae1202e 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
27c06e5517 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
2e848596ed 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
b1a01dc7d1 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
bfab6dc9b5 Bug 820957 - Support object members in WebIDL dictionary. r=bz 2012-12-17 13:44:13 -08:00
William Chen
d33f454e9f 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
b208a08d09 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
eba842099b Bug 821760. Properly handle compartments in WebIDL static operation bindings. r=peterv 2012-12-14 14:11:23 -05:00
Boris Zbarsky
63350ba5b1 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
f685496e81 Bug 816375. Switch NodeFilter to WebIDL bindings. r=peterv 2012-12-14 14:10:49 -05:00
Ed Morley
4f54b7fbbe Backout 67d84be0cc83 (bug 820544) for bustage 2012-12-14 16:58:51 +00:00
William Chen
93b1b7ccbe Bug 820544 - Prefix webidl dictionary native members names to avoid C++ keywords. r=bz 2012-12-11 16:05:46 -08:00
Boris Zbarsky
3076697db0 Bug 820862. JSJitInfo should say what sort of function it is. r=jandem 2012-12-13 17:08:43 -05:00
Nathan Froyd
a152f6602b Bug 821317 - reduce the size of DOMClass.mInterfaceChain to something reasonable; r=bz 2012-12-13 11:01:00 -05:00
Nathan Froyd
5a3f1cc23f Bug 821324 - actually return a success value from replaceFileIfChanged; r=bz 2012-12-13 11:26:33 -05:00
Boris Zbarsky
4240d9a262 Bug 815502. Implement support for variadic arguments in WebIDL. r=peterv 2012-12-11 17:50:56 -05:00
Peter Van der Beken
a5de435427 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
d1c8d3b88e 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
b3142f98f8 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
4cd20ae3e5 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
eb1a773525 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
08a9890d66 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
572496b567 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
739ae0477f Merge m-c to m-i. 2012-12-02 11:32:57 +01:00
Ms2ger
f5bccafc02 Bug 802163 - Fix pyflakes warnings in bindings python; r=peterv 2012-12-02 09:59:08 +01:00
Masatoshi Kimura
7a16130389 Bug 816487 - Allow all ASCII characters for WebIDL enum. r=bz 2012-12-01 21:23:26 -05:00
Benoit Jacob
f5d2c58055 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
29ae813b11 Bug 812783. Add support for flagging callbacks as worker-only. r=khuey 2012-11-29 11:14:40 -05:00
Eric Faust
310c02137b Bug 747289 - Part 1/2 - Update Paris bindings to expose DOM constants. r=bz 2012-11-28 16:28:36 -05:00
Boris Zbarsky
fc1f1a5fd4 Fix up indentation of the generated code for event handler return values. No bug. 2012-11-28 02:33:50 -05:00
Boris Zbarsky
67bc51cf16 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
1c31e545ec 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
6451b2a018 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
dce41beebc Bug 810641. Implement support for variadic callback arguments in WebIDL. r=peterv 2012-11-26 21:14:45 -05:00
Boris Zbarsky
3727b0d820 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
243151f563 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
0db2b629d3 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
46b9d205df 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
2bb6e39346 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
2c380fb37b 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
24950d41c9 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
526256fc6b Bug 792090 - Ignore unused result in CGProxy...PresenceChecker. r=bz 2012-11-12 14:21:46 -08:00
Boris Zbarsky
c8deffa677 Bug 809260. Example codegen should include ErrorResult.h in the header. r=mccr8 2012-11-09 08:24:32 -08:00
Boris Zbarsky
d5b4efd9db Bug 808698. Set up example codegen for proxy bindings to work correctly. r=jst 2012-11-09 08:24:32 -08:00
Boris Zbarsky
3f0cab408f Bug 796983 followup to address peterv's comments. r=presumably-peterv 2012-11-09 08:24:32 -08:00
Boris Zbarsky
2789f45d35 Bug 807224 followup to address review comments. r=presumably-peterv 2012-11-09 08:24:31 -08:00
Boris Zbarsky
e1ded25637 Bug 807226 part 8. Remove the exceptions for EventHandler in WebIDL codegen. r=smaug 2012-11-09 08:00:25 -08:00
Boris Zbarsky
721e804d9a Bug 807224. Implement native-to-JS conversion for WebIDL unions. r=peterv 2012-11-09 07:59:33 -08:00
Boris Zbarsky
b7d72d9da1 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
b44862af8b 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
2cca8f2c52 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
499ff69d95 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
a087a0f7d6 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
5d6259af0a Bug 779048 part 6. Handling of return values for callbacks. r=peterv 2012-11-09 07:43:58 -08:00
Boris Zbarsky
06263c8888 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
1020c25604 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
c7949cb5a7 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
01d54b91df 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
938e5422f5 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
cd4b7e8862 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
db88f5c454 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
d4da4172b2 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
09c482c38b 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
3ca527fe47 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
f8df52c6b0 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
f054cbef56 Bug 803519. Require indexed/named getters if we have creators/deleters/setters. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky
da22cd5b71 Bug 772869. Make getOwnPropertyNames work correctly for WebIDL proxy bindings. r=peterv,ms2ger 2012-11-05 11:58:03 -05:00
Boris Zbarsky
aaed3ec0e2 Bug 803306. Calling a named creator should not define an expando. r=peterv 2012-11-05 11:58:03 -05:00
Boris Zbarsky
42cdade779 Bug 788225. Implement WebIDL deleters. r=peterv 2012-11-05 11:58:02 -05:00
Boris Zbarsky
b953ad4cdd 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
ddd24cd75e 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
603678c976 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
54dd77191f Bug 749866 part 1. Add support for failureCode for sequence unwrapping. r=khuey 2012-11-05 11:58:02 -05:00
William Chen
bcc2b792e9 Bug 807034 - Fix WebIDL codegen for static readonly attributes. r=bz 2012-10-30 11:38:58 -07:00
Vendelin Ruzicka
80dae24d12 Bug 806184 - Can't use 'delete' method in WebIDL. r=bz 2012-10-31 13:36:20 +01:00
Peter Van der Beken
9e18022b7d 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
1ef60a85a4 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
d7322eea5c 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
efd72d6b0c 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
6bae1ef04d Bug 797821 - Address Ms2ger's review comments. r=me 2012-10-25 17:01:09 +02:00
Bobby Holley
05aea8b835 Bug 797821 - Replace usage of XPCWrappedNativeScope::FindInJSObjectScope(ccx, obj) with GetObjectScope(obj). r=mrbkap 2012-10-25 17:01:08 +02:00
Boris Zbarsky
82bd188144 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
f2b84a3ae9 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
85cc57baf9 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
0b95078494 Bug 798187 followup. Actually return our newly-created object from dictionary ToObject. r=peterv 2012-10-22 14:35:08 -04:00
Boris Zbarsky
640f21eb69 Bug 798187 part 1. Add support for dictionary return values. r=peterv 2012-10-22 13:08:52 -04:00
Boris Zbarsky
b3b06a3510 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
5d16209106 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
3fa042ace2 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
ac7e3e09f9 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
7e68ba84af Bug 796983 part 1. Switch nullable primitives to using a const Nullable. r=jst 2012-10-17 17:01:55 -04:00
Ehsan Akhgari
2c5f5e810e Merge mozilla-central into mozilla-inbound 2012-10-16 20:43:47 -04:00
Olli Pettay
94fafd006f Bug 797806 - Helper method to handle stringified JSON in C++, part2, r=khuey 2012-10-16 18:37:44 +03:00
Olli Pettay
725f23d5ee Bug 797806 - Helper method to handle stringified JSON in C++, r=khuey 2012-10-16 17:52:10 +03:00
Peter Van der Beken
de52d9ea80 Fix for bug 798264 (Split property tables). r=bz.
--HG--
extra : rebase_source : 71456ae48d3d3e6014e8095837f7942cfe733a37
2012-10-09 20:50:05 +02:00