Closed Bug 1184786 Opened 10 years ago Closed 10 years ago

WebGL 2 - ReadBuffer returns incorrect errors

Categories

(Core :: Graphics: CanvasWebGL, defect)

All
Unspecified
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: u480271, Assigned: u480271)

References

()

Details

(Whiteboard: [gfx-noted])

Attachments

(2 files)

ReadBuffer is returning the incorrect error type when checking parameters.
Attachment #8635032 - Flags: review?(jgilbert)
Attachment #8635036 - Flags: review?(jgilbert)
Attachment #8635032 - Flags: review?(jgilbert) → review+
Comment on attachment 8635036 [details] [diff] [review] Fix ReadBuffer parameter validation. Review of attachment 8635036 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/canvas/WebGL2ContextFramebuffers.cpp @@ +585,3 @@ > > if (mBoundReadFramebuffer) { > + if (src == LOCAL_GL_BACK) { I would rather test explicitly what it says below, instead of testing against what (for now?) is the only alternative. @@ +599,5 @@ > // Operating on the default framebuffer. > + if (isColorAttachment) { > + ErrorInvalidOperation("readBuffer: If READ_FRAMEBUFFER is null, `src`" > + " must be BACK or NONE. Was %s", > + EnumName(src)); Again, I'd rather test explicitly what is requested to test, rather than process-of-elimination. (prone to breakage when things above it change)
Attachment #8635036 - Flags: review?(jgilbert) → review+
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: