This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15108 - getContext "return a new object for contextId" should handle the called algorithm throwing an exception, so TypeError can be thrown if converting "any..." arguments to a particular IDL type fails.
Summary: getContext "return a new object for contextId" should handle the called algor...
Status: RESOLVED NEEDSINFO
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 03:15 UTC by contributor
Modified: 2012-07-18 18:39 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2011-12-08 03:15:21 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html
Multipage: http://www.whatwg.org/C#the-canvas-element
Complete: http://www.whatwg.org/c#the-canvas-element

Comment:
getContext "return a new object for contextId" should handle the called
algorithm throwing an exception, so TypeError can be thrown if converting
"any..." arguments to a particular IDL type fails.

Posted from: 24.62.196.44
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0
Comment 1 Ian 'Hixie' Hickson 2011-12-09 22:36:00 UTC
I don't understand. What would that entail? Surely the algorithm can just throw an exception and all will work?
Comment 2 Glenn Maynard 2011-12-09 23:43:25 UTC
This is what we discussed previously.  http://krijnhoetmer.nl/irc-logs/whatwg/20111208#l-261

Algorithms that call other algorithms which can throw should make note of this, so it's clear where the exit points in an algorithm are without having to examine every algorithm down the call chain (which itself is impossible in "hookable" algorithm calls like this one).