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

Unified Diff: content/shell/renderer/layout_test/leak_detector.cc

Issue 1227293002: Add support for V8PerContextData to the leak detector (Chromium side) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: haraken's review 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/layout_test/leak_detector.cc
diff --git a/content/shell/renderer/layout_test/leak_detector.cc b/content/shell/renderer/layout_test/leak_detector.cc
index a057563f82a3cc8d2dc220724e21caab4766ebd1..e2e9abde9abcca3be383f164f1fe0e7496a223a5 100644
--- a/content/shell/renderer/layout_test/leak_detector.cc
+++ b/content/shell/renderer/layout_test/leak_detector.cc
@@ -28,6 +28,7 @@ const int kInitialNumberOfLiveRenderObjects = 3;
const int kInitialNumberOfLiveResources = 0;
const int kInitialNumberOfScriptPromises = 0;
const int kInitialNumberOfLiveFrames = 1;
+const int kInitialNumberOfV8PerContextData = 1;
// In the initial state, there are two ActiveDOMObjects (FontFaceSet created by
// HTMLDocument and SuspendableTimer created by DocumentLoader).
@@ -46,6 +47,8 @@ LeakDetector::LeakDetector(BlinkTestRunner* test_runner)
kInitialNumberOfLiveActiveDOMObject;
previous_result_.numberOfLiveScriptPromises = kInitialNumberOfScriptPromises;
previous_result_.numberOfLiveFrames = kInitialNumberOfLiveFrames;
+ previous_result_.numberOfLiveV8PerContextData =
+ kInitialNumberOfV8PerContextData;
}
LeakDetector::~LeakDetector() {
@@ -112,6 +115,13 @@ void LeakDetector::onLeakDetectionComplete(
list->AppendInteger(result.numberOfLiveFrames);
detail.Set("numberOfLiveFrames", list);
}
+ if (previous_result_.numberOfLiveV8PerContextData <
+ result.numberOfLiveV8PerContextData) {
+ base::ListValue* list = new base::ListValue();
+ list->AppendInteger(previous_result_.numberOfLiveV8PerContextData);
+ list->AppendInteger(result.numberOfLiveV8PerContextData);
+ detail.Set("numberOfLiveV8PerContextData", list);
+ }
if (!detail.empty()) {
std::string detail_str;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698