mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1519355 - [Wayland] Produce better error message when mozilla::widget::WaylandShmPool::CreateTemporaryFile() fails, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D16297 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
05862a940f
commit
d704841235
@ -168,6 +168,9 @@ int WaylandShmPool::CreateTemporaryFile(int aSize) {
|
||||
} while (ret == EINTR);
|
||||
if (ret != 0) {
|
||||
close(fd);
|
||||
MOZ_CRASH_UNSAFE_PRINTF(
|
||||
"posix_fallocate() fails on %s size %d error code %d\n", filename,
|
||||
aSize, ret);
|
||||
}
|
||||
#else
|
||||
do {
|
||||
@ -175,9 +178,10 @@ int WaylandShmPool::CreateTemporaryFile(int aSize) {
|
||||
} while (ret < 0 && errno == EINTR);
|
||||
if (ret < 0) {
|
||||
close(fd);
|
||||
MOZ_CRASH_UNSAFE_PRINTF("ftruncate() fails on %s size %d error code %d\n",
|
||||
filename, aSize, ret);
|
||||
}
|
||||
#endif
|
||||
MOZ_RELEASE_ASSERT(ret == 0, "Mapping file allocation failed.");
|
||||
|
||||
return fd;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user