Bug 827217 - Fix null-pointer crash with webgl.can-lose-context-in-foreground=false.