Make SharedMemoryMapping more type safer (and DiscardableMemory) |
|||
Issue descriptionRight now, we rely on people to remember to check: - if the mapping is valid - if the mapping is large enough - then static_cast from void* to the type of choice https://chromium-review.googlesource.com/c/chromium/src/+/1144312 encapsulates these checks inside the GetMemoryAs<T>/GetMemoryAsSpan<T> helpers, so we should switch uses of SharedMemoryMapping::memory() over to them. One interesting question is what to do for the current test usage, which just tries to compare addresses... Also, alexilin points out that there is also DiscardableMemory::data_as, which we should replace with a similar mechanism.
,
Jul 30
dcheng: Is there more to be done here, or do we call this Fixed?
,
Jul 30
We still need to fix DiscardableMemory in a comparable way and remove all uses of the old idioms. I was planning on tracking that here as well.
,
Nov 19
|
|||
►
Sign in to add a comment |
|||
Comment 1 by bugdroid1@chromium.org
, Jul 24