Ms2ger
f8ac1777ff
Don't shadow lifetimes in script.
2015-01-28 13:48:28 +01:00
bors-servo
d373f8dc26
auto merge of #4739 : Manishearth/servo/warning-patrol, r=Ms2ger
2015-01-28 02:27:50 -07:00
bors-servo
1a2a08aa50
auto merge of #4717 : Ms2ger/servo/doc-proxy, r=saneyuki
2015-01-28 01:48:52 -07:00
Manish Goregaokar
e44ee70faf
Remove some old impls
2015-01-28 13:37:18 +05:30
Josh Matthews
95fc29fa0d
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
2015-01-28 10:16:49 +10:00
Ms2ger
238f3e2d91
Require documentation for all code in dom::bindings (excluding dom::bindings::codegen).
2015-01-25 22:01:04 +01:00
Ms2ger
801949556d
Return *const T from JS::unsafe_get() ( fixes #4712 ).
2015-01-24 16:43:19 +01:00
Ms2ger
dfbf83a8ac
Don't call transmute_copy in JS::unsafe_get.
...
It hasn't had borrow flags for quite a while.
2015-01-24 15:57:09 +01:00
Ms2ger
13c7cf928a
Stop calling deref() and deref_mut() explicitly.
2015-01-22 16:04:21 +01:00
Ms2ger
e239bd9644
Document js.rs.
2015-01-19 23:09:00 +01:00
Ms2ger
8a08fff0b4
Remove OptionalSettable.
...
It was obsoleted by MutNullableJS.
2015-01-19 23:08:11 +01:00
Matthew Rasmus
dc72119998
Fix non_upper_case_globals
warnings
2015-01-08 08:51:11 -08:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
Ms2ger
203d1669c8
Construct a new JSRef in Root::r().
2015-01-02 10:28:24 +01:00
Ms2ger
c9f26dfd59
Rename Root::root_ref() to Root::r().
...
As it will be used much more widely after the upcoming changes, this limits
the effort reading and writing the method calls.
2015-01-01 20:36:43 +01:00
Ms2ger
1290c18794
Remove the 'b lifetime from Root.
...
It does not add any safety, as the reference is constructed from a raw pointer
without limiting the lifetime in any way.
2015-01-01 20:36:43 +01:00
Ms2ger
95ec20bd97
Remove the 'a lifetime from Root.
...
It does not add any safety, as the reference is constructed from a raw pointer
without limiting the lifetime in any way.
2015-01-01 20:36:43 +01:00
Josh Matthews
2f059c15e7
Allow refcounting arbitrary DOM objects in concert with the GC to enable safe, asynchronous/cross-task references to pinned objects.
2014-12-29 13:53:48 -05:00
Josh Matthews
8ff3e6bbdc
Create a replacement for Cell<SM primitive>. Fixes #4337 .
2014-12-19 11:17:02 -05:00
Manish Goregaokar
5511e02a78
Add Comparable trait to js.rs; fixups
2014-12-06 02:51:52 -08:00
Ms2ger
d26283c065
Implement MutNullableJS::or_init.
...
This will make it easier to implement lazy getters.
2014-12-04 15:49:29 +01:00
Jack Moffitt
d1b433a3b3
Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a
2014-11-13 11:17:43 +10:00
Patrick Walton
5e9127e2b2
script: Use a 16-element SmallVec
for the root collection.
...
In my tests the size of the root collection never exceeded 7, so 16
seems like a nice conservative number.
2014-10-28 11:12:09 -07:00
Josh Matthews
54fcab61d6
Implement MutNullableJS for mutable, nullable member pointers to DOM objects.
2014-10-01 17:06:23 +02:00
bors-servo
c10948736f
Merge pull request #3497 from zwarich/extended-deref
...
Add an extended_deref method to JSRef
Reviewed-by: Manishearth
2014-09-27 12:48:30 -06:00
Cameron Zwarich
8334942d0c
Add an extended_deref method to JSRef
...
The extended_deref method will take a JSRef<'a, T> and produce an &'a T,
in contrast to the standard deref method that takes an &'b JSRef<'a, T>
and produces an &'a T. This is useful when avoiding passing a JSRef by
reference.
2014-09-26 18:37:26 -07:00
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
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
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
Manish Goregaokar
d241826987
Unwrap pointers and miscellany for unrooted_must_root check
2014-09-16 23:31:40 +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