Bug 1249788 - Follow up: Remove debug logs and TODO comments that should not have landed. r=jimb

This commit is contained in:
Nick Fitzgerald 2016-04-12 14:34:00 -04:00
Родитель c66c7f23d1
Коммит 43931f7d1c
5 изменённых файлов: 20 добавлений и 30 удалений

Просмотреть файл

@ -65,13 +65,16 @@ toolbar.displayBy=Group by:
# describing the select menu options of the display options.
toolbar.displayBy.tooltip=Change how objects are grouped
# TODO FITZGEN
# LOCALIZATION NOTE (toolbar.pop-view): The text in the button to go back to the
# previous view.
toolbar.pop-view=
# TODO FITZGEN
# LOCALIZATION NOTE (toolbar.pop-view.label): The text for the label for the
# button to go back to the previous view.
toolbar.pop-view.label=Go back to aggregates
# TODO FITZGEN
# LOCALIZATION NOTE (toolbar.viewing-individuals): The text letting the user
# know that they are viewing individual nodes from a census group.
toolbar.viewing-individuals=⁂ Viewing individuals in group
# LOCALIZATION NOTE (censusDisplays.coarseType.tooltip): The tooltip for the
@ -178,7 +181,8 @@ filter.placeholder=Filter
# tool's filter search box.
filter.tooltip=Filter the contents of the heap snapshot
# TODO FITZGEN
# LOCALIZATION NOTE (tree-item.view-individuals.tooltip): The tooltip for the
# button to view individuals in this group.
tree-item.view-individuals.tooltip=View individual nodes in this group and their retaining paths
# LOCALIZATION NOTE (tree-item.load-more): The label for the links to fetch the
@ -307,22 +311,28 @@ snapshot.state.saving-tree-map.full=Saving tree map…
# snapshot state ERROR, used in the main heap view.
snapshot.state.error.full=There was an error processing this snapshot.
# TODO FITZGEN
# LOCALIZATION NOTE (individuals.state.error): The short message displayed when
# there is an error fetching individuals from a group.
individuals.state.error=Error
# TODO FITZGEN
# LOCALIZATION NOTE (individuals.state.error.full): The longer message displayed
# when there is an error fetching individuals from a group.
individuals.state.error.full=There was an error while fetching individuals in the group
# TODO FITZGEN
# LOCALIZATION NOTE (individuals.state.fetching): The short message displayed
# while fetching individuals.
individuals.state.fetching=Fetching…
# TODO FITZGEN
# LOCALIZATION NOTE (individuals.state.fetching.full): The longer message
# displayed while fetching individuals.
individuals.state.fetching.full=Fetching individuals in group…
# TODO FITZGEN
# LOCALIZATION NOTE (individuals.field.node): The header label for an individual
# node.
individuals.field.node=Node
# TODO FITZGEN
# LOCALIZATION NOTE (individuals.field.node.tooltip): The tooltip for the header
# label for an individual node.
individuals.field.node.tooltip=The individual node in the snapshot
# LOCALIZATION NOTE (snapshot.state.saving): The label describing the snapshot

Просмотреть файл

@ -9,7 +9,6 @@ const { refresh } = require("./refresh");
exports.setCensusDisplayAndRefresh = function(heapWorker, display) {
return function*(dispatch, getState) {
console.log("FITZGEN: setCensusDisplayAndRefresh", display);
dispatch(setCensusDisplay(display));
yield dispatch(refresh(heapWorker));
};

Просмотреть файл

@ -14,7 +14,6 @@ const snapshot = require("./snapshot");
* @param {HeapAnalysesWorker} heapWorker
*/
exports.refresh = function (heapWorker) {
console.log("FITZGEN: refresh");
return function* (dispatch, getState) {
switch (getState().view.state) {
case viewState.DIFFING:

Просмотреть файл

@ -140,8 +140,6 @@ TaskCache.declareCacheableTask({
},
task: function*(heapWorker, id, removeFromCache, dispatch, getState) {
console.log("FITZGEN: readSnapshot");
const snapshot = getSnapshot(getState(), id);
assert([states.SAVED, states.IMPORTING].includes(snapshot.state),
`Should only read a snapshot once. Found snapshot in state ${snapshot.state}`);
@ -153,14 +151,12 @@ TaskCache.declareCacheableTask({
yield heapWorker.readHeapSnapshot(snapshot.path);
creationTime = yield heapWorker.getCreationTime(snapshot.path);
} catch (error) {
console.log("FITZGEN: readSnapshot: error", error);
removeFromCache();
reportException("readSnapshot", error);
dispatch({ type: actions.SNAPSHOT_ERROR, id, error });
return;
}
console.log("FITZGEN: readSnapshot: done reading");
removeFromCache();
dispatch({ type: actions.READ_SNAPSHOT_END, id, creationTime });
}
@ -196,10 +192,8 @@ function makeTakeCensusTask({ getDisplay, getFilter, getCensus, beginAction,
},
task: function*(heapWorker, id, removeFromCache, dispatch, getState) {
console.log("FITZGEN: takeCensus");
const snapshot = getSnapshot(getState(), id);
if (!snapshot) {
console.log("FITZGEN: no snapshot");
removeFromCache();
return;
}
@ -214,7 +208,6 @@ function makeTakeCensusTask({ getDisplay, getFilter, getCensus, beginAction,
// If display, filter and inversion haven't changed, don't do anything.
if (censusIsUpToDate(filter, display, getCensus(snapshot))) {
console.log("FITZGEN: census is up to date");
removeFromCache();
return;
}
@ -226,7 +219,6 @@ function makeTakeCensusTask({ getDisplay, getFilter, getCensus, beginAction,
display = getDisplay(getState());
filter = getState().filter;
console.log("FITZGEN: taking census with display =", display.displayName);
dispatch({
type: beginAction,
id,
@ -246,7 +238,6 @@ function makeTakeCensusTask({ getDisplay, getFilter, getCensus, beginAction,
{ breakdown: display.breakdown },
opts));
} catch (error) {
console.log("FITZGEN: error taking census: " + error + "\n" + error.stack);
removeFromCache();
reportException("takeCensus", error);
dispatch({ type: errorAction, id, error });
@ -256,8 +247,6 @@ function makeTakeCensusTask({ getDisplay, getFilter, getCensus, beginAction,
while (filter !== getState().filter ||
display !== getDisplay(getState()));
console.log("FITZGEN: done taking census");
removeFromCache();
dispatch({
type: endAction,
@ -465,11 +454,9 @@ const refreshIndividuals = exports.refreshIndividuals = function(heapWorker) {
* @param {HeapAnalysesClient} heapWorker
*/
const refreshSelectedCensus = exports.refreshSelectedCensus = function (heapWorker) {
console.log("FITZGEN: refreshSelectedCensus");
return function*(dispatch, getState) {
let snapshot = getState().snapshots.find(s => s.selected);
if (!snapshot || snapshot.state !== states.READ) {
console.log("FITZGEN: nothing to do");
return;
}
@ -481,7 +468,6 @@ const refreshSelectedCensus = exports.refreshSelectedCensus = function (heapWork
// task action will follow through and ensure that a census is taken.
if ((snapshot.census && snapshot.census.state === censusState.SAVED) ||
!snapshot.census) {
console.log("FITZGEN: taking census");
yield dispatch(takeCensus(heapWorker, snapshot.id));
}
};

Просмотреть файл

@ -45,7 +45,6 @@ const TaskCache = module.exports = class TaskCache {
* @param {Any} key
*/
remove(key) {
console.log("FITZGEN: removing task from cache with keky =", key);
assert(this._cache.has(key),
`Should have an extant entry for key = ${key}`);
@ -71,12 +70,9 @@ TaskCache.declareCacheableTask = function({ getCacheKey, task }) {
const extantResult = cache.get(key);
if (extantResult) {
console.log("FITZGEN: re-using task with cache key =", key);
return extantResult;
}
console.log("FITZGEN: creating new task with cache key =", key);
// Ensure that we have our new entry in the cache *before* dispatching the
// task!
let resolve;