Bug 1583424 - Watch for missing threads in source tree, r=jlast.
authorBrian Hackett <bhackett1024@gmail.com>
Sat, 28 Sep 2019 13:42:54 +0000
changeset 495486 ca5c8cdce0c9af1ccc1afe0a0cec0a5ed97d4b78
parent 495485 6601ef3019e2afba06dc22206c5e85cf50447d94
child 495487 0fd41e9dbd2a56e544d6b836e066fbbbd9f78b84
push id114134
push userccoroiu@mozilla.com
push dateMon, 30 Sep 2019 09:57:15 +0000
treeherdermozilla-inbound@b19e0c207cfd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1583424
milestone71.0a1
first release with
nightly linux32
ca5c8cdce0c9 / 71.0a1 / 20190928211735 / files
nightly linux64
ca5c8cdce0c9 / 71.0a1 / 20190928211735 / files
nightly mac
ca5c8cdce0c9 / 71.0a1 / 20190928211735 / files
nightly win32
ca5c8cdce0c9 / 71.0a1 / 20190928211735 / files
nightly win64
ca5c8cdce0c9 / 71.0a1 / 20190928211735 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1583424 - Watch for missing threads in source tree, r=jlast. Differential Revision: https://phabricator.services.mozilla.com/D47289
devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js
--- a/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js
+++ b/devtools/client/debugger/src/components/PrimaryPanes/SourcesTree.js
@@ -89,17 +89,19 @@ function shouldAutoExpand(depth, item, d
   const { host } = parse(debuggeeUrl);
   return item.name === host;
 }
 
 function findSource({ threads, sources }, itemPath, source) {
   const targetThread = threads.find(thread => itemPath.includes(thread.actor));
   if (targetThread && source) {
     const actor = targetThread.actor;
-    return sources[actor][source.id];
+    if (sources[actor]) {
+      return sources[actor][source.id];
+    }
   }
   return source;
 }
 
 class SourcesTree extends Component<Props, State> {
   constructor(props: Props) {
     super(props);
     const { debuggeeUrl, sources, threads } = this.props;