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

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

Issue 2492343003: Fix the WebGLObject arg non-nullable behaviors. (Closed)
Patch Set: Fix the WebGLObject arg non-nullable behaviors. 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 | « no previous file | third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.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/EXTDisjointTimerQuery.cpp
diff --git a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp
index 1c3b496a4d1395b8fa227e401e8e1ed29a5daaa7..4988bfce36dc2d18de2491730be955f9fc5ba26d 100644
--- a/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp
+++ b/third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.cpp
@@ -68,7 +68,8 @@ void EXTDisjointTimerQuery::beginQueryEXT(GLenum target,
if (scoped.isLost())
return;
- if (!query || query->isDeleted() || !query->validate(0, scoped.context())) {
+ DCHECK(query);
+ if (query->isDeleted() || !query->validate(0, scoped.context())) {
scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "beginQueryEXT",
"invalid query");
return;
@@ -125,7 +126,8 @@ void EXTDisjointTimerQuery::queryCounterEXT(WebGLTimerQueryEXT* query,
if (scoped.isLost())
return;
- if (!query || query->isDeleted() || !query->validate(0, scoped.context())) {
+ DCHECK(query);
+ if (query->isDeleted() || !query->validate(0, scoped.context())) {
scoped.context()->synthesizeGLError(GL_INVALID_OPERATION, "queryCounterEXT",
"invalid query");
return;
@@ -188,7 +190,8 @@ ScriptValue EXTDisjointTimerQuery::getQueryObjectEXT(ScriptState* scriptState,
if (scoped.isLost())
return ScriptValue::createNull(scriptState);
- if (!query || query->isDeleted() || !query->validate(0, scoped.context()) ||
+ DCHECK(query);
+ if (query->isDeleted() || !query->validate(0, scoped.context()) ||
m_currentElapsedQuery == query) {
scoped.context()->synthesizeGLError(GL_INVALID_OPERATION,
"getQueryObjectEXT", "invalid query");
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webgl/EXTDisjointTimerQuery.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698