aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/script/script_task.rs')
-rw-r--r--src/components/script/script_task.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index 9897be2b013..9a729ba2970 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);
}