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

Unified Diff: LayoutTests/inspector/profiler/canvas2d/canvas-replay-log-grid.html

Issue 147923011: Remove unnecessary _profileTypesByIdMap map (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed Created 6 years, 11 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 | LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/profiler/canvas2d/canvas-replay-log-grid.html
diff --git a/LayoutTests/inspector/profiler/canvas2d/canvas-replay-log-grid.html b/LayoutTests/inspector/profiler/canvas2d/canvas-replay-log-grid.html
index b84d1684803ce49a515c468a9267db14b5696e11..8d7cc2ec3bec5501f58be761105bb280582a11c8 100644
--- a/LayoutTests/inspector/profiler/canvas2d/canvas-replay-log-grid.html
+++ b/LayoutTests/inspector/profiler/canvas2d/canvas-replay-log-grid.html
@@ -41,13 +41,16 @@ function test()
WebInspector.showPanel("profiles");
var profilesPanel = WebInspector.panels.profiles;
- var profileType = profilesPanel.getProfileType(WebInspector.CanvasProfileType.TypeId);
+ var typeRegistry = WebInspector.ProfileTypeRegistry.instance;
+ var profileType = typeRegistry.canvasProfileType;
// FIXME: This hack is added because ProfilesPanel might have been already created before experiment was enabled.
// This could be removed once canvas inspection is out of experiments.
if (!profileType) {
- profilesPanel._registerProfileType(new WebInspector.CanvasProfileType());
- profileType = profilesPanel.getProfileType(WebInspector.CanvasProfileType.TypeId);
+ profileType = new WebInspector.CanvasProfileType();
+ typeRegistry.canvasProfileType = profileType;
+ typeRegistry._addProfileType(profileType);
+ profilesPanel._registerProfileType(profileType);
}
profilesPanel._onProfileTypeSelected({data: profileType});
@@ -65,7 +68,7 @@ function test()
function didStartCapturingFrame(frameId, error, traceLogId)
{
profileHeader = profileType.getProfiles()[0]
- profilesPanel._showProfile(profileHeader);
+ profilesPanel.showProfile(profileHeader);
InspectorTest.addSniffer(profileHeader, "_updateCapturingStatus", didReceiveFirstFrame);
InspectorTest.evaluateInConsole("doSomeCanvasCalls(2)");
}
« no previous file with comments | « no previous file | LayoutTests/inspector/profiler/cpu-profiler-profile-removal.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698