aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcanvaselement.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/htmlcanvaselement.rs')
-rw-r--r--components/script/dom/htmlcanvaselement.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/script/dom/htmlcanvaselement.rs b/components/script/dom/htmlcanvaselement.rs
index 9ada3036f1d..b0663192d99 100644
--- a/components/script/dom/htmlcanvaselement.rs
+++ b/components/script/dom/htmlcanvaselement.rs
@@ -157,6 +157,7 @@ impl HTMLCanvasElement {
}
}
+ #[allow(unsafe_code)]
pub fn get_or_init_webgl_context(&self,
cx: *mut JSContext,
attrs: Option<HandleValue>) -> Option<Root<WebGLRenderingContext>> {
@@ -165,7 +166,7 @@ impl HTMLCanvasElement {
let size = self.get_size();
let attrs = if let Some(webgl_attributes) = attrs {
- if let Ok(ref attrs) = WebGLContextAttributes::new(cx, webgl_attributes) {
+ if let Ok(ref attrs) = unsafe { WebGLContextAttributes::new(cx, webgl_attributes) } {
From::from(attrs)
} else {
debug!("Unexpected error on conversion of WebGLContextAttributes");