Commit graph

36 commits

Author SHA1 Message Date
bors-servo
1ad9c678f7 auto merge of #4931 : KiChjang/servo/worker-error-event, r=jdm
Fixes #4511
2015-02-21 07:39:51 -07:00
Keith Yeung
61086d6ee5 Worker now fires errorevent when url fetching failed, fixes #4511 2015-02-21 21:51:35 +08:00
Ms2ger
03408d69fb Remove the unused Worker::refcount field. 2015-02-20 14:45:46 +01:00
Shreya Bastikar
7309f2a428 Support firing error events from a dedicated worker at the containing worker object. 2015-02-05 21:42:10 +00:00
Alexandru Cojocaru
685fee02a0 add unwrap to send/recv calls 2015-02-03 16:05:13 +01:00
Ms2ger
a71ccfabef Use snake case in Worker. 2015-01-30 16:15:46 +01:00
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Josh Matthews
95fc29fa0d Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev. 2015-01-28 10:16:49 +10:00
Ms2ger
b2f40b9873 Make Runnable::handler take self by value.
With my thanks to kimundi and eddyb for their help in making this approach
work.
2015-01-10 17:47:18 +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
Ms2ger
edc1d89251 Deny unsafe blocks in script.
As a first start, this allows them indiscriminately where used.
2015-01-09 10:13:25 +01:00
Matt McCoy
85df7f0d6f Fixes #4164 Make Constructor and new functions take GlobalRef by value 2015-01-07 18:52:41 -05:00
Bharath M R
50d53c9fa3 Issue 4497: Converts WorkerPostMessage into a Runnable.
Implements WorkerMessage handler implementing Runnable trait.
2015-01-04 12:26:27 +05:30
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
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
Manish Goregaokar
552db382d6 Remove manual impls of Reflectors (autogen)
Obtained via:

 `find . -maxdepth 1 -type f -print0 | xargs -0 sed -z -i "s/\\nimpl Reflectable for[^{]*{[^}]*}[^}]*}\\n//"`
 `find . -maxdepth 1 -type f -print0 |xargs -0  grep -lZ dom_struct | xargs -0 grep -LZ  "reflector()\\|Reflector::new" |xargs -0 sed -z -i "s/use dom::bindings::utils::{Reflectable, Reflector, reflect_dom_object};/use dom::bindings::utils::reflect_dom_object;/"`

followed by semi-automated removal of leftover imports
2014-12-27 02:52:33 +05:30
Tetsuharu OHZEKI
a7bb436177 script: Remove glob imports added in #4405 2014-12-19 04:52:48 +09:00
Ms2ger
466faac2a5 Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d. 2014-12-17 15:19:45 -05:00
Michael Booth
2cbf5a3671 Updated reflect_dom_object to be passed by value 2014-11-30 19:47:52 +00:00
Ray Clanan
85f746f9b9 Rename untraceable!() to no_jsmanaged_fields!(). References issue #3671 2014-10-23 21:33:32 -04:00
Tetsuharu OHZEKI
0a84c5d479 Macroize event handler getters and setters. 2014-10-23 13:03:58 +09:00
Manish Goregaokar
3f2cbb275b Use #[dom_struct] everywhere 2014-10-16 10:20:18 +05:30
Ehsan Akhgari
840d949d97 Throw DataCloneError from worker postMessage if structured clone fails
This fixes #3248.
2014-10-15 21:57:40 -04:00
Tim Taubert
acd98a73a4 Simple privatizations 2014-10-13 11:13:12 +02:00
Manish Goregaokar
7defa5e941 Remove Untraceable from dedicatedglobalworkerscope.rs 2014-10-05 21:36:17 +05:30
ProgramFOX
71a05a9c39 Made some DOM fields private.
Relevant to #2242.
2014-09-26 20:35:01 +02:00
Manish Goregaokar
cc44a3b064 Use JSTraceable everywhere 2014-09-24 05:44:49 +05:30
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
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
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
Renamed from src/components/script/dom/worker.rs (Browse further)