Cameron Zwarich
78f061ee54
Improve the correctness of Root lifetimes
...
Use the new lifetime bounds feature of Rust to enforce that the
RootCollection field of Root outlives the jsref field. This still
doesn't enforce that the Root itself outlives the jsref field, and
doing this would require some sort of init dance.
2014-09-26 14:25:43 -07:00
bors-servo
c2d6d8084c
Merge pull request #3480 from zwarich/trailing-whitespace
...
Fix trailing whitespace tidy errors
Reviewed-by: larsbergstrom
2014-09-25 17:00:34 -06:00
Cameron Zwarich
ce2484a7ce
Fix trailing whitespace tidy errors
2014-09-25 13:48:07 -07:00
Ms2ger
c4d36b5721
Remove unused cx_for_dom_object function.
2014-09-25 22:35:38 +02:00
Ms2ger
1d00b28df0
Regroup uses of JS constants in utils.rs.
2014-09-25 22:35:38 +02:00
Ms2ger
47829a37a9
Move global_object_for_js_object to global.rs.
...
This appears to be a more sensible place for it (related to #433 ).
2014-09-25 22:35:37 +02:00
Manish Goregaokar
6f6a62e967
Address review comments
2014-09-24 19:35:41 +05:30
Manish Goregaokar
5336dd9853
Update docs
2014-09-24 05:44:53 +05:30
Manish Goregaokar
cc44a3b064
Use JSTraceable everywhere
2014-09-24 05:44:49 +05:30
Manish Goregaokar
85f79290a6
Add untraceable! macro
2014-09-24 02:35:40 +05:30
Ms2ger
d6321230de
Remove the glob import for UnionTypes.
2014-09-21 16:13:42 +02:00
Ms2ger
b40966981c
Share code to compute the type of a union.
...
This does not change the generated code.
2014-09-21 16:13:42 +02:00
Ms2ger
2dd5f2357e
Don't use a glob import for codegen::{PrototypeList, RegisterBindings}.
2014-09-21 14:21:51 +02:00
Keegan McAllister
dc86e83654
Eliminate warnings
2014-09-20 13:00:55 -07:00
Keegan McAllister
a640a7c5c3
Upgrade to rustc 0.12.0-pre (4d2af3861 2014-09-17 15:51:11 +0000)
2014-09-20 13:00:06 -07:00
Cameron Zwarich
2c8d51a37c
More progress in the &JSRef -> JSRef conversion
...
Change all of the <Class>Methods traits to take `self` instead of
`&self`.
2014-09-20 11:54:10 -07:00
Tetsuharu OHZEKI
54d3a0b280
Reintroduce Untraceable<T>.deref_mut() to make mem::replace() possible to Untracebale<T> field.
...
Some compile errors caused by the compiler's misreading comes back again :(
We re-use `deref()`explicitly to hide these errors.
2014-09-20 15:19:00 +09:00
Cameron Zwarich
4fa8725111
First steps of &JSRef -> JSRef conversion
...
Replace &JSRef with JSRef in the bulk of the generated code. This will
remove a level of indirection throughout all DOM code.
This patch doesn't change methods implemented on JSRef<T> to take `self`
rather than `&self`, and it leaves a few other uses of &JSRef, but those
changes can be made incrementally.
2014-09-19 13:39:17 -07:00
Josh Matthews
6d6726178a
Merge pull request #3253 from ChrisParis/TreeWalker
...
Implement TreeWalker
2014-09-19 10:54:26 -04:00
Cameron Zwarich
176b3f7698
Remove uses of &mut JSRef
...
Since everything with JSRef happens with interior mutability, it doesn't
make any sense to use an &mut JSRef.
2014-09-18 15:30:38 -07:00
Chris Paris
92638a6fe6
Implement TreeWalker
2014-09-18 11:13:33 -10:00
Josh Matthews
9607b468bc
Revert "script: Use atom comparison in more places, especially for attributes." for persistent test failures.
...
This reverts commit 874db26104
.
2014-09-18 09:20:19 -04:00
Patrick Walton
874db26104
script: Use atom comparison in more places, especially for attributes.
...
75% improvement in style recalc for Guardians of the Galaxy.
2014-09-17 13:17:12 -07:00
Manish Goregaokar
30014c3919
Make Reflector #[must_root], propagate to non-HTMLElements
2014-09-17 01:02:41 +05:30
Manish Goregaokar
d241826987
Unwrap pointers and miscellany for unrooted_must_root check
2014-09-16 23:31:40 +05:30
Manish Goregaokar
bded5c3703
Add unrooted_must_root lint for usages of JS<T> in let/for bindings
2014-09-16 22:54:24 +05:30
Manish Goregaokar
12dc54d238
Add unrooted_must_root lint for enums and structs containing JS<T>, as well as functions with JS<T> in their parameter list
...
For safe wrappers over JS<T> (eg Temporary<T>) use #[allow(unrooted_must_root)].
For all other types containing a #[must_root] value, annotate the type with #[must_root] to ensure that it is never used unrooted
2014-09-16 22:11:27 +05:30
Jack Moffitt
c6ab60dbfc
Cargoify servo
2014-09-08 20:21:42 -06:00