зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1751926
- [devtools] Migrate all pending-breakpoints selectors to a selector module. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D136887
This commit is contained in:
Родитель
d4e38bcb1c
Коммит
84e2217080
|
@ -70,24 +70,4 @@ function removeBreakpoint(state, { breakpoint }) {
|
|||
return state;
|
||||
}
|
||||
|
||||
// Selectors
|
||||
// TODO: these functions should be moved out of the reducer
|
||||
|
||||
export function getPendingBreakpoints(state) {
|
||||
return state.pendingBreakpoints;
|
||||
}
|
||||
|
||||
export function getPendingBreakpointList(state) {
|
||||
return Object.values(getPendingBreakpoints(state));
|
||||
}
|
||||
|
||||
export function getPendingBreakpointsForSource(state, source) {
|
||||
return getPendingBreakpointList(state).filter(pendingBreakpoint => {
|
||||
return (
|
||||
pendingBreakpoint.location.sourceUrl === source.url ||
|
||||
pendingBreakpoint.generatedLocation.sourceUrl == source.url
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
export default update;
|
||||
|
|
|
@ -7,7 +7,6 @@ export * from "../reducers/sources";
|
|||
export * from "../reducers/tabs";
|
||||
export * from "../reducers/pause";
|
||||
export * from "../reducers/threads";
|
||||
export * from "../reducers/pending-breakpoints";
|
||||
|
||||
export {
|
||||
getSourceActor,
|
||||
|
@ -36,6 +35,7 @@ export {
|
|||
getSelectedFrames,
|
||||
getVisibleSelectedFrame,
|
||||
} from "./pause";
|
||||
export * from "./pending-breakpoints";
|
||||
export * from "./preview";
|
||||
export * from "./project-text-search";
|
||||
export * from "./quick-open";
|
||||
|
|
|
@ -18,6 +18,7 @@ CompiledModules(
|
|||
"isLineInScope.js",
|
||||
"isSelectedFrameVisible.js",
|
||||
"pause.js",
|
||||
"pending-breakpoints.js",
|
||||
"preview.js",
|
||||
"project-text-search.js",
|
||||
"quick-open.js",
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
|
||||
|
||||
export function getPendingBreakpoints(state) {
|
||||
return state.pendingBreakpoints;
|
||||
}
|
||||
|
||||
export function getPendingBreakpointList(state) {
|
||||
return Object.values(getPendingBreakpoints(state));
|
||||
}
|
||||
|
||||
export function getPendingBreakpointsForSource(state, source) {
|
||||
return getPendingBreakpointList(state).filter(pendingBreakpoint => {
|
||||
return (
|
||||
pendingBreakpoint.location.sourceUrl === source.url ||
|
||||
pendingBreakpoint.generatedLocation.sourceUrl == source.url
|
||||
);
|
||||
});
|
||||
}
|
Загрузка…
Ссылка в новой задаче