Fix possible map::end() dereference in AppCacheUpdateJob triggered by a compromised renderer.

BUG=551044

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

Cr-Commit-Position: refs/heads/master@{#358815}
void AppCacheBackendImpl::TransferHostIn(
    int new_host_id, scoped_ptr<AppCacheHost> host) {
  HostMap::iterator found = hosts_.find(new_host_id);
  if (found == hosts_.end()) {
    NOTREACHED();
    return;
  }

  delete found->second;

  host->CompleteTransfer(new_host_id, frontend_);
  found->second = host.release();
}

void AppCacheBackendImpl::TransferHostIn(
    int new_host_id, scoped_ptr<AppCacheHost> host) {
  HostMap::iterator found = hosts_.find(new_host_id);
  if (found == hosts_.end()) {
    NOTREACHED();
    return;
  }

  delete found->second;

  host->CompleteTransfer(new_host_id, frontend_);
  found->second = host.release();
}
