Commit graph

35 commits

Author SHA1 Message Date
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
Jack Moffitt
629c4c6afe Upgrade Rust. 2014-06-05 09:58:59 -06:00
Edit Balint
7910eb1399 Add a static from_rooted method to JS<T> #2309 2014-06-02 15:48:19 +02:00
Tetsuharu OHZEKI
ad22b29b2d Remove the implementation OptionalSettable for Option<JS<T>> to remove needless '&mut self'. 2014-06-02 00:39:16 +09:00
Tetsuharu OHZEKI
106627e6eb "JS<T>::from_raw" should accept "*T" instead of "*mut T" 2014-05-31 01:10:19 +09:00
Tetsuharu OHZEKI
92da2f16fc Implement OptionalSettable for 'Cell<Option<JS<U>>>'. 2014-05-30 03:53:07 +09:00
Tetsuharu OHZEKI
da703d6a80 JS<T> contains '*T' instead of RefCell. 2014-05-30 03:38:40 +09:00
Tetsuharu OHZEKI
3e558fdcb1 JSRef<T> & Root<T> contains '*T' instead of RefCell. 2014-05-30 03:18:40 +09:00
Ms2ger
d5cb4377ef Use *mut T for the T* pointers in SpiderMonkey. 2014-05-26 18:19:44 +02:00
Ms2ger
eaedeb07cb Update Rust. 2014-05-22 16:36:40 -06:00
Manish Goregaokar
533fab46f9 Async XHR GET with basic response header support 2014-05-20 21:01:12 +05:30
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
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
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
Lars Bergstrom
948daf2422 This batch of changes upgrades Servo to work with the Rust upgrade as of
April 10, 2014. The main changes are to privacy, to work around the
issues with incorrect bounds on the libstd `Arc<Mutex<T>>`, and the
various API changes strewn throughout the libraries.
2014-04-27 15:46:12 -05:00
Josh Matthews
742f73ded5 Add transparent Traceable and Untraceable types to aid proper rooting practices, and replace ad-hoc Untraceable structs with empty Encodable implementations. 2014-04-17 17:41:09 -04:00
Ms2ger
31eee791dd Upgrade rust. 2014-04-04 20:10:32 +02:00
lpy
2fe92bf7ba Make JS<T>::clone inline.(fixes #1955) 2014-03-22 14:57:55 +08:00
bors-servo
7f188500a1 auto merge of #1915 : Ms2ger/servo/wrap-return-js, r=jdm
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
2014-03-19 19:01:48 -04:00
Josh Matthews
f279abbf9f Remove all traces of Box representation from bindings. Work around file read runtime problem. 2014-03-18 09:30:35 -05:00
Lars Bergstrom
bbac8aa5c3 Rust upgrades 2014-03-18 09:30:35 -05:00
Ms2ger
4ad3b6ccd1 Return a JS<T> from *Binding::Wrap rather than a JSObject.
This lets us avoid the sketchy tricks in JS::new and Window::new, where we
kept an unsafe pointer to the native object across the Wrap call that
consumed the owned pointer.
2014-03-14 13:06:51 +01:00
Ms2ger
787108deaf Pass &JS<Window> to the Wrap functions in codegen. 2014-03-04 15:08:44 +01:00
Ms2ger
23b7277b54 Pass &JS<Window> to reflect_dom_object. 2014-03-04 14:13:58 +01:00
Patrick Walton
3c288a5b80 layout: Stop racing on the JSManaged borrow flags 2014-02-27 11:23:06 -08:00
Josh Matthews
625325434b Implement JSManaged for DOM objects. 2014-02-24 15:16:42 -05:00