mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Reintroduce Untraceable<T>.deref_mut() to make mem::replace() possible to Untracebale<T> field.
Some compile errors caused by the compiler's misreading comes back again :( We re-use `deref()`explicitly to hide these errors.
This commit is contained in:
parent
c51b8a07ac
commit
54d3a0b280
5 changed files with 14 additions and 8 deletions
|
@ -85,7 +85,7 @@ impl<'a> WorkerGlobalScopeMethods for JSRef<'a, WorkerGlobalScope> {
|
|||
|
||||
fn Location(&self) -> Temporary<WorkerLocation> {
|
||||
if self.location.get().is_none() {
|
||||
let location = WorkerLocation::new(*self, self.worker_url.clone());
|
||||
let location = WorkerLocation::new(*self, self.worker_url.deref().clone());
|
||||
self.location.assign(Some(location));
|
||||
}
|
||||
Temporary::new(self.location.get().get_ref().clone())
|
||||
|
@ -110,7 +110,7 @@ impl<'a> WorkerGlobalScopeMethods for JSRef<'a, WorkerGlobalScope> {
|
|||
}
|
||||
};
|
||||
|
||||
match self.js_context.evaluate_script(
|
||||
match self.js_context.deref().evaluate_script(
|
||||
self.reflector().get_jsobject(), source, url.serialize(), 1) {
|
||||
Ok(_) => (),
|
||||
Err(_) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue