Bug 1463415 - Update Debugger Frontend v57. r=dwalsh
authorJason Laster <jason.laster.11@gmail.com>
Tue, 22 May 2018 09:07:10 -0400
changeset 473640 eceb175f714a6b6821c9b5ea874b2982defaa883
parent 473639 a04929db78d35914678d26aee21872cebceb98cf
child 473641 1becc594554c1a273535ed175895e801667735e9
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdwalsh
bugs1463415
milestone62.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 1463415 - Update Debugger Frontend v57. r=dwalsh MozReview-Commit-ID: JArKRKwmWjF
devtools/client/debugger/new/README.mozilla
devtools/client/debugger/new/dist/vendors.js
devtools/client/debugger/new/src/components/Editor/Footer.js
devtools/client/debugger/new/src/components/Editor/Tab.js
devtools/client/debugger/new/src/components/Editor/Tabs.js
devtools/client/debugger/new/src/components/Editor/index.js
devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints.js
devtools/client/debugger/new/src/components/SecondaryPanes/CommandBar.js
devtools/client/debugger/new/src/utils/source.js
devtools/client/locales/en-US/debugger.properties
devtools/client/shared/components/reps/reps.js
--- a/devtools/client/debugger/new/README.mozilla
+++ b/devtools/client/debugger/new/README.mozilla
@@ -1,13 +1,13 @@
 This is the debugger.html project output.
 See https://github.com/devtools-html/debugger.html
 
-Version 56
+Version 57
 
-Comparison: https://github.com/devtools-html/debugger.html/compare/release-55...release-56
+Comparison: https://github.com/devtools-html/debugger.html/compare/release-56...release-57
 
 Packages:
 - babel-plugin-transform-es2015-modules-commonjs @6.26.2
 - babel-preset-react @6.24.1
 - react @16.2.0
 - react-dom @16.2.0
 - webpack @3.12.0
--- a/devtools/client/debugger/new/dist/vendors.js
+++ b/devtools/client/debugger/new/dist/vendors.js
@@ -7970,21 +7970,22 @@ class Tree extends Component {
       onKeyDown: this._onKeyDown,
       onKeyPress: this._preventArrowKeyScrolling,
       onKeyUp: this._preventArrowKeyScrolling,
       onFocus: ({ nativeEvent }) => {
         if (focused || !nativeEvent || !this.treeRef) {
           return;
         }
 
-        const { explicitOriginalTarget } = nativeEvent;
+        const { relatedTarget } = nativeEvent;
+
         // Only set default focus to the first tree node if the focus came
         // from outside the tree (e.g. by tabbing to the tree from other
         // external elements).
-        if (explicitOriginalTarget !== this.treeRef && !this.treeRef.contains(explicitOriginalTarget)) {
+        if (relatedTarget !== this.treeRef && !this.treeRef.contains(relatedTarget)) {
           this._focus(traversal[0].item);
         }
       },
       onBlur: this._onBlur,
       "aria-label": this.props.label,
       "aria-labelledby": this.props.labelledby,
       "aria-activedescendant": focused && this.props.getKey(focused),
       style
@@ -8039,39 +8040,32 @@ module.exports = "<!-- This Source Code 
 /***/ }),
 
 /***/ 3721:
 /***/ (function(module, exports, __webpack_require__) {
 
 "use strict";
 /* WEBPACK VAR INJECTION */(function(process) {
 
-Object.defineProperty(exports, "__esModule", {
-  value: true
-});
-exports.isDevelopment = isDevelopment;
-exports.isTesting = isTesting;
-exports.isFirefoxPanel = isFirefoxPanel;
-exports.isFirefox = isFirefox;
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
 const flag = __webpack_require__(52);
 
 function isBrowser() {
   return typeof window == "object";
 }
 
 function isNode() {
   return process && process.release && process.release.name == 'node';
 }
 
 function isDevelopment() {
-  if (!isNode && isBrowser()) {
+  if (!isNode() && isBrowser()) {
     const href = window.location ? window.location.href : "";
     return href.match(/^file:/) || href.match(/localhost:/);
   }
 
   return "production" != "production";
 }
 
 function isTesting() {
@@ -8081,16 +8075,23 @@ function isTesting() {
 function isFirefoxPanel() {
   return !isDevelopment();
 }
 
 function isFirefox() {
   return (/firefox/i.test(navigator.userAgent)
   );
 }
+
+module.exports = {
+  isDevelopment,
+  isTesting,
+  isFirefoxPanel,
+  isFirefox
+};
 /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(120)))
 
 /***/ }),
 
 /***/ 3728:
 /***/ (function(module, exports, __webpack_require__) {
 
 module.exports = __webpack_require__(3729);
--- a/devtools/client/debugger/new/src/components/Editor/Footer.js
+++ b/devtools/client/debugger/new/src/components/Editor/Footer.js
@@ -144,18 +144,17 @@ class SourceFooter extends _react.PureCo
   renderSourceSummary() {
     const {
       mappedSource,
       jumpToMappedLocation,
       selectedSource
     } = this.props;
 
     if (mappedSource) {
-      const bundleSource = mappedSource.toJS();
-      const filename = (0, _source.getFilename)(bundleSource);
+      const filename = (0, _source.getFilename)(mappedSource);
       const tooltip = L10N.getFormatStr("sourceFooter.mappedSourceTooltip", filename);
       const title = L10N.getFormatStr("sourceFooter.mappedSource", filename);
       const mappedSourceLocation = {
         sourceId: selectedSource.get("id"),
         line: 1,
         column: 1
       };
       return _react2.default.createElement("button", {
--- a/devtools/client/debugger/new/src/components/Editor/Tab.js
+++ b/devtools/client/debugger/new/src/components/Editor/Tab.js
@@ -132,18 +132,17 @@ class Tab extends _react.PureComponent {
 
   render() {
     const {
       selectedSource,
       selectSpecificSource,
       closeTab,
       source
     } = this.props;
-    const src = source.toJS();
-    const filename = (0, _source.getFilename)(src);
+    const filename = (0, _source.getFilename)(source);
     const sourceId = source.id;
     const active = selectedSource && sourceId == selectedSource.get("id") && !this.isProjectSearchEnabled() && !this.isSourceSearchEnabled();
     const isPrettyCode = (0, _source.isPretty)(source);
 
     function onClickClose(e) {
       e.stopPropagation();
       closeTab(source.url);
     }
@@ -163,17 +162,17 @@ class Tab extends _react.PureComponent {
       active,
       pretty: isPrettyCode
     });
     return _react2.default.createElement("div", {
       className: className,
       key: sourceId,
       onMouseUp: handleTabClick,
       onContextMenu: e => this.onTabContextMenu(e, sourceId),
-      title: (0, _source.getFileURL)(src)
+      title: (0, _source.getFileURL)(source)
     }, _react2.default.createElement(_SourceIcon2.default, {
       source: source,
       shouldHide: icon => ["file", "javascript"].includes(icon)
     }), _react2.default.createElement("div", {
       className: "filename"
     }, filename), _react2.default.createElement(_Button.CloseButton, {
       handleClick: onClickClose,
       tooltip: L10N.getStr("sourceTabs.closeTabButtonTooltip")
--- a/devtools/client/debugger/new/src/components/Editor/Tabs.js
+++ b/devtools/client/debugger/new/src/components/Editor/Tabs.js
@@ -66,29 +66,29 @@ class Tabs extends _react.PureComponent 
         return moveTab(selectedSource.url, 0);
       }
 
       this.setState({
         hiddenTabs
       });
     };
 
-    this.renderDropdownSource = source => {
+    this.renderDropdownSource = sourceRecord => {
       const {
         selectSpecificSource
       } = this.props;
-      const filename = (0, _source.getFilename)(source.toJS());
+      const filename = (0, _source.getFilename)(sourceRecord);
 
-      const onClick = () => selectSpecificSource(source.id);
+      const onClick = () => selectSpecificSource(sourceRecord.id);
 
       return _react2.default.createElement("li", {
-        key: source.id,
+        key: sourceRecord.id,
         onClick: onClick
       }, _react2.default.createElement("img", {
-        className: `dropdown-icon ${this.getIconClass(source)}`
+        className: `dropdown-icon ${this.getIconClass(sourceRecord)}`
       }), filename);
     };
 
     this.state = {
       dropdownShown: false,
       hiddenTabs: I.List()
     };
     this.onResize = (0, _lodash.debounce)(() => {
@@ -117,22 +117,22 @@ class Tabs extends _react.PureComponent 
 
 
   toggleSourcesDropdown(e) {
     this.setState(prevState => ({
       dropdownShown: !prevState.dropdownShown
     }));
   }
 
-  getIconClass(source) {
-    if ((0, _source.isPretty)(source)) {
+  getIconClass(sourceRecord) {
+    if ((0, _source.isPretty)(sourceRecord)) {
       return "prettyPrint";
     }
 
-    if (source.isBlackBoxed) {
+    if (sourceRecord.isBlackBoxed) {
       return "blackBox";
     }
 
     return "file";
   }
 
   renderTabs() {
     const {
--- a/devtools/client/debugger/new/src/components/Editor/index.js
+++ b/devtools/client/debugger/new/src/components/Editor/index.js
@@ -626,13 +626,13 @@ const mapStateToProps = state => {
   const sourceId = selectedSource ? selectedSource.get("id") : "";
   return {
     selectedLocation: (0, _selectors.getSelectedLocation)(state),
     selectedSource,
     searchOn: (0, _selectors.getActiveSearch)(state) === "file",
     hitCount: (0, _selectors.getHitCountForSource)(state, sourceId),
     coverageOn: (0, _selectors.getCoverageEnabled)(state),
     conditionalPanelLine: (0, _selectors.getConditionalPanelLine)(state),
-    symbols: (0, _selectors.getSymbols)(state, selectedSource && selectedSource.toJS())
+    symbols: (0, _selectors.getSymbols)(state, selectedSource)
   };
 };
 
 exports.default = (0, _reactRedux.connect)(mapStateToProps, _actions2.default)(Editor);
\ No newline at end of file
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Breakpoints.js
@@ -135,17 +135,17 @@ class Breakpoints extends _react.Compone
   renderExceptionsOptions() {
     const {
       breakpoints,
       shouldPauseOnExceptions,
       shouldPauseOnCaughtExceptions,
       pauseOnExceptions
     } = this.props;
     const isEmpty = breakpoints.size == 0;
-    const exceptionsBox = createExceptionOption(L10N.getStr("pauseOnExceptionsItem"), shouldPauseOnExceptions, () => pauseOnExceptions(!shouldPauseOnExceptions, false), "breakpoints-exceptions");
+    const exceptionsBox = createExceptionOption(L10N.getStr("pauseOnExceptionsItem2"), shouldPauseOnExceptions, () => pauseOnExceptions(!shouldPauseOnExceptions, false), "breakpoints-exceptions");
     const ignoreCaughtBox = createExceptionOption(L10N.getStr("pauseOnCaughtExceptionsItem"), shouldPauseOnCaughtExceptions, () => pauseOnExceptions(true, !shouldPauseOnCaughtExceptions), "breakpoints-exceptions-caught");
     return _react2.default.createElement("div", {
       className: (0, _classnames2.default)("breakpoints-exceptions-options", {
         empty: isEmpty
       })
     }, exceptionsBox, shouldPauseOnExceptions ? ignoreCaughtBox : null);
   }
 
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/CommandBar.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/CommandBar.js
@@ -175,18 +175,20 @@ class CommandBar extends _react.Componen
     } = this.props;
 
     if (!canRewind || !isPaused) {
       return null;
     }
 
     const isDisabled = !isPaused;
     return [(0, _CommandBarButton.debugBtn)(this.props.rewind, "rewind", "active", "Rewind Execution"), (0, _CommandBarButton.debugBtn)(() => this.props.resume, "resume", "active", L10N.getFormatStr("resumeButtonTooltip", formatKey("resume"))), _react2.default.createElement("div", {
+      key: "divider-1",
       className: "divider"
     }), (0, _CommandBarButton.debugBtn)(this.props.reverseStepOver, "reverseStepOver", "active", "Reverse step over"), (0, _CommandBarButton.debugBtn)(this.props.stepOver, "stepOver", "active", L10N.getFormatStr("stepOverTooltip", formatKey("stepOver")), isDisabled), _react2.default.createElement("div", {
+      key: "divider-2",
       className: "divider"
     }), (0, _CommandBarButton.debugBtn)(this.props.stepOut, "stepOut", "active", L10N.getFormatStr("stepOutTooltip", formatKey("stepOut")), isDisabled), (0, _CommandBarButton.debugBtn)(this.props.stepIn, "stepIn", "active", L10N.getFormatStr("stepInTooltip", formatKey("stepIn")), isDisabled)];
   }
 
   replayPreviousButton() {
     const {
       history,
       historyPosition,
--- a/devtools/client/debugger/new/src/utils/source.js
+++ b/devtools/client/debugger/new/src/utils/source.js
@@ -418,16 +418,21 @@ function isLoading(source) {
 
 function getTextAtPosition(source, location) {
   if (!source || !source.text) {
     return "";
   }
 
   const line = location.line;
   const column = location.column || 0;
+
+  if (source.isWasm) {
+    return "";
+  }
+
   const lineText = source.text.split("\n")[line - 1];
 
   if (!lineText) {
     return "";
   }
 
   return lineText.slice(column, column + 100).trim();
 }
--- a/devtools/client/locales/en-US/debugger.properties
+++ b/devtools/client/locales/en-US/debugger.properties
@@ -92,19 +92,19 @@ pauseButtonItem=Pause on Next Statement
 # LOCALIZATION NOTE (ignoreExceptionsItem): The pause on exceptions button description
 # when the debugger will not pause on exceptions.
 ignoreExceptionsItem=Ignore exceptions
 
 # LOCALIZATION NOTE (pauseOnUncaughtExceptionsItem): The pause on exceptions dropdown
 # item shown when a user is adding a new breakpoint.
 pauseOnUncaughtExceptionsItem=Pause on uncaught exceptions
 
-# LOCALIZATION NOTE (pauseOnExceptionsItem): The pause on exceptions checkbox description
+# LOCALIZATION NOTE (pauseOnExceptionsItem2): The pause on exceptions checkbox description
 # when the debugger will pause on all exceptions.
-pauseOnExceptionsItem=Pause on exceptions
+pauseOnExceptionsItem2=Pause on exceptions
 
 # LOCALIZATION NOTE (ignoreCaughtExceptionsItem): The pause on exceptions checkbox description
 # when the debugger will not pause on any caught exception
 ignoreCaughtExceptionsItem=Ignore caught exceptions
 
 # LOCALIZATION NOTE (pauseOnCaughtExceptionsItem): The pause on exceptions checkbox description
 # when the debugger should pause on caught exceptions
 pauseOnCaughtExceptionsItem=Pause on caught exceptions
--- a/devtools/client/shared/components/reps/reps.js
+++ b/devtools/client/shared/components/reps/reps.js
@@ -4436,21 +4436,22 @@ class Tree extends Component {
       onKeyDown: this._onKeyDown,
       onKeyPress: this._preventArrowKeyScrolling,
       onKeyUp: this._preventArrowKeyScrolling,
       onFocus: ({ nativeEvent }) => {
         if (focused || !nativeEvent || !this.treeRef) {
           return;
         }
 
-        const { explicitOriginalTarget } = nativeEvent;
+        const { relatedTarget } = nativeEvent;
+
         // Only set default focus to the first tree node if the focus came
         // from outside the tree (e.g. by tabbing to the tree from other
         // external elements).
-        if (explicitOriginalTarget !== this.treeRef && !this.treeRef.contains(explicitOriginalTarget)) {
+        if (relatedTarget !== this.treeRef && !this.treeRef.contains(relatedTarget)) {
           this._focus(traversal[0].item);
         }
       },
       onBlur: this._onBlur,
       "aria-label": this.props.label,
       "aria-labelledby": this.props.labelledby,
       "aria-activedescendant": focused && this.props.getKey(focused),
       style