Skip to content

Commit

Permalink
fix: work around a null scoped_ptr dereference (#19366)
Browse files Browse the repository at this point in the history
This happens occasionally when running the test suite and indicates
that the callback's been reset or the underlying reference has been
released. To workaround, print a warning.
  • Loading branch information
richard-townsend-arm authored and John Kleinschmidt committed Aug 27, 2019
1 parent 1655976 commit 0491abf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions atom/browser/api/atom_api_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,10 @@ void WrapVerifyProc(base::Callback<void(const VerifyRequestParams& request,
base::Callback<void(int)>)> proc,
const VerifyRequestParams& request,
base::OnceCallback<void(int)> cb) {
if (proc.is_null()) {
LOG(ERROR) << "WrapVerifyProc (proc=null)";
return;
}
proc.Run(request, base::AdaptCallbackForRepeating(std::move(cb)));
}

Expand Down

0 comments on commit 0491abf

Please sign in to comment.