Closed
Bug 573541
Opened 15 years ago
Closed 15 years ago
More enums validation and fixes
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
People
(Reporter: bjacob, Assigned: bjacob)
References
Details
Attachments
(2 files, 1 obsolete file)
|
16.05 KB,
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
|
18.19 KB,
patch
|
bjacob
:
review+
|
Details | Diff | Splinter Review |
This patch fixes more enum-related issues.
* Fix the last problematic pnames in GetParameter
* validate the enums in various functions in which we still weren't doing that.
| Assignee | ||
Updated•15 years ago
|
Attachment #452819 -
Attachment is patch: true
Attachment #452819 -
Attachment mime type: application/octet-stream → text/plain
Attachment #452819 -
Flags: review?(vladimir)
| Assignee | ||
Comment 1•15 years ago
|
||
sorry, the previous patch was mistakenly removing a function, i forgot to do a "hg qref".
Attachment #452819 -
Attachment is obsolete: true
Attachment #452846 -
Flags: review?(vladimir)
Attachment #452819 -
Flags: review?(vladimir)
Comment on attachment 452846 [details] [diff] [review]
Lots of enum fixes
This looks good, though I wonder if we should just define these in the header directly so that we can be pretty certain that they get inlined.
Also, one style comment:
>+ if(!ValidateTextureTargetEnum(target))
>+ return ErrorInvalidEnum("GenerateMipmap: invalid target");
Well ok, two style comments -- missing a space, just do a search for "if(" :-)
>+NS_IMETHODIMP
>+WebGLContext::StencilOp(WebGLenum sfail, WebGLenum dpfail, WebGLenum dppass)
>+{
>+ if (!ValidateStencilOpEnum(sfail)
>+ || !ValidateStencilOpEnum(dpfail)
>+ || !ValidateStencilOpEnum(dppass))
>+ return ErrorInvalidEnum("StencilOp: invalid action enum");
This is quite weird indentation -- just 4-space indent everything like normal. I have no preference on || before or after the previous line, either's fine, but with a multiline if condition, the statement should always have { } around it.
Comment on attachment 452846 [details] [diff] [review]
Lots of enum fixes
argh, looks like I forgot to r+ this.. see above for comments, sorry!
Attachment #452846 -
Flags: review?(vladimir) → review+
| Assignee | ||
Comment 4•15 years ago
|
||
No worries, it's just that I've been lazy. Also, I'm looking at adding a pre-"hg qrefresh" hook checking for "if(" ;-)
Attachment #454050 -
Flags: review+
| Assignee | ||
Comment 5•15 years ago
|
||
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•14 years ago
|
Assignee: nobody → bjacob
You need to log in
before you can comment on or make changes to this bug.
Description
•