Minor bustage fixes for bug 1037609 and bug 1037100. r=bustage

--HG--
extra : rebase_source : 72083f1ec1036497a4d6a93ee614ea60794ae749
This commit is contained in:
Jeff Walden 2014-07-11 21:03:07 -07:00
parent 437b5b1da0
commit 30e19aea13
2 changed files with 2 additions and 2 deletions

View File

@ -222,7 +222,7 @@ SharedSurface_Gralloc::Fence()
// work. glReadPixels seems to, though.
if (gfxPrefs::GrallocFenceWithReadPixels()) {
mGL->MakeCurrent();
UniquePtr<char[]> buf = MakeUnique<char>(4);
UniquePtr<char[]> buf = MakeUnique<char[]>(4);
mGL->fReadPixels(0, 0, 1, 1, LOCAL_GL_RGBA, LOCAL_GL_UNSIGNED_BYTE, buf);
}
}

View File

@ -4832,7 +4832,7 @@ js::DuplicateString(js::ThreadSafeContext *cx, const jschar *s)
size_t n = js_strlen(s);
auto ret = cx->make_pod_array<jschar>(n + 1);
if (!ret)
return nullptr;
return ret;
js_strncpy(ret.get(), s, n);
ret[n] = '\0';
return Move(ret);