aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2015-07-31 11:48:47 -0700
committerPatrick Walton <pcwalton@mimiga.net>2015-07-31 15:03:39 -0700
commit61e3a9545ecd3b93e275af6dfa425a7fdd42f9db (patch)
treef426bc8f8aae487096d302f89e732daef2f73646 /components/script/script_task.rs
parent024c4df912a01be6d2909f4402ad2791f53e0dce (diff)
downloadservo-61e3a9545ecd3b93e275af6dfa425a7fdd42f9db.tar.gz
servo-61e3a9545ecd3b93e275af6dfa425a7fdd42f9db.zip
script: Fix test failures.
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 46796d76dbd..bf23bca2db6 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -287,8 +287,9 @@ pub struct ScriptTask {
incomplete_loads: DOMRefCell<Vec<InProgressLoad>>,
/// A handle to the image cache task.
image_cache_task: ImageCacheTask,
- /// A handle to the resource task.
- resource_task: ResourceTask,
+ /// A handle to the resource task. This is an `Arc` to avoid running out of file descriptors if
+ /// there are many iframes.
+ resource_task: Arc<ResourceTask>,
/// A handle to the storage task.
storage_task: StorageTask,
@@ -418,7 +419,7 @@ impl ScriptTaskFactory for ScriptTask {
control_chan,
control_port,
constellation_chan,
- resource_task,
+ Arc::new(resource_task),
storage_task,
image_cache_task,
mem_profiler_chan.clone(),
@@ -504,7 +505,7 @@ impl ScriptTask {
control_chan: ScriptControlChan,
control_port: Receiver<ConstellationControlMsg>,
constellation_chan: ConstellationChan,
- resource_task: ResourceTask,
+ resource_task: Arc<ResourceTask>,
storage_task: StorageTask,
image_cache_task: ImageCacheTask,
mem_profiler_chan: mem::ProfilerChan,