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

Unified Diff: Source/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp

Issue 469373002: Bindings generation emits (more) correct null checking (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/dartium
Patch Set: Adding in fixes to binding generation Created 6 years, 4 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 | « Source/bindings/dart/custom/DartNodeCustom.cpp ('k') | Source/bindings/dart/scripts/dart_attributes.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp
diff --git a/Source/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp b/Source/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp
index dc928be11ebc6922a1ed4163633a6559ff7b31b3..c17728f355ab10fc8bb220d143dd2b1c3c9b74be 100644
--- a/Source/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp
+++ b/Source/bindings/dart/custom/DartWebGLRenderingContextCustom.cpp
@@ -394,7 +394,7 @@ void getAttachedShadersCallback(Dart_NativeArguments args)
Dart_Handle exception = 0;
{
WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRenderingContext>(args);
- WebGLProgram* program = DartWebGLProgram::toNative(Dart_GetNativeArgument(args, 1), exception);
+ WebGLProgram* program = DartWebGLProgram::toNativeWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
if (exception)
goto fail;
@@ -504,7 +504,7 @@ void getProgramParameterCallback(Dart_NativeArguments args)
Dart_Handle exception = 0;
{
WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRenderingContext>(args);
- WebGLProgram* program = DartWebGLProgram::toNative(Dart_GetNativeArgument(args, 1), exception);
+ WebGLProgram* program = DartWebGLProgram::toNativeWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
if (exception)
goto fail;
int pname = DartUtilities::dartToInt(Dart_GetNativeArgument(args, 2), exception);
@@ -535,7 +535,7 @@ void getShaderParameterCallback(Dart_NativeArguments args)
Dart_Handle exception = 0;
{
WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRenderingContext>(args);
- WebGLShader* shader = DartWebGLShader::toNative(Dart_GetNativeArgument(args, 1), exception);
+ WebGLShader* shader = DartWebGLShader::toNativeWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
if (exception)
goto fail;
int pname = DartUtilities::dartToInt(Dart_GetNativeArgument(args, 2), exception);
@@ -640,7 +640,7 @@ static void vertexAttribAndUniformHelperf(Dart_NativeArguments args, FunctionToC
goto fail;
index = indexParam;
} else {
- WebGLUniformLocation* locationParam = DartWebGLUniformLocation::toNative(Dart_GetNativeArgument(args, 1), exception);
+ WebGLUniformLocation* locationParam = DartWebGLUniformLocation::toNativeWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
if (exception)
goto fail;
location = locationParam;
@@ -698,7 +698,7 @@ static void uniformHelperi(Dart_NativeArguments args, FunctionToCall functionToC
// * glUniform4iv(GLUniformLocation location, Array data);
// * glUniform4iv(GLUniformLocation location, Int32Array data);
WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRenderingContext>(args);
- WebGLUniformLocation* location = DartWebGLUniformLocation::toNative(Dart_GetNativeArgument(args, 1), exception);
+ WebGLUniformLocation* location = DartWebGLUniformLocation::toNativeWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
if (exception)
goto fail;
@@ -744,7 +744,7 @@ static void uniformMatrixHelper(Dart_NativeArguments args, int matrixSize)
// * glUniformMatrix4fv(GLint location, GLboolean transpose, Float32Array data);
//
WebGLRenderingContext* context = DartDOMWrapper::receiver<WebGLRenderingContext>(args);
- WebGLUniformLocation* location = DartWebGLUniformLocation::toNative(Dart_GetNativeArgument(args, 1), exception);
+ WebGLUniformLocation* location = DartWebGLUniformLocation::toNativeWithNullCheck(Dart_GetNativeArgument(args, 1), exception);
if (exception)
goto fail;
bool transpose = DartUtilities::dartToBool(Dart_GetNativeArgument(args, 2), exception);
« no previous file with comments | « Source/bindings/dart/custom/DartNodeCustom.cpp ('k') | Source/bindings/dart/scripts/dart_attributes.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698