[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Public WebGL] Firefox 4 and blacklist reporting
- To: Benoit Jacob <bjacob@mozilla.com>
- Subject: Re: [Public WebGL] Firefox 4 and blacklist reporting
- From: Kenneth Russell <kbr@google.com>
- Date: Mon, 28 Mar 2011 11:57:51 -0700
- Cc: Arthur Blume <arthurb@google.com>, public webgl <public_webgl@khronos.org>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1301338674; bh=B2insgqgNDor36dWPdH7dzH8jrg=; h=MIME-Version:In-Reply-To:References:Date:Message-ID:Subject:From: To:Cc:Content-Type:Content-Transfer-Encoding; b=ucI7YEbInflI0LZViP5jw1gWotHZBEw31MeVXfj8ffEmgEw4Yx+KKhxY5TjgJLoAw 0l7v95WxJC4NUjGgYSI7w==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=U+soOXiYSIMlG0OFc/5pCmRoB7G1hNcrRqBc+KunBrk=; b=m9jRTuNdlyn56FZSBOb0f60Jm04P7wt0RwIUrUXVoIS7ND11bhZrpbLBqUv66U/L1X 5LYacm2uRLJEpmViX6SA==
- Domainkey-signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jijLIYLvX6Dr9tiC4oJk8q01z7ac1U/TJ7qEsiAau8wMOwljw7Vqu75vYX1YyZ9ixF gEXttxSQ3qHbm44Bq0Sw==
- In-reply-to: <2076227978.75895.1301336325818.JavaMail.root@cm-mail03.mozilla.org>
- List-id: Public WebGL Mailing List <public_webgl.khronos.org>
- References: <BANLkTi=0UkhHOwpZTzLaXhYTa_L9ZSG6xg@mail.gmail.com> <2076227978.75895.1301336325818.JavaMail.root@cm-mail03.mozilla.org>
- Sender: owner-public_webgl@khronos.org
On Mon, Mar 28, 2011 at 11:18 AM, Benoit Jacob <bjacob@mozilla.com> wrote:
> Hi,
>
> ________________________________
>
> Hi all -- I work on Google Body. Our latest "check WebGL capabilities" code
> will look approximately like this:
> * * *
>
> // 0 = OK. 1 = no GL. 2 = GL couldn't initialize. Other = error text.
> function testGL() {
> try {
> if (!window.WebGLRenderingContext) { return 1; }
> var canvas = document.getElementById('gltest');
> var gl = canvas.getContext('webgl');
> if (!gl) {
> gl = canvas.getContext('experimental-webgl');
> }
> if (!gl) { return 2; }
> return 0;
> } catch(err) {
> // [report err.message]
> }
> }
> * * *
>
> Using FF4/Mac on OS X 10.5.8, the above throws an exception, with
> err.message =
> "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE)
> [nsIDOMHTMLCanvasElement.getContext]"
>
> I understand from the Firefox blocklist wiki page that Firefox is
> blacklisting WebGL. I'm curious why this is being reported via an exception.
>
> Does the spec say something about that? Or have other browsers agreed on
> behavior in that case?
The spec says that getContext() is supposed to return null, not throw
an exception, and report a webglcontextcreationerror. See
http://www.khronos.org/registry/webgl/specs/latest/#5.14.3 .
-Ken
> The problem I'm having is that I want to show different UI for these two
> cases:
> - GL is blacklisted (=> fine, can take user to troubleshooting page and
> coach them through it)
> - A Javascript error occurred (=> not fine, need to investigate)
> and I'm not sure what the best way going forward is to distinguish those
> cases.
>
> I think I understand your concern: that adding this try {...} catch block
> may hide javascript errors. But so far, this had been the standard way of
> creating WebGL contexts, see the WebGL conformance tests, get.webgl.org,
> etc.
>
> If other browser implementers think that we should not generate JS
> exceptions in getContext() on blacklisted drivers/systems, I'm not opposed
> to such a change. Would getContext() then just return null? I couldn't find
> in the spec anything about errors in getContext and return values?
>
> Benoit
>
-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------