Bug 1543731 - When map scopes is disabled we should not compute mappings. r=loganfsmyth a=RyanVM
authorJason Laster <jlaster@mozilla.com>
Wed, 17 Apr 2019 11:52:00 +0300
changeset 526272 b196e0c2e6a883a027266d6d11d647e9ef259599
parent 526271 50707a995cd56232e52b0e3453ec73c17e1339e6
child 526273 ba1cb4f5a1cf8883cf7bd344cc4b8e16f411c621
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth, RyanVM
bugs1543731
milestone67.0
Bug 1543731 - When map scopes is disabled we should not compute mappings. r=loganfsmyth a=RyanVM
devtools/client/debugger/new/src/actions/pause/mapScopes.js
--- a/devtools/client/debugger/new/src/actions/pause/mapScopes.js
+++ b/devtools/client/debugger/new/src/actions/pause/mapScopes.js
@@ -10,17 +10,16 @@ import {
   getSelectedFrame,
   getSelectedGeneratedScope,
   getSelectedOriginalScope,
   getCurrentThread
 } from "../../selectors";
 import { loadSourceText } from "../sources/loadSourceText";
 import { PROMISE } from "../utils/middleware/promise";
 
-import { features } from "../../utils/prefs";
 import { log } from "../../utils/log";
 import { isGenerated, isOriginal } from "../../utils/source";
 import type { Frame, Scope } from "../../types";
 
 import type { ThunkArgs } from "../types";
 
 import { buildMappedScopes } from "../../utils/pause/mapScopes";
 
@@ -57,17 +56,17 @@ export function mapScopes(scopes: Promis
     const source = getSource(getState(), frame.location.sourceId);
 
     await dispatch({
       type: "MAP_SCOPES",
       thread: frame.thread,
       frame,
       [PROMISE]: (async function() {
         if (
-          !features.mapScopes ||
+          !getMapScopes(getState()) ||
           !source ||
           !generatedSource ||
           generatedSource.isWasm ||
           source.isPrettyPrinted ||
           isGenerated(source)
         ) {
           return null;
         }