OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 14 matching lines...) Expand all Loading... |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 | 32 |
33 #include "public/web/WebLeakDetector.h" | 33 #include "public/web/WebLeakDetector.h" |
34 | 34 |
| 35 #include "bindings/core/v8/ScriptPromise.h" |
35 #include "bindings/core/v8/V8Binding.h" | 36 #include "bindings/core/v8/V8Binding.h" |
36 #include "bindings/core/v8/V8GCController.h" | 37 #include "bindings/core/v8/V8GCController.h" |
37 #include "core/dom/ActiveDOMObject.h" | 38 #include "core/dom/ActiveDOMObject.h" |
38 #include "core/dom/Document.h" | 39 #include "core/dom/Document.h" |
39 #include "core/fetch/MemoryCache.h" | 40 #include "core/fetch/MemoryCache.h" |
40 #include "core/fetch/ResourceFetcher.h" | 41 #include "core/fetch/ResourceFetcher.h" |
41 #include "core/inspector/InspectorCounters.h" | 42 #include "core/inspector/InspectorCounters.h" |
42 #include "core/layout/LayoutObject.h" | 43 #include "core/layout/LayoutObject.h" |
43 #include "modules/webaudio/AudioNode.h" | 44 #include "modules/webaudio/AudioNode.h" |
44 #include "platform/Timer.h" | 45 #include "platform/Timer.h" |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ASSERT(m_client); | 128 ASSERT(m_client); |
128 | 129 |
129 WebLeakDetectorClient::Result result; | 130 WebLeakDetectorClient::Result result; |
130 result.numberOfLiveAudioNodes = AudioHandler::instanceCount(); | 131 result.numberOfLiveAudioNodes = AudioHandler::instanceCount(); |
131 result.numberOfLiveDocuments = InspectorCounters::counterValue(InspectorCoun
ters::DocumentCounter); | 132 result.numberOfLiveDocuments = InspectorCounters::counterValue(InspectorCoun
ters::DocumentCounter); |
132 result.numberOfLiveNodes = InspectorCounters::counterValue(InspectorCounters
::NodeCounter); | 133 result.numberOfLiveNodes = InspectorCounters::counterValue(InspectorCounters
::NodeCounter); |
133 result.numberOfLiveLayoutObjects = LayoutObject::instanceCount(); | 134 result.numberOfLiveLayoutObjects = LayoutObject::instanceCount(); |
134 result.numberOfLiveRenderObjects = result.numberOfLiveLayoutObjects; | 135 result.numberOfLiveRenderObjects = result.numberOfLiveLayoutObjects; |
135 result.numberOfLiveResources = Resource::instanceCount(); | 136 result.numberOfLiveResources = Resource::instanceCount(); |
136 result.numberOfLiveActiveDOMObjects = ActiveDOMObject::instanceCount(); | 137 result.numberOfLiveActiveDOMObjects = ActiveDOMObject::instanceCount(); |
| 138 result.numberOfLiveScriptPromises = ScriptPromise::instanceCount(); |
137 | 139 |
138 m_client->onLeakDetectionComplete(result); | 140 m_client->onLeakDetectionComplete(result); |
139 | 141 |
140 #ifndef NDEBUG | 142 #ifndef NDEBUG |
141 showLiveDocumentInstances(); | 143 showLiveDocumentInstances(); |
142 #endif | 144 #endif |
143 } | 145 } |
144 | 146 |
145 } // namespace | 147 } // namespace |
146 | 148 |
147 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) | 149 WebLeakDetector* WebLeakDetector::create(WebLeakDetectorClient* client) |
148 { | 150 { |
149 return new WebLeakDetectorImpl(client); | 151 return new WebLeakDetectorImpl(client); |
150 } | 152 } |
151 | 153 |
152 } // namespace blink | 154 } // namespace blink |
OLD | NEW |