aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2013-09-12 16:58:30 -0700
committerJosh Matthews <josh@joshmatthews.net>2013-09-12 16:58:30 -0700
commit6bd4306d708d1597f46434ac32eaf1323ea7eec0 (patch)
treee5c3f8917c9c622fb42c2089d530d9c5baa4739f /src
parentab743c17fe4c658a00c443e21a38da5897f6e53a (diff)
downloadservo-6bd4306d708d1597f46434ac32eaf1323ea7eec0.tar.gz
servo-6bd4306d708d1597f46434ac32eaf1323ea7eec0.zip
Fix a dynamic borrow error when executing timer callbacks.
Diffstat (limited to 'src')
-rw-r--r--src/components/script/script_task.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/components/script/script_task.rs b/src/components/script/script_task.rs
index a4cf45d022a..e9c7ebdf740 100644
--- a/src/components/script/script_task.rs
+++ b/src/components/script/script_task.rs
@@ -504,16 +504,15 @@ impl ScriptTask {
let page = self.page_tree.find(id).expect("ScriptTask: received fire timer msg for a
pipeline ID not associated with this script task. This is a bug.").page;
unsafe {
- let js_info = page.js_info.get_ref();
let this_value = if timer_data.args.len() > 0 {
RUST_JSVAL_TO_OBJECT(timer_data.args[0])
} else {
- js_info.js_compartment.global_obj.ptr
+ page.js_info.get_ref().js_compartment.global_obj.ptr
};
// TODO: Support extra arguments. This requires passing a `*JSVal` array as `argv`.
let rval = JSVAL_NULL;
- JS_CallFunctionValue(js_info.js_context.ptr,
+ JS_CallFunctionValue(page.js_info.get_ref().js_context.ptr,
this_value,
timer_data.funval,
0,