base: Deprecate base::SharedMemory and base::SharedMemoryHandle
This CL deprecates base::SharedMemory(|Handle) in favor of {Writable,ReadOnly}SharedMemoryRegion. Deprecation comments and a presumbit warning are added. Bug: 795291 Change-Id: Ib861e88937df93b3c3477da6a17d5689da0b0d76 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1543639 Auto-Submit: Alex Ilin <alexilin@chromium.org> Commit-Queue: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#645446}
This commit is contained in:
@ -581,6 +581,15 @@ _BANNED_CPP_FUNCTIONS = (
|
||||
False,
|
||||
(),
|
||||
),
|
||||
(
|
||||
r'base::SharedMemory(|Handle)',
|
||||
(
|
||||
'base::SharedMemory is deprecated. Please use',
|
||||
'{Writable,ReadOnly}SharedMemoryRegion instead.',
|
||||
),
|
||||
False,
|
||||
(),
|
||||
),
|
||||
(
|
||||
r'RunMessageLoop',
|
||||
(
|
||||
|
@ -65,6 +65,9 @@ struct BASE_EXPORT SharedMemoryCreateOptions {
|
||||
// SharedMemory consumes a SharedMemoryHandle [potentially one that it created]
|
||||
// to map a shared memory OS resource into the virtual address space of the
|
||||
// current process.
|
||||
//
|
||||
// DEPRECATED - Use {Writable,ReadOnly}SharedMemoryRegion instead.
|
||||
// http://crbug.com/795291
|
||||
class BASE_EXPORT SharedMemory {
|
||||
public:
|
||||
SharedMemory();
|
||||
|
@ -33,6 +33,9 @@ namespace base {
|
||||
// address space of the current process.
|
||||
// TODO(erikchen): This class should have strong ownership semantics to prevent
|
||||
// leaks of the underlying OS resource. https://crbug.com/640840.
|
||||
//
|
||||
// DEPRECATED - Use {Writable,ReadOnly}SharedMemoryRegion instead.
|
||||
// http://crbug.com/795291
|
||||
class BASE_EXPORT SharedMemoryHandle {
|
||||
public:
|
||||
// The default constructor returns an invalid SharedMemoryHandle.
|
||||
|
Reference in New Issue
Block a user