aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/script/script_task.rs
diff options
context:
space:
mode:
authorbors-servo <release+servo@mozilla.com>2013-10-17 16:34:30 -0700
committerbors-servo <release+servo@mozilla.com>2013-10-17 16:34:30 -0700
commitebe1c1353ca0ffe1f0e195f4ed66abb982f303ee (patch)
tree9bcc0c8adaf11c7272fb5cd096fe01e69c9af731 /src/components/script/script_task.rs
parent79f4d9a47fd9a79687df22940b6d5044f9b2cd2e (diff)
parentff24707771d28c9c58398fef310ff2b456034a4a (diff)
downloadservo-ebe1c1353ca0ffe1f0e195f4ed66abb982f303ee.tar.gz
servo-ebe1c1353ca0ffe1f0e195f4ed66abb982f303ee.zip
auto merge of #1077 : kmcallister/servo/jsstr, r=jdm
This doesn't resolve the big questions of how Servo will represent strings; it's just about doing the conversion correctly for our existing types.
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);
}