Bug 1517577 - DataTransferItemList::Add should use nsVariantCC. r=nika

nsVariant isn't cycle collected, so this can cause a leak.

Differential Revision: https://phabricator.services.mozilla.com/D16124

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew McCreight 2019-01-10 19:23:43 +00:00
parent a95f1a031b
commit a3f7eb4598
3 changed files with 1 additions and 4 deletions

View File

@ -173,7 +173,7 @@ DataTransferItem* DataTransferItemList::Add(File& aData,
}
nsCOMPtr<nsISupports> supports = do_QueryObject(&aData);
nsCOMPtr<nsIWritableVariant> data = new nsVariant();
nsCOMPtr<nsIWritableVariant> data = new nsVariantCC();
data->SetAsISupports(supports);
nsAutoString type;

View File

@ -1,2 +0,0 @@
lsan-allowed: [Alloc, NewEmptyScopeData, __rdl_alloc, __rdl_realloc, js_pod_calloc, js_pod_malloc, js_pod_realloc, mozilla::dom::ChromeUtils::GenerateQI, mozilla::dom::Performance::CreateForMainThread]
leak-threshold: [default:409600, tab:819200]

View File

@ -1 +0,0 @@
lsan-allowed: [Alloc, NewEmptyScopeData, __rdl_alloc, __rdl_realloc, js_new, js_pod_calloc, js_pod_malloc, js_pod_realloc, mozilla::dom::ChromeUtils::GenerateQI, mozilla::dom::Performance::CreateForMainThread]