Mojo cpp bindings: More clear checks for array num_bytes and num_elements.

This CL (1) handles the case that Array<>'s element number or total size exceeds what we can represent in Mojo messages; (2) makes the validation code of the num_bytes field doesn't rely on sizeof(size_t) > sizeof(uint32_t).

The newly-added test passes with/without this CL. But I think it is good to have such a test.

BUG=None
TEST=None

Review URL: https://codereview.chromium.org/486313004

Cr-Commit-Position: refs/heads/master@{#290718}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290718 0039d316-1c4b-4281-b951-d872f2087c98


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