servo: Merge #4607 - Consolidate structured cloning code (from Ms2ger:clone); r=jdm

Source-Repo: https://github.com/servo/servo
Source-Revision: a07c3eadb33eca1fbb2209d168c63c5ec3db23df
This commit is contained in:
Ms2ger
2015-01-10 09:18:45 -07:00
parent 2b06b0f070
commit 9ad17a520b
5 changed files with 76 additions and 65 deletions

View File

@@ -19,6 +19,7 @@ use dom::bindings::global::GlobalRef;
use dom::bindings::js::{JS, JSRef, Temporary, OptionalRootable};
use dom::bindings::js::{RootCollection, RootCollectionPtr};
use dom::bindings::refcounted::{LiveDOMReferences, Trusted};
use dom::bindings::structuredclone::StructuredCloneData;
use dom::bindings::trace::JSTraceable;
use dom::bindings::utils::{wrap_for_same_compartment, pre_wrap};
use dom::document::{Document, IsHTMLDocument, DocumentHelpers, DocumentSource};
@@ -77,7 +78,6 @@ use js;
use url::Url;
use libc;
use libc::size_t;
use std::any::{Any, AnyRefExt};
use std::cell::Cell;
use std::comm::{channel, Sender, Receiver, Select};
@@ -120,7 +120,7 @@ pub enum ScriptMsg {
ExitWindow(PipelineId),
/// Message sent through Worker.postMessage (only dispatched to
/// DedicatedWorkerGlobalScope).
DOMMessage(*mut u64, size_t),
DOMMessage(StructuredCloneData),
/// Generic message that encapsulates event handling.
RunnableMsg(Box<Runnable+Send>),
/// A DOM object's last pinned reference was removed (dispatched to all tasks).