From 1e3b08aae847915b48416f366fc755049e9ac03d Mon Sep 17 00:00:00 2001 From: Alan Jeffrey Date: Tue, 3 Sep 2019 11:03:45 -0500 Subject: [PATCH] Fallback to old extensions API if NUM_EXTENSIONS errors --- components/canvas/webgl_thread.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 7844c762cfb..ceaaf908b9f 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -1727,6 +1727,11 @@ impl WebGLImpl { unsafe { gl.get_integer_v(gl::NUM_EXTENSIONS, &mut ext_count); } + // Fall back to the depricated extensions API if that fails + if gl.get_error() != gl::NO_ERROR { + chan.send(gl.get_string(gl::EXTENSIONS)).unwrap(); + return; + } let ext_count = ext_count[0] as usize; let mut extensions = Vec::with_capacity(ext_count); for idx in 0..ext_count {