Ms2ger
7d1b567744
Encapsulate to-be-cleaned-up refcounted pointers.
...
This will allow us to make them Send in the future.
2015-01-21 20:04:51 +01:00
bors-servo
94ebc7c32d
auto merge of #4682 : servo/servo/to_owned, r=jdm
...
into_string has been removed from Rust.
2015-01-20 07:54:46 -07:00
bors-servo
89645391bf
auto merge of #4678 : Ms2ger/servo/doc-clone, r=jdm
2015-01-20 07:21:48 -07:00
Ms2ger
01ed338746
Move to to_owned rather than into_string.
...
into_string has been removed from Rust.
2015-01-20 14:49:07 +01:00
bors-servo
2629445748
auto merge of #4674 : Ms2ger/servo/doc-js, r=jdm
2015-01-20 04:13:01 -07:00
Ms2ger
cf0652812c
Document structuredclone.rs.
2015-01-20 11:40:40 +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
Ms2ger
05c4e3b9f5
Stop using Vec::from_elem.
...
It is obsolete on Rust master.
2015-01-19 14:42:30 +01:00
Ms2ger
31edd21d68
Document global.rs.
2015-01-18 23:38:42 +01:00
Ms2ger
ecf0317bc0
Document error.rs.
2015-01-18 23:32:03 +01:00
Josh Matthews
66fee39045
Stop pretending to do anything except eagerly report pending exceptions after invoking a callback.
2015-01-14 13:05:32 -05:00
Josh Matthews
159235b3d0
Add handling for unreported exceptions when invoking callback objects.
2015-01-14 12:54:46 -05:00
Ms2ger
8efcca986c
Remove RethrowContentExceptions and related infrastructure.
...
We do not intend to implement the DOM in JS, so this code isn't necessary.
2015-01-10 20:22:03 +01:00
Ms2ger
01444022b0
Make StructuredCloneData an opaque struct.
2015-01-10 17:47:42 +01:00
Ms2ger
14ff55443f
Implement StructuredCloneData::read.
2015-01-10 16:33:26 +01:00
Ms2ger
5978b21abf
Implement StructuredCloneData::write.
2015-01-10 16:33:26 +01:00
Ms2ger
57aaa60fa5
Create a StructuredCloneData struct to encapsulate the result of a structured clone.
2015-01-10 16:33:25 +01:00
bors-servo
0793137631
auto merge of #4575 : mttr/servo/warnings, r=jdm
...
Notes:
* This adds `#![allow(missing_copy_implementations)]` to components/*/lib.rs. I'm not sure how to approach the missing Copy warnings (are there things for which Copy should NOT be implemented, and how can I tell?) so I stuck this in to make life easier when looking through the warnings. I can easily remove this if necessary.
* This leaves the following type of warnings, which I couldn't figure out how to approach (I'll investigate it later if no one else wants to).
```
css/matching.rs:72:23: 72:35 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:72 this_as_query.equiv(other)
^~~~~~~~~~~~
css/matching.rs:95:10: 95:49 warning: use of deprecated item: Use overloaded core::cmp::PartialEq, #[warn(deprecated)] on by default
css/matching.rs:95 impl<'a> Equiv<ApplicableDeclarationsCacheEntry> for ApplicableDeclarationsCacheQuery<'a> {
```
2015-01-08 16:03:55 -07:00
bors-servo
7800d98728
auto merge of #4566 : mattnenterprise/servo/globalref-by-value, r=Ms2ger
2015-01-08 13:12:55 -07:00
Matthew Rasmus
7bbce60e43
Fix renamed to slice::from_raw_buf
warning
2015-01-08 08:51:11 -08:00
Matthew Rasmus
dc72119998
Fix non_upper_case_globals
warnings
2015-01-08 08:51:11 -08:00
bors-servo
ec474ae835
auto merge of #4541 : Manishearth/servo/ban-stuff, r=jdm
...
Didn't do the `Vec<Temporary<T>>` banning since we might want to whitelist something there. I'll work on that next.
2015-01-08 09:30:54 -07:00
bors-servo
df6a7959df
auto merge of #4069 : guillaumebort/servo/fix/3936, r=jdm
2015-01-08 08:48:54 -07:00
Ms2ger
16c7060bc8
Update rustc to revision 2cfb5acb5a2751c759627377e602bac4f88f2d19.
2015-01-08 09:58:46 -05:00
Matt McCoy
85df7f0d6f
Fixes #4164 Make Constructor and new functions take GlobalRef by value
2015-01-07 18:52:41 -05:00
Guillaume Bort
5fe3a3e54f
Fix #3936 – {Window,WorkerGlobalScope}.set{Timeout,Interval}(DOMString)
2015-01-07 11:39:15 +01:00
Manish Goregaokar
6225bc6309
Mention MutHeap in DESIGN.md
2015-01-04 20:23:56 +05:30
Ms2ger
f689093d2b
Qualify JSGCTraceKind.
2015-01-04 15:53:21 +01:00
Ms2ger
121904dd89
Slice some fixed-size arrays.
2015-01-04 11:59:50 +01:00
Ms2ger
b51e83819d
Fix obsolete format traits.
...
They are to be removed from the language in the next rust upgrade.
2015-01-02 19:04:18 +01:00
bors-servo
141b5d038f
auto merge of #4526 : servo/servo/deref-1, r=Manishearth
...
This is a start towards fixing #3868 . Not all callers have been fixed yet, so the `Deref` implementation remains for now.
2015-01-02 09:22:51 -07:00
Ms2ger
203d1669c8
Construct a new JSRef in Root::r().
2015-01-02 10:28:24 +01:00
Ms2ger
43eecf6e7a
Stop using ptr.is_not_null() in script.
...
This method is deprecated in rust master; removing its users in advance will
make a future rust upgrade smoother.
2015-01-01 22:19:34 +01:00
Ms2ger
6077ed0ce8
Rename GlobalRoot::root_ref() to GlobalRoot::r() for consistency.
2015-01-01 20:38:04 +01:00
Ms2ger
1dad710063
Replace Root::deref() calls by Root::r() calls where possible.
...
This changes those calls that were already sound.
2015-01-01 20:36:43 +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
yodalee
bb087c238b
use str to_jsval() now
...
xmlhttprequest.rs, CodegenRust.py
replace into_string().to_jsval() to to_jsval()
conversions.rs
DOMString to_jsval() use as_slice().tojsval() now
2015-01-01 02:17:33 +08:00
yodalee
6f569dee92
add str ToJSValConvertible for str type
2014-12-31 20:20:44 +08:00
Bruno de Oliveira Abinader
bb577968e5
Codegen style fix
2014-12-30 12:40:49 -04:00
Bruno de Oliveira Abinader
7cca51b3b4
Codegen empty lines fix
2014-12-30 12:40:48 -04:00
Bruno de Oliveira Abinader
0721c624d9
Codegen indent fixes
2014-12-30 12:40:48 -04:00
Bruno de Oliveira Abinader
c950e3d61e
Codegen whitespace fixes
2014-12-30 11:28:59 -04:00
bors-servo
2c259f477c
auto merge of #4057 : jdm/servo/refcountdom, r=Ms2ger
...
This replaces the specialized TrustedXHRAddress and TrustedWorkerAddress code that was used for the same purpose. A non-zero refcount pins the given DOM object's reflector and prevents it from being GCed even when there are no other outstanding references visible to SpiderMonkey. This will enable us to implement asynchronous operations that refer to particular DOM objects (such as "queue a task to fire a simple event named load at the iframe element" from the spec) safely and conveniently, and paves the way for things like asynchronous network responses.
Some concerns about the resulting size of XHR progress messages have been expressed, but I believe optimizations to reduce that can be implemented in subsequent PRs.
r? @Ms2ger - note in particular the changes to the worker lifetime code. I couldn't figure out how to achieve an identical lifetime to the previous addref/release pairing, and I also was having trouble figuring out why the existing setup was safe. The new implementation now holds the main script task Worker object alive via the TrustedWorkerAddress field in the dedicated worker global scope, which is a significant difference.
2014-12-29 11:57:45 -07:00
Josh Matthews
9a7cd31134
Force all messages to worker tasks to send a TrustedWorkerAddress along with the ScriptMsg. This ensures that the main-thread Worker object is rooted for as long as there are events in flight or being processed.
2014-12-29 13:53:49 -05: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
Bruno de Oliveira Abinader
ab618dd9c7
Add support for named deleter
...
Closes #4469 .
2014-12-29 12:58:48 -04:00
ProgramFOX
18d8ee6ce0
Added readonly flag for CSSStyleDeclaration
2014-12-28 17:39:07 +01:00