mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 1503726 - Null check release callback in CGDataProviderCreateWithData redirection, r=mccr8.
This commit is contained in:
parent
a6aa854ab5
commit
48b0840f22
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user