Bug 907755 - Followups, r=fitzgen

This commit is contained in:
Victor Porof 2013-09-28 10:41:20 +03:00
parent 1adc379263
commit e32fea9ff6

View File

@ -36,9 +36,6 @@ const DEFAULT_EDITOR_CONFIG = {
showOverviewRuler: true
};
//For telemetry
Cu.import("resource://gre/modules/Services.jsm")
/**
* Object defining the debugger view components.
*/
@ -279,13 +276,10 @@ let DebuggerView = {
if (this._editorSource.url == aSource.url && !aFlags.force) {
return this._editorSource.promise;
}
let transportType = DebuggerController.client.localTransport
? "_LOCAL"
: "_REMOTE";
//Telemetry probe
let transportType = gClient.localTransport ? "_LOCAL" : "_REMOTE";
let histogramId = "DEVTOOLS_DEBUGGER_DISPLAY_SOURCE" + transportType + "_MS";
let histogram = Services.telemetry.getHistogramById(histogramId);
let startTime = +new Date();
let startTime = Date.now();
let deferred = promise.defer();
@ -306,7 +300,7 @@ let DebuggerView = {
DebuggerView.Sources.selectedValue = aSource.url;
DebuggerController.Breakpoints.updateEditorBreakpoints();
histogram.add(+new Date() - startTime);
histogram.add(Date.now() - startTime);
// Resolve and notify that a source file was shown.
window.emit(EVENTS.SOURCE_SHOWN, aSource);