mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Remove unrooted() methods
This commit is contained in:
parent
af21229c0e
commit
2770886196
3 changed files with 10 additions and 33 deletions
|
@ -129,7 +129,7 @@ impl<'a> HTMLCanvasElementHelpers for JSRef<'a, HTMLCanvasElement> {
|
|||
let context = self.GetContext(String::from_str("2d"));
|
||||
match context.unwrap() {
|
||||
CanvasRenderingContext2DOrWebGLRenderingContext::eCanvasRenderingContext2D(context) => {
|
||||
Temporary::new(context.root().r().unrooted())
|
||||
Temporary::from_unrooted(context)
|
||||
}
|
||||
_ => panic!("Wrong Context Type: Expected 2d context"),
|
||||
}
|
||||
|
@ -139,8 +139,8 @@ impl<'a> HTMLCanvasElementHelpers for JSRef<'a, HTMLCanvasElement> {
|
|||
let context = self.GetContext(String::from_str("webgl"));
|
||||
match context.unwrap() {
|
||||
CanvasRenderingContext2DOrWebGLRenderingContext::eWebGLRenderingContext(context) => {
|
||||
return Temporary::new(context.root().r().unrooted());
|
||||
}
|
||||
Temporary::from_unrooted(context)
|
||||
},
|
||||
_ => panic!("Wrong Context Type: Expected webgl context"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue