зеркало из https://github.com/mozilla/gecko-dev.git
Bug 944675 - Fix some spurious rooting hazards in WebGL. r=bjacob
This commit is contained in:
Родитель
7206a7caa7
Коммит
c2df9c5ce5
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче