Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(492)

Unified Diff: third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
diff --git a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
index c71f2d1b58106661fe658e38ddae1dd0753ccb7e..ba1ea3040b5a860a60fc8f39b832a9ae704b7af7 100644
--- a/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
+++ b/third_party/WebKit/Source/modules/fetch/BodyStreamBuffer.cpp
@@ -22,7 +22,7 @@ namespace blink {
class BodyStreamBuffer::LoaderClient final
: public GarbageCollectedFinalized<LoaderClient>,
- public SuspendableObject,
+ public ContextLifecycleObserver,
public FetchDataLoader::Client {
WTF_MAKE_NONCOPYABLE(LoaderClient);
USING_GARBAGE_COLLECTED_MIXIN(LoaderClient);
@@ -31,11 +31,9 @@ class BodyStreamBuffer::LoaderClient final
LoaderClient(ExecutionContext* executionContext,
BodyStreamBuffer* buffer,
FetchDataLoader::Client* client)
- : SuspendableObject(executionContext),
+ : ContextLifecycleObserver(executionContext),
m_buffer(buffer),
- m_client(client) {
- suspendIfNeeded();
- }
+ m_client(client) {}
void didFetchDataLoadedBlobHandle(
PassRefPtr<BlobDataHandle> blobDataHandle) override {
@@ -66,7 +64,7 @@ class BodyStreamBuffer::LoaderClient final
DEFINE_INLINE_TRACE() {
visitor->trace(m_buffer);
visitor->trace(m_client);
- SuspendableObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
FetchDataLoader::Client::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698