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

Unified Diff: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-deep-nesting.html

Issue 2022673002: DevTools: Fix Maximum call stack size exceeded error while retrieving CPU profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-deep-nesting.html
diff --git a/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-deep-nesting.html b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-deep-nesting.html
new file mode 100644
index 0000000000000000000000000000000000000000..51e6f91983719ea4279e535f62a8ce025b9bbb7e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/inspector/profiler/cpu-profiler-deep-nesting.html
@@ -0,0 +1,36 @@
+<html>
+<head>
+ <script src="../../http/tests/inspector/inspector-test.js"></script>
+ <script src="profiler-test.js"></script>
+<script>
+
+function test()
+{
+ InspectorTest.runProfilerTestSuite([
+ function testDeepProfile(next)
+ {
+ function findPageFunctionInProfileView(view)
+ {
+ InspectorTest.addResult(`Max profile tree depth: ${maxDepth(view.profile.root)}`);
+ next();
+ }
+ function maxDepth(node)
+ {
+ return Math.max.apply(Math, node.children.map(maxDepth).concat(0)) + 1;
+ }
+ InspectorTest.showProfileWhenAdded("profile");
+ InspectorTest.waitUntilProfileViewIsShown("profile", findPageFunctionInProfileView);
+ InspectorTest.evaluateInPage("f = d => d ? f(d - 1) : console.profile('profile'); f(1000); console.profileEnd('profile');", () => 0);
pfeldman 2016/05/28 01:43:14 Lets test what you fix.
alph 2016/05/28 02:21:52 Redone everything.
+ }
+ ]);
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests that CPU profiler can retrieve deeply nested profile trees.
+
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698