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

Side by Side Diff: Source/web/WebLeakDetector.cpp

Issue 1223713003: Leak Detector: Add support for ScriptPromise on Blink side (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/bindings/core/v8/ScriptPromise.cpp ('k') | public/web/WebLeakDetector.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/ScriptPromise.cpp ('k') | public/web/WebLeakDetector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698