Ms2ger
df552fca5d
Use CGIndenter for CGProxyUnwrap.definition_body.
2014-06-21 13:57:54 +02:00
Ms2ger
5affa73aa1
Use CGIndenter for CGSpecialized{Method, Getter, Setter}.definition_body.
2014-06-21 13:57:39 +02:00
Ms2ger
437c025e99
Stop indenting in CGMethodCall.
2014-06-21 13:48:55 +02:00
Ms2ger
fa7a0aae75
Use CGIndenter for CGDefineDOMInterfaceMethod.definition_body.
2014-06-21 13:41:38 +02:00
Ms2ger
b717fbe868
Use CGIndenter for CGGetPerInterfaceObject.definition_body.
2014-06-21 13:38:57 +02:00
Ms2ger
44a609d563
Use CGIndenter for CGWrapMethod.definition_body.
2014-06-21 13:37:18 +02:00
Ms2ger
644df404f5
Return a CGThing from CGAbstractMethod.definition_body.
2014-06-21 13:34:37 +02:00
Ms2ger
6cf79732f9
Move the responsibility for indentation to CGAbstractBindingMethod.definition_body from its callees.
2014-06-21 13:24:51 +02:00
Ms2ger
8df0f981fe
Keep calling the DefineDOMInterface method for NoInterfaceObject interfaces.
...
DefineDOMInterface also creates the proxy handler for proxy classes, so it
should be called in this case as well.
2014-06-20 19:21:47 +02:00
Ms2ger
5acbea5199
Pass the interface object-related arguments to CreateInterfaceObjects2 together in an Option.
...
This clarifies the code and fixes our support of NoInterfaceObject interfaces.
2014-06-20 18:47:31 +02:00
Ms2ger
f11e7ee0a9
Generate code for NoInterfaceObject interfaces in InterfaceTypes and InheritTypes.
...
There is no reason for those interfaces to be excluded.
2014-06-20 17:52:20 +02:00
Ms2ger
c8b8550cfb
Correct the condition for generating CGGetConstructorObjectMethod.
...
As we don't actually implement the feature for which this is needed, I've
commented the call out for now and mentioned the issue for the feature.
2014-06-20 15:20:19 +02:00
Ms2ger
d7c4f2ba93
Stop pretending that CreateInterfaceObjects2 can return the interface object.
...
We do not currently support the case of a non-callback interface that doesn't
have an interface prototype object. (This case is not allowed by the WebIDL
specification; it was added to Gecko to allow feature-detecting the URL
interface. See <https://bugzilla.mozilla.org/show_bug.cgi?id=1026720 >.)
It follows that, if we call CreateInterfaceObjects2 at all, we will call it
with a protoClass argument, so there is no reason to use a nullable pointer
type for that argument.
Moreover, if we had actually supported that case, the returned interface
object would have been stored in the interface prototype object cache, to ill
effect.
2014-06-20 10:33:47 +02:00
Ms2ger
5a1ed6396e
Handle JSAPI OOM failures by task failure as soon as possible.
...
We already ensure to fail the task if GetProtoObject returns null, as we don't
have a useful way to handle OOM, and we don't wish to thread the failure
through to some place where we could handle it in a useful way.
Unfortunately, we cannot ensure through the type system that none of those
functions returns null, so we use assertions to check it dynamically.
2014-06-20 09:46:12 +02:00
Ms2ger
90b6c77666
Remove unused code to support preffed-off and chrome-only APIs.
2014-06-14 13:14:34 +02:00
bors-servo
c0576108c5
auto merge of #2585 : ebalint/servo/2530, r=jdm
2014-06-13 14:04:45 -04:00
Edit Balint
94ec3cde8a
Split Page code out of script_task.rs #2530
2014-06-13 19:28:57 +02:00
Ms2ger
c331b200b1
Use Cell for Reflector::object.
2014-06-13 19:19:56 +02:00
Ms2ger
44f57ae6da
Pass a JSRef to RegisterBindings::Register.
...
JS<T> should only be used for members of traced structures; the correct type
for arguments is JSRef.
2014-06-11 12:40:12 +02:00
Ms2ger
406acd17af
Avoid reallocations with variadic arguments.
...
Thanks to huon for pointing that out.
2014-06-10 10:19:26 +02:00
Ms2ger
78f368d336
Support union variadic arguments and add tests.
2014-06-10 10:19:26 +02:00
Ms2ger
d89f867b14
Implement variadic arguments ( fixes #1985 ).
2014-06-10 10:19:26 +02:00
bors-servo
0ff6a45709
auto merge of #2611 : Ms2ger/servo/webidl-parser-sync, r=jdm
2014-06-09 22:19:44 -04:00
bors-servo
1f41eda321
auto merge of #2613 : Manishearth/servo/xhr-wpt-methods, r=Ms2ger
...
For [XMLHttpRequest/open-method-case-sensitive.htm](https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/open-method-case-sensitive.htm ), [XMLHttpRequest/XMLHttpRequest/open-method-insecure.htm](https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/open-method-insecure.htm ), [XMLHttpRequest/XMLHttpRequest/open-method-responsetype-set-sync.htm ](https://github.com/w3c/web-platform-tests/blob/master/XMLHttpRequest/open-method-responsetype-set-sync.htm ) in particular. `getResponseHeader()` is used by a lot of other tests (the harness echoes most of the metadata in the response headers, which is tested on this side)
The sync changes fixes half of the timeouts to give meaningful results.
Blocks #2525
2014-06-08 12:22:31 -04:00
Manish Goregaokar
e8de5f2f55
Support for extension methods, getResponseHeader(), and an extra error
2014-06-08 21:18:44 +05:30
Manish Goregaokar
7843b7b317
Allow union types to be used as return values
2014-06-07 23:44:21 +05:30
Ms2ger
ef0ccd3e15
Add support for undefined default values for 'any'.
...
This also updates TestBinding to take into account the automatic default
for optional 'any' arguments and dictionary members.
2014-06-07 17:38:35 +02:00
bors-servo
eae9b94399
auto merge of #2599 : Ms2ger/servo/constantspec, r=jdm
2014-06-06 14:04:29 -04:00
Ms2ger
d882bb7cc0
Store a slice in ConstantSpec, rather than a raw pointer.
2014-06-06 14:23:09 +02:00
Ms2ger
ba68203ebf
Remove the pointless terminator from ConstantSpec slices.
2014-06-06 14:10:41 +02:00
Ms2ger
0c54cd1634
Pass slices to CreateInterfaceObjects2 rather than raw pointers.
2014-06-06 14:01:09 +02:00
Ms2ger
3dece6b7ab
Remove some code to support preffing off APIs.
...
We won't be using this feature in the near future, and the implementation is
not really Rustic.
2014-06-06 13:22:47 +02:00
Ms2ger
f0a87bcf64
Don't use mem::transmute for the argument to CreateProxyHandler.
2014-06-06 12:29:43 +02:00
Jack Moffitt
629c4c6afe
Upgrade Rust.
2014-06-05 09:58:59 -06:00
Ms2ger
d8801da9c5
Move WebIDL unions into their own module.
...
This will allow multiple unions to contain the same type.
2014-06-03 18:47:59 +02:00
bors-servo
52a809259a
auto merge of #2550 : Ms2ger/servo/default-handling, r=jdm
2014-06-02 18:01:22 -04:00
Ms2ger
97efd122a3
Rename BindingDeclarations to Bindings.
2014-06-02 19:48:42 +02:00
Ms2ger
dea8a4ffcb
Support dictionary members without default values.
2014-06-02 19:37:06 +02:00
Ms2ger
ebd9b9a519
Rewrite the dictionary codegen to use pattern matching rather than is_some/unwrap.
2014-06-02 19:37:06 +02:00
Ms2ger
2a91e987b4
Return the default value from getJSToNativeConversionTemplate, to allow reusing it more easily.
...
This commit does not change the generated code.
2014-06-02 19:37:05 +02:00
Ms2ger
6d619f484c
Support enumerations in dictionaries.
2014-06-02 14:46:23 +02:00
Ms2ger
33e64c95d3
Include modules with only callbacks in BindingDeclarations.
...
This commit also includes improvements to the 'use' order in some of the
touched files.
2014-05-31 18:58:04 +02:00
Ms2ger
0e83f5af00
Fix minor misformatting in codegen.
2014-05-30 21:49:09 +02:00
bors-servo
da896b8299
auto merge of #2515 : saneyuki/servo/raw, r=jdm
...
Fix #2511
@jdm r?
2014-05-30 13:16:09 -04:00
Ms2ger
b448972d52
Throw DOMExceptions where appropriate ( fixes #2518 ).
2014-05-30 18:14:02 +02:00
Tetsuharu OHZEKI
106627e6eb
"JS<T>::from_raw" should accept "*T" instead of "*mut T"
2014-05-31 01:10:19 +09:00
Josh Matthews
003e5bcd46
Port modern callback handling code from Gecko, and copy related WebIDL parser bits too.
2014-05-27 20:43:52 +02:00
Josh Matthews
2d6153772c
Add stubs for inline event handler manipulation.
2014-05-27 20:43:48 +02:00
Ms2ger
51d2891c9b
Make GetProtoOrIfaceArray return the actual type.
2014-05-26 20:19:38 +02:00
Ms2ger
1834855ff5
Pass an immutable pointer to the private in NewProxyObject.
2014-05-26 20:18:00 +02:00