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

Unified Diff: ui/gl/generate_bindings.py

Issue 1775353002: Add DCHECK for nullptr in gl bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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 | ui/gl/gl_bindings_autogen_egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/generate_bindings.py
diff --git a/ui/gl/generate_bindings.py b/ui/gl/generate_bindings.py
index b3158027a09c3d2b72be8387576c7cbd2aeb766b..1cba075631ad9d3c31440478568f4bc10b74b7f4 100755
--- a/ui/gl/generate_bindings.py
+++ b/ui/gl/generate_bindings.py
@@ -2174,6 +2174,8 @@ void Driver%s::InitializeExtensionBindings() {
if return_type == 'void':
file.write(' GL_SERVICE_LOG("%s" << "(" %s << ")");\n' %
(function_name, log_argument_names))
+ file.write(' DCHECK(g_driver_%s.debug_fn.%sFn != nullptr);\n' %
+ (set_name.lower(), function_name))
file.write(' g_driver_%s.debug_fn.%sFn(%s);\n' %
(set_name.lower(), function_name, argument_names))
if 'logging_code' in func:
@@ -2186,6 +2188,8 @@ void Driver%s::InitializeExtensionBindings() {
else:
file.write(' GL_SERVICE_LOG("%s" << "(" %s << ")");\n' %
(function_name, log_argument_names))
+ file.write(' DCHECK(g_driver_%s.debug_fn.%sFn != nullptr);\n' %
+ (set_name.lower(), function_name))
file.write(' %s result = g_driver_%s.debug_fn.%sFn(%s);\n' %
(return_type, set_name.lower(), function_name, argument_names))
if 'logging_code' in func:
« no previous file with comments | « no previous file | ui/gl/gl_bindings_autogen_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698