tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

pending-breakpoints.js (690B)


      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/>. */
      4 
      5 export function getPendingBreakpoints(state) {
      6  return state.pendingBreakpoints;
      7 }
      8 
      9 export function getPendingBreakpointList(state) {
     10  return Object.values(getPendingBreakpoints(state));
     11 }
     12 
     13 export function getPendingBreakpointsForSource(state, source) {
     14  return getPendingBreakpointList(state).filter(pendingBreakpoint => {
     15    return (
     16      pendingBreakpoint.location.sourceUrl === source.url ||
     17      pendingBreakpoint.generatedLocation.sourceUrl == source.url
     18    );
     19  });
     20 }