aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
authorteymour-aldridge <teymour.aldridge@icloud.com>2021-02-05 14:25:02 +0000
committerteymour-aldridge <teymour.aldridge@icloud.com>2021-02-05 14:29:45 +0000
commitff767b13a93c0ca50fbe7e029ef57f0fee960a8d (patch)
tree66e61442ddf0a75adf90707b3726a4ccb32b1cd6 /components/script/dom/window.rs
parent466e895cdfc0cf909f49db8e4d2eb4958ad0101d (diff)
downloadservo-ff767b13a93c0ca50fbe7e029ef57f0fee960a8d.tar.gz
servo-ff767b13a93c0ca50fbe7e029ef57f0fee960a8d.zip
Remove unused arguments from methods.
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 70734efb9bb..71ceb293664 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -1755,9 +1755,7 @@ impl Window {
for image in complete.pending_images {
let id = image.id;
- let js_runtime = self.js_runtime.borrow();
- let js_runtime = js_runtime.as_ref().unwrap();
- let node = unsafe { from_untrusted_node_address(js_runtime.rt(), image.node) };
+ let node = unsafe { from_untrusted_node_address(image.node) };
if let PendingImageState::Unrequested(ref url) = image.state {
fetch_image_for_layout(url.clone(), &*node, id, self.image_cache.clone());
@@ -1988,10 +1986,8 @@ impl Window {
// FIXME(nox): Layout can reply with a garbage value which doesn't
// actually correspond to an element, that's unsound.
let response = self.layout_rpc.offset_parent();
- let js_runtime = self.js_runtime.borrow();
- let js_runtime = js_runtime.as_ref().unwrap();
let element = response.node_address.and_then(|parent_node_address| {
- let node = unsafe { from_untrusted_node_address(js_runtime.rt(), parent_node_address) };
+ let node = unsafe { from_untrusted_node_address(parent_node_address) };
DomRoot::downcast(node)
});
(element, response.rect)