Bug 1290328 - Return null for webgl GetActiveUniformBlockName() error. r=jgilbert
authorJerryShih <hshih@mozilla.com>
Thu, 28 Jul 2016 18:21:00 -0400
changeset 332344 3776797b6c7154191ebd774005c01ad8bb2e654c
parent 332343 00970bf2151cd5ff60b08798063ae1d802c559d2
child 332345 5ad44f0d3ea46981d77e10563fe5c868384bfdc4
push id9858
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 14:37:10 +0000
treeherdermozilla-aurora@203106ef6cb6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1290328
milestone50.0a1
Bug 1290328 - Return null for webgl GetActiveUniformBlockName() error. r=jgilbert
dom/canvas/WebGL2ContextUniforms.cpp
--- a/dom/canvas/WebGL2ContextUniforms.cpp
+++ b/dom/canvas/WebGL2ContextUniforms.cpp
@@ -272,16 +272,17 @@ WebGL2Context::GetActiveUniformBlockPara
 
     ErrorInvalidEnumInfo("getActiveUniformBlockParameter: parameter", pname);
 }
 
 void
 WebGL2Context::GetActiveUniformBlockName(WebGLProgram* program, GLuint uniformBlockIndex,
                                          nsAString& retval)
 {
+    retval.SetIsVoid(true);
     if (IsContextLost())
         return;
 
     if (!ValidateObject("getActiveUniformBlockName: program", program))
         return;
 
     program->GetActiveUniformBlockName(uniformBlockIndex, retval);
 }