Fix #3936 – {Window,WorkerGlobalScope}.set{Timeout,Interval}(DOMString)

This commit is contained in:
Guillaume Bort 2014-11-19 12:06:36 +01:00
parent ca876edc05
commit 5fe3a3e54f
16 changed files with 126 additions and 55 deletions

View file

@ -27,7 +27,7 @@ use dom::htmlelement::HTMLElementTypeId;
use dom::keyboardevent::KeyboardEvent;
use dom::mouseevent::MouseEvent;
use dom::node::{mod, Node, NodeHelpers, NodeDamage, NodeTypeId};
use dom::window::{Window, WindowHelpers};
use dom::window::{Window, WindowHelpers, ScriptHelpers};
use parse::html::{HTMLInput, parse_html};
use layout_interface::{ScriptLayoutChan, LayoutChan, ReflowGoal, ReflowQueryType};
use layout_interface;
@ -836,7 +836,7 @@ impl ScriptTask {
(HTMLInput::InputUrl(load_response), final_url)
} else {
let evalstr = load_data.url.non_relative_scheme_data().unwrap();
let jsval = window.r().evaluate_js_with_result(evalstr);
let jsval = window.r().evaluate_js_on_global_with_result(evalstr);
let strval = FromJSValConvertible::from_jsval(self.get_cx(), jsval,
StringificationBehavior::Empty);
(HTMLInput::InputString(strval.unwrap_or("".into_string())), doc_url)