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

Unified Diff: test/cctest/cctest.cc

Issue 22852024: Track JS allocations as they arrive with no affection on performance when tracking is switched off (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Make separate API for JS allocations recording, add example of checking JS allocations recording in… Created 7 years, 4 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
Index: test/cctest/cctest.cc
diff --git a/test/cctest/cctest.cc b/test/cctest/cctest.cc
index b20696617cf7b171ca7604487f5407305d8613aa..215e4d76d5cf3e7ab62d6efa0086eac29819fc40 100644
--- a/test/cctest/cctest.cc
+++ b/test/cctest/cctest.cc
@@ -174,3 +174,9 @@ int main(int argc, char* argv[]) {
RegisterThreadedTest *RegisterThreadedTest::first_ = NULL;
int RegisterThreadedTest::count_ = 0;
+
+void RunAndTrackAllocations(void (*test)()) {
+ LocalContext env;
+ HeapObjectsTracker tracker;
+ (*test)();
+}

Powered by Google App Engine
This is Rietveld 408576698