diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2014-04-21 16:04:16 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2014-04-21 16:06:01 -0700 |
commit | b38f7d26d1666ae0801cef46b8c4f7cd0a8ee4be (patch) | |
tree | ce211624302b0a630dd05cde2b643dbbc37f490a /src/components/main/pipeline.rs | |
parent | c6bdc7b7f2d39b522be5767f09f88b1b4ca5577a (diff) | |
download | servo-b38f7d26d1666ae0801cef46b8c4f7cd0a8ee4be.tar.gz servo-b38f7d26d1666ae0801cef46b8c4f7cd0a8ee4be.zip |
Make sure RefCell borrows are temporary.
This fixes two `RefCell<T> is already borrowed` failures when reloading an
existing pipeline, both caused by functions trying to modify `Pipeline::url`
or `ScriptTask::url` while a reference to a previous borrow is still in scope.
Diffstat (limited to 'src/components/main/pipeline.rs')
-rw-r--r-- | src/components/main/pipeline.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/components/main/pipeline.rs b/src/components/main/pipeline.rs index 2ed978360ac..78ebd91c868 100644 --- a/src/components/main/pipeline.rs +++ b/src/components/main/pipeline.rs @@ -202,7 +202,8 @@ impl Pipeline { } pub fn reload(&self) { - self.url.borrow().clone().map(|url| { + let url = self.url.borrow().clone(); + url.map(|url| { self.load(url); }); } |