Bug 1534248 - Remove loading unnecessary generated sources. r=loganfsmyth
authorJason Laster <jlaster@mozilla.com>
Mon, 11 Mar 2019 19:02:17 +0000
changeset 521416 8fe54aa70e8f
parent 521415 68834c8b15bd
child 521417 6ded300544a9
push id10866
push usernerli@mozilla.com
push dateTue, 12 Mar 2019 18:59:09 +0000
treeherdermozilla-beta@445c24a51727 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersloganfsmyth
bugs1534248
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1534248 - Remove loading unnecessary generated sources. r=loganfsmyth Differential Revision: https://phabricator.services.mozilla.com/D22966
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
@@ -12,17 +12,17 @@ import {
   getSelectedGeneratedScope,
   getSelectedOriginalScope
 } 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 } from "../../utils/source";
+import { isGenerated, isOriginal } from "../../utils/source";
 import type { Frame, Scope } from "../../types";
 
 import type { ThunkArgs } from "../types";
 
 import { buildMappedScopes } from "../../utils/pause/mapScopes";
 
 export function toggleMapScopes() {
   return async function({ dispatch, getState, client, sourceMaps }: ThunkArgs) {
@@ -67,16 +67,19 @@ export function mapScopes(scopes: Promis
           generatedSource.isWasm ||
           source.isPrettyPrinted ||
           isGenerated(source)
         ) {
           return null;
         }
 
         await dispatch(loadSourceText(source));
+        if (isOriginal(source)) {
+          await dispatch(loadSourceText(generatedSource));
+        }
 
         try {
           return await buildMappedScopes(
             source,
             frame,
             await scopes,
             sourceMaps,
             client