mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 1743225 - Return an error from AutoMemMap::initWithHandle() if MapViewOfFile() returns null. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D132323
This commit is contained in:
parent
08f296ee63
commit
1a298a052b
@ -111,6 +111,9 @@ Result<Ok, nsresult> AutoMemMap::initWithHandle(const FileDescriptor& file,
|
||||
addr = MapViewOfFile(
|
||||
handle_, prot == PR_PROT_READONLY ? FILE_MAP_READ : FILE_MAP_ALL_ACCESS,
|
||||
0, 0, size);
|
||||
if (!addr) {
|
||||
return Err(NS_ERROR_FAILURE);
|
||||
}
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user