Commit ab56c6ae by Sudarsana Nagineni Committed by Jamie Madill

Fix memory leaks in angle_unittests.

Call ShDestruct() to destroy the compiler objects to avoid memory leaks. BUG=angle:737 Change-Id: I71a8ddfe67c9d8c7b4e5b5683c69dd578fc38c66 Reviewed-on: https://chromium-review.googlesource.com/215860Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarSudarsana Nagineni <sudarsana.nagineni@intel.com>
parent 2d96b9eb
......@@ -59,6 +59,7 @@ Intel Corporation
Jin Yang
Andy Chen
Josh Triplett
Sudarsana Nagineni
Klarälvdalens Datakonsult AB
Milian Wolff
......
......@@ -201,6 +201,7 @@ TEST_F(ExpressionLimitTest, ExpressionComplexity)
GenerateShaderWithLongExpression(
kMaxExpressionComplexity + 10).c_str(),
compileOptions & ~SH_LIMIT_EXPRESSION_COMPLEXITY, NULL));
ShDestruct(vertexCompiler);
}
TEST_F(ExpressionLimitTest, UnusedExpressionComplexity)
......@@ -229,6 +230,7 @@ TEST_F(ExpressionLimitTest, UnusedExpressionComplexity)
GenerateShaderWithUnusedLongExpression(
kMaxExpressionComplexity + 10).c_str(),
compileOptions & ~SH_LIMIT_EXPRESSION_COMPLEXITY, NULL));
ShDestruct(vertexCompiler);
}
TEST_F(ExpressionLimitTest, CallStackDepth)
......@@ -257,6 +259,7 @@ TEST_F(ExpressionLimitTest, CallStackDepth)
GenerateShaderWithDeepFunctionStack(
kMaxCallStackDepth + 10).c_str(),
compileOptions & ~SH_LIMIT_CALL_STACK_DEPTH, NULL));
ShDestruct(vertexCompiler);
}
TEST_F(ExpressionLimitTest, UnusedCallStackDepth)
......@@ -285,6 +288,7 @@ TEST_F(ExpressionLimitTest, UnusedCallStackDepth)
GenerateShaderWithUnusedDeepFunctionStack(
kMaxCallStackDepth + 10).c_str(),
compileOptions & ~SH_LIMIT_CALL_STACK_DEPTH, NULL));
ShDestruct(vertexCompiler);
}
TEST_F(ExpressionLimitTest, Recursion)
......@@ -502,5 +506,6 @@ TEST_F(ExpressionLimitTest, Recursion)
EXPECT_TRUE(CheckShaderCompilation(
vertexCompiler, shaderWithNoRecursion,
compileOptions | SH_LIMIT_CALL_STACK_DEPTH, NULL));
ShDestruct(vertexCompiler);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment