Bug 1534248 - Remove loading unnecessary generated sources. r=loganfsmyth
authorJason Laster <jlaster@mozilla.com>
Mon, 11 Mar 2019 19:02:17 +0000
changeset 524414 8fe54aa70e8f6d2e143b4cdcbdfa377a4fce14ea
parent 524413 68834c8b15bd65191b9956abb8a1bfdb53c2d802
child 524415 6ded300544a9b8826b5575334dbbb7681a1015fb
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
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