Skip to content

Commit

Permalink
Add liveness checks around DoCreateStreamComplete to help debug crbug…
Browse files Browse the repository at this point in the history
….com/652868 to diagnose the cause of the crash.

BUG=652868

Review-Url: https://codereview.chromium.org/2421473005
Cr-Commit-Position: refs/heads/master@{#425240}
  • Loading branch information
zyshi authored and Commit bot committed Oct 14, 2016
1 parent 195ccbe commit 3aedde9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions net/http/http_network_transaction.cc
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,11 @@ int HttpNetworkTransaction::DoLoop(int result) {
rv = DoCreateStream();
break;
case STATE_CREATE_STREAM_COMPLETE:
// TODO(zhongyi): remove liveness checks when crbug.com/652868 is
// solved.
net_log_.CrashIfInvalid();
rv = DoCreateStreamComplete(rv);
net_log_.CrashIfInvalid();
break;
case STATE_INIT_STREAM:
DCHECK_EQ(OK, rv);
Expand Down
6 changes: 3 additions & 3 deletions net/log/net_log_with_source.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ class NET_EXPORT NetLogWithSource {
// the case of NULL net_log.
static NetLogWithSource Make(NetLog* net_log, NetLogSourceType source_type);

// TODO(eroman): Temporary until crbug.com/467797 is solved.
void CrashIfInvalid() const;

const NetLogSource& source() const { return source_; }
NetLog* net_log() const { return net_log_; }

Expand All @@ -82,9 +85,6 @@ class NET_EXPORT NetLogWithSource {
NetLogWithSource(const NetLogSource& source, NetLog* net_log)
: source_(source), net_log_(net_log) {}

// TODO(eroman): Temporary until crbug.com/467797 is solved.
void CrashIfInvalid() const;

NetLogSource source_;
NetLog* net_log_;

Expand Down

0 comments on commit 3aedde9

Please sign in to comment.