Bug 944675 - Fix some spurious rooting hazards in WebGL. r=bjacob

This commit is contained in:
Jon Coppeard 2013-12-02 11:55:25 -05:00
Родитель 7206a7caa7
Коммит c2df9c5ce5
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -1902,6 +1902,7 @@ WebGLContext::GetUniform(JSContext* cx, WebGLProgram *prog,
JSObject* obj = Float32Array::Create(cx, this, unitSize, fv);
if (!obj) {
ErrorOutOfMemory("getUniform: out of memory");
return JS::NullValue();
}
return JS::ObjectOrNullValue(obj);
}
@ -1914,6 +1915,7 @@ WebGLContext::GetUniform(JSContext* cx, WebGLProgram *prog,
JSObject* obj = Int32Array::Create(cx, this, unitSize, iv);
if (!obj) {
ErrorOutOfMemory("getUniform: out of memory");
return JS::NullValue();
}
return JS::ObjectOrNullValue(obj);
}
@ -1929,6 +1931,7 @@ WebGLContext::GetUniform(JSContext* cx, WebGLProgram *prog,
JSObject* obj = JS_NewArrayObject(cx, unitSize, uv);
if (!obj) {
ErrorOutOfMemory("getUniform: out of memory");
return JS::NullValue();
}
return JS::ObjectOrNullValue(obj);
}