Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp

Issue 2485443002: Change WebGL API arg nullable behavior. (Closed)
Patch Set: rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « DEPS ('k') | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
index 97d8f1c1a0c67d456beb5a4108fa5da17dfc61dd..b1cfe9ebbed5c87bc3ff8c02ebeb92e8b6e6bd5d 100644
--- a/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
+++ b/third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.cpp
@@ -2815,12 +2815,7 @@ GLboolean WebGL2RenderingContextBase::isQuery(WebGLQuery* query) {
void WebGL2RenderingContextBase::beginQuery(GLenum target, WebGLQuery* query) {
bool deleted;
- if (!query) {
- synthesizeGLError(GL_INVALID_OPERATION, "beginQuery",
- "query object is null");
- return;
- }
-
+ DCHECK(query);
if (!checkObjectToBeBound("beginQuery", query, deleted))
return;
if (deleted) {
@@ -2980,12 +2975,8 @@ ScriptValue WebGL2RenderingContextBase::getQueryParameter(
ScriptState* scriptState,
WebGLQuery* query,
GLenum pname) {
+ DCHECK(query);
Ken Russell (switch to Gerrit) 2016/11/05 05:14:52 It's pretty cool and interesting that because the
bool deleted;
- if (!query) {
- synthesizeGLError(GL_INVALID_OPERATION, "getQueryParameter",
- "query object is null");
- return ScriptValue::createNull(scriptState);
- }
if (!checkObjectToBeBound("getQueryParameter", query, deleted))
return ScriptValue::createNull(scriptState);
if (deleted) {
« no previous file with comments | « DEPS ('k') | third_party/WebKit/Source/modules/webgl/WebGL2RenderingContextBase.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698