Closed Bug 844244 Opened 11 years ago Closed 11 years ago

when webgl is disabled, getContext("experimental-webgl") throws NS_ERROR_FAILURE instead of returning null

Categories

(Core :: Graphics: CanvasWebGL, defect)

19 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 645792

People

(Reporter: bugzilla, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:19.0) Gecko/20100101 Firefox/19.0
Build ID: 20130215130331

Steps to reproduce:

1. go to about:config
2. set "webgl.disabled" to "true"
3. in the console, enter: document.createElement("canvas").getContext("experimental-webgl")


Actual results:

This throws:

Error: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLCanvasElement.getContext]


Expected results:

If an unsupported value is passed to `getContext`, it must return `null`. If WebGL is supported by the user agent, but not with the currently used configuration, calling `getContext` with the WebGL contextId must return `null`, too.

http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvas-getcontext
Component: Untriaged → Canvas: WebGL
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.