Matt Murphy
81fd243f37
~[] to Vec in glfw_windowing and servo
2014-05-04 23:16:17 +02:00
Matt Murphy
7605464c24
~[] to Vec in table, table_colgroup, and text
2014-05-04 23:16:16 +02:00
Matt Murphy
e761649cda
~[] to Vec in layout flow, block, table, row, rowgroup, wrapper
2014-05-04 23:16:16 +02:00
Matt Murphy
3d1a885a55
~[] to Vec in main
2014-05-04 23:16:16 +02:00
Matt Murphy
6522e7827d
~[] to Vec in main/constellation.rs
2014-05-04 23:16:16 +02:00
Matt Murphy
7073f3b645
~[] to Vec in main/compositing/compositor_layer.rs
2014-05-04 23:16:16 +02:00
Matt Murphy
60d443da16
~[] to Vec in main/layout/wrapper.rs
2014-05-04 23:16:16 +02:00
Matt Murphy
3a8ecb2bb1
~[] to Vec in main/layout/layout_task.rs, script/dom/clientrectlist.rs,
...
script/layout_interface.rs
2014-05-04 23:16:16 +02:00
Matt Murphy
36fdcdc929
~[] to Vec in main/layout/box_.rs, gfx/text/util.rs, main/layout/text.rs
2014-05-04 23:16:16 +02:00
Matt Murphy
62bbe1f555
~[] to Vec in main/layout/construct.rs and associated files
2014-05-04 23:16:16 +02:00
Matt Murphy
8da47b6a32
~[] to std::vec::Vec in layout
2014-05-04 23:16:16 +02:00
Matt Murphy
d734a8937d
~[] to Vec in main/compositing and associated files
2014-05-04 23:16:16 +02:00
Matt Murphy
f2707bc405
~[] to Vec in style/media_quieres.rs, selectors.rs, stylesheets.rs
2014-05-04 23:16:15 +02:00
Matt Murphy
7447ed69e3
~[] to Vec in FontStyle and FontGroup
2014-05-04 23:16:15 +02:00
Ms2ger
cde01affcd
Use str.to_owned() in tests.
2014-05-04 20:12:58 +02:00
bors-servo
b1d0dac50d
auto merge of #2312 : Ms2ger/servo/owned-strings, r=SimonSapin
2014-05-04 06:22:21 -04:00
Ms2ger
11ea7d4935
Call find_equiv to avoid allocation strings.
2014-05-04 10:17:32 +02:00
Ms2ger
0ff8610727
Reorder some comparisons to avoid allocating strings for them.
2014-05-04 10:17:06 +02:00
Ms2ger
25542e3f7e
Replace most ~"string"s with "string".to_owned().
2014-05-04 09:39:07 +02:00
bors-servo
660f7a016e
auto merge of #2311 : Ms2ger/servo/empty-owned, r=jdm
2014-05-04 01:01:21 -04:00
Ms2ger
243814022e
Replace all ~"" with "".to_owned().
2014-05-03 22:17:45 +02:00
bors-servo
731e66ff13
auto merge of #2101 : jdm/servo/newroot_rebase, r=Ms2ger
...
As described in #1764 , this strategy uses the following properties:
* DOM members are `JS<T>` types. These cannot be used with being explicitly rooted, but they are required for compiler-derived trace hooks.
* Methods that take DOM type arguments receive `&[mut] JSRef<T>`. These are rooted value references that are cloneable but cannot escape.
* Methods that return DOM values use `Unrooted<T>`. These are values that may or may not be rooted elsewhere, but callers must root them in order to interact with them in any way. One unsoundness hole exists - `Unrooted` values must be rooted ASAP, or there exists the danger that JSAPI calls could be made that could cause the underlying JS value to be GCed.
* All methods are implemented on `JSRef<T>`, enforcing the requirement that all DOM values are rooted for the duration of a method call (with a few exceptions for layout-related code, which cannot root values and therefore interacts with `JS<T>` and `&T` values - this is safe under the assumption that layout code interacts with DOM nodes that are in the tree, therefore rooted, and does not run concurrently with content code)
2014-05-03 14:25:22 -04:00
Josh Matthews
91278da9dd
Address review comments.
2014-05-03 14:18:31 -04:00
Josh Matthews
46a33b4b38
Fix up the virtual method unsoundness.
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
8e10daba97
Allow controlling GC zeal via JS_GC_ZEAL environment variable.
2014-05-03 14:18:31 -04:00
Josh Matthews
109410900c
Move all methods on T to JSRef<T> or JS<T> as appropriate.
2014-05-03 14:18:30 -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
4051a8096d
auto merge of #2302 : Manishearth/servo/attr, r=Ms2ger
2014-05-03 12:31:25 -04:00
Manish Goregaokar
dbf65aee3c
Remove dead code
2014-05-03 21:34:31 +05:30
bors-servo
56fe29dd44
auto merge of #2303 : Manishearth/servo/privtype, r=jdm
2014-05-03 12:01:26 -04:00
Manish Goregaokar
e656f1efff
Fix some private type export warnings
2014-05-03 21:20:44 +05:30
Manish Goregaokar
7ce3c244a2
Use new attribute syntax
2014-05-03 21:13:59 +05:30
bors-servo
09374f07e2
auto merge of #2297 : Ms2ger/servo/fail-owned-str, r=jdm
...
The ~"string" expression is being removed in upstream rust.
2014-05-03 11:25:22 -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
Ms2ger
86df4c1fc1
Stop passing owned strings to fail!().
...
The ~"string" expression is being removed in upstream rust.
2014-05-03 12:16:52 +02:00
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
6295feea16
Update rust-opengles.
...
This includes changes to move from ~[T] to Vec<T>.
2014-05-03 11:16:12 +02: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