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

Side by Side Diff: third_party/WebKit/Source/core/streams/UnderlyingSourceBase.cpp

Issue 1750453002: Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/streams/UnderlyingSourceBase.h" 5 #include "core/streams/UnderlyingSourceBase.h"
6 6
7 #include "bindings/core/v8/ScriptPromise.h" 7 #include "bindings/core/v8/ScriptPromise.h"
8 #include "bindings/core/v8/ScriptState.h" 8 #include "bindings/core/v8/ScriptState.h"
9 #include "bindings/core/v8/ScriptValue.h" 9 #include "bindings/core/v8/ScriptValue.h"
10 #include "core/streams/ReadableStreamController.h" 10 #include "core/streams/ReadableStreamController.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 bool UnderlyingSourceBase::hasPendingActivity() const 49 bool UnderlyingSourceBase::hasPendingActivity() const
50 { 50 {
51 // This will return false within a finite time period _assuming_ that 51 // This will return false within a finite time period _assuming_ that
52 // consumers use the controller to close or error the stream. 52 // consumers use the controller to close or error the stream.
53 // Browser-created readable streams should always close or error within a 53 // Browser-created readable streams should always close or error within a
54 // finite time period, due to timeouts etc. 54 // finite time period, due to timeouts etc.
55 return m_controller && m_controller->isActive(); 55 return m_controller && m_controller->isActive();
56 } 56 }
57 57
58 void UnderlyingSourceBase::stop() 58 void UnderlyingSourceBase::contextDestroyed()
59 { 59 {
60 m_controller->noteHasBeenCanceled(); 60 m_controller->noteHasBeenCanceled();
61 m_controller.clear(); 61 m_controller.clear();
62 } 62 }
63 63
64 DEFINE_TRACE(UnderlyingSourceBase) 64 DEFINE_TRACE(UnderlyingSourceBase)
65 { 65 {
66 ActiveDOMObject::trace(visitor);
67 visitor->trace(m_controller); 66 visitor->trace(m_controller);
67 ContextLifecycleObserver::trace(visitor);
68 } 68 }
69 69
70 } // namespace blink 70 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698