Make changing a record's type an atomic operation.

Accessing the type_id is generally thread-safe within the PMA
code because it is only accessed once the memory is owned to
the exclusion of any other allocator. The same can't be said,
however, once access to it is given to a caller and so
protection needs to be added so that callers can't introduce
race conditions due to their inter-process thread-unsafety.

BUG=546019

Review-Url: https://codereview.chromium.org/2034813003
Cr-Commit-Position: refs/heads/master@{#397711}


CrOS-Libchrome-Original-Commit: 84a8e0963774266d197d9bf90c952d983ab74869
4 files changed
tree: de8c194aa395e56c590536218c38c66205fc7187
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/