Mojo EDK: Ensure that NodeDelegate is never called while holding locks

Removes GenerateRandomPortName from NodeDelegate's interface. The
obvious base/crypto RandBytes impl is now baked into Node.

Adds a helper to ensure that a Node's NodeDelegate is never called into
while holding any internal locks (the Node's |ports_lock_| or any
individual Port locks.)

Includes the minimal refactoring necessary (in OnObserveProxy only) to
ensure that the new NodeDelegate calling constraints are met.

BUG=726489

Change-Id: Ib4fdaf3e8bf853987a0ade72f5c3f1548ef70206
Reviewed-on: https://chromium-review.googlesource.com/526732
Commit-Queue: Ken Rockot <rockot@chromium.org>
Reviewed-by: Jay Civelli <jcivelli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#477534}

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