Bug 1525857 - Add release asserts for pre-crash cases. r=lsalzman

Differential Revision: https://phabricator.services.mozilla.com/D21145

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jeff Gilbert 2019-02-26 02:54:08 +00:00
parent adaa388508
commit 0005243e88
2 changed files with 3 additions and 0 deletions

View File

@ -473,6 +473,8 @@ static RefPtr<const webgl::LinkedProgramInfo> QueryProgramInfo(
{
const auto& fragShader = prog->FragShader();
MOZ_RELEASE_ASSERT(fragShader);
MOZ_RELEASE_ASSERT(fragShader->Validator());
const auto& handle = fragShader->Validator()->Handle();
const auto version = sh::GetShaderVersion(handle);

View File

@ -213,6 +213,7 @@ namespace webgl {
const ShBuiltInResources& resources, ShCompileOptions compileOptions) {
ShHandle handle =
sh::ConstructCompiler(shaderType, spec, outputLanguage, &resources);
MOZ_RELEASE_ASSERT(handle);
if (!handle) return nullptr;
return new ShaderValidator(handle, compileOptions,