diff options
-rw-r--r-- | src/components/main/compositing/mod.rs | 4 | ||||
-rw-r--r-- | src/components/msg/compositor_msg.rs | 1 | ||||
-rw-r--r-- | src/components/script/script_task.rs | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/components/main/compositing/mod.rs b/src/components/main/compositing/mod.rs index f5c7f48d3d9..f66992c60a3 100644 --- a/src/components/main/compositing/mod.rs +++ b/src/components/main/compositing/mod.rs @@ -67,6 +67,10 @@ impl ScriptListener for CompositorChan { self.chan.send(InvalidateRect(id, rect)); } + fn close(&self) { + self.chan.send(Exit); + } + } /// Implementation of the abstract `RenderListener` interface. diff --git a/src/components/msg/compositor_msg.rs b/src/components/msg/compositor_msg.rs index 58a3b66a1b7..89a01604766 100644 --- a/src/components/msg/compositor_msg.rs +++ b/src/components/msg/compositor_msg.rs @@ -80,6 +80,7 @@ pub trait RenderListener { pub trait ScriptListener : Clone { fn set_ready_state(&self, ReadyState); fn invalidate_rect(&self, PipelineId, Rect<uint>); + fn close(&self); } /// The interface used by the quadtree to get info about LayerBuffers diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs index 870dec7468d..688176bc4c8 100644 --- a/src/components/script/script_task.rs +++ b/src/components/script/script_task.rs @@ -564,6 +564,7 @@ impl ScriptTask { } page.layout_chan.send(layout_interface::ExitMsg); } + self.compositor.close(); } /// The entry point to document loading. Defines bindings, sets up the window and document |