Title: [225648] trunk/Source/WebCore
Revision
225648
Author
[email protected]
Date
2017-12-07 15:30:33 -0800 (Thu, 07 Dec 2017)

Log Message

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

Patch by Youenn Fablet <[email protected]> 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.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (225647 => 225648)


--- trunk/Source/WebCore/ChangeLog	2017-12-07 23:25:04 UTC (rev 225647)
+++ trunk/Source/WebCore/ChangeLog	2017-12-07 23:30:33 UTC (rev 225648)
@@ -1,3 +1,15 @@
+2017-12-07  Youenn Fablet  <[email protected]>
+
+        Fix erroneous ASSERT in DocumentThreadableLoader::didFail
+        https://bugs.webkit.org/show_bug.cgi?id=180549
+
+        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.
+
 2017-12-07  Ryosuke Niwa  <[email protected]>
 
         iOS: Many AMP pages crash inside Document::updateStyleIfNeeded

Modified: trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp (225647 => 225648)


--- trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2017-12-07 23:25:04 UTC (rev 225647)
+++ trunk/Source/WebCore/loader/DocumentThreadableLoader.cpp	2017-12-07 23:30:33 UTC (rev 225648)
@@ -410,7 +410,8 @@
 
         m_options.serviceWorkersMode = ServiceWorkersMode::None;
         makeCrossOriginAccessRequestWithPreflight(WTFMove(m_bypassingPreflightForServiceWorkerRequest.value()));
-        ASSERT(!m_bypassingPreflightForServiceWorkerRequest);
+        ASSERT(m_bypassingPreflightForServiceWorkerRequest->isNull());
+        m_bypassingPreflightForServiceWorkerRequest = std::nullopt;
         return;
     }
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to