aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_task.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/script_task.rs')
-rw-r--r--components/script/script_task.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/script_task.rs b/components/script/script_task.rs
index 28e194b2a4a..48972b3fe70 100644
--- a/components/script/script_task.rs
+++ b/components/script/script_task.rs
@@ -236,7 +236,6 @@ pub enum ScriptTaskEventCategory {
SetViewport,
WebSocketEvent,
WorkerEvent,
- XhrEvent,
}
/// Messages used to control the script event loop
@@ -954,7 +953,6 @@ impl ScriptTask {
ScriptTaskEventCategory::TimerEvent => ProfilerCategory::ScriptTimerEvent,
ScriptTaskEventCategory::WebSocketEvent => ProfilerCategory::ScriptWebSocketEvent,
ScriptTaskEventCategory::WorkerEvent => ProfilerCategory::ScriptWorkerEvent,
- ScriptTaskEventCategory::XhrEvent => ProfilerCategory::ScriptXhrEvent,
};
profile(profiler_cat, None, self.time_profiler_chan.clone(), f)
} else {
@@ -1685,11 +1683,13 @@ impl ScriptTask {
let script_source = String::from_utf8_lossy(&script_source_bytes);
// Script source is ready to be evaluated (11.)
- let mut jsval = RootedValue::new(self.get_cx(), UndefinedValue());
- window.evaluate_js_on_global_with_result(&script_source, jsval.handle_mut());
- let strval = DOMString::from_jsval(self.get_cx(), jsval.handle(),
- StringificationBehavior::Empty);
- strval.unwrap_or(DOMString::new())
+ unsafe {
+ let mut jsval = RootedValue::new(self.get_cx(), UndefinedValue());
+ window.evaluate_js_on_global_with_result(&script_source, jsval.handle_mut());
+ let strval = DOMString::from_jsval(self.get_cx(), jsval.handle(),
+ StringificationBehavior::Empty);
+ strval.unwrap_or(DOMString::new())
+ }
} else {
DOMString::new()
};
@@ -1965,7 +1965,7 @@ impl ScriptTask {
data: load_data.data,
cors: None,
pipeline_id: Some(id),
- }, LoadConsumer::Listener(response_target))).unwrap();
+ }, LoadConsumer::Listener(response_target), None)).unwrap();
self.incomplete_loads.borrow_mut().push(incomplete);
}