diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs
index e5ccb6f2e83..b9892ac86a3 100644
--- a/src/components/script/html/hubbub_html_parser.rs
+++ b/src/components/script/html/hubbub_html_parser.rs
@@ -19,6 +19,7 @@ use std::cast;
use std::cell::Cell;
use std::comm;
use std::comm::{Port, SharedChan};
+use std::str;
use std::str::eq_slice;
use std::task;
use std::from_str::FromStr;
@@ -102,7 +103,7 @@ macro_rules! handle_element_base(
pub struct JSFile {
- data: ~[u8],
+ data: ~str,
url: Url
}
@@ -222,11 +223,11 @@ fn js_script_listener(to_parent: SharedChan,
let bytes = result_port.recv();
if bytes.is_some() {
- result_vec.push(JSFile { data: bytes.unwrap(), url: url_clone });
+ result_vec.push(JSFile { data: str::from_utf8(bytes.unwrap()), url: url_clone });
}
}
JSTaskNewInlineScript(data, url) => {
- result_vec.push(JSFile { data: data.into_bytes(), url: url });
+ result_vec.push(JSFile { data: data, url: url });
}
JSTaskExit => {
break;
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index 31a0bd6eb9d..c96c2f626d3 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -30,6 +30,7 @@ use std::comm;
use std::comm::{Port, SharedChan};
use std::io::read_whole_file;
use std::ptr;
+use std::str;
use std::task::{spawn_sched, SingleThreaded};
use std::util::replace;
use dom::window::TimerData;
@@ -578,7 +579,7 @@ impl ScriptTask {
Ok(bytes) => {
compartment.define_functions(debug_fns);
cx.evaluate_script(compartment.global_obj,
- bytes,
+ str::from_utf8(bytes),
url.path.clone(),
1);
}
diff --git a/src/support/spidermonkey/rust-mozjs b/src/support/spidermonkey/rust-mozjs
index 1a9a5c3c146..7372f6b7ed1 160000
--- a/src/support/spidermonkey/rust-mozjs
+++ b/src/support/spidermonkey/rust-mozjs
@@ -1 +1 @@
-Subproject commit 1a9a5c3c1462bd3b3e7905ee2834a5ba906f0214
+Subproject commit 7372f6b7ed1cfa66f0883667d4b08901487c9ab2