Closed
Bug 616401
Opened 14 years ago
Closed 12 years ago
nsHTMLCanvasElement::GetContext ignores JS exceptions
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: luke, Assigned: Ms2ger)
Details
(Whiteboard: webgl-conformance)
Attachments
(2 files)
5.11 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
3.34 KB,
patch
|
Details | Diff | Splinter Review |
nsHTMLCanvasElement::GetContext has a loop to the effect: for (...) { if (!JS_IdToValue(...) && !JS_GetPropertyById(...)) continue; ... } Thus, any exception thrown by JS_GetPropertyById (getter, invalid prop access) will be ignored or overwritten. I'm no expert in the area, so maybe there is some higher-level design, perhaps some property of aContextOptions, that makes this not a problem. Also, the return value of JS_ValueToString isn't tested for null.
Comment 1•14 years ago
|
||
Neither http://www.whatwg.org/specs/web-apps/current-work/complete/the-canvas-element.html#dom-canvas-getcontext nor https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/doc/spec/WebGL-spec.html#WEBGLCONTEXTATTRIBUTES seem to consider the possibility of exceptions here, and hence don't define behavior in those situations. They probably need to do that. Vlad, the webgl spec is probably where this should live....
Updated•12 years ago
|
QA Contact: canvas.2d → bjacob
Comment 2•12 years ago
|
||
Blocking webgl-conformance so we can't forget this.
Blocks: webgl-conformance
Updated•12 years ago
|
No longer blocks: webgl-conformance
Whiteboard: webgl-conformance
Assignee | ||
Comment 3•12 years ago
|
||
Assignee | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Comment on attachment 621301 [details] [diff] [review] Patch v1 diff -w would have been nice.... r=me
Attachment #621301 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 6•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/09df0008b156 (In reply to Boris Zbarsky (:bz) from comment #5) > Comment on attachment 621301 [details] [diff] [review] > Patch v1 > > diff -w would have been nice.... > > r=me Er, attachment 621302 [details] [diff] [review]?
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Component: Canvas: 2D → DOM: Core & HTML
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Version: unspecified → Trunk
Comment 7•12 years ago
|
||
Er, indeed....
You need to log in
before you can comment on or make changes to this bug.
Description
•