diff options
Diffstat (limited to 'components/script')
-rw-r--r-- | components/script/dom/bindings/conversions.rs | 4 | ||||
-rw-r--r-- | components/script/dom/htmlfontelement.rs | 4 | ||||
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 2 | ||||
-rw-r--r-- | components/script/dom/htmllinkelement.rs | 1 | ||||
-rw-r--r-- | components/script/layout_interface.rs | 4 | ||||
-rw-r--r-- | components/script/script_thread.rs | 14 |
6 files changed, 14 insertions, 15 deletions
diff --git a/components/script/dom/bindings/conversions.rs b/components/script/dom/bindings/conversions.rs index 6db0d08af4d..060d3d598ca 100644 --- a/components/script/dom/bindings/conversions.rs +++ b/components/script/dom/bindings/conversions.rs @@ -253,12 +253,12 @@ pub unsafe fn get_dom_class(obj: *mut JSObject) -> Result<&'static DOMClass, ()> let clasp = JS_GetClass(obj); if is_dom_class(&*clasp) { - debug!("plain old dom object"); + trace!("plain old dom object"); let domjsclass: *const DOMJSClass = clasp as *const DOMJSClass; return Ok(&(&*domjsclass).dom_class); } if is_dom_proxy(obj) { - debug!("proxy dom object"); + trace!("proxy dom object"); let dom_class: *const DOMClass = GetProxyHandlerExtra(obj) as *const DOMClass; return Ok(&*dom_class); } diff --git a/components/script/dom/htmlfontelement.rs b/components/script/dom/htmlfontelement.rs index ae274411040..d898a5840b2 100644 --- a/components/script/dom/htmlfontelement.rs +++ b/components/script/dom/htmlfontelement.rs @@ -15,7 +15,7 @@ use dom::node::Node; use dom::virtualmethods::VirtualMethods; use string_cache::Atom; use style::values::specified; -use util::str::{DOMString, WHITESPACE, read_numbers}; +use util::str::{DOMString, HTML_SPACE_CHARACTERS, read_numbers}; #[dom_struct] pub struct HTMLFontElement { @@ -124,7 +124,7 @@ pub fn parse_legacy_font_size(mut input: &str) -> Option<&'static str> { // Steps 1 & 2 are not relevant // Step 3 - input = input.trim_matches(WHITESPACE); + input = input.trim_matches(HTML_SPACE_CHARACTERS); enum ParseMode { RelativePlus, diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index fc339664833..a9d5471d468 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -13,7 +13,7 @@ use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding; use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods; use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::conversions::{ToJSValConvertible}; -use dom::bindings::error::{Error, ErrorResult, Fallible}; +use dom::bindings::error::{Error, ErrorResult}; use dom::bindings::global::GlobalRef; use dom::bindings::inheritance::Castable; use dom::bindings::js::{Root, LayoutJS}; diff --git a/components/script/dom/htmllinkelement.rs b/components/script/dom/htmllinkelement.rs index 1b058b4c671..1ad52f45d6c 100644 --- a/components/script/dom/htmllinkelement.rs +++ b/components/script/dom/htmllinkelement.rs @@ -8,7 +8,6 @@ use dom::attr::{Attr, AttrValue}; use dom::bindings::cell::DOMRefCell; use dom::bindings::codegen::Bindings::HTMLLinkElementBinding; use dom::bindings::codegen::Bindings::HTMLLinkElementBinding::HTMLLinkElementMethods; -use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use dom::bindings::inheritance::Castable; use dom::bindings::js::{JS, MutNullableHeap, Root}; use dom::bindings::js::{RootedReference}; diff --git a/components/script/layout_interface.rs b/components/script/layout_interface.rs index 07d8ac47edc..e72bb168f33 100644 --- a/components/script/layout_interface.rs +++ b/components/script/layout_interface.rs @@ -12,7 +12,7 @@ use euclid::point::Point2D; use euclid::rect::Rect; use gfx_traits::{Epoch, LayerId}; use ipc_channel::ipc::{IpcReceiver, IpcSender}; -use msg::constellation_msg::{ConstellationChan, Failure, PipelineId}; +use msg::constellation_msg::{ConstellationChan, PanicMsg, PipelineId}; use msg::constellation_msg::{WindowSizeData}; use net_traits::image_cache_thread::ImageCacheThread; use profile_traits::mem::ReportsChan; @@ -250,7 +250,7 @@ pub struct NewLayoutThreadInfo { pub layout_pair: OpaqueScriptLayoutChannel, pub pipeline_port: IpcReceiver<LayoutControlMsg>, pub constellation_chan: ConstellationChan<ConstellationMsg>, - pub failure: Failure, + pub panic_chan: ConstellationChan<PanicMsg>, pub script_chan: IpcSender<ConstellationControlMsg>, pub image_cache_thread: ImageCacheThread, pub paint_chan: OptionalOpaqueIpcSender, diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 5f2ecd095ba..78c9aefc409 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -389,7 +389,7 @@ pub struct ScriptThread { content_process_shutdown_chan: IpcSender<()>, } -/// In the event of thread failure, all data on the stack runs its destructor. However, there +/// In the event of thread panic, all data on the stack runs its destructor. However, there /// are no reachable, owning pointers to the DOM memory, so it never gets freed by default /// when the script thread fails. The ScriptMemoryFailsafe uses the destructor bomb pattern /// to forcibly tear down the JS compartments for pages associated with the failing ScriptThread. @@ -442,11 +442,11 @@ impl ScriptThreadFactory for ScriptThread { state: InitialScriptState, layout_chan: &OpaqueScriptLayoutChannel, load_data: LoadData) { - let ConstellationChan(const_chan) = state.constellation_chan.clone(); + let ConstellationChan(panic_chan) = state.panic_chan.clone(); let (script_chan, script_port) = channel(); let layout_chan = LayoutChan(layout_chan.sender()); - let failure_info = state.failure_info.clone(); - thread::spawn_named_with_send_on_failure(format!("ScriptThread {:?}", state.id), + let pipeline_id = state.id; + thread::spawn_named_with_send_on_panic(format!("ScriptThread {:?}", state.id), thread_state::SCRIPT, move || { PipelineNamespace::install(state.pipeline_namespace_id); @@ -481,7 +481,7 @@ impl ScriptThreadFactory for ScriptThread { // This must always be the very last operation performed before the thread completes failsafe.neuter(); - }, failure_info, const_chan); + }, Some(pipeline_id), panic_chan); } } @@ -1061,7 +1061,7 @@ impl ScriptThread { subpage_id, load_data, paint_chan, - failure, + panic_chan, pipeline_port, layout_shutdown_chan, content_process_shutdown_chan, @@ -1079,7 +1079,7 @@ impl ScriptThread { layout_pair: layout_pair, pipeline_port: pipeline_port, constellation_chan: self.layout_to_constellation_chan.clone(), - failure: failure, + panic_chan: panic_chan, paint_chan: paint_chan, script_chan: self.control_chan.clone(), image_cache_thread: self.image_cache_thread.clone(), |