Bug 1455492: While here, fix refcount churn. r?bholley draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 20 Apr 2018 03:45:04 +0200
changeset 785415 71ceb0a6a24061fdde5bcc26fa43b5459d23ab0b
parent 785414 7c11f0b7c5f260ef1f31dce6530f167b5d48fcb6
push id107222
push userbmo:emilio@crisal.io
push dateFri, 20 Apr 2018 01:50:11 +0000
reviewersbholley
bugs1455492
milestone61.0a1
Bug 1455492: While here, fix refcount churn. r?bholley MozReview-Commit-ID: 88jzsn25e53
layout/style/Loader.cpp
--- 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);