1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
10 } = require("resource://devtools/client/memory/constants.js");
11 const DEFAULT_TREE_MAP_DISPLAY = treeMapDisplays.coarseType;
13 const handlers = Object.create(null);
15 handlers[actions.SET_TREE_MAP_DISPLAY] = function (_, { display }) {
19 module.exports = function (state = DEFAULT_TREE_MAP_DISPLAY, action) {
20 const handler = handlers[action.type];
21 return handler ? handler(state, action) : state;