mirror of
https://github.com/electron/electron.git
synced 2026-01-27 00:09:09 -05:00
Get rid of SharedMemory::GiveToProcess.
https://codereview.chromium.org/2847033003 Changes copied from "printing: Sandboxed processes must ask the browser to allocate shared memory." https://codereview.chromium.org/1714643002
This commit is contained in:
committed by
Cheng Zhao
parent
ee9a547985
commit
fe952d5c65
@@ -1165,8 +1165,9 @@ bool PrintWebViewHelper::CopyMetafileDataToSharedMem(
|
||||
if (!metafile.GetData(shared_buf->memory(), buf_size))
|
||||
return false;
|
||||
|
||||
return shared_buf->GiveToProcess(base::GetCurrentProcessHandle(),
|
||||
shared_mem_handle);
|
||||
*shared_mem_handle =
|
||||
base::SharedMemory::DuplicateHandle(shared_buf->handle());
|
||||
return true;
|
||||
}
|
||||
#endif // defined(OS_POSIX)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user