Title: [234003] trunk/Source/WebCore
- Revision
- 234003
- Author
- [email protected]
- Date
- 2018-07-19 13:51:48 -0700 (Thu, 19 Jul 2018)
Log Message
Unreviewed, rolling out r233994.
Caused EWS and bot failures due to assertions added
Reverted changeset:
"FetchResponse should close its stream when loading finishes"
https://bugs.webkit.org/show_bug.cgi?id=187790
https://trac.webkit.org/changeset/233994
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (234002 => 234003)
--- trunk/Source/WebCore/ChangeLog 2018-07-19 20:48:43 UTC (rev 234002)
+++ trunk/Source/WebCore/ChangeLog 2018-07-19 20:51:48 UTC (rev 234003)
@@ -1,3 +1,15 @@
+2018-07-19 David Fenton <[email protected]>
+
+ Unreviewed, rolling out r233994.
+
+ Caused EWS and bot failures due to assertions added
+
+ Reverted changeset:
+
+ "FetchResponse should close its stream when loading finishes"
+ https://bugs.webkit.org/show_bug.cgi?id=187790
+ https://trac.webkit.org/changeset/233994
+
2018-07-19 Jer Noble <[email protected]>
REGRESSION(r233926): media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-pip-to-inline.html is a TIMEOUT failure
Modified: trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp (234002 => 234003)
--- trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp 2018-07-19 20:48:43 UTC (rev 234002)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.cpp 2018-07-19 20:51:48 UTC (rev 234003)
@@ -45,12 +45,6 @@
suspendIfNeeded();
}
-FetchBodyOwner::~FetchBodyOwner()
-{
- if (m_readableStreamSource)
- m_readableStreamSource->detach();
-}
-
void FetchBodyOwner::stop()
{
if (m_body)
Modified: trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h (234002 => 234003)
--- trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h 2018-07-19 20:48:43 UTC (rev 234002)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodyOwner.h 2018-07-19 20:51:48 UTC (rev 234003)
@@ -41,7 +41,6 @@
class FetchBodyOwner : public RefCounted<FetchBodyOwner>, public ActiveDOMObject {
public:
FetchBodyOwner(ScriptExecutionContext&, std::optional<FetchBody>&&, Ref<FetchHeaders>&&);
- ~FetchBodyOwner();
bool bodyUsed() const { return isDisturbed(); }
void arrayBuffer(Ref<DeferredPromise>&&);
Modified: trunk/Source/WebCore/Modules/fetch/FetchBodySource.cpp (234002 => 234003)
--- trunk/Source/WebCore/Modules/fetch/FetchBodySource.cpp 2018-07-19 20:48:43 UTC (rev 234002)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodySource.cpp 2018-07-19 20:51:48 UTC (rev 234003)
@@ -34,52 +34,38 @@
namespace WebCore {
FetchBodySource::FetchBodySource(FetchBodyOwner& bodyOwner)
- : m_bodyOwner(&bodyOwner)
+ : m_bodyOwner(bodyOwner)
{
}
void FetchBodySource::setActive()
{
- ASSERT(m_bodyOwner);
- if (m_bodyOwner)
- m_bodyOwner->setPendingActivity(m_bodyOwner);
+ m_bodyOwner.setPendingActivity(&m_bodyOwner);
}
void FetchBodySource::setInactive()
{
- ASSERT(m_bodyOwner);
- if (m_bodyOwner)
- m_bodyOwner->unsetPendingActivity(m_bodyOwner);
+ m_bodyOwner.unsetPendingActivity(&m_bodyOwner);
}
void FetchBodySource::doStart()
{
- ASSERT(m_bodyOwner);
- if (m_bodyOwner)
- m_bodyOwner->consumeBodyAsStream();
+ m_bodyOwner.consumeBodyAsStream();
}
void FetchBodySource::doPull()
{
- ASSERT(m_bodyOwner);
- if (m_bodyOwner)
- m_bodyOwner->feedStream();
+ m_bodyOwner.feedStream();
}
void FetchBodySource::doCancel()
{
m_isCancelling = true;
- ASSERT(m_bodyOwner);
- if (!m_bodyOwner)
- return;
-
- m_bodyOwner->cancel();
- m_bodyOwner = nullptr;
+ m_bodyOwner.cancel();
}
void FetchBodySource::close()
{
- m_bodyOwner = nullptr;
controller().close();
clean();
}
@@ -86,7 +72,6 @@
void FetchBodySource::error(const String& value)
{
- m_bodyOwner = nullptr;
controller().error(value);
clean();
}
Modified: trunk/Source/WebCore/Modules/fetch/FetchBodySource.h (234002 => 234003)
--- trunk/Source/WebCore/Modules/fetch/FetchBodySource.h 2018-07-19 20:48:43 UTC (rev 234002)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodySource.h 2018-07-19 20:51:48 UTC (rev 234003)
@@ -49,7 +49,6 @@
bool isCancelling() const { return m_isCancelling; }
void resolvePullPromise() { pullFinished(); }
- void detach() { m_bodyOwner = nullptr; }
private:
void doStart() final;
@@ -58,7 +57,7 @@
void setActive() final;
void setInactive() final;
- FetchBodyOwner* m_bodyOwner;
+ FetchBodyOwner& m_bodyOwner;
bool m_isCancelling { false };
};
Modified: trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp (234002 => 234003)
--- trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp 2018-07-19 20:48:43 UTC (rev 234002)
+++ trunk/Source/WebCore/Modules/fetch/FetchResponse.cpp 2018-07-19 20:51:48 UTC (rev 234003)
@@ -225,12 +225,8 @@
m_response.m_body->loadingSucceeded();
#if ENABLE(STREAMS_API)
- if (m_response.m_readableStreamSource) {
- if (m_response.body().consumer().hasData())
- m_response.m_readableStreamSource->enqueue(m_response.body().consumer().takeAsArrayBuffer());
-
+ if (m_response.m_readableStreamSource && !m_response.body().consumer().hasData())
m_response.closeStream();
- }
#endif
if (auto consumeDataCallback = WTFMove(m_consumeDataCallback))
consumeDataCallback(nullptr);
@@ -256,7 +252,7 @@
#if ENABLE(STREAMS_API)
if (m_response.m_readableStreamSource) {
if (!m_response.m_readableStreamSource->isCancelling())
- m_response.m_readableStreamSource->error(makeString("Loading failed: "_s, error.localizedDescription()));
+ m_response.m_readableStreamSource->error("Loading failed"_s);
m_response.m_readableStreamSource = nullptr;
}
#endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes