Commit b689fb9e authored by valenting's avatar valenting
Browse files

Bug 1533957 - The request should be cancelled before being removed from the LoadGroup r=bzbarsky

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

--HG--
extra : moz-landing-system : lando
parent ac74e89b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -212,6 +212,9 @@ nsLoadGroup::Cancel(nsresult status) {
           nameStr.get()));
    }

    // Cancel the request...
    rv = request->Cancel(status);

    //
    // Remove the request from the load group...  This may cause
    // the OnStopRequest notification to fire...
@@ -220,9 +223,6 @@ nsLoadGroup::Cancel(nsresult status) {
    //
    (void)RemoveRequest(request, nullptr, status);

    // Cancel the request...
    rv = request->Cancel(status);

    // Remember the first failure and return it...
    if (NS_FAILED(rv) && NS_SUCCEEDED(firstError)) firstError = rv;
  }