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); |