Skip to content
This repository has been archived by the owner on Nov 7, 2018. It is now read-only.

Commit

Permalink
Bug 1503726 - Null check release callback in CGDataProviderCreateWith…
Browse files Browse the repository at this point in the history
…Data redirection, r=mccr8.
  • Loading branch information
bhackett1024 committed Oct 31, 2018
1 parent ea715c4 commit de8f9f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions toolkit/recordreplay/ProcessRedirectDarwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2056,7 +2056,7 @@ RR_CGDataProviderCreateWithData(Stream& aEvents, CallArguments* aArguments, Erro
auto& size = aArguments->Arg<2, size_t>();
auto& releaseData = aArguments->Arg<3, CGDataProviderReleaseDataCallback>();

if (IsReplaying()) {
if (IsReplaying() && releaseData) {
// Immediately release the data, since there is no data provider to do it for us.
releaseData(info, data, size);
}
Expand Down Expand Up @@ -2090,7 +2090,7 @@ Middleman_CGDataProviderCreateWithData(MiddlemanCallContext& aCx)
}

// Immediately release the data in the replaying process.
if (aCx.mPhase == MiddlemanCallPhase::ReplayInput) {
if (aCx.mPhase == MiddlemanCallPhase::ReplayInput && releaseData) {
releaseData(info, data, size);
}
}
Expand Down

0 comments on commit de8f9f4

Please sign in to comment.