mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 04:38:02 +00:00
Bug 1310518 - fix crashes when downloading files without referrer/source URL, r=mstange
MozReview-Commit-ID: HnSb0yxlAfs --HG-- extra : rebase_source : 56548450c404702c66e213e327e2083495577382
This commit is contained in:
parent
345cac0665
commit
8d36987e6f
@ -239,11 +239,11 @@ void AddQuarantineMetadataToFile(const CFStringRef filePath,
|
||||
::CFDictionarySetValue(mutQuarantineProps, kLSQuarantineTypeKey, type);
|
||||
}
|
||||
|
||||
if (!::CFDictionaryGetValue(mutQuarantineProps, kLSQuarantineOriginURLKey)) {
|
||||
if (!::CFDictionaryGetValue(mutQuarantineProps, kLSQuarantineOriginURLKey) && referrerURL) {
|
||||
::CFDictionarySetValue(mutQuarantineProps, kLSQuarantineOriginURLKey, referrerURL);
|
||||
}
|
||||
|
||||
if (!::CFDictionaryGetValue(mutQuarantineProps, kLSQuarantineDataURLKey)) {
|
||||
if (!::CFDictionaryGetValue(mutQuarantineProps, kLSQuarantineDataURLKey) && sourceURL) {
|
||||
::CFDictionarySetValue(mutQuarantineProps, kLSQuarantineDataURLKey, sourceURL);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user