Closed Bug 296388 Opened 19 years ago Closed 19 years ago

canvas 2d rendering context drawWindow gives a non-informative error when passed a null window

Categories

(Core :: Graphics: Canvas2D, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: ted, Assigned: ted)

Details

Attachments

(1 file)

Passing null as the first argument to drawWindow (from javascript) gives
NS_ERROR_FAILURE.  It would be nice to give NS_ERROR_INVALIDARG or something
more descriptive.
Also the case for |undefined|, I bet.
Severity: normal → minor
Hardware: DEC → All
Attached patch Trivial patchSplinter Review
Adds NS_ENSURE_ARG after the security check.  I used that in place of
NS_ENSURE_ARG_PTR because the error return value makes a little more sense in
javascript, where you don't have pointers.
Assignee: nobody → ted.mielczarek
Status: NEW → ASSIGNED
Attachment #186975 - Flags: review?(vladimir)
Comment on attachment 186975 [details] [diff] [review]
Trivial patch

r=vladimir, sounds good
Attachment #186975 - Flags: review?(vladimir) → review+
Comment on attachment 186975 [details] [diff] [review]
Trivial patch

Trivial better error message
Attachment #186975 - Flags: approval1.8b3?
Attachment #186975 - Flags: approval1.8b3? → approval1.8b3+
checked in, thanks
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: