mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Issue 4497: Converts WorkerPostMessage into a Runnable.
Implements WorkerMessage handler implementing Runnable trait.
This commit is contained in:
parent
dd84ae6bfb
commit
50d53c9fa3
3 changed files with 24 additions and 11 deletions
|
@ -27,7 +27,6 @@ use dom::keyboardevent::KeyboardEvent;
|
|||
use dom::mouseevent::MouseEvent;
|
||||
use dom::node::{mod, Node, NodeHelpers, NodeDamage, NodeTypeId};
|
||||
use dom::window::{Window, WindowHelpers};
|
||||
use dom::worker::{Worker, TrustedWorkerAddress};
|
||||
use parse::html::{HTMLInput, parse_html};
|
||||
use layout_interface::{ScriptLayoutChan, LayoutChan, ReflowGoal, ReflowQueryType};
|
||||
use layout_interface;
|
||||
|
@ -115,8 +114,6 @@ pub enum ScriptMsg {
|
|||
/// Message sent through Worker.postMessage (only dispatched to
|
||||
/// DedicatedWorkerGlobalScope).
|
||||
DOMMessage(*mut u64, size_t),
|
||||
/// Posts a message to the Worker object (dispatched to all tasks).
|
||||
WorkerPostMessage(TrustedWorkerAddress, *mut u64, size_t),
|
||||
/// Generic message that encapsulates event handling.
|
||||
RunnableMsg(Box<Runnable+Send>),
|
||||
/// A DOM object's last pinned reference was removed (dispatched to all tasks).
|
||||
|
@ -600,8 +597,6 @@ impl ScriptTask {
|
|||
self.handle_exit_window_msg(id),
|
||||
ScriptMsg::DOMMessage(..) =>
|
||||
panic!("unexpected message"),
|
||||
ScriptMsg::WorkerPostMessage(addr, data, nbytes) =>
|
||||
Worker::handle_message(addr, data, nbytes),
|
||||
ScriptMsg::RunnableMsg(runnable) =>
|
||||
runnable.handler(),
|
||||
ScriptMsg::RefcountCleanup(addr) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue