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

Unified Diff: webkit/glue/devtools/js/devtools.js

Issue 202003: DevTools profiler: remove code due to WebKit Inspector upstreaming. (Closed)
Patch Set: Created 11 years, 3 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: webkit/glue/devtools/js/devtools.js
diff --git a/webkit/glue/devtools/js/devtools.js b/webkit/glue/devtools/js/devtools.js
index 2520f0fff3a10d93bc80521c036a5fc38fa8f0b9..f47d2ccbfed8515e428fb9b43f7dfd734993ec9a 100644
--- a/webkit/glue/devtools/js/devtools.js
+++ b/webkit/glue/devtools/js/devtools.js
@@ -159,6 +159,7 @@ WebInspector.loaded = function() {
devtools.tools.reset();
Preferences.ignoreWhitespace = false;
+ Preferences.samplingCPUProfiler = true;
oldLoaded.call(this);
// Hide dock button on Mac OS.
@@ -276,40 +277,6 @@ WebInspector.ScriptsPanel.prototype.__defineGetter__(
})();
-// As columns in data grid can't be changed after initialization,
-// we need to intercept the constructor and modify columns upon creation.
-(function InterceptDataGridForProfiler() {
- var originalDataGrid = WebInspector.DataGrid;
- WebInspector.DataGrid = function(columns) {
- if (('average' in columns) && ('calls' in columns)) {
- delete columns['average'];
- delete columns['calls'];
- }
- return new originalDataGrid(columns);
- };
-})();
-
-
-// WebKit's profiler displays milliseconds with high resolution (shows
-// three digits after the decimal point). We never have such resolution,
-// as our minimal sampling rate is 1 ms. So we are disabling high resolution
-// to avoid visual clutter caused by meaningless ".000" parts.
-(function InterceptTimeDisplayInProfiler() {
- var originalDataGetter =
- WebInspector.ProfileDataGridNode.prototype.__lookupGetter__('data');
- WebInspector.ProfileDataGridNode.prototype.__defineGetter__('data',
- function() {
- var oldNumberSecondsToString = Number.secondsToString;
- Number.secondsToString = function(seconds, formatterFunction) {
- return oldNumberSecondsToString(seconds, formatterFunction, false);
- };
- var data = originalDataGetter.call(this);
- Number.secondsToString = oldNumberSecondsToString;
- return data;
- });
-})();
-
-
(function InterceptProfilesPanelEvents() {
var oldShow = WebInspector.ProfilesPanel.prototype.show;
WebInspector.ProfilesPanel.prototype.show = function() {
« 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