Tetsuharu OHZEKI
7fcade294c
Remove "DerefMut" implementation from Root/JSRef.
2014-06-22 21:22:58 +09:00
Ms2ger
4964d2792e
Pass the NativeProperties struct to CreateInterfaceObjects2.
...
This will simplify adding more kinds of properties, such as static attributes.
2014-06-22 13:25:18 +02:00
Ms2ger
886d401ff0
Introduce a NativeProperties struct to store the properties.
...
This will simplify adding more kinds of properties, such as static attributes.
2014-06-22 13:25:18 +02:00
Ms2ger
da28a791e5
Store the arrays of properties as &'static [T] rather than [T, ..N].
...
This means the .as_slice() call (which is problematic when storing the array
in a static struct) is no longer necessary.
2014-06-22 13:25:18 +02:00
Josh Matthews
f6294a67c5
Merge pull request #2693 from Ms2ger/fix-indentation
...
Clean up the indentation of generated code.
2014-06-22 13:04:32 +02:00
Ms2ger
0731045249
Remove some spurious newlines from the generated code.
2014-06-21 20:07:09 +02:00
Josh Matthews
5067ebac2a
Merge pull request #2683 from Ms2ger/nointerfaceobject
...
Fix the implementation of NoInterfaceObject.
2014-06-21 18:47:39 +02:00
Ms2ger
5fb475617b
Move the responsibility for indenting code from CGAbstractMethod.definition_body to its caller.
2014-06-21 14:48:23 +02:00
Ms2ger
46b9343459
Use CGIndenter for CGRegisterProtos.definition_body.
2014-06-21 14:44:08 +02:00
Ms2ger
f3a8f74d3c
Use CGIndenter for CGClassConstructHook.definition_body.
2014-06-21 14:38:58 +02:00
Ms2ger
31ab6415c9
Use CGIndenter for CGAbstractClassHook.definition_body.
2014-06-21 14:36:35 +02:00
Ms2ger
504efb66fb
Indent the contents of obj_toString correctly.
2014-06-21 14:25:08 +02:00
Ms2ger
eb4213f613
Indent the contents of get.
2014-06-21 14:22:14 +02:00
Ms2ger
b5ca6d9a37
Indent the contents of hasOwn.
2014-06-21 14:19:31 +02:00
Ms2ger
cf556cbbd6
Indent the contents of defineProperty.
2014-06-21 14:14:49 +02:00
Ms2ger
8ef51158ff
Indent the contents of getOwnPropertyDescriptor.
2014-06-21 14:10:14 +02:00
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
Manish Goregaokar
7d029ae7b2
Fix field-value checking to not throw for lone spaces
2014-06-21 09:33:17 +05:30
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
Josh Matthews
0395558343
Merge pull request #2663 from saneyuki/trace_comment
...
Mention the usecase of Traceable/Untraceable.
2014-06-20 11:00:37 +01: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
Manish Goregaokar
f558f9aad0
Request termination for XHR
2014-06-19 22:37:33 +05:30
Tetsuharu OHZEKI
2477e6feac
Mention the usecase of Traceable/Untraceable.
2014-06-17 01:28:59 +09:00
Ms2ger
90b6c77666
Remove unused code to support preffed-off and chrome-only APIs.
2014-06-14 13:14:34 +02:00
bors-servo
239fa77dd5
auto merge of #2653 : Ms2ger/servo/docs, r=Ms2ger,metajack
2014-06-13 15:01:54 -04:00
bors-servo
7ed5041891
auto merge of #2649 : ebalint/servo/2580_JS_T_unrooted_replace, r=jdm
...
removed .clone() calls
modified from_rooted method parameter: T to &T
2014-06-13 14:33:03 -04:00
bors-servo
c0576108c5
auto merge of #2585 : ebalint/servo/2530, r=jdm
2014-06-13 14:04:45 -04:00
Ms2ger
d2707d3344
Correct formatting in documentation in js.rs.
2014-06-13 19:34:18 +02:00
Ms2ger
db5badd36f
Add some blank lines to ensure rustdoc picks up the lists.
2014-06-13 19:33:19 +02:00
Ms2ger
7b35e11626
Use '//!' rather than '///' for the overview comment in js.rs.
2014-06-13 19:33:19 +02:00
Edit Balint
94ec3cde8a
Split Page code out of script_task.rs #2530
2014-06-13 19:28:57 +02:00
Ms2ger
e09ed14362
Remove Reflectable::mut_reflector.
2014-06-13 19:19:58 +02:00
Ms2ger
c331b200b1
Use Cell for Reflector::object.
2014-06-13 19:19:56 +02:00
Edit Balint
bda29ade09
Replace uses of JS<T>.unrooted() with JS::from_rooted #2580
2014-06-13 19:06:28 +02:00
bors-servo
4c5437c58b
auto merge of #2652 : saneyuki/servo/root, r=jdm
...
fix #2650
2014-06-13 12:49:52 -04:00
Tetsuharu OHZEKI
e5a708f727
Make the conservertive stack scanner calculates Temporary<T>
as root instead of calling root methods.
...
See: https://github.com/mozilla/servo/issues/2650
2014-06-14 01:32:18 +09:00
bors-servo
da668f53d9
auto merge of #2616 : Ms2ger/servo/attrvalue, r=jdm
...
Obsoletes #2073 .
2014-06-13 11:41:13 -04:00
Ms2ger
972c69883e
Implement Element.classList (partially fixes #1717 ).
2014-06-13 14:13:00 +02:00
bors-servo
cc23f3c436
auto merge of #2633 : Ms2ger/servo/derefmut, r=jdm
...
Part of #1854 .
2014-06-11 13:59:01 -04:00