Bug 1455492: While here, fix refcount churn. r?bholley
MozReview-Commit-ID: 88jzsn25e53
--- a/layout/style/Loader.cpp
+++ b/layout/style/Loader.cpp
@@ -1651,17 +1651,17 @@ Loader::DoParseSheetServo(ServoStyleShee
// This parse does not need to be synchronous. \o/
//
// Note that we need to block onload because there may be no network requests
// pending.
BlockOnload();
RefPtr<SheetLoadData> loadData = aLoadData;
nsCOMPtr<nsISerialEventTarget> target = DispatchTarget();
aSheet->ParseSheet(this, aBytes, aLoadData)->Then(target, __func__,
- [loadData](bool aDummy) {
+ [loadData = Move(loadData)](bool aDummy) {
MOZ_ASSERT(NS_IsMainThread());
loadData->mIsBeingParsed = false;
loadData->mLoader->UnblockOnload(/* aFireSync = */ false);
// If there are no child sheets outstanding, mark us as complete.
// Otherwise, the children are holding strong refs to the data and
// will call SheetComplete() on it when they complete.
if (loadData->mPendingChildren == 0) {
loadData->mLoader->SheetComplete(loadData, NS_OK);