Changeset 225648 in webkit


Ignore:
Timestamp:
Dec 7, 2017 3:30:33 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Fix erroneous ASSERT in DocumentThreadableLoader::didFail
https://bugs.webkit.org/show_bug.cgi?id=180549

Patch by Youenn Fablet <youenn@apple.com> on 2017-12-07
Reviewed by Alex Christensen.

  • loader/DocumentThreadableLoader.cpp:

(WebCore::DocumentThreadableLoader::didFail): ASSERT was checking whether the optional was null.
This could never be the case since we move the value of the optional, not the optional itself.
Ensure that the optional value is null so that we are sure request is being loaded and make the optional null just after that.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r225647 r225648  
     12017-12-07  Youenn Fablet  <youenn@apple.com>
     2
     3        Fix erroneous ASSERT in DocumentThreadableLoader::didFail
     4        https://bugs.webkit.org/show_bug.cgi?id=180549
     5
     6        Reviewed by Alex Christensen.
     7
     8        * loader/DocumentThreadableLoader.cpp:
     9        (WebCore::DocumentThreadableLoader::didFail): ASSERT was checking whether the optional was null.
     10        This could never be the case since we move the value of the optional, not the optional itself.
     11        Ensure that the optional value is null so that we are sure request is being loaded and make the optional null just after that.
     12
    1132017-12-07  Ryosuke Niwa  <rniwa@webkit.org>
    214
  • trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp

    r225591 r225648  
    411411        m_options.serviceWorkersMode = ServiceWorkersMode::None;
    412412        makeCrossOriginAccessRequestWithPreflight(WTFMove(m_bypassingPreflightForServiceWorkerRequest.value()));
    413         ASSERT(!m_bypassingPreflightForServiceWorkerRequest);
     413        ASSERT(m_bypassingPreflightForServiceWorkerRequest->isNull());
     414        m_bypassingPreflightForServiceWorkerRequest = std::nullopt;
    414415        return;
    415416    }
Note: See TracChangeset for help on using the changeset viewer.