mac: Make ScopedRlzValueStoreLock handle nested lock failures.

I thought that lib_rlz always early-exits when it fails to acquire the rlz lock,
and so nested lock acquisition failures should never happen. That is true as
long as SupplementaryBranding isn't used, and that can even be used from
user code like so:

    rlz_lib::SupplementaryBranding branding(reactivation_brand.c_str());
    ret &= rlz_lib::RecordProductEvent(product, point, event_id);

Since SupplementaryBranding tries to acquire the rlz lock and keeps it while
it's on the scope, if RecordProductEvent fails to acquire the lock it'll be a
nested lock failure. Update the code to not CHECK on this case.

Add a test that covers this scenario.

TEST=unit test. I verified the test crashes in the CHECK without my code change.

Review URL:

git-svn-id: 10bc0f33-e4bf-9a86-80cf-af638054f0c4
2 files changed
tree: f1e76ce6173815cacb8feaa4bb6f09503a92f6b0
  1. lib/
  2. mac/
  3. test/
  4. win/
  6. DEPS
  7. rlz.gyp