Bug 1157946 - Early return if aResponse.sources is undefined;r=fitzgen
authorBrian Grinstead <bgrinstead@mozilla.com>
Sat, 25 Apr 2015 10:11:16 -0700
changeset 241168 18a5781a6b93190d103867948be84227a9895da6
parent 241167 0ca15d7656bf7e4e4f39ec50d87d1f9df1b882e1
child 241169 5201e29ea4b9635f958f0aae75d5794e5bfc2b6e
push id28653
push usercbook@mozilla.com
push dateMon, 27 Apr 2015 10:34:32 +0000
treeherdermozilla-central@9c22b105b0e3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfitzgen
bugs1157946
milestone40.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 1157946 - Early return if aResponse.sources is undefined;r=fitzgen This happens quite often during the damp devtools talos test, when the toolbox is closed immediately after a page is reloaded
browser/devtools/debugger/debugger-controller.js
--- a/browser/devtools/debugger/debugger-controller.js
+++ b/browser/devtools/debugger/debugger-controller.js
@@ -1217,17 +1217,17 @@ SourceScripts.prototype = {
     // Signal that a new source has been added.
     window.emit(EVENTS.NEW_SOURCE);
   },
 
   /**
    * Callback for the debugger's active thread getSources() method.
    */
   _onSourcesAdded: function(aResponse) {
-    if (aResponse.error) {
+    if (aResponse.error || !aResponse.sources) {
       let msg = "Error getting sources: " + aResponse.message;
       Cu.reportError(msg);
       dumpn(msg);
       return;
     }
 
     if (aResponse.sources.length === 0) {
       DebuggerView.Sources.emptyText = L10N.getStr("noSourcesText");