Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upIssue #20623: Check the input to WebGLRenderingContext's clear(). #20669
Conversation
highfive
commented
Apr 20, 2018
|
Heads up! This PR modifies the following files:
|
| // - DEPTH_BUFFER_BIT | ||
| // - STENCIL_BUFFER_BIT | ||
| // - COLOR_BUFFER_BIT | ||
| match mask & !(constants::DEPTH_BUFFER_BIT | constants::STENCIL_BUFFER_BIT | constants::COLOR_BUFFER_BIT) { |
This comment has been minimized.
This comment has been minimized.
nox
Apr 21, 2018
Member
Just use if.
if mask & !(constants::DEPTH_BUFFER_BIT | constants::STENCIL_BUFFER_BIT | constants::COLOR_BUFFER_BIT) != 0 {
return self.webgl_error(InvalidValue);
}
This comment has been minimized.
This comment has been minimized.
| // GL_INVALID_VALUE is generated if any bit other than the following is set in mask: | ||
| // - DEPTH_BUFFER_BIT | ||
| // - STENCIL_BUFFER_BIT | ||
| // - COLOR_BUFFER_BIT |
This comment has been minimized.
This comment has been minimized.
| @@ -39229,6 +39229,12 @@ | |||
| {} | |||
| ] | |||
| ], | |||
| "mozilla/webgl/clear.html": [ | |||
This comment has been minimized.
This comment has been minimized.
nox
Apr 21, 2018
Member
@emilio We can't put tests there without causing issues for syncing with Khronos, right?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jdm
May 15, 2018
Member
No - we already have test files in that directory that are not part of the sync. It's fine to add additional ones.
|
@bors-servo try |
Issue #20623: Check the input to WebGLRenderingContext's clear(). Validate the input to this function as per specifications. --- - [X] `./mach build -d` does not report any errors - [X] `./mach build-geckolib` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #20623 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20669) <!-- Reviewable:end -->
|
|
|
Is there anything outstanding for this PR to go in? Thanks. |
|
@bors-servo r+ |
|
|
Issue #20623: Check the input to WebGLRenderingContext's clear(). Validate the input to this function as per specifications. --- - [X] `./mach build -d` does not report any errors - [X] `./mach build-geckolib` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #20623 - [X] There are tests for these changes <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20669) <!-- Reviewable:end -->
|
|
simartin commentedApr 20, 2018
•
edited by SimonSapin
Validate the input to this function as per specifications.
./mach build -ddoes not report any errors./mach build-geckolibdoes not report any errors./mach test-tidydoes not report any errorsThis change is