Bug 1508840 - Handle messages with no execution point in the console, r=jlast.
authorBrian Hackett <bhackett1024@gmail.com>
Tue, 20 Nov 2018 12:37:31 -1000
changeset 504172 795cc577254c0b9b8665c78c6b2a4bdad9cfa5be
parent 504171 3578632557aafbb6ff8564189e0b5a684418d4d6
child 504173 f668df79d93b379add8c1019792e6fdef687506b
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjlast
bugs1508840
milestone65.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 1508840 - Handle messages with no execution point in the console, r=jlast.
devtools/client/webconsole/components/ConsoleOutput.js
devtools/client/webconsole/components/Message.js
--- a/devtools/client/webconsole/components/ConsoleOutput.js
+++ b/devtools/client/webconsole/components/ConsoleOutput.js
@@ -31,17 +31,18 @@ const {
 function getPausedMessage(visibleMessages, messages, executionPoint) {
   if (!executionPoint || !visibleMessages) {
     return null;
   }
 
   let pausedMessage = messages.get(visibleMessages[0]);
   for (const messageId of visibleMessages) {
     const message = messages.get(messageId);
-    if (executionPoint.progress >= message.executionPoint.progress &&
+    if (message.executionPoint &&
+        executionPoint.progress >= message.executionPoint.progress &&
         message.executionPoint.progress > pausedMessage.executionPoint.progress) {
       pausedMessage = message;
     }
   }
 
   return pausedMessage;
 }
 
--- a/devtools/client/webconsole/components/Message.js
+++ b/devtools/client/webconsole/components/Message.js
@@ -122,17 +122,17 @@ class Message extends Component {
     e.preventDefault();
   }
 
   renderIcon() {
     const { level, messageId, executionPoint, serviceContainer } = this.props;
 
     return MessageIcon({
       level,
-      onRewindClick: serviceContainer.canRewind()
+      onRewindClick: (serviceContainer.canRewind() && executionPoint)
         ? () => serviceContainer.jumpToExecutionPoint(executionPoint, messageId)
         : null,
     });
   }
 
   render() {
     const {
       open,