Glenn Watson
7cba2f1738
Remove unused imports for UnionTypes codegen. Fixes #2440 .
2014-05-16 08:46:20 +10:00
Cameron Zwarich
b8d423d931
Switch to using ContravariantLifetime in JSRef<'a, T>.
...
Since ContravariantLifetime doesn't take up any storage space, this
means that JSRef will be a single word. This fixes #2333 .
2014-05-14 14:13:58 -07:00
bors-servo
288550a2bf
auto merge of #2428 : zwarich/servo/remove-add-html-element, r=jdm
...
We can just use the defaults for all of the HTML elements for now and
deal with the nonstandard behavior later. This fixes #2207 .
2014-05-14 01:25:13 -04:00
Cameron Zwarich
a44e9e8e6c
Remove addHTMLElement from Bindings.conf.
...
We can just use the defaults for all of the HTML elements for now and
deal with the nonstandard behavior later. This fixes #2207 .
2014-05-13 21:40:36 -07:00
Ms2ger
30fcf7ed61
Remove the isOptional argument and the dealWithOptional return value from getJSToNativeConversionTemplate.
...
Note that dictionaries currently don't support members without default values
right now.
This commit does not change the generated code.
2014-05-10 11:00:01 +02:00
Ms2ger
6ed924f515
Remove the argcAndIndex argument from instantiateJSToNativeConversionTemplate.
...
This commit does not change the generated code.
2014-05-10 10:50:10 +02:00
Guro Bokum
04c807dd53
Convert as many of Page's RefCell fields to Cell as possible ( fixes #1990 ).
2014-05-09 23:52:06 +02:00
Manish Goregaokar
b40d8b4d53
Basic synchronous GET with XHR
2014-05-09 20:39:54 +05:30
Cameron Zwarich
20fa4d7e11
Remove an unused field from CodegenRust.py.
...
The defaultVisibility field was cloned from the C++ implementation,
where it tracks the difference between struct and class visibility.
Since no similar concept exists in Rust, it should be removed.
2014-05-08 13:59:53 -07:00
Manish Goregaokar
2f376a1104
Add ProgressEvent interface
2014-05-08 20:41:51 +05:30
bors-servo
86a6de209e
auto merge of #2346 : gsingh93/servo/master, r=jdm
2014-05-07 18:58:18 -04:00
Gulshan Singh
fb0c433b70
Add Performance object to Window and implement Performance::Now()
2014-05-07 17:30:33 -04:00
Ms2ger
0ab3444af9
Add support for DOMString in unions ( fixes #2324 ).
2014-05-07 17:30:32 -04:00
Ms2ger
87008a5ae1
Remove unused zip_copies.
2014-05-07 12:29:26 +02:00
Glenn Watson
51ef2f06ba
Rename from_unrooted to from_temporary. Fixes #2332 .
2014-05-07 09:25:32 +10:00
bors-servo
8d1b9db5aa
auto merge of #2343 : Ms2ger/servo/String-union, r=jdm
2014-05-06 10:25:23 -04:00
Ms2ger
590a8ac824
Add support for DOMString in unions ( fixes #2324 ).
2014-05-06 15:51:17 +02:00
Ms2ger
8ea3cbf18a
Enter a compartment when calling callbacks.
2014-05-06 12:16:03 +02:00
Ms2ger
0016b1839e
Use a single JSContext per JSRuntime.
...
The long-term plan for SpiderMonkey is to eliminate JSContexts by merging
(most of) it into JSRuntime, so to future-proof our code, we should avoid
creating multiple JSContexts for the same JSRuntime.
However, this implies we'll have to use the same JSContext for objects in
different compartments, so we need to enter compartments. This is done by
using the with_compartment function.
2014-05-05 19:41:02 +02:00
bors-servo
f642d5951a
auto merge of #2299 : Ms2ger/servo/getJSToNativeConversionTemplate-cleanup, r=jdm
2014-05-05 09:43:18 -04:00
Manish Goregaokar
1008a536a7
Fix some unused_mut/unused_result warnings
2014-05-05 15:43:29 +05:30
Ms2ger
262dc30c18
Assign into the argument binding directly in instantiateJSToNativeConversionTemplate.
2014-05-05 11:36:52 +02:00
Ms2ger
aed95dfd94
Move the assignment outside the if when dealing with optional arguments.
2014-05-05 11:36:52 +02:00
Ms2ger
d14efebb5c
Move the assignment of 'None' in the no-argument-passed case into an else branch.
...
This is the only case where we assign into an argument local twice, so removing
it will allow us to make that binding immutable.
2014-05-05 11:36:52 +02:00
Ms2ger
cb2723c4ed
Remove getJSToNativeConversionTemplate's initialValue return value.
...
This commit does not change the generated code.
2014-05-05 11:36:49 +02:00
Ms2ger
455465f3c6
Move the handling of default values in getJSToNativeConversionTemplate into handleOptional.
...
This is a first step towards moving responsibility for default values into the
caller, which should improve their code (in particular for the dictionary
codegen.
This also introduces a Dictionary::empty function, whose implementation is a
hack. The implementation will be improved once its codegen has access to the
raw default values.
Besides dictionaries, this commit does not change the generated code.
2014-05-05 11:29:46 +02:00
Ms2ger
e53c768b9e
Use CGIfWrapper in instantiateJSToNativeConversionTemplate.
2014-05-05 11:21:13 +02:00
Ms2ger
2db1ce72f0
Remove references to unused substitution variables in getJSToNativeConversionTemplate.
2014-05-05 11:21:13 +02:00
Glenn Watson
71f3f5894e
Prevent unused result warning in codegen. Always expect success for now.
2014-05-05 11:04:05 +10:00
Ms2ger
25542e3f7e
Replace most ~"string"s with "string".to_owned().
2014-05-04 09:39:07 +02:00
Ms2ger
243814022e
Replace all ~"" with "".to_owned().
2014-05-03 22:17:45 +02:00
Josh Matthews
91278da9dd
Address review comments.
2014-05-03 14:18:31 -04:00
Josh Matthews
895e9ee37f
Make dictionaries contain Root<T> values instead of JS<T>, ensuring that they will not be collected while the dictionary is alive.
2014-05-03 14:18:31 -04:00
Josh Matthews
0f2d0b1dc3
Address review comments.
2014-05-03 14:18:31 -04:00
Josh Matthews
7b3e6d1f21
Remove all root collections.
2014-05-03 14:18:31 -04:00
Josh Matthews
aaf0a61194
Store per-ScriptTask RootCollection in TLS and use that in favour of per-frame collections.
2014-05-03 14:18:31 -04:00
Josh Matthews
a09a4bd297
Root Temporary values for the duration of their lifetime.
2014-05-03 14:18:31 -04:00
Josh Matthews
522d3f167b
s/Unrooted/Temporary/g
2014-05-03 14:18:31 -04:00
Josh Matthews
bbfed38168
Move stack roots into Root types instead of RootCollection, removing the aribtrary 10 roots per stack frame restriction.
2014-05-03 14:18:31 -04:00
Josh Matthews
7daa97c7e5
Remove abstract_self.
2014-05-03 14:18:30 -04:00
Josh Matthews
76783b029e
Move WebIDL methods to traits implemented by JSRef types.
2014-05-03 14:18:30 -04:00
Josh Matthews
dfdda0098a
Remove JS::get/get_mut to enforce sound rooting practices.
2014-05-03 14:18:30 -04:00
Josh Matthews
d7b96db33c
Implement safe rooting strategy via Unrooted, Root, JSRef, and JS.
2014-05-03 14:18:30 -04:00
Josh Matthews
ffdc3f5b32
Turn on GC all the time. Fix rooting errors during parsing and storing timers. Fix borrow errors during tracing.
2014-05-03 14:18:30 -04:00
bors-servo
897c54351a
auto merge of #2301 : Manishearth/servo/xhr-bytestring, r=Ms2ger
...
I had used DOMString in place of ByteString while implementing the XHR webidl, now that we have ByteString, I'll switch to that.
Blocks #2282
2014-05-03 10:55:28 -04:00
Manish Goregaokar
a4c5df3494
Use ByteString in XHR
2014-05-03 19:39:11 +05:30
bors-servo
812d70942f
auto merge of #2295 : Ms2ger/servo/JSCLASS_DOM_GLOBAL, r=jdm
...
It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.
2014-05-03 05:37:15 -04:00
Ms2ger
599d76fa6e
Add JSCLASS_DOM_GLOBAL to DOM global classes, and assert it is used.
...
It seems unlikely that this will ever be hit, but potentially hard to
figure out if it ever is hit.
2014-05-03 10:37:46 +02:00
Manish Goregaokar
619da07a4f
Webidl and basic implementation of XHR object
2014-05-03 14:00:20 +05:30
bors-servo
b36b779d24
auto merge of #2290 : saneyuki/servo/export, r=jdm
...
- Fix #2128
- Take over from #2220
I didn't change `InterfaceTypes.rs` to `type.rs` because `type` is very common name which might be troublesome.
2014-05-01 23:34:39 -04:00