Merge mozilla-central to mozilla-inbound. a=merge
authorCosmin Sabou <csabou@mozilla.com>
Wed, 29 Aug 2018 21:05:53 +0300
changeset 491710 64b1b8d041ac307768824c5e78a0a916a1e3c61c
parent 491709 55662a7bc29c9587a8435e586735dc6965dea98a (current diff)
parent 491677 c2e3be6a1dd352b969a45f0b85e87674e24ad284 (diff)
child 491711 2c723487d70b82dbb84ee91e51c5f586e3cce6a1
push id1815
push userffxbld-merge
push dateMon, 15 Oct 2018 10:40:45 +0000
treeherdermozilla-release@18d4c09e9378 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone63.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
Merge mozilla-central to mozilla-inbound. a=merge
testing/web-platform/meta/css/css-text/astral-bidi/adlam-anti-ref.html.ini
testing/web-platform/meta/css/css-text/astral-bidi/cypriot-anti-ref.html.ini
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -347,17 +347,17 @@ function loadPageInfo(frameOuterWindowID
   let pageInfoData;
 
   // Get initial pageInfoData needed to display the general, feeds, permission and security tabs.
   mm.addMessageListener("PageInfo:data", function onmessage(message) {
     mm.removeMessageListener("PageInfo:data", onmessage);
     pageInfoData = message.data;
     let docInfo = pageInfoData.docInfo;
     let windowInfo = pageInfoData.windowInfo;
-    let uri = makeURI(docInfo.documentURIObject.spec);
+    let uri = Services.io.newURI(docInfo.documentURIObject.spec);
     let principal = docInfo.principal;
     gDocInfo = docInfo;
 
     gImageElement = imageInfo;
 
     var titleFormat = windowInfo.isTopWindow ? "pageInfo.page.title"
                                              : "pageInfo.frame.title";
     document.title = gBundle.getFormattedString(titleFormat, [docInfo.location]);
@@ -673,17 +673,17 @@ function saveMedia() {
     if (url) {
       var titleKey = "SaveImageTitle";
 
       if (item instanceof HTMLVideoElement)
         titleKey = "SaveVideoTitle";
       else if (item instanceof HTMLAudioElement)
         titleKey = "SaveAudioTitle";
 
-      saveURL(url, null, titleKey, false, false, makeURI(item.baseURI),
+      saveURL(url, null, titleKey, false, false, Services.io.newURI(item.baseURI),
               null, gDocInfo.isContentWindowPrivate, gDocInfo.principal);
     }
   } else {
     selectSaveFolder(function(aDirectory) {
       if (aDirectory) {
         var saveAnImage = function(aURIString, aChosenData, aBaseURI) {
           uniqueFile(aChosenData.file);
           internalSave(aURIString, null, null, null, null, false, "SaveImageTitle",
@@ -691,48 +691,48 @@ function saveMedia() {
                        gDocInfo.isContentWindowPrivate, gDocInfo.principal);
         };
 
         for (var i = 0; i < rowArray.length; i++) {
           let v = rowArray[i];
           let dir = aDirectory.clone();
           let item = gImageView.data[v][COL_IMAGE_NODE];
           let uriString = gImageView.data[v][COL_IMAGE_ADDRESS];
-          let uri = makeURI(uriString);
+          let uri = Services.io.newURI(uriString);
 
           try {
             uri.QueryInterface(Ci.nsIURL);
             dir.append(decodeURIComponent(uri.fileName));
           } catch (ex) {
             // data:/blob: uris
             // Supply a dummy filename, otherwise Download Manager
             // will try to delete the base directory on failure.
             dir.append(gImageView.data[v][COL_IMAGE_TYPE]);
           }
 
           if (i == 0) {
-            saveAnImage(uriString, new AutoChosen(dir, uri), makeURI(item.baseURI));
+            saveAnImage(uriString, new AutoChosen(dir, uri), Services.io.newURI(item.baseURI));
           } else {
             // This delay is a hack which prevents the download manager
             // from opening many times. See bug 377339.
             setTimeout(saveAnImage, 200, uriString, new AutoChosen(dir, uri),
-                       makeURI(item.baseURI));
+                       Services.io.newURI(item.baseURI));
           }
         }
       }
     });
   }
 }
 
 function onBlockImage() {
   var permissionManager = Cc[PERMISSION_CONTRACTID]
                             .getService(nsIPermissionManager);
 
   var checkbox = document.getElementById("blockImage");
-  var uri = makeURI(document.getElementById("imageurltext").value);
+  var uri = Services.io.newURI(document.getElementById("imageurltext").value);
   if (checkbox.checked)
     permissionManager.add(uri, "image", nsIPermissionManager.DENY_ACTION);
   else
     permissionManager.remove(uri, "image");
 }
 
 function onImageSelect() {
   var previewBox   = document.getElementById("mediaPreviewBox");
@@ -933,17 +933,17 @@ function makeBlockImage(url) {
 
   var checkbox = document.getElementById("blockImage");
   var imagePref = Services.prefs.getIntPref("permissions.default.image");
   if (!(/^https?:/.test(url)) || imagePref == 2)
     // We can't block the images from this host because either is is not
     // for http(s) or we don't load images at all
     checkbox.hidden = true;
   else {
-    var uri = makeURI(url);
+    var uri = Services.io.newURI(url);
     if (uri.host) {
       checkbox.hidden = false;
       checkbox.label = gBundle.getFormattedString("mediaBlockImage", [uri.host]);
       var perm = permissionManager.testPermission(uri, "image");
       checkbox.checked = perm == nsIPermissionManager.DENY_ACTION;
     } else
       checkbox.hidden = true;
   }
@@ -955,17 +955,17 @@ var imagePermissionObserver = {
       return;
 
     if (aTopic == "perm-changed") {
       var permission = aSubject.QueryInterface(Ci.nsIPermission);
       if (permission.type == "image") {
         var imageTree = document.getElementById("imagetree");
         var row = getSelectedRow(imageTree);
         var url = gImageView.data[row][COL_IMAGE_ADDRESS];
-        if (permission.matchesURI(makeURI(url), true)) {
+        if (permission.matchesURI(Services.io.newURI(url), true)) {
           makeBlockImage(url);
         }
       }
     }
   }
 };
 
 function getContentTypeFromHeaders(cacheEntryDescriptor) {
--- a/browser/base/content/test/performance/browser_preferences_usage.js
+++ b/browser/base/content/test/performance/browser_preferences_usage.js
@@ -45,16 +45,23 @@ function checkPrefGetters(stats, max, wh
       if (whitelistItem.max) {
         Assert.lessOrEqual(count, whitelistItem.max,
           `Whitelist item ${pref} should be accessed at most ${whitelistItem.max} times.`);
       }
       delete whitelist[pref];
     }
   }
 
+  // This pref will be accessed by mozJSComponentLoader when loading modules,
+  // which fails TV runs since they run the test multiple times without restarting.
+  // We just ignore this pref, since it's for testing only anyway.
+  if (whitelist["browser.startup.record"]) {
+    delete whitelist["browser.startup.record"];
+  }
+
   let remainingWhitelist = Object.keys(whitelist);
   is(remainingWhitelist.length, 0, `Should have checked all whitelist items. Remaining: ${remainingWhitelist}`);
 }
 
 /**
  * A helper function to read preference access data
  * using the Services.prefs.readStats() function.
  */
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -1051,17 +1051,17 @@ file, You can obtain one at http://mozil
           }
 
           this.popup.overrideValue = "http://www." + url;
         ]]></body>
       </method>
 
       <method name="_initURLTooltip">
         <body><![CDATA[
-          if (this.focused || !this.hasAttribute("textoverflow"))
+          if (this.focused || !this._inOverflow)
             return;
           // We set the tooltip text on the parent node instead of the input
           // field because XUL tooltips only work on XUL elements.
           //
           // FIXME(bug 1486716): title should work on chrome documents instead.
           this.inputField.parentNode.setAttribute("tooltiptext", this.value);
         ]]></body>
       </method>
@@ -1395,30 +1395,41 @@ file, You can obtain one at http://mozil
               }
               break;
             case "mousemove":
               this._initURLTooltip();
               break;
             case "mouseout":
               this._hideURLTooltip();
               break;
-            case "overflow":
-              if (!this.value) {
-                // We initially get a spurious overflow event from the
-                // anonymous div containing the placeholder text; bail out.
+            case "overflow": {
+              const targetIsPlaceholder =
+                !aEvent.originalTarget.classList.contains("anonymous-div");
+              // We only care about the non-placeholder text.
+              // This shouldn't be needed, see bug 1487036.
+              if (targetIsPlaceholder) {
                 break;
               }
               this._inOverflow = true;
               this.updateTextOverflow();
               break;
-            case "underflow":
+            }
+            case "underflow": {
+              const targetIsPlaceholder =
+                !aEvent.originalTarget.classList.contains("anonymous-div");
+              // We only care about the non-placeholder text.
+              // This shouldn't be needed, see bug 1487036.
+              if (targetIsPlaceholder) {
+                break;
+              }
               this._inOverflow = false;
               this.updateTextOverflow();
               this._hideURLTooltip();
               break;
+            }
             case "scrollend":
               this.updateTextOverflow();
               break;
             case "TabSelect":
               // The autocomplete controller uses heuristic on some internal caches
               // to handle cases like backspace, autofill or repeated searches.
               // Ensure to clear those internal caches when switching tabs.
               this.controller.resetInternalState();
--- a/devtools/client/aboutdebugging-new/src/actions/ui.js
+++ b/devtools/client/aboutdebugging-new/src/actions/ui.js
@@ -9,16 +9,22 @@ const {
   PAGE_SELECTED,
   PAGES,
 } = require("../constants");
 
 const Actions = require("./index");
 
 function selectPage(page) {
   return async (dispatch, getState) => {
+    const currentPage = getState().ui.selectedPage;
+    if (page === currentPage) {
+      // Nothing to dispatch if the page is the same as the current page.
+      return;
+    }
+
     dispatch({ type: PAGE_SELECTED, page });
 
     if (page === PAGES.THIS_FIREFOX) {
       dispatch(Actions.connectRuntime());
     } else {
       dispatch(Actions.disconnectRuntime());
     }
   };
--- a/devtools/client/aboutdebugging-new/src/reducers/ui-state.js
+++ b/devtools/client/aboutdebugging-new/src/reducers/ui-state.js
@@ -2,23 +2,22 @@
  * 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/. */
 
 "use strict";
 
 const {
   NETWORK_LOCATIONS_UPDATED,
   PAGE_SELECTED,
-  PAGES,
 } = require("../constants");
 
 function UiState(locations = []) {
   return {
     networkLocations: locations,
-    selectedPage: PAGES.THIS_FIREFOX,
+    selectedPage: null,
   };
 }
 
 function uiReducer(state = UiState(), action) {
   switch (action.type) {
     case PAGE_SELECTED: {
       const { page } = action;
       return Object.assign({}, state, { selectedPage: page });
--- a/devtools/client/inspector/fonts/components/FontEditor.js
+++ b/devtools/client/inspector/fonts/components/FontEditor.js
@@ -167,40 +167,40 @@ class FontEditor extends PureComponent {
           className: "font-family-name"
         },
         family),
       group
     );
   }
 
   renderFontSize(value) {
-    return value && FontSize({
+    return value !== null && FontSize({
       key: `${this.props.fontEditor.id}:font-size`,
       onChange: this.props.onPropertyChange,
       value,
     });
   }
 
   renderLineHeight(value) {
-    return value && LineHeight({
+    return value !== null && LineHeight({
       key: `${this.props.fontEditor.id}:line-height`,
       onChange: this.props.onPropertyChange,
       value,
     });
   }
 
   renderFontStyle(value) {
     return value && FontStyle({
       onChange: this.props.onPropertyChange,
       value,
     });
   }
 
   renderFontWeight(value) {
-    return value && FontWeight({
+    return value !== null && FontWeight({
       onChange: this.props.onPropertyChange,
       value,
     });
   }
 
   /**
    * Get a dropdown which allows selecting between variation instances defined by a font.
    *
--- a/devtools/client/inspector/fonts/components/FontPropertyValue.js
+++ b/devtools/client/inspector/fonts/components/FontPropertyValue.js
@@ -356,28 +356,30 @@ class FontPropertyValue extends PureComp
   }
 
   render() {
     // Guard against bad axis data.
     if (this.props.min === this.props.max) {
       return null;
     }
 
+    const propsValue = this.props.value !== null
+      ? this.props.value
+      : this.props.defaultValue;
+
     const defaults = {
       min: this.props.min,
       max: this.props.max,
       onBlur: this.onBlur,
       onChange: this.onChange,
       onFocus: this.onFocus,
       step: this.props.step,
       // While interacting with the range and number inputs, prevent updating value from
       // outside props which is debounced and causes jitter on successive renders.
-      value: this.state.interactive
-        ? this.state.value
-        : this.props.value || this.props.defaultValue,
+      value: this.state.interactive ? this.state.value : propsValue,
     };
 
     const range = dom.input(
       {
         ...defaults,
         onKeyDown: this.onKeyDown,
         onKeyUp: this.onKeyUp,
         onMouseDown: this.onMouseDown,
--- a/devtools/client/inspector/fonts/fonts.js
+++ b/devtools/client/inspector/fonts/fonts.js
@@ -142,17 +142,17 @@ class FontInspector {
    * @return {Number}
    *         Converted numeric value.
    */
   async convertUnits(property, value, fromUnit, toUnit) {
     if (value !== parseFloat(value)) {
       throw TypeError(`Invalid value for conversion. Expected Number, got ${value}`);
     }
 
-    if (fromUnit === toUnit) {
+    if (fromUnit === toUnit || value === 0) {
       return value;
     }
 
     // Special case for line-height. Consider em and untiless to be equivalent.
     if (property === "line-height" &&
        (fromUnit === "" && toUnit === "em") || (fromUnit === "em" && toUnit === "")) {
       return value;
     }
@@ -270,16 +270,22 @@ class FontInspector {
           : value / 100 * Math.min(dim.innerWidth, dim.innerHeight);
       } else if (unit === "vmax") {
         out = fromPx
           ? value * 100 / Math.max(dim.innerWidth, dim.innerHeight)
           : value / 100 * Math.max(dim.innerWidth, dim.innerHeight);
       }
     }
 
+    // Catch any NaN or Infinity as result of dividing by zero in any
+    // of the relative unit conversions which rely on external values.
+    if (isNaN(out) || Math.abs(out) === Infinity) {
+      out = 0;
+    }
+
     // Return rounded pixel values. Limit other values to 3 decimals.
     if (fromPx) {
       // Round values like 1.000 to 1
       return out === Math.round(out) ? Math.round(out) : out.toFixed(3);
     }
 
     return Math.round(out);
   }
--- a/devtools/client/themes/common.css
+++ b/devtools/client/themes/common.css
@@ -136,17 +136,17 @@ html|button, html|select {
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   z-index: -1;
 }
 
 /* Rest of the dark and light theme */
-
+.devtools-autocomplete-popup,
 .tooltip-panel.devtools-autocomplete-popup,
 .CodeMirror-hints,
 .CodeMirror-Tern-tooltip {
   border: 1px solid var(--theme-popup-border-color);
   background-color: var(--theme-popup-background);
   color: var(--theme-popup-color);
 }
 
@@ -514,16 +514,17 @@ checkbox:-moz-focusring {
   border-color: var(--theme-focus-border-color-textbox);
   box-shadow: var(--theme-focus-box-shadow-textbox);
   transition: all 0.2s ease-in-out;
   outline: none;
 }
 
 .devtools-searchbox .devtools-autocomplete-popup {
   position: absolute;
+  left: 0;
   top: 100%;
   width: 100%;
   line-height: initial !important;
   /* See bug - 1414609. z-index is greater than 1000 so that searchbox's z-index
   is more than z-index of requests-list-headers-wrapper in netmonitor */
   z-index: 1001;
 }
 
--- a/devtools/client/themes/webconsole.css
+++ b/devtools/client/themes/webconsole.css
@@ -327,17 +327,17 @@ html #webconsole-notificationbox {
 .jsterm-input-container {
   background-color: var(--theme-tab-toolbar-background);
   border-top: 1px solid var(--theme-splitter-color);
   position: relative;
 }
 
 .jsterm-input-node {
   box-sizing: border-box;
-  height: 100%;
+  min-height: 100%;
   color: var(--theme-content-color1);
   /* input icon */
   background-image: var(--theme-console-input-image);
   background-position-x: calc(10px + var(--console-icon-horizontal-offset));
   background-position-y: 7px;
   background-repeat: no-repeat;
   background-size: 12px 12px;
   -moz-context-properties: fill;
--- a/devtools/client/webconsole/components/JSTerm.js
+++ b/devtools/client/webconsole/components/JSTerm.js
@@ -138,17 +138,17 @@ class JSTerm extends Component {
     hud.jsterm = this;
   }
 
   componentDidMount() {
     const autocompleteOptions = {
       onSelect: this.onAutocompleteSelect.bind(this),
       onClick: this.acceptProposedCompletion.bind(this),
       listId: "webConsole_autocompletePopupListBox",
-      position: "top",
+      position: "bottom",
       autoSelect: true
     };
 
     const doc = this.hud.document;
     const toolbox = gDevTools.getToolbox(this.hud.owner.target);
     const tooltipDoc = toolbox ? toolbox.doc : doc;
     // The popup will be attached to the toolbox document or HUD document in the case
     // such as the browser console which doesn't have a toolbox.
@@ -380,17 +380,17 @@ class JSTerm extends Component {
     }
 
     this.inputBorderSize = this.inputNode
       ? this.inputNode.getBoundingClientRect().height - this.inputNode.clientHeight
       : 0;
 
     // Update the character and chevron width needed for the popup offset calculations.
     this._inputCharWidth = this._getInputCharWidth();
-    this._chevronWidth = this.editor ? null : this._getChevronWidth();
+    this._paddingInlineStart = this.editor ? null : this._getInputPaddingInlineStart();
 
     this.hud.window.addEventListener("blur", this._blurEventHandler);
     this.lastInputValue && this.setInputValue(this.lastInputValue);
   }
 
   shouldComponentUpdate(nextProps, nextState) {
     // XXX: For now, everything is handled in an imperative way and we
     // only want React to do the initial rendering of the component.
@@ -644,35 +644,37 @@ class JSTerm extends Component {
   }
 
   /**
    * Updates the size of the input field (command line) to fit its contents.
    *
    * @returns void
    */
   resizeInput() {
-    if (this.props.codeMirrorEnabled) {
+    if (this.props.codeMirrorEnabled || !this.inputNode) {
       return;
     }
 
-    if (!this.inputNode) {
-      return;
-    }
-
-    const inputNode = this.inputNode;
+    const {inputNode, completeNode} = this;
 
     // Reset the height so that scrollHeight will reflect the natural height of
     // the contents of the input field.
     inputNode.style.height = "auto";
+    const minHeightBackup = inputNode.style.minHeight;
+    inputNode.style.minHeight = "unset";
+    completeNode.style.height = "auto";
 
     // Now resize the input field to fit its contents.
     const scrollHeight = inputNode.scrollHeight;
 
     if (scrollHeight > 0) {
-      inputNode.style.height = (scrollHeight + this.inputBorderSize) + "px";
+      const pxHeight = (scrollHeight + this.inputBorderSize) + "px";
+      inputNode.style.height = pxHeight;
+      inputNode.style.minHeight = minHeightBackup;
+      completeNode.style.height = pxHeight;
     }
   }
 
   /**
    * Sets the value of the input field (command line), and resizes the field to
    * fit its contents. This method is preferred over setting "inputNode.value"
    * directly, because it correctly resizes the field.
    *
@@ -705,16 +707,17 @@ class JSTerm extends Component {
       }
 
       this.inputNode.value = newValue;
       this.completeNode.value = "";
     }
 
     this.lastInputValue = newValue;
     this.resizeInput();
+
     this.emit("set-input-value");
   }
 
   /**
    * Gets the value from the input field
    * @returns string
    */
   getInputValue() {
@@ -1198,18 +1201,21 @@ class JSTerm extends Component {
         popupAlignElement = this.node.querySelector(".CodeMirror-cursor");
         // We need to show the popup at the ".".
         xOffset = -1 * matchProp.length * this._inputCharWidth;
         yOffset = 5;
       } else if (this.inputNode) {
         const offset = inputUntilCursor.length -
           (inputUntilCursor.lastIndexOf("\n") + 1) -
           matchProp.length;
-        xOffset = (offset * this._inputCharWidth) + this._chevronWidth;
-        popupAlignElement = this.inputNode;
+        xOffset = (offset * this._inputCharWidth) + this._paddingInlineStart;
+        // We use completeNode as the popup anchor as its height never exceeds the
+        // content size, whereas it can be the case for inputNode (when there's no message
+        // in the output, it takes the whole height).
+        popupAlignElement = this.completeNode;
       }
 
       if (popupAlignElement) {
         popup.openPopup(popupAlignElement, xOffset, yOffset);
       }
     } else if (items.length < minimumAutoCompleteLength && popup.isOpen) {
       popup.hidePopup();
     }
@@ -1304,21 +1310,25 @@ class JSTerm extends Component {
 
     if (numberOfCharsToReplaceCharsBeforeCursor) {
       prefix =
         prefix.substring(0, prefix.length - numberOfCharsToReplaceCharsBeforeCursor);
     }
 
     // We need to retrieve the cursor before setting the new value.
     const editorCursor = this.editor && this.editor.getCursor();
+
+    const scrollPosition = this.inputNode ? this.inputNode.parentElement.scrollTop : null;
+
     this.setInputValue(prefix + str + suffix);
 
     if (this.inputNode) {
       const newCursor = prefix.length + str.length;
       this.inputNode.selectionStart = this.inputNode.selectionEnd = newCursor;
+      this.inputNode.parentElement.scrollTop = scrollPosition;
     } else if (this.editor) {
       // Set the cursor on the same line it was already at, after the autocompleted text
       this.editor.setCursor({
         line: editorCursor.line,
         ch: editorCursor.ch + str.length - numberOfCharsToReplaceCharsBeforeCursor
       });
     }
   }
@@ -1416,38 +1426,37 @@ class JSTerm extends Component {
     style.position = "fixed";
     style.padding = "0";
     style.margin = "0";
     style.width = "auto";
     style.color = "transparent";
     WebConsoleUtils.copyTextStyles(this.inputNode, tempLabel);
     tempLabel.textContent = "x";
     doc.documentElement.appendChild(tempLabel);
-    const width = tempLabel.offsetWidth;
+    const width = tempLabel.getBoundingClientRect().width;
     tempLabel.remove();
     return width;
   }
 
   /**
    * Calculates and returns the width of the chevron icon.
    * This will be used in opening the popup at the correct offset.
    *
    * @returns {Number|null}: Width of the icon, or null if the input does not exist.
    */
-  _getChevronWidth() {
+  _getInputPaddingInlineStart() {
     if (!this.inputNode) {
       return null;
     }
-
-   // Calculate the width of the chevron placed at the beginning of the input
-    // box. Remove 4 more pixels to accommodate the padding of the popup.
+   // Calculate the width of the chevron placed at the beginning of the input box.
     const doc = this.hud.document;
-    return doc.defaultView
+
+    return new Number(doc.defaultView
       .getComputedStyle(this.inputNode)
-      .paddingLeft.replace(/[^0-9.]/g, "") - 4;
+      .paddingInlineStart.replace(/[^0-9.]/g, ""));
   }
 
   onContextMenu(e) {
     // The toolbox does it's own edit menu handling with
     // toolbox-textbox-context-popup and friends. For now, fall
     // back to use that if running inside the toolbox, but use our
     // own menu when running in the Browser Console (see Bug 1476097).
     if (this.props.hud.isBrowserConsole) {
--- a/devtools/client/webconsole/test/mochitest/browser.ini
+++ b/devtools/client/webconsole/test/mochitest/browser.ini
@@ -177,16 +177,17 @@ skip-if = (verify && debug && (os == 'ma
 [browser_console_restore.js]
 skip-if = verify
 [browser_console_webconsole_console_api_calls.js]
 [browser_console_webconsole_ctrlw_close_tab.js]
 [browser_console_webconsole_iframe_messages.js]
 [browser_console_webconsole_private_browsing.js]
 [browser_jsterm_accessibility.js]
 [browser_jsterm_add_edited_input_to_history.js]
+[browser_jsterm_autocomplete_accept_no_scroll.js]
 [browser_jsterm_autocomplete_array_no_index.js]
 [browser_jsterm_autocomplete_arrow_keys.js]
 [browser_jsterm_autocomplete_cached_results.js]
 [browser_jsterm_autocomplete_commands.js]
 [browser_jsterm_autocomplete_crossdomain_iframe.js]
 [browser_jsterm_autocomplete_escape_key.js]
 [browser_jsterm_autocomplete_extraneous_closing_brackets.js]
 [browser_jsterm_autocomplete_helpers.js]
new file mode 100644
--- /dev/null
+++ b/devtools/client/webconsole/test/mochitest/browser_jsterm_autocomplete_accept_no_scroll.js
@@ -0,0 +1,52 @@
+/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
+/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+
+// Test that the accepting an autocompletion does not scroll the input.
+
+const TEST_URI = `data:text/html;charset=utf-8,
+  <script>
+    /* Create a prototype-less object so popup does not contain native
+     * Object prototype properties.
+     */
+    window.foobar = Object.create(null, Object.getOwnPropertyDescriptors({
+      item0: "value0",
+      item1: "value1",
+    }));
+  </script>`;
+
+add_task(async function() {
+  // Only run test with legacy JsTerm.
+  await pushPref("devtools.webconsole.jsterm.codeMirror", false);
+
+  const { jsterm, ui } = await openNewTabAndConsole(TEST_URI);
+  const { autocompletePopup: popup } = jsterm;
+
+  info("Insert multiple new lines so the input overflows");
+  const onPopUpOpen = popup.once("popup-opened");
+  const lines = "\n".repeat(200);
+  jsterm.setInputValue(lines);
+
+  info("Fire the autocompletion popup");
+  EventUtils.sendString("window.foobar.");
+
+  await onPopUpOpen;
+
+  const inputContainer = ui.window.document.querySelector(".jsterm-input-container");
+  ok(inputContainer.scrollTop > 0, "The input overflows");
+  const scrollTop = inputContainer.scrollTop;
+
+  info("Hit Enter to accept the autocompletion");
+  const onPopupClose = popup.once("popup-closed");
+  EventUtils.synthesizeKey("KEY_Enter");
+  await onPopupClose;
+
+  ok(!popup.isOpen, "popup is not open after KEY_Enter");
+  is(jsterm.getInputValue(), lines + "window.foobar.item0",
+    "completion was successful after KEY_Enter");
+  is(inputContainer.scrollTop, scrollTop,
+    "The scrolling position stayed the same when accepting the completion");
+});
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -10037,16 +10037,17 @@ public:
                                         const BlockParsingOptions& aOptions)
     : mPromise(aPromise)
   {
     nsCOMPtr<nsIParser> parser = aDocument->CreatorParserOrNull();
     if (parser && (aOptions.mBlockScriptCreated || !parser->IsScriptCreated())) {
       parser->BlockParser();
       mParser = do_GetWeakReference(parser);
       mDocument = aDocument;
+      mDocument->BlockOnload();
     }
   }
 
   void
   ResolvedCallback(JSContext* aCx, JS::Handle<JS::Value> aValue) override
   {
     MaybeUnblockParser();
 
@@ -10075,16 +10076,17 @@ private:
   void MaybeUnblockParser() {
     nsCOMPtr<nsIParser> parser = do_QueryReferent(mParser);
     if (parser) {
       MOZ_DIAGNOSTIC_ASSERT(mDocument);
       nsCOMPtr<nsIParser> docParser = mDocument->CreatorParserOrNull();
       if (parser == docParser) {
         parser->UnblockParser();
         parser->ContinueInterruptedParsingAsync();
+        mDocument->UnblockOnload(false);
       }
     }
     mParser = nullptr;
     mDocument = nullptr;
   }
 
   nsWeakPtr mParser;
   RefPtr<Promise> mPromise;
--- a/dom/html/nsHTMLContentSink.cpp
+++ b/dom/html/nsHTMLContentSink.cpp
@@ -126,16 +126,17 @@ public:
   NS_IMETHOD DidBuildModel(bool aTerminated) override;
   NS_IMETHOD WillInterrupt(void) override;
   NS_IMETHOD WillResume(void) override;
   NS_IMETHOD SetParser(nsParserBase* aParser) override;
   virtual void FlushPendingNotifications(FlushType aType) override;
   virtual void SetDocumentCharset(NotNull<const Encoding*> aEncoding) override;
   virtual nsISupports *GetTarget() override;
   virtual bool IsScriptExecuting() override;
+  virtual void ContinueInterruptedParsingAsync() override;
 
   // nsIHTMLContentSink
   NS_IMETHOD OpenContainer(ElementType aNodeType) override;
   NS_IMETHOD CloseContainer(ElementType aTag) override;
 
 protected:
   virtual ~HTMLContentSink();
 
@@ -170,16 +171,19 @@ protected:
   void CloseHeadContext();
 
   // nsContentSink overrides
   void UpdateChildCounts() override;
 
   void NotifyInsert(nsIContent* aContent,
                     nsIContent* aChildContent);
   void NotifyRootInsertion();
+
+private:
+  void ContinueInterruptedParsingIfEnabled();
 };
 
 class SinkContext
 {
 public:
   explicit SinkContext(HTMLContentSink* aSink);
   ~SinkContext();
 
@@ -1042,8 +1046,28 @@ HTMLContentSink::GetTarget()
   return mDocument;
 }
 
 bool
 HTMLContentSink::IsScriptExecuting()
 {
   return IsScriptExecutingImpl();
 }
+
+void
+HTMLContentSink::ContinueInterruptedParsingIfEnabled()
+{
+  if (mParser && mParser->IsParserEnabled()) {
+    static_cast<nsIParser*>(mParser.get())->ContinueInterruptedParsing();
+  }
+}
+
+void
+HTMLContentSink::ContinueInterruptedParsingAsync()
+{
+  nsCOMPtr<nsIRunnable> ev =
+    NewRunnableMethod("HTMLContentSink::ContinueInterruptedParsingIfEnabled",
+                      this,
+                      &HTMLContentSink::ContinueInterruptedParsingIfEnabled);
+
+  nsCOMPtr<nsIDocument> doc = do_QueryInterface(mHTMLDocument);
+  doc->Dispatch(mozilla::TaskCategory::Other, ev.forget());
+}
--- a/js/src/gdb/mozilla/unwind.py
+++ b/js/src/gdb/mozilla/unwind.py
@@ -33,27 +33,27 @@ except ImportError:
 
 def debug(something):
     # print("@@ " + something)
     pass
 
 
 # Maps frametype enum base names to corresponding class.
 SizeOfFramePrefix = {
-    'JitFrame_IonJS': 'ExitFrameLayout',
-    'JitFrame_BaselineJS': 'JitFrameLayout',
-    'JitFrame_BaselineStub': 'BaselineStubFrameLayout',
-    'JitFrame_IonStub': 'JitStubFrameLayout',
-    'JitFrame_CppToJSJit': 'JitFrameLayout',
-    'JitFrame_WasmToJSJit': 'JitFrameLayout',
-    'JitFrame_Rectifier': 'RectifierFrameLayout',
-    'JitFrame_IonAccessorIC': 'IonAccessorICFrameLayout',
-    'JitFrame_IonICCall': 'IonICCallFrameLayout',
-    'JitFrame_Exit': 'ExitFrameLayout',
-    'JitFrame_Bailout': 'JitFrameLayout',
+    'FrameType::IonJS': 'ExitFrameLayout',
+    'FrameType::BaselineJS': 'JitFrameLayout',
+    'FrameType::BaselineStub': 'BaselineStubFrameLayout',
+    'FrameType::IonStub': 'JitStubFrameLayout',
+    'FrameType::CppToJSJit': 'JitFrameLayout',
+    'FrameType::WasmToJSJit': 'JitFrameLayout',
+    'FrameType::Rectifier': 'RectifierFrameLayout',
+    'FrameType::IonAccessorIC': 'IonAccessorICFrameLayout',
+    'FrameType::IonICCall': 'IonICCallFrameLayout',
+    'FrameType::Exit': 'ExitFrameLayout',
+    'FrameType::Bailout': 'JitFrameLayout',
 }
 
 
 class UnwinderTypeCache(object):
     # All types and symbols that we need are attached to an object that we
     # can dispose of as needed.
 
     def __init__(self):
@@ -327,17 +327,17 @@ class UnwinderState(object):
     def get_frame(self, frame):
         sp = long(frame.read_register(self.SP_REGISTER))
         if sp in self.frame_map:
             return self.frame_map[sp]
         return None
 
     # Add information about a frame to the frame map.  This map is
     # queried by |self.get_frame|.  |sp| is the frame's stack pointer,
-    # and |name| the frame's type as a string, e.g. "JitFrame_Exit".
+    # and |name| the frame's type as a string, e.g. "FrameType::Exit".
     def add_frame(self, sp, name=None, this_frame=None):
         self.frame_map[long(sp)] = {"name": name, "this_frame": this_frame}
 
     # See whether |pc| is claimed by some text mapping.  See
     # |parse_proc_maps| for details on how the decision is made.
     def text_address_claimed(self, pc):
         for (start, end) in self.proc_mappings:
             if (pc >= start and pc <= end):
@@ -382,17 +382,17 @@ class UnwinderState(object):
     # representing the previous frame's type.
     def unpack_descriptor(self, common):
         value = long(common['descriptor_'])
         local_size = value >> self.typecache.FRAMESIZE_SHIFT
         header_size = ((value >> self.typecache.FRAME_HEADER_SIZE_SHIFT) &
                        self.typecache.FRAME_HEADER_SIZE_MASK)
         header_size = header_size * self.typecache.void_starstar.sizeof
         frame_type = long(value & self.typecache.FRAMETYPE_MASK)
-        if frame_type == self.typecache.JitFrame_CppToJSJit:
+        if frame_type == self.typecache.CppToJSJit:
             # Trampoline-x64.cpp pushes a JitFrameLayout object, but
             # the stack pointer is actually adjusted as if a
             # CommonFrameLayout object was pushed.
             header_size = self.typecache.typeCommonFrameLayout.sizeof
         return (local_size, header_size, frame_type)
 
     # Create a new frame for gdb.  This makes a new unwind info object
     # and fills it in, then returns it.  It also registers any
@@ -458,25 +458,25 @@ class UnwinderState(object):
         else:
             self.activation = self.activation['prevJitActivation_']
 
         packedExitFP = self.activation['packedExitFP_']
         if packedExitFP == 0:
             return None
 
         exit_sp = pending_frame.read_register(self.SP_REGISTER)
-        frame_type = self.typecache.JitFrame_Exit
+        frame_type = self.typecache.Exit
         return self.create_frame(pc, exit_sp, packedExitFP, frame_type, pending_frame)
 
     # A wrapper for unwind_entry_frame_registers that handles
     # architecture-independent boilerplate.
     def unwind_entry_frame(self, pc, pending_frame):
         sp = self.next_sp
         # Notify the frame filter.
-        self.add_frame(sp, name='JitFrame_CppToJSJit')
+        self.add_frame(sp, name='FrameType::CppToJSJit')
         # Make an unwind_info for the per-architecture code to fill in.
         frame_id = SpiderMonkeyFrameId(sp, pc)
         unwind_info = pending_frame.create_unwind_info(frame_id)
         self.unwind_entry_frame_registers(sp, unwind_info)
         self.next_sp = None
         self.next_type = None
         return unwind_info
 
@@ -487,17 +487,17 @@ class UnwinderState(object):
         pc = pending_frame.read_register(self.PC_REGISTER)
 
         # If the jit does not claim this address, bail.  GDB defers to our
         # unwinder by default, but we don't really want that kind of power.
         if not self.is_jit_address(long(pc)):
             return None
 
         if self.next_sp is not None:
-            if self.next_type == self.typecache.JitFrame_CppToJSJit:
+            if self.next_type == self.typecache.CppToJSJit:
                 return self.unwind_entry_frame(pc, pending_frame)
             return self.unwind_ordinary(pc, pending_frame)
         # Maybe we've found an exit frame.  FIXME I currently don't
         # know how to identify these precisely, so we'll just hope for
         # the time being.
         return self.unwind_exit_frame(pc, pending_frame)
 
 # The UnwinderState subclass for x86-64.
--- a/js/src/gdb/tests/test-unwind.py
+++ b/js/src/gdb/tests/test-unwind.py
@@ -21,19 +21,19 @@ def do_unwinder_test():
     found_inner = False
     found_outer = False
     frames = list(gdb.frames.execute_frame_filters(gdb.newest_frame(), 0, -1))
     for frame in frames:
         print("examining " + frame.function())
         if first:
             assert_eq(frame.function().startswith("Something"), True)
             first = False
-        elif frame.function() == "<<JitFrame_Exit>>":
+        elif frame.function() == "<<FrameType::Exit>>":
             found_exit = True
-        elif frame.function() == "<<JitFrame_CppToJSJit>>":
+        elif frame.function() == "<<FrameType::CppToJSJit>>":
             found_entry = True
         elif frame.function() == "main":
             found_main = True
         elif "unwindFunctionInner" in frame.function():
             found_inner = True
         elif "unwindFunctionOuter" in frame.function():
             found_outer = True
 
--- a/js/src/jit/BaselineBailouts.cpp
+++ b/js/src/jit/BaselineBailouts.cpp
@@ -356,30 +356,30 @@ struct BaselineStackBuilder
         // Get the incoming frame.
         BufferPointer<JitFrameLayout> topFrame = topFrameAddress();
         FrameType type = topFrame->prevType();
 
         // For IonJS, IonICCall and Entry frames, the "saved" frame pointer
         // in the baseline frame is meaningless, since Ion saves all registers
         // before calling other ion frames, and the entry frame saves all
         // registers too.
-        if (JSJitFrameIter::isEntry(type) || type == JitFrame_IonJS || type == JitFrame_IonICCall)
+        if (JSJitFrameIter::isEntry(type) || type == FrameType::IonJS || type == FrameType::IonICCall)
             return nullptr;
 
         // BaselineStub - Baseline calling into Ion.
         //  PrevFramePtr needs to point to the BaselineStubFrame's saved frame pointer.
         //      STACK_START_ADDR + JitFrameLayout::Size() + PREV_FRAME_SIZE
         //                      - BaselineStubFrameLayout::reverseOffsetOfSavedFramePtr()
-        if (type == JitFrame_BaselineStub) {
+        if (type == FrameType::BaselineStub) {
             size_t offset = JitFrameLayout::Size() + topFrame->prevFrameLocalSize() +
                             BaselineStubFrameLayout::reverseOffsetOfSavedFramePtr();
             return virtualPointerAtStackOffset(offset);
         }
 
-        MOZ_ASSERT(type == JitFrame_Rectifier);
+        MOZ_ASSERT(type == FrameType::Rectifier);
         // Rectifier - behaviour depends on the frame preceding the rectifier frame, and
         // whether the arch is x86 or not.  The x86 rectifier frame saves the frame pointer,
         // so we can calculate it directly.  For other archs, the previous frame pointer
         // is stored on the stack in the frame that precedes the rectifier frame.
         size_t priorOffset = JitFrameLayout::Size() + topFrame->prevFrameLocalSize();
 #if defined(JS_CODEGEN_X86)
         // On X86, the FramePointer is pushed as the first value in the Rectifier frame.
         MOZ_ASSERT(BaselineFrameReg == FramePointer);
@@ -389,22 +389,22 @@ struct BaselineStackBuilder
       defined(JS_CODEGEN_MIPS32) || defined(JS_CODEGEN_MIPS64) || \
       defined(JS_CODEGEN_X64)
         // On X64, ARM, ARM64, and MIPS, the frame pointer save location depends on
         // the caller of the rectifier frame.
         BufferPointer<RectifierFrameLayout> priorFrame =
             pointerAtStackOffset<RectifierFrameLayout>(priorOffset);
         FrameType priorType = priorFrame->prevType();
         MOZ_ASSERT(JSJitFrameIter::isEntry(priorType) ||
-                   priorType == JitFrame_IonJS ||
-                   priorType == JitFrame_BaselineStub);
+                   priorType == FrameType::IonJS ||
+                   priorType == FrameType::BaselineStub);
 
         // If the frame preceding the rectifier is an IonJS or entry frame,
         // then once again the frame pointer does not matter.
-        if (priorType == JitFrame_IonJS || JSJitFrameIter::isEntry(priorType))
+        if (priorType == FrameType::IonJS || JSJitFrameIter::isEntry(priorType))
             return nullptr;
 
         // Otherwise, the frame preceding the rectifier is a BaselineStub frame.
         //  let X = STACK_START_ADDR + JitFrameLayout::Size() + PREV_FRAME_SIZE
         //      X + RectifierFrameLayout::Size()
         //        + ((RectifierFrameLayout*) X)->prevFrameLocalSize()
         //        - BaselineStubFrameLayout::reverseOffsetOfSavedFramePtr()
         size_t extraOffset = RectifierFrameLayout::Size() + priorFrame->prevFrameLocalSize() +
@@ -1235,17 +1235,17 @@ InitFromBailout(JSContext* cx, size_t fr
             cx->runtime()->geckoProfiler().markEvent(buf.get());
         }
 
         return true;
     }
 
     // Write out descriptor of BaselineJS frame.
     size_t baselineFrameDescr = MakeFrameDescriptor((uint32_t) builder.framePushed(),
-                                                    JitFrame_BaselineJS,
+                                                    FrameType::BaselineJS,
                                                     BaselineStubFrameLayout::Size());
     if (!builder.writeWord(baselineFrameDescr, "Descriptor"))
         return false;
 
     // Calculate and write out return address.
     // The icEntry in question MUST have an inlinable fallback stub.
     ICEntry& icEntry = baselineScript->icEntryFromPCOffset(pcOff);
     MOZ_ASSERT(IsInlinableFallback(icEntry.firstStub()->getChainFallback()));
@@ -1346,17 +1346,17 @@ InitFromBailout(JSContext* cx, size_t fr
 
     // In case these arguments need to be copied on the stack again for a rectifier frame,
     // save the framePushed values here for later use.
     size_t endOfBaselineStubArgs = builder.framePushed();
 
     // Calculate frame size for descriptor.
     size_t baselineStubFrameSize = builder.framePushed() - startOfBaselineStubFrame;
     size_t baselineStubFrameDescr = MakeFrameDescriptor((uint32_t) baselineStubFrameSize,
-                                                        JitFrame_BaselineStub,
+                                                        FrameType::BaselineStub,
                                                         JitFrameLayout::Size());
 
     // Push actual argc
     if (!builder.writeWord(actualArgc, "ActualArgc"))
         return false;
 
     // Push callee token (must be a JS Function)
     JitSpew(JitSpew_BaselineBailouts, "      Callee = %016" PRIx64, callee.asRawBits());
@@ -1459,17 +1459,17 @@ InitFromBailout(JSContext* cx, size_t fr
         builder.pointerAtStackOffset<uint8_t>(builder.framePushed() - endOfBaselineStubArgs);
     JitSpew(JitSpew_BaselineBailouts, "      MemCpy from %p", stubArgsEnd.get());
     memcpy(builder.pointerAtStackOffset<uint8_t>(0).get(), stubArgsEnd.get(),
            (actualArgc + 1) * sizeof(Value));
 
     // Calculate frame size for descriptor.
     size_t rectifierFrameSize = builder.framePushed() - startOfRectifierFrame;
     size_t rectifierFrameDescr = MakeFrameDescriptor((uint32_t) rectifierFrameSize,
-                                                     JitFrame_Rectifier,
+                                                     FrameType::Rectifier,
                                                      JitFrameLayout::Size());
 
     // Push actualArgc
     if (!builder.writeWord(actualArgc, "ActualArgc"))
         return false;
 
     // Push calleeToken again.
     if (!builder.writePtr(CalleeToToken(calleeFun, pushedNewTarget), "CalleeToken"))
@@ -1521,20 +1521,20 @@ jit::BailoutIonToBaseline(JSContext* cx,
     //      IonJS - Ion calling into Ion.
     //      BaselineStub - Baseline calling into Ion.
     //      Entry / WasmToJSJit - Interpreter or other (wasm) calling into Ion.
     //      Rectifier - Arguments rectifier calling into Ion.
     MOZ_ASSERT(iter.isBailoutJS());
 #if defined(DEBUG) || defined(JS_JITSPEW)
     FrameType prevFrameType = iter.prevType();
     MOZ_ASSERT(JSJitFrameIter::isEntry(prevFrameType) ||
-               prevFrameType == JitFrame_IonJS ||
-               prevFrameType == JitFrame_BaselineStub ||
-               prevFrameType == JitFrame_Rectifier ||
-               prevFrameType == JitFrame_IonICCall);
+               prevFrameType == FrameType::IonJS ||
+               prevFrameType == FrameType::BaselineStub ||
+               prevFrameType == FrameType::Rectifier ||
+               prevFrameType == FrameType::IonICCall);
 #endif
 
     // All incoming frames are going to look like this:
     //
     //      +---------------+
     //      |     ...       |
     //      +---------------+
     //      |     Args      |
--- a/js/src/jit/BaselineCompiler.cpp
+++ b/js/src/jit/BaselineCompiler.cpp
@@ -4758,17 +4758,17 @@ BaselineCompiler::emit_JSOP_RESUME()
     // Push |undefined| for |this|.
     masm.pushValue(UndefinedValue());
 
     // Update BaselineFrame frameSize field and create the frame descriptor.
     masm.computeEffectiveAddress(Address(BaselineFrameReg, BaselineFrame::FramePointerOffset),
                                  scratch2);
     masm.subStackPtrFrom(scratch2);
     masm.store32(scratch2, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
-    masm.makeFrameDescriptor(scratch2, JitFrame_BaselineJS, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch2, FrameType::BaselineJS, JitFrameLayout::Size());
 
     masm.Push(Imm32(0)); // actual argc
     masm.PushCalleeToken(callee, /* constructing = */ false);
     masm.Push(scratch2); // frame descriptor
 
     regs.add(callee);
 
     // Load the return value.
@@ -4889,17 +4889,17 @@ BaselineCompiler::emit_JSOP_RESUME()
         pushArg(retVal);
         pushArg(genObj);
         pushArg(scratch2);
 
         TrampolinePtr code = cx->runtime()->jitRuntime()->getVMWrapper(GeneratorThrowOrReturnInfo);
 
         // Create the frame descriptor.
         masm.subStackPtrFrom(scratch1);
-        masm.makeFrameDescriptor(scratch1, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(scratch1, FrameType::BaselineJS, ExitFrameLayout::Size());
 
         // Push the frame descriptor and a dummy return address (it doesn't
         // matter what we push here, frame iterators will use the frame pc
         // set in jit::GeneratorThrowOrReturn).
         masm.push(scratch1);
 
         // On ARM64, the callee will push the return address.
 #ifndef JS_CODEGEN_ARM64
--- a/js/src/jit/BaselineDebugModeOSR.cpp
+++ b/js/src/jit/BaselineDebugModeOSR.cpp
@@ -184,17 +184,17 @@ static bool
 CollectJitStackScripts(JSContext* cx, const Debugger::ExecutionObservableSet& obs,
                        const ActivationIterator& activation, DebugModeOSREntryVector& entries)
 {
     ICStub* prevFrameStubPtr = nullptr;
     bool needsRecompileHandler = false;
     for (OnlyJSJitFrameIter iter(activation); !iter.done(); ++iter) {
         const JSJitFrameIter& frame = iter.frame();
         switch (frame.type()) {
-          case JitFrame_BaselineJS: {
+          case FrameType::BaselineJS: {
             JSScript* script = frame.script();
 
             if (!obs.shouldRecompileOrInvalidate(script)) {
                 prevFrameStubPtr = nullptr;
                 break;
             }
 
             BaselineFrame* baselineFrame = frame.baselineFrame();
@@ -229,22 +229,22 @@ CollectJitStackScripts(JSContext* cx, co
 
                 needsRecompileHandler |= true;
             }
             entries.back().oldStub = prevFrameStubPtr;
             prevFrameStubPtr = nullptr;
             break;
           }
 
-          case JitFrame_BaselineStub:
+          case FrameType::BaselineStub:
             prevFrameStubPtr =
                 reinterpret_cast<BaselineStubFrameLayout*>(frame.fp())->maybeStubPtr();
             break;
 
-          case JitFrame_IonJS: {
+          case FrameType::IonJS: {
             InlineFrameIterator inlineIter(cx, &frame);
             while (true) {
                 if (obs.shouldRecompileOrInvalidate(inlineIter.script())) {
                     if (!entries.append(DebugModeOSREntry(inlineIter.script())))
                         return false;
                 }
                 if (!inlineIter.more())
                     break;
@@ -383,17 +383,17 @@ PatchBaselineFramesForDebugMode(JSContex
     //
 
     CommonFrameLayout* prev = nullptr;
     size_t entryIndex = *start;
 
     for (OnlyJSJitFrameIter iter(activation); !iter.done(); ++iter) {
         const JSJitFrameIter& frame = iter.frame();
         switch (frame.type()) {
-          case JitFrame_BaselineJS: {
+          case FrameType::BaselineJS: {
             // If the script wasn't recompiled or is not observed, there's
             // nothing to patch.
             if (!obs.shouldRecompileOrInvalidate(frame.script()))
                 break;
 
             DebugModeOSREntry& entry = entries[entryIndex];
 
             if (!entry.recompiled()) {
@@ -585,17 +585,17 @@ PatchBaselineFramesForDebugMode(JSContex
             prev->setReturnAddress(reinterpret_cast<uint8_t*>(handlerAddr));
             frame.baselineFrame()->setDebugModeOSRInfo(recompInfo);
             frame.baselineFrame()->setOverridePc(recompInfo->pc);
 
             entryIndex++;
             break;
           }
 
-          case JitFrame_BaselineStub: {
+          case FrameType::BaselineStub: {
             JSJitFrameIter prev(iter.frame());
             ++prev;
             BaselineFrame* prevFrame = prev.baselineFrame();
             if (!obs.shouldRecompileOrInvalidate(prevFrame->script()))
                 break;
 
             DebugModeOSREntry& entry = entries[entryIndex];
 
@@ -628,17 +628,17 @@ PatchBaselineFramesForDebugMode(JSContex
                 MOZ_ASSERT(entry.newStub || prevFrame->isHandlingException());
                 SpewPatchStubFrame(entry.oldStub, entry.newStub);
                 layout->setStubPtr(entry.newStub);
             }
 
             break;
           }
 
-          case JitFrame_IonJS: {
+          case FrameType::IonJS: {
             // Nothing to patch.
             InlineFrameIterator inlineIter(cx, &frame);
             while (true) {
                 if (obs.shouldRecompileOrInvalidate(inlineIter.script()))
                     entryIndex++;
                 if (!inlineIter.more())
                     break;
                 ++inlineIter;
--- a/js/src/jit/BaselineJIT.cpp
+++ b/js/src/jit/BaselineJIT.cpp
@@ -1189,27 +1189,27 @@ jit::ToggleBaselineTraceLoggerEngine(JSR
 #endif
 
 static void
 MarkActiveBaselineScripts(JSContext* cx, const JitActivationIterator& activation)
 {
     for (OnlyJSJitFrameIter iter(activation); !iter.done(); ++iter) {
         const JSJitFrameIter& frame = iter.frame();
         switch (frame.type()) {
-          case JitFrame_BaselineJS:
+          case FrameType::BaselineJS:
             frame.script()->baselineScript()->setActive();
             break;
-          case JitFrame_Exit:
+          case FrameType::Exit:
             if (frame.exitFrame()->is<LazyLinkExitFrameLayout>()) {
                 LazyLinkExitFrameLayout* ll = frame.exitFrame()->as<LazyLinkExitFrameLayout>();
                 ScriptFromCalleeToken(ll->jsFrame()->calleeToken())->baselineScript()->setActive();
             }
             break;
-          case JitFrame_Bailout:
-          case JitFrame_IonJS: {
+          case FrameType::Bailout:
+          case FrameType::IonJS: {
             // Keep the baseline script around, since bailouts from the ion
             // jitcode might need to re-enter into the baseline jitcode.
             frame.script()->baselineScript()->setActive();
             for (InlineFrameIterator inlineIter(cx, &frame); inlineIter.more(); ++inlineIter)
                 inlineIter.script()->baselineScript()->setActive();
             break;
           }
           default:;
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -4631,17 +4631,17 @@ CodeGenerator::visitCallGeneric(LCallGen
         masm.loadJitCodeRaw(calleereg, objreg);
     else
         masm.loadJitCodeNoArgCheck(calleereg, objreg);
 
     // Nestle the StackPointer up to the argument vector.
     masm.freeStack(unusedStack);
 
     // Construct the IonFramePrefix.
-    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), FrameType::IonJS,
                                               JitFrameLayout::Size());
     masm.Push(Imm32(call->numActualArgs()));
     masm.PushCalleeToken(calleereg, call->mir()->isConstructing());
     masm.Push(Imm32(descriptor));
 
     // Check whether the provided arguments satisfy target argc.
     // We cannot have lowered to LCallGeneric with a known target. Assert that we didn't
     // add any undefineds in IonBuilder. NB: MCall::numStackArgs includes |this|.
@@ -4753,17 +4753,17 @@ CodeGenerator::visitCallKnown(LCallKnown
         masm.loadJitCodeRaw(calleereg, objreg);
     else
         masm.loadJitCodeNoArgCheck(calleereg, objreg);
 
     // Nestle the StackPointer up to the argument vector.
     masm.freeStack(unusedStack);
 
     // Construct the IonFramePrefix.
-    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), FrameType::IonJS,
                                               JitFrameLayout::Size());
     masm.Push(Imm32(call->numActualArgs()));
     masm.PushCalleeToken(calleereg, call->mir()->isConstructing());
     masm.Push(Imm32(descriptor));
 
     // Finally call the function in objreg.
     uint32_t callOffset = masm.callJit(objreg);
     markSafepointAt(callOffset, call);
@@ -5069,17 +5069,17 @@ CodeGenerator::emitApplyGeneric(T* apply
 
         // Knowing that calleereg is a non-native function, load jitcode.
         masm.loadJitCodeRaw(calleereg, objreg);
 
         // Create the frame descriptor.
         unsigned pushed = masm.framePushed();
         Register stackSpace = extraStackSpace;
         masm.addPtr(Imm32(pushed), stackSpace);
-        masm.makeFrameDescriptor(stackSpace, JitFrame_IonJS, JitFrameLayout::Size());
+        masm.makeFrameDescriptor(stackSpace, FrameType::IonJS, JitFrameLayout::Size());
 
         masm.Push(argcreg);
         masm.Push(calleereg);
         masm.Push(stackSpace); // descriptor
 
         Label underflow, rejoin;
 
         // Check whether the provided arguments satisfy target argc.
--- a/js/src/jit/Ion.cpp
+++ b/js/src/jit/Ion.cpp
@@ -2572,59 +2572,59 @@ InvalidateActivation(FreeOp* fop, const 
         activations->asJit()->setCheckRegs(false);
 #endif
 
     size_t frameno = 1;
 
     for (OnlyJSJitFrameIter iter(activations); !iter.done(); ++iter, ++frameno) {
         const JSJitFrameIter& frame = iter.frame();
         MOZ_ASSERT_IF(frameno == 1, frame.isExitFrame() ||
-                                    frame.type() == JitFrame_Bailout ||
-                                    frame.type() == JitFrame_JSJitToWasm);
+                                    frame.type() == FrameType::Bailout ||
+                                    frame.type() == FrameType::JSJitToWasm);
 
 #ifdef JS_JITSPEW
         switch (frame.type()) {
-          case JitFrame_Exit:
+          case FrameType::Exit:
             JitSpew(JitSpew_IonInvalidate, "#%zu exit frame @ %p", frameno, frame.fp());
             break;
-          case JitFrame_JSJitToWasm:
+          case FrameType::JSJitToWasm:
             JitSpew(JitSpew_IonInvalidate, "#%zu wasm exit frame @ %p", frameno, frame.fp());
             break;
-          case JitFrame_BaselineJS:
-          case JitFrame_IonJS:
-          case JitFrame_Bailout:
+          case FrameType::BaselineJS:
+          case FrameType::IonJS:
+          case FrameType::Bailout:
           {
             MOZ_ASSERT(frame.isScripted());
             const char* type = "Unknown";
             if (frame.isIonJS())
                 type = "Optimized";
             else if (frame.isBaselineJS())
                 type = "Baseline";
             else if (frame.isBailoutJS())
                 type = "Bailing";
             JitSpew(JitSpew_IonInvalidate,
                     "#%zu %s JS frame @ %p, %s:%u (fun: %p, script: %p, pc %p)",
                     frameno, type, frame.fp(), frame.script()->maybeForwardedFilename(),
                     frame.script()->lineno(), frame.maybeCallee(), (JSScript*)frame.script(),
                     frame.returnAddressToFp());
             break;
           }
-          case JitFrame_BaselineStub:
+          case FrameType::BaselineStub:
             JitSpew(JitSpew_IonInvalidate, "#%zu baseline stub frame @ %p", frameno, frame.fp());
             break;
-          case JitFrame_Rectifier:
+          case FrameType::Rectifier:
             JitSpew(JitSpew_IonInvalidate, "#%zu rectifier frame @ %p", frameno, frame.fp());
             break;
-          case JitFrame_IonICCall:
+          case FrameType::IonICCall:
             JitSpew(JitSpew_IonInvalidate, "#%zu ion IC call frame @ %p", frameno, frame.fp());
             break;
-          case JitFrame_CppToJSJit:
+          case FrameType::CppToJSJit:
             JitSpew(JitSpew_IonInvalidate, "#%zu entry frame @ %p", frameno, frame.fp());
             break;
-          case JitFrame_WasmToJSJit:
+          case FrameType::WasmToJSJit:
             JitSpew(JitSpew_IonInvalidate, "#%zu wasm frames @ %p", frameno, frame.fp());
             break;
         }
 #endif // JS_JITSPEW
 
         if (!frame.isIonScripted())
             continue;
 
--- a/js/src/jit/IonCacheIRCompiler.cpp
+++ b/js/src/jit/IonCacheIRCompiler.cpp
@@ -289,32 +289,32 @@ CacheRegisterAllocator::restoreIonLiveRe
     availableRegs_.set() = GeneralRegisterSet();
     availableRegsAfterSpill_.set() = GeneralRegisterSet::All();
 }
 
 static void*
 GetReturnAddressToIonCode(JSContext* cx)
 {
     JSJitFrameIter frame(cx->activation()->asJit());
-    MOZ_ASSERT(frame.type() == JitFrame_Exit,
+    MOZ_ASSERT(frame.type() == FrameType::Exit,
                "An exit frame is expected as update functions are called with a VMFunction.");
 
     void* returnAddr = frame.returnAddress();
 #ifdef DEBUG
     ++frame;
     MOZ_ASSERT(frame.isIonJS());
 #endif
     return returnAddr;
 }
 
 // The AutoSaveLiveRegisters parameter is used to ensure registers were saved
 void
 IonCacheIRCompiler::prepareVMCall(MacroAssembler& masm, const AutoSaveLiveRegisters&)
 {
-    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), FrameType::IonJS,
                                               IonICCallFrameLayout::Size());
     pushStubCodePointer();
     masm.Push(Imm32(descriptor));
     masm.Push(ImmPtr(GetReturnAddressToIonCode(cx_)));
 
 #ifdef DEBUG
     calledPrepareVMCall_ = true;
 #endif
@@ -323,17 +323,17 @@ IonCacheIRCompiler::prepareVMCall(MacroA
 bool
 IonCacheIRCompiler::callVM(MacroAssembler& masm, const VMFunction& fun)
 {
     MOZ_ASSERT(calledPrepareVMCall_);
 
     TrampolinePtr code = cx_->runtime()->jitRuntime()->getVMWrapper(fun);
 
     uint32_t frameSize = fun.explicitStackSlots() * sizeof(void*);
-    uint32_t descriptor = MakeFrameDescriptor(frameSize, JitFrame_IonICCall,
+    uint32_t descriptor = MakeFrameDescriptor(frameSize, FrameType::IonICCall,
                                               ExitFrameLayout::Size());
     masm.Push(Imm32(descriptor));
     masm.callJit(code);
 
     // Remove rest of the frame left on the stack. We remove the return address
     // which is implicitly poped when returning.
     int framePop = sizeof(ExitFrameLayout) - sizeof(void*);
 
@@ -966,17 +966,17 @@ IonCacheIRCompiler::emitCallScriptedGett
     bool isCrossRealm = reader.readBool();
     MOZ_ASSERT(isCrossRealm == (cx_->realm() != target->realm()));
 
     allocator.discardStack(masm);
 
     uint32_t framePushedBefore = masm.framePushed();
 
     // Construct IonICCallFrameLayout.
-    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), FrameType::IonJS,
                                               IonICCallFrameLayout::Size());
     pushStubCodePointer();
     masm.Push(Imm32(descriptor));
     masm.Push(ImmPtr(GetReturnAddressToIonCode(cx_)));
 
     // The JitFrameLayout pushed below will be aligned to JitStackAlignment,
     // so we just have to make sure the stack is aligned after we push the
     // |this| + argument Values.
@@ -990,17 +990,17 @@ IonCacheIRCompiler::emitCallScriptedGett
         masm.Push(UndefinedValue());
     masm.Push(TypedOrValueRegister(MIRType::Object, AnyRegister(obj)));
 
     if (isCrossRealm)
         masm.switchToRealm(target->realm(), scratch);
 
     masm.movePtr(ImmGCPtr(target), scratch);
 
-    descriptor = MakeFrameDescriptor(argSize + padding, JitFrame_IonICCall,
+    descriptor = MakeFrameDescriptor(argSize + padding, FrameType::IonICCall,
                                      JitFrameLayout::Size());
     masm.Push(Imm32(0)); // argc
     masm.Push(scratch);
     masm.Push(Imm32(descriptor));
 
     // Check stack alignment. Add sizeof(uintptr_t) for the return address.
     MOZ_ASSERT(((masm.framePushed() + sizeof(uintptr_t)) % JitStackAlignment) == 0);
 
@@ -2101,17 +2101,17 @@ IonCacheIRCompiler::emitCallScriptedSett
 
     AutoScratchRegister scratch(allocator, masm);
 
     allocator.discardStack(masm);
 
     uint32_t framePushedBefore = masm.framePushed();
 
     // Construct IonICCallFrameLayout.
-    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(masm.framePushed(), FrameType::IonJS,
                                               IonICCallFrameLayout::Size());
     pushStubCodePointer();
     masm.Push(Imm32(descriptor));
     masm.Push(ImmPtr(GetReturnAddressToIonCode(cx_)));
 
     // The JitFrameLayout pushed below will be aligned to JitStackAlignment,
     // so we just have to make sure the stack is aligned after we push the
     // |this| + argument Values.
@@ -2127,17 +2127,17 @@ IonCacheIRCompiler::emitCallScriptedSett
     masm.Push(val);
     masm.Push(TypedOrValueRegister(MIRType::Object, AnyRegister(obj)));
 
     if (isCrossRealm)
         masm.switchToRealm(target->realm(), scratch);
 
     masm.movePtr(ImmGCPtr(target), scratch);
 
-    descriptor = MakeFrameDescriptor(argSize + padding, JitFrame_IonICCall,
+    descriptor = MakeFrameDescriptor(argSize + padding, FrameType::IonICCall,
                                      JitFrameLayout::Size());
     masm.Push(Imm32(1)); // argc
     masm.Push(scratch);
     masm.Push(Imm32(descriptor));
 
     // Check stack alignment. Add sizeof(uintptr_t) for the return address.
     MOZ_ASSERT(((masm.framePushed() + sizeof(uintptr_t)) % JitStackAlignment) == 0);
 
--- a/js/src/jit/JSJitFrameIter.cpp
+++ b/js/src/jit/JSJitFrameIter.cpp
@@ -12,40 +12,40 @@
 #include "jit/JitFrames.h"
 #include "jit/Safepoints.h"
 
 using namespace js;
 using namespace js::jit;
 
 JSJitFrameIter::JSJitFrameIter(const JitActivation* activation)
   : current_(activation->jsExitFP()),
-    type_(JitFrame_Exit),
+    type_(FrameType::Exit),
     returnAddressToFp_(nullptr),
     frameSize_(0),
     cachedSafepointIndex_(nullptr),
     activation_(activation)
 {
     if (activation_->bailoutData()) {
         current_ = activation_->bailoutData()->fp();
         frameSize_ = activation_->bailoutData()->topFrameSize();
-        type_ = JitFrame_Bailout;
+        type_ = FrameType::Bailout;
     } else {
         MOZ_ASSERT(!TlsContext.get()->inUnsafeCallWithABI);
     }
 }
 
 JSJitFrameIter::JSJitFrameIter(const JitActivation* activation, FrameType frameType, uint8_t* fp)
   : current_(fp),
     type_(frameType),
     returnAddressToFp_(nullptr),
     frameSize_(0),
     cachedSafepointIndex_(nullptr),
     activation_(activation)
 {
-    MOZ_ASSERT(type_ == JitFrame_JSJitToWasm || type_ == JitFrame_Exit);
+    MOZ_ASSERT(type_ == FrameType::JSJitToWasm || type_ == FrameType::Exit);
     MOZ_ASSERT(!activation_->bailoutData());
     MOZ_ASSERT(!TlsContext.get()->inUnsafeCallWithABI);
 }
 
 bool
 JSJitFrameIter::checkInvalidation() const
 {
     IonScript* dummy;
@@ -97,17 +97,17 @@ JSJitFrameIter::maybeCallee() const
     if (isScripted() && isFunctionFrame())
         return callee();
     return nullptr;
 }
 
 bool
 JSJitFrameIter::isBareExit() const
 {
-    if (type_ != JitFrame_Exit)
+    if (type_ != FrameType::Exit)
         return false;
     return exitFrame()->isBareExit();
 }
 
 bool
 JSJitFrameIter::isFunctionFrame() const
 {
     return CalleeTokenIsFunction(calleeToken());
@@ -341,69 +341,69 @@ JSJitFrameIter::dumpBaseline() const
 #endif
     }
 }
 
 void
 JSJitFrameIter::dump() const
 {
     switch (type_) {
-      case JitFrame_CppToJSJit:
+      case FrameType::CppToJSJit:
         fprintf(stderr, " Entry frame\n");
         fprintf(stderr, "  Frame size: %u\n", unsigned(current()->prevFrameLocalSize()));
         break;
-      case JitFrame_BaselineJS:
+      case FrameType::BaselineJS:
         dumpBaseline();
         break;
-      case JitFrame_BaselineStub:
+      case FrameType::BaselineStub:
         fprintf(stderr, " Baseline stub frame\n");
         fprintf(stderr, "  Frame size: %u\n", unsigned(current()->prevFrameLocalSize()));
         break;
-      case JitFrame_Bailout:
-      case JitFrame_IonJS:
+      case FrameType::Bailout:
+      case FrameType::IonJS:
       {
         InlineFrameIterator frames(TlsContext.get(), this);
         for (;;) {
             frames.dump();
             if (!frames.more())
                 break;
             ++frames;
         }
         break;
       }
-      case JitFrame_Rectifier:
+      case FrameType::Rectifier:
         fprintf(stderr, " Rectifier frame\n");
         fprintf(stderr, "  Frame size: %u\n", unsigned(current()->prevFrameLocalSize()));
         break;
-      case JitFrame_IonICCall:
+      case FrameType::IonICCall:
         fprintf(stderr, " Ion IC call\n");
         fprintf(stderr, "  Frame size: %u\n", unsigned(current()->prevFrameLocalSize()));
         break;
-      case JitFrame_WasmToJSJit:
+      case FrameType::WasmToJSJit:
         fprintf(stderr, " Fast wasm-to-JS entry frame\n");
         fprintf(stderr, "  Frame size: %u\n", unsigned(current()->prevFrameLocalSize()));
         break;
-      case JitFrame_Exit:
+      case FrameType::Exit:
         fprintf(stderr, " Exit frame\n");
         break;
-      case JitFrame_JSJitToWasm:
+      case FrameType::JSJitToWasm:
         fprintf(stderr, " Wasm exit frame\n");
         break;
     };
     fputc('\n', stderr);
 }
 
 #ifdef DEBUG
 bool
 JSJitFrameIter::verifyReturnAddressUsingNativeToBytecodeMap()
 {
     MOZ_ASSERT(returnAddressToFp_ != nullptr);
 
     // Only handle Ion frames for now.
-    if (type_ != JitFrame_IonJS && type_ != JitFrame_BaselineJS)
+    if (type_ != FrameType::IonJS && type_ != FrameType::BaselineJS)
         return true;
 
     JSRuntime* rt = TlsContext.get()->runtime();
 
     // Don't verify while off thread.
     if (!CurrentThreadCanAccessRuntime(rt))
         return true;
 
@@ -433,17 +433,17 @@ JSJitFrameIter::verifyReturnAddressUsing
 
     JitSpew(JitSpew_Profiling, "Found bytecode location of depth %d:", depth);
     for (size_t i = 0; i < location.length(); i++) {
         JitSpew(JitSpew_Profiling, "   %s:%u - %zu",
                 location[i].script->filename(), location[i].script->lineno(),
                 size_t(location[i].pc - location[i].script->code()));
     }
 
-    if (type_ == JitFrame_IonJS) {
+    if (type_ == FrameType::IonJS) {
         // Create an InlineFrameIterator here and verify the mapped info against the iterator info.
         InlineFrameIterator inlineFrames(TlsContext.get(), this);
         for (size_t idx = 0; idx < location.length(); idx++) {
             MOZ_ASSERT(idx < location.length());
             MOZ_ASSERT_IF(idx < location.length() - 1, inlineFrames.more());
 
             JitSpew(JitSpew_Profiling,
                     "Match %d: ION %s:%u(%zu) vs N2B %s:%u(%zu)",
@@ -466,31 +466,31 @@ JSJitFrameIter::verifyReturnAddressUsing
 }
 #endif // DEBUG
 
 JSJitProfilingFrameIterator::JSJitProfilingFrameIterator(JSContext* cx, void* pc)
 {
     // If no profilingActivation is live, initialize directly to
     // end-of-iteration state.
     if (!cx->profilingActivation()) {
-        type_ = JitFrame_CppToJSJit;
+        type_ = FrameType::CppToJSJit;
         fp_ = nullptr;
         returnAddressToFp_ = nullptr;
         return;
     }
 
     MOZ_ASSERT(cx->profilingActivation()->isJit());
 
     JitActivation* act = cx->profilingActivation()->asJit();
 
     // If the top JitActivation has a null lastProfilingFrame, assume that
     // it's a trivially empty activation, and initialize directly
     // to end-of-iteration state.
     if (!act->lastProfilingFrame()) {
-        type_ = JitFrame_CppToJSJit;
+        type_ = FrameType::CppToJSJit;
         fp_ = nullptr;
         returnAddressToFp_ = nullptr;
         return;
     }
 
     // Get the fp from the current profilingActivation
     fp_ = (uint8_t*) act->lastProfilingFrame();
 
@@ -516,17 +516,17 @@ JSJitProfilingFrameIterator::JSJitProfil
         if (tryInitWithTable(table, lastCallSite, /* forLastCallSite = */ true))
             return;
     }
 
     MOZ_ASSERT(frameScript()->hasBaselineScript());
 
     // If nothing matches, for now just assume we are at the start of the last frame's
     // baseline jit code.
-    type_ = JitFrame_BaselineJS;
+    type_ = FrameType::BaselineJS;
     returnAddressToFp_ = frameScript()->baselineScript()->method()->raw();
 }
 
 template <typename ReturnType = CommonFrameLayout*>
 static inline ReturnType
 GetPreviousRawFrame(CommonFrameLayout* frame)
 {
     size_t prevSize = frame->prevFrameLocalSize() + frame->headerSize();
@@ -540,24 +540,24 @@ JSJitProfilingFrameIterator::JSJitProfil
 
 bool
 JSJitProfilingFrameIterator::tryInitWithPC(void* pc)
 {
     JSScript* callee = frameScript();
 
     // Check for Ion first, since it's more likely for hot code.
     if (callee->hasIonScript() && callee->ionScript()->method()->containsNativePC(pc)) {
-        type_ = JitFrame_IonJS;
+        type_ = FrameType::IonJS;
         returnAddressToFp_ = pc;
         return true;
     }
 
     // Check for containment in Baseline jitcode second.
     if (callee->hasBaselineScript() && callee->baselineScript()->method()->containsNativePC(pc)) {
-        type_ = JitFrame_BaselineJS;
+        type_ = FrameType::BaselineJS;
         returnAddressToFp_ = pc;
         return true;
     }
 
     return false;
 }
 
 bool
@@ -572,62 +572,62 @@ JSJitProfilingFrameIterator::tryInitWith
         return false;
 
     JSScript* callee = frameScript();
 
     MOZ_ASSERT(entry->isIon() || entry->isBaseline() || entry->isIonCache() || entry->isDummy());
 
     // Treat dummy lookups as an empty frame sequence.
     if (entry->isDummy()) {
-        type_ = JitFrame_CppToJSJit;
+        type_ = FrameType::CppToJSJit;
         fp_ = nullptr;
         returnAddressToFp_ = nullptr;
         return true;
     }
 
     if (entry->isIon()) {
         // If looked-up callee doesn't match frame callee, don't accept lastProfilingCallSite
         if (entry->ionEntry().getScript(0) != callee)
             return false;
 
-        type_ = JitFrame_IonJS;
+        type_ = FrameType::IonJS;
         returnAddressToFp_ = pc;
         return true;
     }
 
     if (entry->isBaseline()) {
         // If looked-up callee doesn't match frame callee, don't accept lastProfilingCallSite
         if (forLastCallSite && entry->baselineEntry().script() != callee)
             return false;
 
-        type_ = JitFrame_BaselineJS;
+        type_ = FrameType::BaselineJS;
         returnAddressToFp_ = pc;
         return true;
     }
 
     if (entry->isIonCache()) {
         void* ptr = entry->ionCacheEntry().rejoinAddr();
         const JitcodeGlobalEntry& ionEntry = table->lookupInfallible(ptr);
         MOZ_ASSERT(ionEntry.isIon());
 
         if (ionEntry.ionEntry().getScript(0) != callee)
             return false;
 
-        type_ = JitFrame_IonJS;
+        type_ = FrameType::IonJS;
         returnAddressToFp_ = pc;
         return true;
     }
 
     return false;
 }
 
 void
 JSJitProfilingFrameIterator::fixBaselineReturnAddress()
 {
-    MOZ_ASSERT(type_ == JitFrame_BaselineJS);
+    MOZ_ASSERT(type_ == FrameType::BaselineJS);
     BaselineFrame* bl = (BaselineFrame*)(fp_ - BaselineFrame::FramePointerOffset -
                                          BaselineFrame::Size());
 
     // Debug mode OSR for Baseline uses a "continuation fixer" and stashes the
     // actual return address in an auxiliary structure.
     if (BaselineDebugModeOSRInfo* info = bl->getDebugModeOSRInfo()) {
         returnAddressToFp_ = info->resumeAddr;
         return;
@@ -652,28 +652,28 @@ JSJitProfilingFrameIterator::operator++(
 
 void
 JSJitProfilingFrameIterator::moveToWasmFrame(CommonFrameLayout* frame)
 {
     // No previous js jit frame, this is a transition frame, used to
     // pass a wasm iterator the correct value of FP.
     returnAddressToFp_ = nullptr;
     fp_ = GetPreviousRawFrame<uint8_t*>(frame);
-    type_ = JitFrame_WasmToJSJit;
+    type_ = FrameType::WasmToJSJit;
     MOZ_ASSERT(!done());
 }
 
 void
 JSJitProfilingFrameIterator::moveToCppEntryFrame()
 {
     // No previous frame, set to nullptr to indicate that
     // JSJitProfilingFrameIterator is done().
     returnAddressToFp_ = nullptr;
     fp_ = nullptr;
-    type_ = JitFrame_CppToJSJit;
+    type_ = FrameType::CppToJSJit;
 }
 
 void
 JSJitProfilingFrameIterator::moveToNextFrame(CommonFrameLayout* frame)
 {
     /*
      * fp_ points to a Baseline or Ion frame.  The possible call-stacks
      * patterns occurring between this frame and a previous Ion or Baseline
@@ -706,92 +706,92 @@ JSJitProfilingFrameIterator::moveToNextF
      *      ^--- Ion
      *      |
      *      ^--- Baseline
      *      |
      *      ^--- Baseline Stub <---- Baseline
      */
     FrameType prevType = frame->prevType();
 
-    if (prevType == JitFrame_IonJS) {
+    if (prevType == FrameType::IonJS) {
         returnAddressToFp_ = frame->returnAddress();
         fp_ = GetPreviousRawFrame<uint8_t*>(frame);
-        type_ = JitFrame_IonJS;
+        type_ = FrameType::IonJS;
         return;
     }
 
-    if (prevType == JitFrame_BaselineJS) {
+    if (prevType == FrameType::BaselineJS) {
         returnAddressToFp_ = frame->returnAddress();
         fp_ = GetPreviousRawFrame<uint8_t*>(frame);
-        type_ = JitFrame_BaselineJS;
+        type_ = FrameType::BaselineJS;
         fixBaselineReturnAddress();
         return;
     }
 
-    if (prevType == JitFrame_BaselineStub) {
+    if (prevType == FrameType::BaselineStub) {
         BaselineStubFrameLayout* stubFrame = GetPreviousRawFrame<BaselineStubFrameLayout*>(frame);
-        MOZ_ASSERT(stubFrame->prevType() == JitFrame_BaselineJS);
+        MOZ_ASSERT(stubFrame->prevType() == FrameType::BaselineJS);
 
         returnAddressToFp_ = stubFrame->returnAddress();
         fp_ = ((uint8_t*) stubFrame->reverseSavedFramePtr())
                 + jit::BaselineFrame::FramePointerOffset;
-        type_ = JitFrame_BaselineJS;
+        type_ = FrameType::BaselineJS;
         return;
     }
 
-    if (prevType == JitFrame_Rectifier) {
+    if (prevType == FrameType::Rectifier) {
         RectifierFrameLayout* rectFrame = GetPreviousRawFrame<RectifierFrameLayout*>(frame);
         FrameType rectPrevType = rectFrame->prevType();
 
-        if (rectPrevType == JitFrame_IonJS) {
+        if (rectPrevType == FrameType::IonJS) {
             returnAddressToFp_ = rectFrame->returnAddress();
             fp_ = GetPreviousRawFrame<uint8_t*>(rectFrame);
-            type_ = JitFrame_IonJS;
+            type_ = FrameType::IonJS;
             return;
         }
 
-        if (rectPrevType == JitFrame_BaselineStub) {
+        if (rectPrevType == FrameType::BaselineStub) {
             BaselineStubFrameLayout* stubFrame =
                 GetPreviousRawFrame<BaselineStubFrameLayout*>(rectFrame);
             returnAddressToFp_ = stubFrame->returnAddress();
             fp_ = ((uint8_t*) stubFrame->reverseSavedFramePtr())
                     + jit::BaselineFrame::FramePointerOffset;
-            type_ = JitFrame_BaselineJS;
+            type_ = FrameType::BaselineJS;
             return;
         }
 
-        if (rectPrevType == JitFrame_WasmToJSJit) {
+        if (rectPrevType == FrameType::WasmToJSJit) {
             moveToWasmFrame(rectFrame);
             return;
         }
 
-        if (rectPrevType == JitFrame_CppToJSJit) {
+        if (rectPrevType == FrameType::CppToJSJit) {
             moveToCppEntryFrame();
             return;
         }
 
         MOZ_CRASH("Bad frame type prior to rectifier frame.");
     }
 
-    if (prevType == JitFrame_IonICCall) {
+    if (prevType == FrameType::IonICCall) {
         IonICCallFrameLayout* callFrame =
             GetPreviousRawFrame<IonICCallFrameLayout*>(frame);
 
-        MOZ_ASSERT(callFrame->prevType() == JitFrame_IonJS);
+        MOZ_ASSERT(callFrame->prevType() == FrameType::IonJS);
 
         returnAddressToFp_ = callFrame->returnAddress();
         fp_ = GetPreviousRawFrame<uint8_t*>(callFrame);
-        type_ = JitFrame_IonJS;
+        type_ = FrameType::IonJS;
         return;
     }
 
-    if (prevType == JitFrame_WasmToJSJit) {
+    if (prevType == FrameType::WasmToJSJit) {
         moveToWasmFrame(frame);
         return;
     }
 
-    if (prevType == JitFrame_CppToJSJit) {
+    if (prevType == FrameType::CppToJSJit) {
         moveToCppEntryFrame();
         return;
     }
 
     MOZ_CRASH("Bad frame type.");
 }
--- a/js/src/jit/JSJitFrameIter.h
+++ b/js/src/jit/JSJitFrameIter.h
@@ -15,60 +15,60 @@
 #include "vm/JSFunction.h"
 #include "vm/JSScript.h"
 
 namespace js {
 namespace jit {
 
 typedef void * CalleeToken;
 
-enum FrameType
+enum class FrameType
 {
     // A JS frame is analogous to a js::InterpreterFrame, representing one scripted
     // function activation. IonJS frames are used by the optimizing compiler.
-    JitFrame_IonJS,
+    IonJS,
 
     // JS frame used by the baseline JIT.
-    JitFrame_BaselineJS,
+    BaselineJS,
 
     // Frame pushed by Baseline stubs that make non-tail calls, so that the
     // return address -> ICEntry mapping works.
-    JitFrame_BaselineStub,
+    BaselineStub,
 
     // The entry frame is the initial prologue block transitioning from the VM
     // into the Ion world.
-    JitFrame_CppToJSJit,
+    CppToJSJit,
 
     // A rectifier frame sits in between two JS frames, adapting argc != nargs
     // mismatches in calls.
-    JitFrame_Rectifier,
+    Rectifier,
 
     // Ion IC calling a scripted getter/setter or a VMFunction.
-    JitFrame_IonICCall,
+    IonICCall,
 
     // An exit frame is necessary for transitioning from a JS frame into C++.
     // From within C++, an exit frame is always the last frame in any
     // JitActivation.
-    JitFrame_Exit,
+    Exit,
 
     // A bailout frame is a special IonJS jit frame after a bailout, and before
     // the reconstruction of the BaselineJS frame. From within C++, a bailout
     // frame is always the last frame in a JitActivation iff the bailout frame
     // information is recorded on the JitActivation.
-    JitFrame_Bailout,
+    Bailout,
 
     // A wasm to JS frame is constructed during fast calls from wasm to the JS
     // jits, used as a marker to interleave JS jit and wasm frames. From the
     // point of view of JS JITs, this is just another kind of entry frame.
-    JitFrame_WasmToJSJit,
+    WasmToJSJit,
 
     // A JS to wasm frame is constructed during fast calls from any JS jits to
     // wasm, and is a special kind of exit frame that doesn't have the exit
     // footer. From the point of view of the jit, it can be skipped as an exit.
-    JitFrame_JSJitToWasm,
+    JSJitToWasm,
 };
 
 enum ReadFrameArgsBehavior {
     // Only read formals (i.e. [0 ... callee()->nargs]
     ReadFrame_Formals,
 
     // Only read overflown args (i.e. [callee()->nargs ... numActuals()]
     ReadFrame_Overflown,
@@ -151,47 +151,47 @@ class JSJitFrameIter
     inline ExitFrameLayout* exitFrame() const;
 
     // Returns whether the JS frame has been invalidated and, if so,
     // places the invalidated Ion script in |ionScript|.
     bool checkInvalidation(IonScript** ionScript) const;
     bool checkInvalidation() const;
 
     bool isExitFrame() const {
-        return type_ == JitFrame_Exit;
+        return type_ == FrameType::Exit;
     }
     bool isScripted() const {
-        return type_ == JitFrame_BaselineJS || type_ == JitFrame_IonJS || type_ == JitFrame_Bailout;
+        return type_ == FrameType::BaselineJS || type_ == FrameType::IonJS || type_ == FrameType::Bailout;
     }
     bool isBaselineJS() const {
-        return type_ == JitFrame_BaselineJS;
+        return type_ == FrameType::BaselineJS;
     }
     bool isIonScripted() const {
-        return type_ == JitFrame_IonJS || type_ == JitFrame_Bailout;
+        return type_ == FrameType::IonJS || type_ == FrameType::Bailout;
     }
     bool isIonJS() const {
-        return type_ == JitFrame_IonJS;
+        return type_ == FrameType::IonJS;
     }
     bool isIonICCall() const {
-        return type_ == JitFrame_IonICCall;
+        return type_ == FrameType::IonICCall;
     }
     bool isBailoutJS() const {
-        return type_ == JitFrame_Bailout;
+        return type_ == FrameType::Bailout;
     }
     bool isBaselineStub() const {
-        return type_ == JitFrame_BaselineStub;
+        return type_ == FrameType::BaselineStub;
     }
     bool isRectifier() const {
-        return type_ == JitFrame_Rectifier;
+        return type_ == FrameType::Rectifier;
     }
     bool isBareExit() const;
     template <typename T> bool isExitFrameLayout() const;
 
     static bool isEntry(FrameType type) {
-        return type == JitFrame_CppToJSJit || type == JitFrame_WasmToJSJit;
+        return type == FrameType::CppToJSJit || type == FrameType::WasmToJSJit;
     }
     bool isEntry() const {
         return isEntry(type_);
     }
 
     bool isFunctionFrame() const;
 
     bool isConstructing() const;
--- a/js/src/jit/JitFrames-inl.h
+++ b/js/src/jit/JitFrames-inl.h
@@ -25,17 +25,17 @@ SafepointIndex::resolve()
     resolved = true;
 #endif
 }
 
 inline BaselineFrame*
 GetTopBaselineFrame(JSContext* cx)
 {
     JSJitFrameIter frame(cx->activation()->asJit());
-    MOZ_ASSERT(frame.type() == JitFrame_Exit);
+    MOZ_ASSERT(frame.type() == FrameType::Exit);
     ++frame;
     if (frame.isBaselineStub())
         ++frame;
     MOZ_ASSERT(frame.isBaselineJS());
     return frame.baselineFrame();
 }
 
 } // namespace jit
--- a/js/src/jit/JitFrames.cpp
+++ b/js/src/jit/JitFrames.cpp
@@ -860,17 +860,17 @@ TraceThisAndArguments(JSTracer* trc, con
 
     if (!CalleeTokenIsFunction(layout->calleeToken()))
         return;
 
     size_t nargs = layout->numActualArgs();
     size_t nformals = 0;
 
     JSFunction* fun = CalleeTokenToFunction(layout->calleeToken());
-    if (frame.type() != JitFrame_JSJitToWasm &&
+    if (frame.type() != FrameType::JSJitToWasm &&
         !frame.isExitFrameLayout<CalledFromJitExitFrameLayout>() &&
         !fun->nonLazyScript()->mayReadFrameArgsDirectly())
     {
         nformals = fun->nargs();
     }
 
     size_t newTargetOffset = Max(nargs, fun->nargs());
 
@@ -1050,29 +1050,29 @@ UpdateIonJSFrameForMinorGC(JSRuntime* rt
 }
 
 static void
 TraceBaselineStubFrame(JSTracer* trc, const JSJitFrameIter& frame)
 {
     // Trace the ICStub pointer stored in the stub frame. This is necessary
     // so that we don't destroy the stub code after unlinking the stub.
 
-    MOZ_ASSERT(frame.type() == JitFrame_BaselineStub);
+    MOZ_ASSERT(frame.type() == FrameType::BaselineStub);
     JitStubFrameLayout* layout = (JitStubFrameLayout*)frame.fp();
 
     if (ICStub* stub = layout->maybeStubPtr()) {
         MOZ_ASSERT(stub->makesGCCalls());
         stub->trace(trc);
     }
 }
 
 static void
 TraceIonICCallFrame(JSTracer* trc, const JSJitFrameIter& frame)
 {
-    MOZ_ASSERT(frame.type() == JitFrame_IonICCall);
+    MOZ_ASSERT(frame.type() == FrameType::IonICCall);
     IonICCallFrameLayout* layout = (IonICCallFrameLayout*)frame.fp();
     TraceRoot(trc, layout->stubCode(), "ion-ic-call-code");
 }
 
 #ifdef JS_CODEGEN_MIPS32
 uint8_t*
 alignDoubleSpillWithOffset(uint8_t* pointer, int32_t offset)
 {
@@ -1292,43 +1292,43 @@ TraceJitActivation(JSTracer* trc, JitAct
 
     activation->traceRematerializedFrames(trc);
     activation->traceIonRecovery(trc);
 
     for (JitFrameIter frames(activation); !frames.done(); ++frames) {
         if (frames.isJSJit()) {
             const JSJitFrameIter& jitFrame = frames.asJSJit();
             switch (jitFrame.type()) {
-              case JitFrame_Exit:
+              case FrameType::Exit:
                 TraceJitExitFrame(trc, jitFrame);
                 break;
-              case JitFrame_BaselineJS:
+              case FrameType::BaselineJS:
                 jitFrame.baselineFrame()->trace(trc, jitFrame);
                 break;
-              case JitFrame_IonJS:
+              case FrameType::IonJS:
                 TraceIonJSFrame(trc, jitFrame);
                 break;
-              case JitFrame_BaselineStub:
+              case FrameType::BaselineStub:
                 TraceBaselineStubFrame(trc, jitFrame);
                 break;
-              case JitFrame_Bailout:
+              case FrameType::Bailout:
                 TraceBailoutFrame(trc, jitFrame);
                 break;
-              case JitFrame_Rectifier:
+              case FrameType::Rectifier:
                 TraceRectifierFrame(trc, jitFrame);
                 break;
-              case JitFrame_IonICCall:
+              case FrameType::IonICCall:
                 TraceIonICCallFrame(trc, jitFrame);
                 break;
-              case JitFrame_WasmToJSJit:
+              case FrameType::WasmToJSJit:
                 // Ignore: this is a special marker used to let the
                 // JitFrameIter know the frame above is a wasm frame, handled
                 // in the next iteration.
                 break;
-              case JitFrame_JSJitToWasm:
+              case FrameType::JSJitToWasm:
                 TraceJSJitToWasmFrame(trc, jitFrame);
                 break;
               default:
                 MOZ_CRASH("unexpected frame type");
             }
         } else {
             MOZ_ASSERT(frames.isWasm());
             frames.asWasm().instance()->trace(trc);
@@ -1345,17 +1345,17 @@ TraceJitActivations(JSContext* cx, JSTra
 
 void
 UpdateJitActivationsForMinorGC(JSRuntime* rt)
 {
     MOZ_ASSERT(JS::RuntimeHeapIsMinorCollecting());
     JSContext* cx = rt->mainContextFromOwnThread();
     for (JitActivationIterator activations(cx); !activations.done(); ++activations) {
         for (OnlyJSJitFrameIter iter(activations); !iter.done(); ++iter) {
-            if (iter.frame().type() == JitFrame_IonJS)
+            if (iter.frame().type() == FrameType::IonJS)
                 UpdateIonJSFrameForMinorGC(rt, iter.frame());
         }
     }
 }
 
 void
 GetPcScript(JSContext* cx, JSScript** scriptRes, jsbytecode** pcRes)
 {
@@ -2436,17 +2436,17 @@ AssertJitStackInvariants(JSContext* cx)
             bool isScriptedCallee = false;
             for (; !frames.done(); ++frames) {
                 size_t calleeFp = reinterpret_cast<size_t>(frames.fp());
                 size_t callerFp = reinterpret_cast<size_t>(frames.prevFp());
                 MOZ_ASSERT(callerFp >= calleeFp);
                 prevFrameSize = frameSize;
                 frameSize = callerFp - calleeFp;
 
-                if (frames.isScripted() && frames.prevType() == JitFrame_Rectifier) {
+                if (frames.isScripted() && frames.prevType() == FrameType::Rectifier) {
                     MOZ_RELEASE_ASSERT(frameSize % JitStackAlignment == 0,
                       "The rectifier frame should keep the alignment");
 
                     size_t expectedFrameSize = 0
 #if defined(JS_CODEGEN_X86)
                         + sizeof(void*) /* frame pointer */
 #endif
                         + sizeof(Value) * (frames.callee()->nargs() +
@@ -2477,22 +2477,22 @@ AssertJitStackInvariants(JSContext* cx)
                     if (isScriptedCallee) {
                         MOZ_RELEASE_ASSERT(prevFrameSize % JitStackAlignment == 0,
                           "The ion frame should keep the alignment");
                     }
                 }
 
                 // The stack is dynamically aligned by baseline stubs before calling
                 // any jitted code.
-                if (frames.prevType() == JitFrame_BaselineStub && isScriptedCallee) {
+                if (frames.prevType() == FrameType::BaselineStub && isScriptedCallee) {
                     MOZ_RELEASE_ASSERT(calleeFp % JitStackAlignment == 0,
                         "The baseline stub restores the stack alignment");
                 }
 
-                isScriptedCallee = frames.isScripted() || frames.type() == JitFrame_Rectifier;
+                isScriptedCallee = frames.isScripted() || frames.type() == FrameType::Rectifier;
             }
 
             MOZ_RELEASE_ASSERT(JSJitFrameIter::isEntry(frames.type()),
               "The first frame of a Jit activation should be an entry frame");
             MOZ_RELEASE_ASSERT(reinterpret_cast<size_t>(frames.fp()) % JitStackAlignment == 0,
               "The entry frame should be properly aligned");
         } else {
             MOZ_ASSERT(iter.isWasm());
--- a/js/src/jit/JitFrames.h
+++ b/js/src/jit/JitFrames.h
@@ -298,27 +298,28 @@ EncodeFrameHeaderSize(size_t headerSize)
     uint32_t headerSizeWords = headerSize / sizeof(uintptr_t);
     MOZ_ASSERT(headerSizeWords <= FRAME_HEADER_SIZE_MASK);
     return headerSizeWords;
 }
 
 static inline uint32_t
 MakeFrameDescriptor(uint32_t frameSize, FrameType type, uint32_t headerSize)
 {
-    MOZ_ASSERT(headerSize < FRAMESIZE_MASK);
+    MOZ_ASSERT(frameSize < FRAMESIZE_MASK);
     headerSize = EncodeFrameHeaderSize(headerSize);
-    return 0 | (frameSize << FRAMESIZE_SHIFT) | (headerSize << FRAME_HEADER_SIZE_SHIFT) | type;
+    return 0 | (frameSize << FRAMESIZE_SHIFT) | (headerSize << FRAME_HEADER_SIZE_SHIFT) |
+           uint32_t(type);
 }
 
 // Returns the JSScript associated with the topmost JIT frame.
 inline JSScript*
 GetTopJitJSScript(JSContext* cx)
 {
     JSJitFrameIter frame(cx->activation()->asJit());
-    MOZ_ASSERT(frame.type() == JitFrame_Exit);
+    MOZ_ASSERT(frame.type() == FrameType::Exit);
     ++frame;
 
     if (frame.isBaselineStub()) {
         ++frame;
         MOZ_ASSERT(frame.isBaselineJS());
     }
 
     MOZ_ASSERT(frame.isScripted());
@@ -353,17 +354,17 @@ class CommonFrameLayout
     static size_t offsetOfReturnAddress() {
         return offsetof(CommonFrameLayout, returnAddress_);
     }
     FrameType prevType() const {
         return FrameType(descriptor_ & FRAMETYPE_MASK);
     }
     void changePrevType(FrameType type) {
         descriptor_ &= ~FRAMETYPE_MASK;
-        descriptor_ |= type;
+        descriptor_ |= uintptr_t(type);
     }
     size_t prevFrameLocalSize() const {
         return descriptor_ >> FRAMESIZE_SHIFT;
     }
     size_t headerSize() const {
         return sizeof(uintptr_t) *
             ((descriptor_ >> FRAME_HEADER_SIZE_SHIFT) & FRAME_HEADER_SIZE_MASK);
     }
@@ -894,17 +895,17 @@ class ICStub;
 
 class JitStubFrameLayout : public CommonFrameLayout
 {
     // Info on the stack
     //
     // --------------------
     // |JitStubFrameLayout|
     // +------------------+
-    // | - Descriptor     | => Marks end of JitFrame_IonJS
+    // | - Descriptor     | => Marks end of FrameType::IonJS
     // | - returnaddres   |
     // +------------------+
     // | - StubPtr        | => First thing pushed in a stub only when the stub will do
     // --------------------    a vmcall. Else we cannot have JitStubFrame. But technically
     //                         not a member of the layout.
 
   public:
     static size_t Size() {
@@ -923,17 +924,17 @@ class JitStubFrameLayout : public Common
 
 class BaselineStubFrameLayout : public JitStubFrameLayout
 {
     // Info on the stack
     //
     // -------------------------
     // |BaselineStubFrameLayout|
     // +-----------------------+
-    // | - Descriptor          | => Marks end of JitFrame_BaselineJS
+    // | - Descriptor          | => Marks end of FrameType::BaselineJS
     // | - returnaddres        |
     // +-----------------------+
     // | - StubPtr             | => First thing pushed in a stub only when the stub will do
     // +-----------------------+    a vmcall. Else we cannot have BaselineStubFrame.
     // | - FramePtr            | => Baseline stubs also need to push the frame ptr when doing
     // -------------------------    a vmcall.
     //                              Technically these last two variables are not part of the
     //                              layout.
--- a/js/src/jit/MacroAssembler-inl.h
+++ b/js/src/jit/MacroAssembler-inl.h
@@ -230,17 +230,17 @@ void
 MacroAssembler::makeFrameDescriptor(Register frameSizeReg, FrameType type, uint32_t headerSize)
 {
     // See JitFrames.h for a description of the frame descriptor format.
     // The saved-frame bit is zero for new frames. See js::SavedStacks.
 
     lshiftPtr(Imm32(FRAMESIZE_SHIFT), frameSizeReg);
 
     headerSize = EncodeFrameHeaderSize(headerSize);
-    orPtr(Imm32((headerSize << FRAME_HEADER_SIZE_SHIFT) | type), frameSizeReg);
+    orPtr(Imm32((headerSize << FRAME_HEADER_SIZE_SHIFT) | uint32_t(type)), frameSizeReg);
 }
 
 void
 MacroAssembler::pushStaticFrameDescriptor(FrameType type, uint32_t headerSize)
 {
     uint32_t descriptor = MakeFrameDescriptor(framePushed(), type, headerSize);
     Push(Imm32(descriptor));
 }
@@ -274,17 +274,17 @@ MacroAssembler::loadFunctionFromCalleeTo
     andPtr(Imm32(uint32_t(CalleeTokenMask)), dest);
 }
 
 uint32_t
 MacroAssembler::buildFakeExitFrame(Register scratch)
 {
     mozilla::DebugOnly<uint32_t> initialDepth = framePushed();
 
-    pushStaticFrameDescriptor(JitFrame_IonJS, ExitFrameLayout::Size());
+    pushStaticFrameDescriptor(FrameType::IonJS, ExitFrameLayout::Size());
     uint32_t retAddr = pushFakeReturnAddress(scratch);
 
     MOZ_ASSERT(framePushed() == initialDepth + ExitFrameLayout::Size());
     return retAddr;
 }
 
 // ===============================================================
 // Exit frame footer.
--- a/js/src/jit/MacroAssembler.cpp
+++ b/js/src/jit/MacroAssembler.cpp
@@ -1878,17 +1878,17 @@ MacroAssembler::generateBailoutTail(Regi
             store32(temp, Address(getStackPointer(), 0));
             jump(&copyLoop);
             bind(&endOfCopy);
         }
 
         // Enter exit frame for the FinishBailoutToBaseline call.
         loadPtr(Address(bailoutInfo, offsetof(BaselineBailoutInfo, resumeFramePtr)), temp);
         load32(Address(temp, BaselineFrame::reverseOffsetOfFrameSize()), temp);
-        makeFrameDescriptor(temp, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        makeFrameDescriptor(temp, FrameType::BaselineJS, ExitFrameLayout::Size());
         push(temp);
         push(Address(bailoutInfo, offsetof(BaselineBailoutInfo, resumeAddr)));
         // No GC things to mark on the stack, push a bare token.
         loadJSContext(scratch);
         enterFakeExitFrame(scratch, scratch, ExitFrameType::Bare);
 
         // If monitorStub is non-null, handle resumeAddr appropriately.
         Label noMonitor;
@@ -1976,20 +1976,20 @@ MacroAssembler::generateBailoutTail(Regi
 
 void
 MacroAssembler::assertRectifierFrameParentType(Register frameType)
 {
 #ifdef DEBUG
     {
         // Check the possible previous frame types here.
         Label checkOk;
-        branch32(Assembler::Equal, frameType, Imm32(JitFrame_IonJS), &checkOk);
-        branch32(Assembler::Equal, frameType, Imm32(JitFrame_BaselineStub), &checkOk);
-        branch32(Assembler::Equal, frameType, Imm32(JitFrame_WasmToJSJit), &checkOk);
-        branch32(Assembler::Equal, frameType, Imm32(JitFrame_CppToJSJit), &checkOk);
+        branch32(Assembler::Equal, frameType, Imm32(FrameType::IonJS), &checkOk);
+        branch32(Assembler::Equal, frameType, Imm32(FrameType::BaselineStub), &checkOk);
+        branch32(Assembler::Equal, frameType, Imm32(FrameType::WasmToJSJit), &checkOk);
+        branch32(Assembler::Equal, frameType, Imm32(FrameType::CppToJSJit), &checkOk);
         assumeUnreachable("Unrecognized frame type preceding RectifierFrame.");
         bind(&checkOk);
     }
 #endif
 }
 
 void
 MacroAssembler::loadJitCodeRaw(Register func, Register dest)
--- a/js/src/jit/VMFunctions.cpp
+++ b/js/src/jit/VMFunctions.cpp
@@ -392,17 +392,17 @@ ArrayPushDense(JSContext* cx, HandleArra
         return result == DenseElementResult::Success;
     }
 
     // AutoDetectInvalidation uses GetTopJitJSScript(cx)->ionScript(), but it's
     // possible the setOrExtendDenseElements call already invalidated the
     // IonScript. JSJitFrameIter::ionScript works when the script is invalidated
     // so we use that instead.
     JSJitFrameIter frame(cx->activation()->asJit());
-    MOZ_ASSERT(frame.type() == JitFrame_Exit);
+    MOZ_ASSERT(frame.type() == FrameType::Exit);
     ++frame;
     IonScript* ionScript = frame.ionScript();
 
     JS::AutoValueArray<3> argv(cx);
     AutoDetectInvalidation adi(cx, argv[0], ionScript);
     argv[0].setUndefined();
     argv[1].setObject(*arr);
     argv[2].set(v);
@@ -1294,17 +1294,17 @@ StringReplace(JSContext* cx, HandleStrin
 
 bool
 RecompileImpl(JSContext* cx, bool force)
 {
     MOZ_ASSERT(cx->currentlyRunningInJit());
     JitActivationIterator activations(cx);
     JSJitFrameIter frame(activations->asJit());
 
-    MOZ_ASSERT(frame.type() == JitFrame_Exit);
+    MOZ_ASSERT(frame.type() == FrameType::Exit);
     ++frame;
 
     RootedScript script(cx, frame.script());
     MOZ_ASSERT(script->hasIonScript());
 
     if (!IsIonEnabled(cx))
         return true;
 
--- a/js/src/jit/arm/MacroAssembler-arm.cpp
+++ b/js/src/jit/arm/MacroAssembler-arm.cpp
@@ -1786,17 +1786,17 @@ MacroAssemblerARM::ma_vstr(VFPRegister s
     as_add(scratch, base, lsl(index, shift), LeaveCC, cc);
     return as_vdtr(IsStore, src, Operand(Address(scratch, 0)).toVFPAddr(), cc);
 }
 
 bool
 MacroAssemblerARMCompat::buildOOLFakeExitFrame(void* fakeReturnAddr)
 {
     DebugOnly<uint32_t> initialDepth = asMasm().framePushed();
-    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), FrameType::IonJS,
                                               ExitFrameLayout::Size());
 
     asMasm().Push(Imm32(descriptor)); // descriptor_
     asMasm().Push(ImmPtr(fakeReturnAddr));
 
     return true;
 }
 
--- a/js/src/jit/arm/SharedICHelpers-arm-inl.h
+++ b/js/src/jit/arm/SharedICHelpers-arm-inl.h
@@ -33,32 +33,32 @@ EmitBaselineTailCallVM(TrampolinePtr tar
     }
     masm.store32(r1, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
 
     // Push frame descriptor and perform the tail call.
     // ICTailCallReg (lr) already contains the return address (as we keep
     // it there through the stub calls), but the VMWrapper code being called
     // expects the return address to also be pushed on the stack.
     MOZ_ASSERT(ICTailCallReg == lr);
-    masm.makeFrameDescriptor(r0, JitFrame_BaselineJS, ExitFrameLayout::Size());
+    masm.makeFrameDescriptor(r0, FrameType::BaselineJS, ExitFrameLayout::Size());
     masm.push(r0);
     masm.push(lr);
     masm.jump(target);
 }
 
 inline void
 EmitBaselineCreateStubFrameDescriptor(MacroAssembler& masm, Register reg, uint32_t headerSize)
 {
     // Compute stub frame size. We have to add two pointers: the stub reg and
     // previous frame pointer pushed by EmitEnterStubFrame.
     masm.mov(BaselineFrameReg, reg);
     masm.as_add(reg, reg, Imm8(sizeof(void*) * 2));
     masm.ma_sub(BaselineStackReg, reg);
 
-    masm.makeFrameDescriptor(reg, JitFrame_BaselineStub, headerSize);
+    masm.makeFrameDescriptor(reg, FrameType::BaselineStub, headerSize);
 }
 
 inline void
 EmitBaselineCallVM(TrampolinePtr target, MacroAssembler& masm)
 {
     EmitBaselineCreateStubFrameDescriptor(masm, r0, ExitFrameLayout::Size());
     masm.push(r0);
     masm.call(target);
@@ -79,17 +79,17 @@ EmitBaselineEnterStubFrame(MacroAssemble
     masm.ma_sub(BaselineStackReg, scratch);
 
     masm.store32(scratch, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
 
     // Note: when making changes here, don't forget to update STUB_FRAME_SIZE if
     // needed.
 
     // Push frame descriptor and return address.
-    masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, BaselineStubFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, BaselineStubFrameLayout::Size());
     masm.Push(scratch);
     masm.Push(ICTailCallReg);
 
     // Save old frame pointer, stack pointer and stub reg.
     masm.Push(ICStubReg);
     masm.Push(BaselineFrameReg);
     masm.mov(BaselineStackReg, BaselineFrameReg);
 
--- a/js/src/jit/arm/Trampoline-arm.cpp
+++ b/js/src/jit/arm/Trampoline-arm.cpp
@@ -200,17 +200,17 @@ JitRuntime::generateEnterJIT(JSContext* 
         // BIG FAT WARNING: this loads both r6 and r7.
         aasm->as_extdtr(IsLoad,  64, true, PostIndex, r6, EDtrAddr(r2, EDtrOffImm(8)));
         aasm->as_extdtr(IsStore, 64, true, PostIndex, r6, EDtrAddr(r4, EDtrOffImm(8)));
         aasm->as_b(&header, Assembler::NonZero);
         masm.bind(&footer);
     }
 
     masm.ma_sub(r8, sp, r8);
-    masm.makeFrameDescriptor(r8, JitFrame_CppToJSJit, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(r8, FrameType::CppToJSJit, JitFrameLayout::Size());
 
     masm.startDataTransferM(IsStore, sp, IB, NoWriteBack);
                            // [sp]    = return address (written later)
     masm.transferReg(r8);  // [sp',4] = descriptor, argc*8+20
     masm.transferReg(r9);  // [sp',8]  = callee token
     masm.transferReg(r10); // [sp',12]  = actual arguments
     masm.finishDataTransfer();
 
@@ -280,17 +280,17 @@ JitRuntime::generateEnterJIT(JSContext* 
 #endif
 
         // Reserve space for locals and stack values.
         masm.ma_lsl(Imm32(3), numStackValues, scratch);
         masm.ma_sub(sp, scratch, sp);
 
         // Enter exit frame.
         masm.addPtr(Imm32(BaselineFrame::Size() + BaselineFrame::FramePointerOffset), scratch);
-        masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, ExitFrameLayout::Size());
         masm.push(scratch);
         masm.push(Imm32(0)); // Fake return address.
         // No GC things to mark on the stack, push a bare token.
         masm.loadJSContext(scratch);
         masm.enterFakeExitFrame(scratch, scratch, ExitFrameType::Bare);
 
         masm.push(framePtr); // BaselineFrame
         masm.push(r0); // jitcode
@@ -516,17 +516,17 @@ JitRuntime::generateArgumentsRectifier(M
         masm.ma_b(&copyLoopTop, Assembler::NotSigned);
     }
 
     // translate the framesize from values into bytes
     masm.as_add(r6, r6, Imm8(1));
     masm.ma_lsl(Imm32(3), r6, r6);
 
     // Construct sizeDescriptor.
-    masm.makeFrameDescriptor(r6, JitFrame_Rectifier, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(r6, FrameType::Rectifier, JitFrameLayout::Size());
 
     // Construct JitFrameLayout.
     masm.ma_push(r0); // actual arguments.
     masm.ma_push(r1); // callee token
     masm.ma_push(r6); // frame descriptor.
 
     // Call the target function.
     masm.andPtr(Imm32(CalleeTokenMask), r1);
@@ -1119,30 +1119,30 @@ JitRuntime::generateProfilerExitFrameTai
     // Handling of each case is dependent on FrameDescriptor.type
     Label handle_IonJS;
     Label handle_BaselineStub;
     Label handle_Rectifier;
     Label handle_IonICCall;
     Label handle_Entry;
     Label end;
 
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineStub), &handle_BaselineStub);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_Rectifier), &handle_Rectifier);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonICCall), &handle_IonICCall);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_CppToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineStub), &handle_BaselineStub);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::Rectifier), &handle_Rectifier);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonICCall), &handle_IonICCall);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::CppToJSJit), &handle_Entry);
 
     // The WasmToJSJit is just another kind of entry.
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_WasmToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::WasmToJSJit), &handle_Entry);
 
     masm.assumeUnreachable("Invalid caller frame type when exiting from Ion frame.");
 
     //
-    // JitFrame_IonJS
+    // FrameType::IonJS
     //
     // Stack layout:
     //                  ...
     //                  Ion-Descriptor
     //     Prev-FP ---> Ion-ReturnAddr
     //                  ... previous frame data ... |- Descriptor.Size
     //                  ... arguments ...           |
     //                  ActualArgc          |
@@ -1163,17 +1163,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch2 := StackPointer + Descriptor.size*1 + JitFrameLayout::Size();
         masm.ma_add(StackPointer, scratch1, scratch2);
         masm.as_add(scratch2, scratch2, Imm8(JitFrameLayout::Size()));
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_BaselineStub
+    // FrameType::BaselineStub
     //
     // Look past the stub and store the frame pointer to
     // the baselineJS frame prior to it.
     //
     // Stack layout:
     //              ...
     //              BL-Descriptor
     // Prev-FP ---> BL-ReturnAddr
@@ -1207,17 +1207,17 @@ JitRuntime::generateProfilerExitFrameTai
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2); // Skip past BL-PrevFramePtr
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
 
     //
-    // JitFrame_Rectifier
+    // FrameType::Rectifier
     //
     // The rectifier frame can be preceded by either an IonJS, a BaselineStub,
     // or a CppToJSJit/WasmToJSJit frame.
     //
     // Stack layout if caller of rectifier was Ion or CppToJSJit/WasmToJSJit:
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
@@ -1261,51 +1261,51 @@ JitRuntime::generateProfilerExitFrameTai
         // Now |scratch1| contains Rect-Descriptor.Size
         // and |scratch2| points to Rectifier frame
         // and |scratch3| contains Rect-Descriptor.Type
 
         masm.assertRectifierFrameParentType(scratch3);
 
         // Check for either Ion or BaselineStub frame.
         Label notIonFrame;
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_IonJS), &notIonFrame);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
         masm.ma_add(scratch2, scratch1, scratch3);
         masm.add32(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_BaselineStub), &handle_Entry);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::BaselineStub), &handle_Entry);
 
         // Handle Rectifier <- BaselineStub <- BaselineJS
         masm.ma_add(scratch2, scratch1, scratch3);
         Address stubFrameReturnAddr(scratch3, RectifierFrameLayout::Size() +
                                               BaselineStubFrameLayout::offsetOfReturnAddress());
         masm.loadPtr(stubFrameReturnAddr, scratch2);
         masm.storePtr(scratch2, lastProfilingCallSite);
 
         Address stubFrameSavedFramePtr(scratch3,
                                        RectifierFrameLayout::Size() - (2 * sizeof(void*)));
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
-    // JitFrame_IonICCall
+    // FrameType::IonICCall
     //
     // The caller is always an IonJS frame.
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
     //              ... ion frame data ... |- CallFrame-Descriptor.Size
     //              StubCode               |
     //              ICCallFrame-Descriptor |- IonICCallFrameLayout::Size()
@@ -1324,17 +1324,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch3 := ICCallFrame-Descriptor.Size
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfDescriptor()), scratch3);
 #ifdef DEBUG
         // Assert previous frame is an IonJS frame.
         masm.movePtr(scratch3, scratch1);
         masm.and32(Imm32((1 << FRAMETYPE_BITS) - 1), scratch1);
         {
             Label checkOk;
-            masm.branch32(Assembler::Equal, scratch1, Imm32(JitFrame_IonJS), &checkOk);
+            masm.branch32(Assembler::Equal, scratch1, Imm32(FrameType::IonJS), &checkOk);
             masm.assumeUnreachable("IonICCall frame must be preceded by IonJS frame");
             masm.bind(&checkOk);
         }
 #endif
         masm.rshiftPtr(Imm32(FRAMESIZE_SHIFT), scratch3);
 
         // lastProfilingCallSite := ICCallFrame-ReturnAddr
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfReturnAddress()), scratch1);
@@ -1344,17 +1344,17 @@ JitRuntime::generateProfilerExitFrameTai
         //                       IonICCallFrameLayout::Size()
         masm.ma_add(scratch2, scratch3, scratch1);
         masm.addPtr(Imm32(IonICCallFrameLayout::Size()), scratch1);
         masm.storePtr(scratch1, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_CppToJSJit / JitFrame_WasmToJSJit
+    // FrameType::CppToJSJit / FrameType::WasmToJSJit
     //
     // If at an entry frame, store null into both fields.
     // A fast-path wasm->jit transition frame is an entry frame from the point
     // of view of the JIT.
     //
     masm.bind(&handle_Entry);
     {
         masm.movePtr(ImmPtr(nullptr), scratch1);
--- a/js/src/jit/arm64/MacroAssembler-arm64.h
+++ b/js/src/jit/arm64/MacroAssembler-arm64.h
@@ -2004,17 +2004,17 @@ class MacroAssemblerCompat : public vixl
     // FIXME: Should be in Assembler?
     // FIXME: Should be const?
     uint32_t currentOffset() const {
         return nextOffset().getOffset();
     }
 
   protected:
     bool buildOOLFakeExitFrame(void* fakeReturnAddr) {
-        uint32_t descriptor = MakeFrameDescriptor(framePushed(), JitFrame_IonJS,
+        uint32_t descriptor = MakeFrameDescriptor(framePushed(), FrameType::IonJS,
                                                   ExitFrameLayout::Size());
         Push(Imm32(descriptor));
         Push(ImmPtr(fakeReturnAddr));
         return true;
     }
 };
 
 // See documentation for ScratchTagScope and ScratchTagScopeRelease in
--- a/js/src/jit/arm64/SharedICHelpers-arm64-inl.h
+++ b/js/src/jit/arm64/SharedICHelpers-arm64-inl.h
@@ -31,17 +31,17 @@ EmitBaselineTailCallVM(TrampolinePtr tar
 
         masm.Sub(scratch32, w0, Operand(argSize));
         masm.store32(scratch32.asUnsized(),
                      Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
     }
 
     // Push frame descriptor (minus the return address) and perform the tail call.
     MOZ_ASSERT(ICTailCallReg == lr);
-    masm.makeFrameDescriptor(r0, JitFrame_BaselineJS, ExitFrameLayout::Size());
+    masm.makeFrameDescriptor(r0, FrameType::BaselineJS, ExitFrameLayout::Size());
     masm.push(r0);
 
     // The return address will be pushed by the VM wrapper, for compatibility
     // with direct calls. Refer to the top of generateVMWrapper().
     // ICTailCallReg (lr) already contains the return address (as we keep
     // it there through the stub calls).
 
     masm.jump(target);
@@ -51,17 +51,17 @@ inline void
 EmitBaselineCreateStubFrameDescriptor(MacroAssembler& masm, Register reg, uint32_t headerSize)
 {
     ARMRegister reg64(reg, 64);
 
     // Compute stub frame size.
     masm.Sub(reg64, masm.GetStackPointer64(), Operand(sizeof(void*) * 2));
     masm.Sub(reg64, BaselineFrameReg64, reg64);
 
-    masm.makeFrameDescriptor(reg, JitFrame_BaselineStub, headerSize);
+    masm.makeFrameDescriptor(reg, FrameType::BaselineStub, headerSize);
 }
 
 inline void
 EmitBaselineCallVM(TrampolinePtr target, MacroAssembler& masm)
 {
     EmitBaselineCreateStubFrameDescriptor(masm, r0, ExitFrameLayout::Size());
     masm.push(r0);
     masm.call(target);
@@ -81,17 +81,17 @@ EmitBaselineEnterStubFrame(MacroAssemble
     masm.Sub(ARMRegister(scratch, 64), ARMRegister(scratch, 64), masm.GetStackPointer64());
 
     masm.store32(scratch, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
 
     // Note: when making changes here, don't forget to update STUB_FRAME_SIZE.
 
     // Push frame descriptor and return address.
     // Save old frame pointer, stack pointer, and stub reg.
-    masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, BaselineStubFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, BaselineStubFrameLayout::Size());
     masm.Push(scratch, ICTailCallReg, ICStubReg, BaselineFrameReg);
 
     // Update the frame register.
     masm.Mov(BaselineFrameReg64, masm.GetStackPointer64());
 
     // Stack should remain 16-byte aligned.
     masm.checkStackAlignment();
 }
--- a/js/src/jit/arm64/Trampoline-arm64.cpp
+++ b/js/src/jit/arm64/Trampoline-arm64.cpp
@@ -159,17 +159,17 @@ JitRuntime::generateEnterJIT(JSContext* 
     masm.unboxInt32(Address(reg_vp, 0x0), ip0);
     masm.push(ip0, reg_callee);
     masm.checkStackAlignment();
 
     // Calculate the number of bytes pushed so far.
     masm.subStackPtrFrom(r19);
 
     // Push the frameDescriptor.
-    masm.makeFrameDescriptor(r19, JitFrame_CppToJSJit, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(r19, FrameType::CppToJSJit, JitFrameLayout::Size());
     masm.Push(r19);
 
     Label osrReturnPoint;
     {
         // Check for Interpreter -> Baseline OSR.
         Label notOsr;
         masm.branchTestPtr(Assembler::Zero, OsrFrameReg, OsrFrameReg, &notOsr);
 
@@ -182,17 +182,17 @@ JitRuntime::generateEnterJIT(JSContext* 
         masm.moveStackPtrTo(BaselineFrameReg);
 
         // Reserve space for locals and stack values.
         masm.Lsl(w19, ARMRegister(reg_osrNStack, 32), 3); // w19 = num_stack_values * sizeof(Value).
         masm.subFromStackPtr(r19);
 
         // Enter exit frame.
         masm.addPtr(Imm32(BaselineFrame::Size() + BaselineFrame::FramePointerOffset), r19);
-        masm.makeFrameDescriptor(r19, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(r19, FrameType::BaselineJS, ExitFrameLayout::Size());
         masm.asVIXL().Push(x19, xzr); // Push xzr for a fake return address.
         // No GC things to mark: push a bare token.
         masm.loadJSContext(r19);
         masm.enterFakeExitFrame(r19, r19, ExitFrameType::Bare);
 
         masm.push(BaselineFrameReg, reg_code);
 
         // Initialize the frame, including filling in the slots.
@@ -386,17 +386,17 @@ JitRuntime::generateArgumentsRectifier(M
         masm.B(&copyLoopTop, Assembler::NotSigned);
     }
 
     // Fix up the size of the stack frame. +1 accounts for |this|.
     masm.Add(x6, x7, Operand(1));
     masm.Lsl(x6, x6, 3);
 
     // Make that into a frame descriptor.
-    masm.makeFrameDescriptor(r6, JitFrame_Rectifier, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(r6, FrameType::Rectifier, JitFrameLayout::Size());
 
     masm.push(r0,  // Number of actual arguments.
               r1,  // Callee token.
               r6); // Frame descriptor.
 
     // Load the address of the code that is getting called.
     masm.loadJitCodeRaw(r5, r3);
     argumentsRectifierReturnOffset_ = masm.callJitNoProfiler(r3);
@@ -928,30 +928,30 @@ JitRuntime::generateProfilerExitFrameTai
     // Handling of each case is dependent on FrameDescriptor.type
     Label handle_IonJS;
     Label handle_BaselineStub;
     Label handle_Rectifier;
     Label handle_IonICCall;
     Label handle_Entry;
     Label end;
 
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineStub), &handle_BaselineStub);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_Rectifier), &handle_Rectifier);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonICCall), &handle_IonICCall);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_CppToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineStub), &handle_BaselineStub);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::Rectifier), &handle_Rectifier);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonICCall), &handle_IonICCall);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::CppToJSJit), &handle_Entry);
 
     // The WasmToJSJit is just another kind of entry.
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_WasmToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::WasmToJSJit), &handle_Entry);
 
     masm.assumeUnreachable("Invalid caller frame type when exiting from Ion frame.");
 
     //
-    // JitFrame_IonJS
+    // FrameType::IonJS
     //
     // Stack layout:
     //                  ...
     //                  Ion-Descriptor
     //     Prev-FP ---> Ion-ReturnAddr
     //                  ... previous frame data ... |- Descriptor.Size
     //                  ... arguments ...           |
     //                  ActualArgc          |
@@ -974,17 +974,17 @@ JitRuntime::generateProfilerExitFrameTai
         masm.Add(ARMRegister(scratch2, 64), masm.GetStackPointer64(), ARMRegister(scratch1, 64));
         masm.syncStackPtr();
         masm.addPtr(Imm32(JitFrameLayout::Size()), scratch2, scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_BaselineStub
+    // FrameType::BaselineStub
     //
     // Look past the stub and store the frame pointer to
     // the baselineJS frame prior to it.
     //
     // Stack layout:
     //              ...
     //              BL-Descriptor
     // Prev-FP ---> BL-ReturnAddr
@@ -1019,17 +1019,17 @@ JitRuntime::generateProfilerExitFrameTai
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2); // Skip past BL-PrevFramePtr.
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
 
     //
-    // JitFrame_Rectifier
+    // FrameType::Rectifier
     //
     // The rectifier frame can be preceded by either an IonJS, a BaselineStub,
     // or a CppToJSJit/WasmToJSJit frame.
     //
     // Stack layout if caller of rectifier was Ion or CppToJSJit/WasmToJSJit:
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
@@ -1074,51 +1074,51 @@ JitRuntime::generateProfilerExitFrameTai
         // Now |scratch1| contains Rect-Descriptor.Size
         // and |scratch2| points to Rectifier frame
         // and |scratch3| contains Rect-Descriptor.Type
 
         masm.assertRectifierFrameParentType(scratch3);
 
         // Check for either Ion or BaselineStub frame.
         Label notIonFrame;
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_IonJS), &notIonFrame);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
         masm.addPtr(scratch2, scratch1, scratch3);
         masm.add32(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_BaselineStub), &handle_Entry);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::BaselineStub), &handle_Entry);
 
         // Handle Rectifier <- BaselineStub <- BaselineJS
         masm.addPtr(scratch2, scratch1, scratch3);
         Address stubFrameReturnAddr(scratch3, RectifierFrameLayout::Size() +
                                               BaselineStubFrameLayout::offsetOfReturnAddress());
         masm.loadPtr(stubFrameReturnAddr, scratch2);
         masm.storePtr(scratch2, lastProfilingCallSite);
 
         Address stubFrameSavedFramePtr(scratch3,
                                        RectifierFrameLayout::Size() - (2 * sizeof(void*)));
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
-    // JitFrame_IonICCall
+    // FrameType::IonICCall
     //
     // The caller is always an IonJS frame.
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
     //              ... ion frame data ... |- CallFrame-Descriptor.Size
     //              StubCode               |
     //              ICCallFrame-Descriptor |- IonICCallFrameLayout::Size()
@@ -1138,17 +1138,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch3 := ICCallFrame-Descriptor.Size
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfDescriptor()), scratch3);
 #ifdef DEBUG
         // Assert previous frame is an IonJS frame.
         masm.movePtr(scratch3, scratch1);
         masm.and32(Imm32((1 << FRAMETYPE_BITS) - 1), scratch1);
         {
             Label checkOk;
-            masm.branch32(Assembler::Equal, scratch1, Imm32(JitFrame_IonJS), &checkOk);
+            masm.branch32(Assembler::Equal, scratch1, Imm32(FrameType::IonJS), &checkOk);
             masm.assumeUnreachable("IonICCall frame must be preceded by IonJS frame");
             masm.bind(&checkOk);
         }
 #endif
         masm.rshiftPtr(Imm32(FRAMESIZE_SHIFT), scratch3);
 
         // lastProfilingCallSite := ICCallFrame-ReturnAddr
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfReturnAddress()), scratch1);
@@ -1158,17 +1158,17 @@ JitRuntime::generateProfilerExitFrameTai
         //                       IonICCallFrameLayout::Size()
         masm.addPtr(scratch2, scratch3, scratch1);
         masm.addPtr(Imm32(IonICCallFrameLayout::Size()), scratch1);
         masm.storePtr(scratch1, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_CppToJSJit / JitFrame_WasmToJSJit
+    // FrameType::CppToJSJit / FrameType::WasmToJSJit
     //
     // If at an entry frame, store null into both fields.
     // A fast-path wasm->jit transition frame is an entry frame from the point
     // of view of the JIT.
     //
     masm.bind(&handle_Entry);
     {
         masm.movePtr(ImmPtr(nullptr), scratch1);
--- a/js/src/jit/mips-shared/SharedICHelpers-mips-shared-inl.h
+++ b/js/src/jit/mips-shared/SharedICHelpers-mips-shared-inl.h
@@ -29,34 +29,34 @@ EmitBaselineTailCallVM(TrampolinePtr tar
     masm.store32(scratch, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
     masm.addPtr(Imm32(argSize), scratch);
 
     // Push frame descriptor and perform the tail call.
     // ICTailCallReg (ra) already contains the return address (as we
     // keep it there through the stub calls), but the VMWrapper code being
     // called expects the return address to also be pushed on the stack.
     MOZ_ASSERT(ICTailCallReg == ra);
-    masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, ExitFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, ExitFrameLayout::Size());
     masm.subPtr(Imm32(sizeof(CommonFrameLayout)), StackPointer);
     masm.storePtr(scratch, Address(StackPointer, CommonFrameLayout::offsetOfDescriptor()));
     masm.storePtr(ra, Address(StackPointer, CommonFrameLayout::offsetOfReturnAddress()));
 
     masm.jump(target);
 }
 
 inline void
 EmitBaselineCreateStubFrameDescriptor(MacroAssembler& masm, Register reg, uint32_t headerSize)
 {
     // Compute stub frame size. We have to add two pointers: the stub reg and
     // previous frame pointer pushed by EmitEnterStubFrame.
     masm.movePtr(BaselineFrameReg, reg);
     masm.addPtr(Imm32(sizeof(intptr_t) * 2), reg);
     masm.subPtr(BaselineStackReg, reg);
 
-    masm.makeFrameDescriptor(reg, JitFrame_BaselineStub, headerSize);
+    masm.makeFrameDescriptor(reg, FrameType::BaselineStub, headerSize);
 }
 
 inline void
 EmitBaselineCallVM(TrampolinePtr target, MacroAssembler& masm)
 {
     Register scratch = R2.scratchReg();
     EmitBaselineCreateStubFrameDescriptor(masm, scratch, ExitFrameLayout::Size());
     masm.push(scratch);
@@ -74,17 +74,17 @@ EmitBaselineEnterStubFrame(MacroAssemble
     masm.subPtr(BaselineStackReg, scratch);
 
     masm.store32(scratch, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
 
     // Note: when making changes here, don't forget to update
     // BaselineStubFrame if needed.
 
     // Push frame descriptor and return address.
-    masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, BaselineStubFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, BaselineStubFrameLayout::Size());
     masm.subPtr(Imm32(STUB_FRAME_SIZE), StackPointer);
     masm.storePtr(scratch, Address(StackPointer, offsetof(BaselineStubFrame, descriptor)));
     masm.storePtr(ICTailCallReg, Address(StackPointer,
                                                offsetof(BaselineStubFrame, returnAddress)));
 
     // Save old frame pointer, stack pointer and stub reg.
     masm.storePtr(ICStubReg, Address(StackPointer,
                                            offsetof(BaselineStubFrame, savedStub)));
--- a/js/src/jit/mips32/MacroAssembler-mips32.cpp
+++ b/js/src/jit/mips32/MacroAssembler-mips32.cpp
@@ -957,17 +957,17 @@ MacroAssemblerMIPS::ma_push(FloatRegiste
         ma_sdc1WordAligned(f, StackPointer, 0);
     else
         as_swc1(f, StackPointer, 0);
 }
 
 bool
 MacroAssemblerMIPSCompat::buildOOLFakeExitFrame(void* fakeReturnAddr)
 {
-    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), FrameType::IonJS,
                                               ExitFrameLayout::Size());
 
     asMasm().Push(Imm32(descriptor)); // descriptor_
     asMasm().Push(ImmPtr(fakeReturnAddr));
 
     return true;
 }
 
--- a/js/src/jit/mips32/Trampoline-mips32.cpp
+++ b/js/src/jit/mips32/Trampoline-mips32.cpp
@@ -195,17 +195,17 @@ JitRuntime::generateEnterJIT(JSContext* 
     }
     masm.bind(&footer);
 
     masm.subPtr(Imm32(2 * sizeof(uintptr_t)), StackPointer);
     masm.storePtr(s3, Address(StackPointer, sizeof(uintptr_t))); // actual arguments
     masm.storePtr(s2, Address(StackPointer, 0)); // callee token
 
     masm.subPtr(StackPointer, s4);
-    masm.makeFrameDescriptor(s4, JitFrame_CppToJSJit, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(s4, FrameType::CppToJSJit, JitFrameLayout::Size());
     masm.push(s4); // descriptor
 
     CodeLabel returnLabel;
     CodeLabel oomReturnLabel;
     {
         // Handle Interpreter -> Baseline OSR.
         AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
         regs.take(OsrFrameReg);
@@ -241,17 +241,17 @@ JitRuntime::generateEnterJIT(JSContext* 
         masm.movePtr(StackPointer, framePtr);
 
         // Reserve space for locals and stack values.
         masm.ma_sll(scratch, numStackValues, Imm32(3));
         masm.subPtr(scratch, StackPointer);
 
         // Enter exit frame.
         masm.addPtr(Imm32(BaselineFrame::Size() + BaselineFrame::FramePointerOffset), scratch);
-        masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, ExitFrameLayout::Size());
 
         // Push frame descriptor and fake return address.
         masm.reserveStack(2 * sizeof(uintptr_t));
         masm.storePtr(scratch, Address(StackPointer, sizeof(uintptr_t))); // Frame descriptor
         masm.storePtr(zero, Address(StackPointer, 0)); // fake return address
 
         // No GC things to mark, push a bare token.
         masm.loadJSContext(scratch);
@@ -488,17 +488,17 @@ JitRuntime::generateArgumentsRectifier(M
         masm.ma_b(s3, s3, &copyLoopTop, Assembler::NonZero, ShortJump);
     }
 
     // translate the framesize from values into bytes
     masm.ma_addu(t0, numArgsReg, Imm32(1));
     masm.lshiftPtr(Imm32(3), t0);
 
     // Construct sizeDescriptor.
-    masm.makeFrameDescriptor(t0, JitFrame_Rectifier, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(t0, FrameType::Rectifier, JitFrameLayout::Size());
 
     // Construct JitFrameLayout.
     masm.subPtr(Imm32(3 * sizeof(uintptr_t)), StackPointer);
     // Push actual arguments.
     masm.storePtr(numActArgsReg, Address(StackPointer, 2 * sizeof(uintptr_t)));
     // Push callee token.
     masm.storePtr(calleeTokenReg, Address(StackPointer, sizeof(uintptr_t)));
     // Push frame descriptor.
@@ -1097,30 +1097,30 @@ JitRuntime::generateProfilerExitFrameTai
     // Handling of each case is dependent on FrameDescriptor.type
     Label handle_IonJS;
     Label handle_BaselineStub;
     Label handle_Rectifier;
     Label handle_IonICCall;
     Label handle_Entry;
     Label end;
 
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineStub), &handle_BaselineStub);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_Rectifier), &handle_Rectifier);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonICCall), &handle_IonICCall);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_CppToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineStub), &handle_BaselineStub);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::Rectifier), &handle_Rectifier);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonICCall), &handle_IonICCall);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::CppToJSJit), &handle_Entry);
 
     // The WasmToJSJit is just another kind of entry.
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_WasmToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::WasmToJSJit), &handle_Entry);
 
     masm.assumeUnreachable("Invalid caller frame type when exiting from Ion frame.");
 
     //
-    // JitFrame_IonJS
+    // FrameType::IonJS
     //
     // Stack layout:
     //                  ...
     //                  Ion-Descriptor
     //     Prev-FP ---> Ion-ReturnAddr
     //                  ... previous frame data ... |- Descriptor.Size
     //                  ... arguments ...           |
     //                  ActualArgc          |
@@ -1141,17 +1141,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch2 := StackPointer + Descriptor.size*1 + JitFrameLayout::Size();
         masm.as_addu(scratch2, StackPointer, scratch1);
         masm.ma_addu(scratch2, scratch2, Imm32(JitFrameLayout::Size()));
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_BaselineStub
+    // FrameType::BaselineStub
     //
     // Look past the stub and store the frame pointer to
     // the baselineJS frame prior to it.
     //
     // Stack layout:
     //              ...
     //              BL-Descriptor
     // Prev-FP ---> BL-ReturnAddr
@@ -1185,17 +1185,17 @@ JitRuntime::generateProfilerExitFrameTai
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2); // Skip past BL-PrevFramePtr
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
 
     //
-    // JitFrame_Rectifier
+    // FrameType::Rectifier
     //
     // The rectifier frame can be preceded by either an IonJS, a BaselineStub,
     // or a CppToJSJit/WasmToJSJit frame.
     //
     // Stack layout if caller of rectifier was Ion or CppToJSJit/WasmToJSJit:
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
@@ -1239,51 +1239,51 @@ JitRuntime::generateProfilerExitFrameTai
         // Now |scratch1| contains Rect-Descriptor.Size
         // and |scratch2| points to Rectifier frame
         // and |scratch3| contains Rect-Descriptor.Type
 
         masm.assertRectifierFrameParentType(scratch3);
 
         // Check for either Ion or BaselineStub frame.
         Label notIonFrame;
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_IonJS), &notIonFrame);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
         masm.as_addu(scratch3, scratch2, scratch1);
         masm.add32(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_BaselineStub), &handle_Entry);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::BaselineStub), &handle_Entry);
 
         // Handle Rectifier <- BaselineStub <- BaselineJS
         masm.as_addu(scratch3, scratch2, scratch1);
         Address stubFrameReturnAddr(scratch3, RectifierFrameLayout::Size() +
                                               BaselineStubFrameLayout::offsetOfReturnAddress());
         masm.loadPtr(stubFrameReturnAddr, scratch2);
         masm.storePtr(scratch2, lastProfilingCallSite);
 
         Address stubFrameSavedFramePtr(scratch3,
                                        RectifierFrameLayout::Size() - (2 * sizeof(void*)));
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
-    // JitFrame_IonICCall
+    // FrameType::IonICCall
     //
     // The caller is always an IonJS frame.
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
     //              ... ion frame data ... |- CallFrame-Descriptor.Size
     //              StubCode               |
     //              ICCallFrame-Descriptor |- IonICCallFrameLayout::Size()
@@ -1302,17 +1302,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch3 := ICCallFrame-Descriptor.Size
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfDescriptor()), scratch3);
 #ifdef DEBUG
         // Assert previous frame is an IonJS frame.
         masm.movePtr(scratch3, scratch1);
         masm.and32(Imm32((1 << FRAMETYPE_BITS) - 1), scratch1);
         {
             Label checkOk;
-            masm.branch32(Assembler::Equal, scratch1, Imm32(JitFrame_IonJS), &checkOk);
+            masm.branch32(Assembler::Equal, scratch1, Imm32(FrameType::IonJS), &checkOk);
             masm.assumeUnreachable("IonICCall frame must be preceded by IonJS frame");
             masm.bind(&checkOk);
         }
 #endif
         masm.rshiftPtr(Imm32(FRAMESIZE_SHIFT), scratch3);
 
         // lastProfilingCallSite := ICCallFrame-ReturnAddr
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfReturnAddress()), scratch1);
@@ -1322,17 +1322,17 @@ JitRuntime::generateProfilerExitFrameTai
         //                       IonICCallFrameLayout::Size()
         masm.as_addu(scratch1, scratch2, scratch3);
         masm.addPtr(Imm32(IonICCallFrameLayout::Size()), scratch1);
         masm.storePtr(scratch1, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_CppToJSJit / JitFrame_WasmToJSJit
+    // FrameType::CppToJSJit / FrameType::WasmToJSJit
     //
     // If at an entry frame, store null into both fields.
     // A fast-path wasm->jit transition frame is an entry frame from the point
     // of view of the JIT.
     //
     masm.bind(&handle_Entry);
     {
         masm.movePtr(ImmPtr(nullptr), scratch1);
--- a/js/src/jit/mips64/MacroAssembler-mips64.cpp
+++ b/js/src/jit/mips64/MacroAssembler-mips64.cpp
@@ -915,17 +915,17 @@ MacroAssemblerMIPS64::ma_push(FloatRegis
 {
     as_daddiu(StackPointer, StackPointer, (int32_t)-sizeof(double));
     as_sdc1(f, StackPointer, 0);
 }
 
 bool
 MacroAssemblerMIPS64Compat::buildOOLFakeExitFrame(void* fakeReturnAddr)
 {
-    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), FrameType::IonJS,
                                               ExitFrameLayout::Size());
 
     asMasm().Push(Imm32(descriptor)); // descriptor_
     asMasm().Push(ImmPtr(fakeReturnAddr));
 
     return true;
 }
 
--- a/js/src/jit/mips64/Trampoline-mips64.cpp
+++ b/js/src/jit/mips64/Trampoline-mips64.cpp
@@ -224,17 +224,17 @@ JitRuntime::generateEnterJIT(JSContext* 
     }
     masm.bind(&footer);
 
     masm.subPtr(Imm32(2 * sizeof(uintptr_t)), StackPointer);
     masm.storePtr(s3, Address(StackPointer, sizeof(uintptr_t))); // actual arguments
     masm.storePtr(reg_token, Address(StackPointer, 0)); // callee token
 
     masm.subPtr(StackPointer, s4);
-    masm.makeFrameDescriptor(s4, JitFrame_CppToJSJit, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(s4, FrameType::CppToJSJit, JitFrameLayout::Size());
     masm.push(s4); // descriptor
 
     CodeLabel returnLabel;
     CodeLabel oomReturnLabel;
     {
         // Handle Interpreter -> Baseline OSR.
         AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
         regs.take(OsrFrameReg);
@@ -265,17 +265,17 @@ JitRuntime::generateEnterJIT(JSContext* 
         masm.movePtr(StackPointer, framePtr);
 
         // Reserve space for locals and stack values.
         masm.ma_dsll(scratch, numStackValues, Imm32(3));
         masm.subPtr(scratch, StackPointer);
 
         // Enter exit frame.
         masm.addPtr(Imm32(BaselineFrame::Size() + BaselineFrame::FramePointerOffset), scratch);
-        masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, ExitFrameLayout::Size());
 
         // Push frame descriptor and fake return address.
         masm.reserveStack(2 * sizeof(uintptr_t));
         masm.storePtr(scratch, Address(StackPointer, sizeof(uintptr_t))); // Frame descriptor
         masm.storePtr(zero, Address(StackPointer, 0)); // fake return address
 
         // No GC things to mark, push a bare token.
         masm.loadJSContext(scratch);
@@ -532,17 +532,17 @@ JitRuntime::generateArgumentsRectifier(M
     // [arg2] [arg1] [this] [[argc] [callee] [descr] [raddr]] <- t2
     //
     //
     // Rectifier frame:
     // [undef] [undef] [undef] [arg2] [arg1] [this] <- sp [[argc] [callee] [descr] [raddr]]
 
     // Construct sizeDescriptor.
     masm.subPtr(StackPointer, t2);
-    masm.makeFrameDescriptor(t2, JitFrame_Rectifier, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(t2, FrameType::Rectifier, JitFrameLayout::Size());
 
     // Construct JitFrameLayout.
     masm.subPtr(Imm32(3 * sizeof(uintptr_t)), StackPointer);
     // Push actual arguments.
     masm.storePtr(numActArgsReg, Address(StackPointer, 2 * sizeof(uintptr_t)));
     // Push callee token.
     masm.storePtr(calleeTokenReg, Address(StackPointer, sizeof(uintptr_t)));
     // Push frame descriptor.
@@ -1046,30 +1046,30 @@ JitRuntime::generateProfilerExitFrameTai
     // Handling of each case is dependent on FrameDescriptor.type
     Label handle_IonJS;
     Label handle_BaselineStub;
     Label handle_Rectifier;
     Label handle_IonICCall;
     Label handle_Entry;
     Label end;
 
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineStub), &handle_BaselineStub);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_Rectifier), &handle_Rectifier);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonICCall), &handle_IonICCall);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_CppToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineStub), &handle_BaselineStub);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::Rectifier), &handle_Rectifier);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonICCall), &handle_IonICCall);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::CppToJSJit), &handle_Entry);
 
     // The WasmToJSJit is just another kind of entry.
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_WasmToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::WasmToJSJit), &handle_Entry);
 
     masm.assumeUnreachable("Invalid caller frame type when exiting from Ion frame.");
 
     //
-    // JitFrame_IonJS
+    // FrameType::IonJS
     //
     // Stack layout:
     //                  ...
     //                  Ion-Descriptor
     //     Prev-FP ---> Ion-ReturnAddr
     //                  ... previous frame data ... |- Descriptor.Size
     //                  ... arguments ...           |
     //                  ActualArgc          |
@@ -1090,17 +1090,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch2 := StackPointer + Descriptor.size*1 + JitFrameLayout::Size();
         masm.as_daddu(scratch2, StackPointer, scratch1);
         masm.ma_daddu(scratch2, scratch2, Imm32(JitFrameLayout::Size()));
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_BaselineStub
+    // FrameType::BaselineStub
     //
     // Look past the stub and store the frame pointer to
     // the baselineJS frame prior to it.
     //
     // Stack layout:
     //              ...
     //              BL-Descriptor
     // Prev-FP ---> BL-ReturnAddr
@@ -1134,17 +1134,17 @@ JitRuntime::generateProfilerExitFrameTai
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2); // Skip past BL-PrevFramePtr
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
 
     //
-    // JitFrame_Rectifier
+    // FrameType::Rectifier
     //
     // The rectifier frame can be preceded by either an IonJS, a BaselineStub,
     // or a CppToJSJit/WasmToJSJit frame.
     //
     // Stack layout if caller of rectifier was Ion or CppToJSJit/WasmToJSJit:
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
@@ -1188,51 +1188,51 @@ JitRuntime::generateProfilerExitFrameTai
         // Now |scratch1| contains Rect-Descriptor.Size
         // and |scratch2| points to Rectifier frame
         // and |scratch3| contains Rect-Descriptor.Type
 
         masm.assertRectifierFrameParentType(scratch3);
 
         // Check for either Ion or BaselineStub frame.
         Label notIonFrame;
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_IonJS), &notIonFrame);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
         masm.as_daddu(scratch3, scratch2, scratch1);
         masm.addPtr(Imm32(RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_BaselineStub), &handle_Entry);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::BaselineStub), &handle_Entry);
 
         // Handle Rectifier <- BaselineStub <- BaselineJS
         masm.as_daddu(scratch3, scratch2, scratch1);
         Address stubFrameReturnAddr(scratch3, RectifierFrameLayout::Size() +
                                               BaselineStubFrameLayout::offsetOfReturnAddress());
         masm.loadPtr(stubFrameReturnAddr, scratch2);
         masm.storePtr(scratch2, lastProfilingCallSite);
 
         Address stubFrameSavedFramePtr(scratch3,
                                        RectifierFrameLayout::Size() - (2 * sizeof(void*)));
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
-    // JitFrame_IonICCall
+    // FrameType::IonICCall
     //
     // The caller is always an IonJS frame.
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
     //              ... ion frame data ... |- CallFrame-Descriptor.Size
     //              StubCode               |
     //              ICCallFrame-Descriptor |- IonICCallFrameLayout::Size()
@@ -1251,17 +1251,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch3 := ICCallFrame-Descriptor.Size
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfDescriptor()), scratch3);
 #ifdef DEBUG
         // Assert previous frame is an IonJS frame.
         masm.movePtr(scratch3, scratch1);
         masm.and32(Imm32((1 << FRAMETYPE_BITS) - 1), scratch1);
         {
             Label checkOk;
-            masm.branch32(Assembler::Equal, scratch1, Imm32(JitFrame_IonJS), &checkOk);
+            masm.branch32(Assembler::Equal, scratch1, Imm32(FrameType::IonJS), &checkOk);
             masm.assumeUnreachable("IonICCall frame must be preceded by IonJS frame");
             masm.bind(&checkOk);
         }
 #endif
         masm.rshiftPtr(Imm32(FRAMESIZE_SHIFT), scratch3);
 
         // lastProfilingCallSite := ICCallFrame-ReturnAddr
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfReturnAddress()), scratch1);
@@ -1271,17 +1271,17 @@ JitRuntime::generateProfilerExitFrameTai
         //                       IonICCallFrameLayout::Size()
         masm.as_daddu(scratch1, scratch2, scratch3);
         masm.addPtr(Imm32(IonICCallFrameLayout::Size()), scratch1);
         masm.storePtr(scratch1, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_CppToJSJit / JitFrame_WasmToJSJit
+    // FrameType::CppToJSJit / FrameType::WasmToJSJit
     //
     // If at an entry frame, store null into both fields.
     // A fast-path wasm->jit transition frame is an entry frame from the point
     // of view of the JIT.
     //
     masm.bind(&handle_Entry);
     {
         masm.movePtr(ImmPtr(nullptr), scratch1);
--- a/js/src/jit/shared/Assembler-shared.h
+++ b/js/src/jit/shared/Assembler-shared.h
@@ -99,16 +99,18 @@ ScaleFromElemWidth(int shift)
 
 // Used for 32-bit immediates which do not require relocation.
 struct Imm32
 {
     int32_t value;
 
     explicit Imm32(int32_t value) : value(value)
     { }
+    explicit Imm32(FrameType type) : Imm32(int32_t(type))
+    { }
 
     static inline Imm32 ShiftOf(enum Scale s) {
         switch (s) {
           case TimesOne:
             return Imm32(0);
           case TimesTwo:
             return Imm32(1);
           case TimesFour:
--- a/js/src/jit/shared/BaselineCompiler-shared.cpp
+++ b/js/src/jit/shared/BaselineCompiler-shared.cpp
@@ -82,23 +82,23 @@ BaselineCompilerShared::callVM(const VMF
     MOZ_ASSERT(masm.framePushed() - pushedBeforeCall_ == argSize);
 
     Address frameSizeAddress(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize());
     uint32_t frameVals = frame.nlocals() + frame.stackDepth();
     uint32_t frameBaseSize = BaselineFrame::FramePointerOffset + BaselineFrame::Size();
     uint32_t frameFullSize = frameBaseSize + (frameVals * sizeof(Value));
     if (phase == POST_INITIALIZE) {
         masm.store32(Imm32(frameFullSize), frameSizeAddress);
-        uint32_t descriptor = MakeFrameDescriptor(frameFullSize + argSize, JitFrame_BaselineJS,
+        uint32_t descriptor = MakeFrameDescriptor(frameFullSize + argSize, FrameType::BaselineJS,
                                                   ExitFrameLayout::Size());
         masm.push(Imm32(descriptor));
 
     } else if (phase == PRE_INITIALIZE) {
         masm.store32(Imm32(frameBaseSize), frameSizeAddress);
-        uint32_t descriptor = MakeFrameDescriptor(frameBaseSize + argSize, JitFrame_BaselineJS,
+        uint32_t descriptor = MakeFrameDescriptor(frameBaseSize + argSize, FrameType::BaselineJS,
                                                   ExitFrameLayout::Size());
         masm.push(Imm32(descriptor));
 
     } else {
         MOZ_ASSERT(phase == CHECK_OVER_RECURSED);
         Label afterWrite;
         Label writePostInitialize;
 
@@ -112,17 +112,17 @@ BaselineCompilerShared::callVM(const VMF
         masm.jump(&afterWrite);
 
         masm.bind(&writePostInitialize);
         masm.move32(Imm32(frameFullSize), ICTailCallReg);
 
         masm.bind(&afterWrite);
         masm.store32(ICTailCallReg, frameSizeAddress);
         masm.add32(Imm32(argSize), ICTailCallReg);
-        masm.makeFrameDescriptor(ICTailCallReg, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(ICTailCallReg, FrameType::BaselineJS, ExitFrameLayout::Size());
         masm.push(ICTailCallReg);
     }
     MOZ_ASSERT(fun.expectTailCall == NonTailCall);
     // Perform the call.
     masm.call(code);
     uint32_t callOffset = masm.currentOffset();
     masm.pop(BaselineFrameReg);
 
--- a/js/src/jit/shared/CodeGenerator-shared.cpp
+++ b/js/src/jit/shared/CodeGenerator-shared.cpp
@@ -1374,20 +1374,20 @@ CodeGeneratorShared::callVM(const VMFunc
         StoreAllLiveRegs(masm, ins->safepoint()->liveRegs());
 #endif
 
     // Push an exit frame descriptor. If |dynStack| is a valid pointer to a
     // register, then its value is added to the value of the |framePushed()| to
     // fill the frame descriptor.
     if (dynStack) {
         masm.addPtr(Imm32(masm.framePushed()), *dynStack);
-        masm.makeFrameDescriptor(*dynStack, JitFrame_IonJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(*dynStack, FrameType::IonJS, ExitFrameLayout::Size());
         masm.Push(*dynStack); // descriptor
     } else {
-        masm.pushStaticFrameDescriptor(JitFrame_IonJS, ExitFrameLayout::Size());
+        masm.pushStaticFrameDescriptor(FrameType::IonJS, ExitFrameLayout::Size());
     }
 
     // Call the wrapper function.  The wrapper is in charge to unwind the stack
     // when returning from the call.  Failures are handled with exceptions based
     // on the return value of the C functions.  To guard the outcome of the
     // returned value, use another LIR instruction.
     uint32_t callOffset = masm.callJit(wrapper);
     markSafepointAt(callOffset, ins);
--- a/js/src/jit/x64/SharedICHelpers-x64-inl.h
+++ b/js/src/jit/x64/SharedICHelpers-x64-inl.h
@@ -25,32 +25,32 @@ EmitBaselineTailCallVM(TrampolinePtr tar
     masm.subq(BaselineStackReg, scratch);
 
     // Store frame size without VMFunction arguments for GC marking.
     masm.movq(scratch, rdx);
     masm.subq(Imm32(argSize), rdx);
     masm.store32(rdx, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
 
     // Push frame descriptor and perform the tail call.
-    masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, ExitFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, ExitFrameLayout::Size());
     masm.push(scratch);
     masm.push(ICTailCallReg);
     masm.jump(target);
 }
 
 inline void
 EmitBaselineCreateStubFrameDescriptor(MacroAssembler& masm, Register reg, uint32_t headerSize)
 {
     // Compute stub frame size. We have to add two pointers: the stub reg and previous
     // frame pointer pushed by EmitEnterStubFrame.
     masm.movq(BaselineFrameReg, reg);
     masm.addq(Imm32(sizeof(void*) * 2), reg);
     masm.subq(BaselineStackReg, reg);
 
-    masm.makeFrameDescriptor(reg, JitFrame_BaselineStub, headerSize);
+    masm.makeFrameDescriptor(reg, FrameType::BaselineStub, headerSize);
 }
 
 inline void
 EmitBaselineCallVM(TrampolinePtr target, MacroAssembler& masm)
 {
     ScratchRegisterScope scratch(masm);
     EmitBaselineCreateStubFrameDescriptor(masm, scratch, ExitFrameLayout::Size());
     masm.push(scratch);
@@ -87,17 +87,17 @@ EmitBaselineEnterStubFrame(MacroAssemble
 
     // Note: when making changes here,  don't forget to update STUB_FRAME_SIZE
     // if needed.
 
     // Push the return address that's currently on top of the stack.
     masm.Push(Operand(BaselineStackReg, 0));
 
     // Replace the original return address with the frame descriptor.
-    masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, BaselineStubFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, BaselineStubFrameLayout::Size());
     masm.storePtr(scratch, Address(BaselineStackReg, sizeof(uintptr_t)));
 
     // Save old frame pointer, stack pointer and stub reg.
     masm.Push(ICStubReg);
     masm.Push(BaselineFrameReg);
     masm.mov(BaselineStackReg, BaselineFrameReg);
 }
 
--- a/js/src/jit/x64/Trampoline-x64.cpp
+++ b/js/src/jit/x64/Trampoline-x64.cpp
@@ -158,17 +158,17 @@ JitRuntime::generateEnterJIT(JSContext* 
     masm.push(token);
 
     /*****************************************************************
     Push the number of bytes we've pushed so far on the stack and call
     *****************************************************************/
     masm.subq(rsp, r14);
 
     // Create a frame descriptor.
-    masm.makeFrameDescriptor(r14, JitFrame_CppToJSJit, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(r14, FrameType::CppToJSJit, JitFrameLayout::Size());
     masm.push(r14);
 
     CodeLabel returnLabel;
     CodeLabel oomReturnLabel;
     {
         // Handle Interpreter -> Baseline OSR.
         AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
         regs.takeUnchecked(OsrFrameReg);
@@ -223,17 +223,17 @@ JitRuntime::generateEnterJIT(JSContext* 
         // Reserve space for locals and stack values.
         Register valuesSize = regs.takeAny();
         masm.mov(numStackValues, valuesSize);
         masm.shll(Imm32(3), valuesSize);
         masm.subPtr(valuesSize, rsp);
 
         // Enter exit frame.
         masm.addPtr(Imm32(BaselineFrame::Size() + BaselineFrame::FramePointerOffset), valuesSize);
-        masm.makeFrameDescriptor(valuesSize, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(valuesSize, FrameType::BaselineJS, ExitFrameLayout::Size());
         masm.push(valuesSize);
         masm.push(Imm32(0)); // Fake return address.
         // No GC things to mark, push a bare token.
         masm.loadJSContext(scratch);
         masm.enterFakeExitFrame(scratch, scratch, ExitFrameType::Bare);
 
         regs.add(valuesSize);
 
@@ -498,17 +498,17 @@ JitRuntime::generateArgumentsRectifier(M
     //
     //
     // Rectifier frame:
     // [undef] [undef] [undef] [arg2] [arg1] [this] <- rsp [[argc] [callee] [descr] [raddr]]
     //
 
     // Construct descriptor.
     masm.subq(rsp, r9);
-    masm.makeFrameDescriptor(r9, JitFrame_Rectifier, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(r9, FrameType::Rectifier, JitFrameLayout::Size());
 
     // Construct JitFrameLayout.
     masm.push(rdx); // numActualArgs
     masm.push(rax); // callee token
     masm.push(r9); // descriptor
 
     // Call the target function.
     masm.andq(Imm32(uint32_t(CalleeTokenMask)), rax);
@@ -1008,30 +1008,30 @@ JitRuntime::generateProfilerExitFrameTai
     // Handling of each case is dependent on FrameDescriptor.type
     Label handle_IonJS;
     Label handle_BaselineStub;
     Label handle_Rectifier;
     Label handle_IonICCall;
     Label handle_Entry;
     Label end;
 
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineStub), &handle_BaselineStub);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_Rectifier), &handle_Rectifier);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonICCall), &handle_IonICCall);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_CppToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineStub), &handle_BaselineStub);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::Rectifier), &handle_Rectifier);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonICCall), &handle_IonICCall);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::CppToJSJit), &handle_Entry);
 
-    // The WasmToJSJit is just another kind of entry.
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_WasmToJSJit), &handle_Entry);
+    // The WasmToJSJit is just another kind of entry
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::WasmToJSJit), &handle_Entry);
 
     masm.assumeUnreachable("Invalid caller frame type when exiting from Ion frame.");
 
     //
-    // JitFrame_IonJS
+    // FrameType::IonJS
     //
     // Stack layout:
     //                  ...
     //                  Ion-Descriptor
     //     Prev-FP ---> Ion-ReturnAddr
     //                  ... previous frame data ... |- Descriptor.Size
     //                  ... arguments ...           |
     //                  ActualArgc          |
@@ -1049,17 +1049,17 @@ JitRuntime::generateProfilerExitFrameTai
         // Store return frame in lastProfilingFrame.
         // scratch2 := StackPointer + Descriptor.size*1 + JitFrameLayout::Size();
         masm.lea(Operand(StackPointer, scratch1, TimesOne, JitFrameLayout::Size()), scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_BaselineStub
+    // FrameType::BaselineStub
     //
     // Look past the stub and store the frame pointer to
     // the baselineJS frame prior to it.
     //
     // Stack layout:
     //              ...
     //              BL-Descriptor
     // Prev-FP ---> BL-ReturnAddr
@@ -1092,17 +1092,17 @@ JitRuntime::generateProfilerExitFrameTai
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2); // Skip past BL-PrevFramePtr
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
 
     //
-    // JitFrame_Rectifier
+    // FrameType::Rectifier
     //
     // The rectifier frame can be preceded by either an IonJS, a BaselineStub,
     // or a CppToJSJit/WasmToJSJit frame.
     //
     // Stack layout if caller of rectifier was Ion or CppToJSJit/WasmToJSJit:
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
@@ -1146,50 +1146,50 @@ JitRuntime::generateProfilerExitFrameTai
         // Now |scratch1| contains Rect-Descriptor.Size
         // and |scratch2| points to Rectifier frame
         // and |scratch3| contains Rect-Descriptor.Type
 
         masm.assertRectifierFrameParentType(scratch3);
 
         // Check for either Ion or something else frame.
         Label notIonFrame;
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_IonJS), &notIonFrame);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
         masm.lea(Operand(scratch2, scratch1, TimesOne, RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_BaselineStub), &handle_Entry);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::BaselineStub), &handle_Entry);
 
         // Handle Rectifier <- BaselineStub <- BaselineJS
         BaseIndex stubFrameReturnAddr(scratch2, scratch1, TimesOne,
                                          RectifierFrameLayout::Size() +
                                          BaselineStubFrameLayout::offsetOfReturnAddress());
         masm.loadPtr(stubFrameReturnAddr, scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         BaseIndex stubFrameSavedFramePtr(scratch2, scratch1, TimesOne,
                                          RectifierFrameLayout::Size() - (2 * sizeof(void*)));
         masm.loadPtr(stubFrameSavedFramePtr, scratch3);
         masm.addPtr(Imm32(sizeof(void*)), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
     }
 
-    // JitFrame_IonICCall
+    // FrameType::IonICCall
     //
     // The caller is always an IonJS frame.
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
     //              ... ion frame data ... |- CallFrame-Descriptor.Size
     //              StubCode               |
     //              ICCallFrame-Descriptor |- IonICCallFrameLayout::Size()
@@ -1207,17 +1207,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch3 := ICCallFrame-Descriptor.Size
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfDescriptor()), scratch3);
 #ifdef DEBUG
         // Assert previous frame is an IonJS frame.
         masm.movePtr(scratch3, scratch1);
         masm.and32(Imm32((1 << FRAMETYPE_BITS) - 1), scratch1);
         {
             Label checkOk;
-            masm.branch32(Assembler::Equal, scratch1, Imm32(JitFrame_IonJS), &checkOk);
+            masm.branch32(Assembler::Equal, scratch1, Imm32(FrameType::IonJS), &checkOk);
             masm.assumeUnreachable("IonICCall frame must be preceded by IonJS frame");
             masm.bind(&checkOk);
         }
 #endif
         masm.rshiftPtr(Imm32(FRAMESIZE_SHIFT), scratch3);
 
         // lastProfilingCallSite := ICCallFrame-ReturnAddr
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfReturnAddress()), scratch1);
@@ -1226,17 +1226,17 @@ JitRuntime::generateProfilerExitFrameTai
         // lastProfilingFrame := ICCallFrame + ICCallFrame-Descriptor.Size +
         //                       IonICCallFrameLayout::Size()
         masm.lea(Operand(scratch2, scratch3, TimesOne, IonICCallFrameLayout::Size()), scratch1);
         masm.storePtr(scratch1, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_CppToJSJit / JitFrame_WasmToJSJit
+    // FrameType::CppToJSJit / FrameType::WasmToJSJit
     //
     // If at an entry frame, store null into both fields.
     // A fast-path wasm->jit transition frame is an entry frame from the point
     // of view of the JIT.
     //
     masm.bind(&handle_Entry);
     {
         masm.movePtr(ImmPtr(nullptr), scratch1);
--- a/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp
+++ b/js/src/jit/x86-shared/MacroAssembler-x86-shared.cpp
@@ -62,17 +62,17 @@ MacroAssembler::clampDoubleToUint8(Float
     }
 
     bind(&done);
 }
 
 bool
 MacroAssemblerX86Shared::buildOOLFakeExitFrame(void* fakeReturnAddr)
 {
-    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), JitFrame_IonJS,
+    uint32_t descriptor = MakeFrameDescriptor(asMasm().framePushed(), FrameType::IonJS,
                                               ExitFrameLayout::Size());
     asMasm().Push(Imm32(descriptor));
     asMasm().Push(ImmPtr(fakeReturnAddr));
     return true;
 }
 
 void
 MacroAssemblerX86Shared::branchNegativeZero(FloatRegister reg,
--- a/js/src/jit/x86/SharedICHelpers-x86-inl.h
+++ b/js/src/jit/x86/SharedICHelpers-x86-inl.h
@@ -25,32 +25,32 @@ EmitBaselineTailCallVM(TrampolinePtr tar
     masm.subl(BaselineStackReg, eax);
 
     // Store frame size without VMFunction arguments for GC marking.
     masm.movl(eax, ebx);
     masm.subl(Imm32(argSize), ebx);
     masm.store32(ebx, Address(BaselineFrameReg, BaselineFrame::reverseOffsetOfFrameSize()));
 
     // Push frame descriptor and perform the tail call.
-    masm.makeFrameDescriptor(eax, JitFrame_BaselineJS, ExitFrameLayout::Size());
+    masm.makeFrameDescriptor(eax, FrameType::BaselineJS, ExitFrameLayout::Size());
     masm.push(eax);
     masm.push(ICTailCallReg);
     masm.jump(target);
 }
 
 inline void
 EmitBaselineCreateStubFrameDescriptor(MacroAssembler& masm, Register reg, uint32_t headerSize)
 {
     // Compute stub frame size. We have to add two pointers: the stub reg and previous
     // frame pointer pushed by EmitEnterStubFrame.
     masm.movl(BaselineFrameReg, reg);
     masm.addl(Imm32(sizeof(void*) * 2), reg);
     masm.subl(BaselineStackReg, reg);
 
-    masm.makeFrameDescriptor(reg, JitFrame_BaselineStub, headerSize);
+    masm.makeFrameDescriptor(reg, FrameType::BaselineStub, headerSize);
 }
 
 inline void
 EmitBaselineCallVM(TrampolinePtr target, MacroAssembler& masm)
 {
     EmitBaselineCreateStubFrameDescriptor(masm, eax, ExitFrameLayout::Size());
     masm.push(eax);
     masm.call(target);
@@ -84,17 +84,17 @@ EmitBaselineEnterStubFrame(MacroAssemble
 
     // Note: when making changes here,  don't forget to update STUB_FRAME_SIZE
     // if needed.
 
     // Push the return address that's currently on top of the stack.
     masm.Push(Operand(BaselineStackReg, 0));
 
     // Replace the original return address with the frame descriptor.
-    masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, BaselineStubFrameLayout::Size());
+    masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, BaselineStubFrameLayout::Size());
     masm.storePtr(scratch, Address(BaselineStackReg, sizeof(uintptr_t)));
 
     // Save old frame pointer, stack pointer and stub reg.
     masm.Push(ICStubReg);
     masm.Push(BaselineFrameReg);
     masm.mov(BaselineStackReg, BaselineFrameReg);
 }
 
--- a/js/src/jit/x86/Trampoline-x86.cpp
+++ b/js/src/jit/x86/Trampoline-x86.cpp
@@ -152,17 +152,17 @@ JitRuntime::generateEnterJIT(JSContext* 
     // This address is also used for setting the constructing bit on all paths.
     masm.loadPtr(Address(ebp, ARG_STACKFRAME), OsrFrameReg);
 
     /*****************************************************************
     Push the number of bytes we've pushed so far on the stack and call
     *****************************************************************/
     // Create a frame descriptor.
     masm.subl(esp, esi);
-    masm.makeFrameDescriptor(esi, JitFrame_CppToJSJit, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(esi, FrameType::CppToJSJit, JitFrameLayout::Size());
     masm.push(esi);
 
     CodeLabel returnLabel;
     CodeLabel oomReturnLabel;
     {
         // Handle Interpreter -> Baseline OSR.
         AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
         regs.take(JSReturnOperand);
@@ -216,17 +216,17 @@ JitRuntime::generateEnterJIT(JSContext* 
 
         // Reserve space for locals and stack values.
         masm.mov(numStackValues, scratch);
         masm.shll(Imm32(3), scratch);
         masm.subPtr(scratch, esp);
 
         // Enter exit frame.
         masm.addPtr(Imm32(BaselineFrame::Size() + BaselineFrame::FramePointerOffset), scratch);
-        masm.makeFrameDescriptor(scratch, JitFrame_BaselineJS, ExitFrameLayout::Size());
+        masm.makeFrameDescriptor(scratch, FrameType::BaselineJS, ExitFrameLayout::Size());
         masm.push(scratch); // Fake return address.
         masm.push(Imm32(0));
         // No GC things to mark on the stack, push a bare token.
         masm.loadJSContext(scratch);
         masm.enterFakeExitFrame(scratch, scratch, ExitFrameType::Bare);
 
         masm.push(framePtr);
         masm.push(jitcode);
@@ -489,17 +489,17 @@ JitRuntime::generateArgumentsRectifier(M
         masm.storeValue(newTarget, dst);
 
         masm.bind(&notConstructing);
     }
 
     // Construct descriptor, accounting for pushed frame pointer above
     masm.lea(Operand(FramePointer, sizeof(void*)), ebx);
     masm.subl(esp, ebx);
-    masm.makeFrameDescriptor(ebx, JitFrame_Rectifier, JitFrameLayout::Size());
+    masm.makeFrameDescriptor(ebx, FrameType::Rectifier, JitFrameLayout::Size());
 
     // Construct JitFrameLayout.
     masm.push(edx); // number of actual arguments
     masm.push(eax); // callee token
     masm.push(ebx); // descriptor
 
     // Call the target function.
     masm.andl(Imm32(CalleeTokenMask), eax);
@@ -1029,30 +1029,30 @@ JitRuntime::generateProfilerExitFrameTai
     // Handling of each case is dependent on FrameDescriptor.type
     Label handle_IonJS;
     Label handle_BaselineStub;
     Label handle_Rectifier;
     Label handle_IonICCall;
     Label handle_Entry;
     Label end;
 
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineJS), &handle_IonJS);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_BaselineStub), &handle_BaselineStub);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_Rectifier), &handle_Rectifier);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_IonICCall), &handle_IonICCall);
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_CppToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineJS), &handle_IonJS);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::BaselineStub), &handle_BaselineStub);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::Rectifier), &handle_Rectifier);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::IonICCall), &handle_IonICCall);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::CppToJSJit), &handle_Entry);
 
     // The WasmToJSJit is just another kind of entry.
-    masm.branch32(Assembler::Equal, scratch2, Imm32(JitFrame_WasmToJSJit), &handle_Entry);
+    masm.branch32(Assembler::Equal, scratch2, Imm32(FrameType::WasmToJSJit), &handle_Entry);
 
     masm.assumeUnreachable("Invalid caller frame type when exiting from Ion frame.");
 
     //
-    // JitFrame_IonJS
+    // FrameType::IonJS
     //
     // Stack layout:
     //                  ...
     //                  Ion-Descriptor
     //     Prev-FP ---> Ion-ReturnAddr
     //                  ... previous frame data ... |- Descriptor.Size
     //                  ... arguments ...           |
     //                  ActualArgc          |
@@ -1072,17 +1072,17 @@ JitRuntime::generateProfilerExitFrameTai
         // Store return frame in lastProfilingFrame.
         // scratch2 := StackPointer + Descriptor.size*1 + JitFrameLayout::Size();
         masm.lea(Operand(StackPointer, scratch1, TimesOne, JitFrameLayout::Size()), scratch2);
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_BaselineStub
+    // FrameType::BaselineStub
     //
     // Look past the stub and store the frame pointer to
     // the baselineJS frame prior to it.
     //
     // Stack layout:
     //              ...
     //              BL-Descriptor
     // Prev-FP ---> BL-ReturnAddr
@@ -1115,17 +1115,17 @@ JitRuntime::generateProfilerExitFrameTai
         masm.loadPtr(stubFrameSavedFramePtr, scratch2);
         masm.addPtr(Imm32(sizeof(void*)), scratch2); // Skip past BL-PrevFramePtr
         masm.storePtr(scratch2, lastProfilingFrame);
         masm.ret();
     }
 
 
     //
-    // JitFrame_Rectifier
+    // FrameType::Rectifier
     //
     // The rectifier frame can be preceded by either an IonJS, a BaselineStub,
     // or a CppToJSJit/WasmToJSJit frame.
     //
     // Stack layout if caller of rectifier was Ion or CppToJSJit/WasmToJSJit:
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
@@ -1169,50 +1169,50 @@ JitRuntime::generateProfilerExitFrameTai
         // Now |scratch1| contains Rect-Descriptor.Size
         // and |scratch2| points to Rectifier frame
         // and |scratch3| contains Rect-Descriptor.Type
 
         masm.assertRectifierFrameParentType(scratch3);
 
         // Check for either Ion or BaselineStub frame.
         Label notIonFrame;
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_IonJS), &notIonFrame);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::IonJS), &notIonFrame);
 
         // Handle Rectifier <- IonJS
         // scratch3 := RectFrame[ReturnAddr]
         masm.loadPtr(Address(scratch2, RectifierFrameLayout::offsetOfReturnAddress()), scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         // scratch3 := RectFrame + Rect-Descriptor.Size + RectifierFrameLayout::Size()
         masm.lea(Operand(scratch2, scratch1, TimesOne, RectifierFrameLayout::Size()), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
 
         masm.bind(&notIonFrame);
 
         // Check for either BaselineStub or a CppToJSJit/WasmToJSJit entry
         // frame.
-        masm.branch32(Assembler::NotEqual, scratch3, Imm32(JitFrame_BaselineStub), &handle_Entry);
+        masm.branch32(Assembler::NotEqual, scratch3, Imm32(FrameType::BaselineStub), &handle_Entry);
 
         // Handle Rectifier <- BaselineStub <- BaselineJS
         BaseIndex stubFrameReturnAddr(scratch2, scratch1, TimesOne,
                                          RectifierFrameLayout::Size() +
                                          BaselineStubFrameLayout::offsetOfReturnAddress());
         masm.loadPtr(stubFrameReturnAddr, scratch3);
         masm.storePtr(scratch3, lastProfilingCallSite);
 
         BaseIndex stubFrameSavedFramePtr(scratch2, scratch1, TimesOne,
                                          RectifierFrameLayout::Size() - (2 * sizeof(void*)));
         masm.loadPtr(stubFrameSavedFramePtr, scratch3);
         masm.addPtr(Imm32(sizeof(void*)), scratch3);
         masm.storePtr(scratch3, lastProfilingFrame);
         masm.ret();
     }
 
-    // JitFrame_IonICCall
+    // FrameType::IonICCall
     //
     // The caller is always an IonJS frame.
     //
     //              Ion-Descriptor
     //              Ion-ReturnAddr
     //              ... ion frame data ... |- CallFrame-Descriptor.Size
     //              StubCode               |
     //              ICCallFrame-Descriptor |- IonICCallFrameLayout::Size()
@@ -1230,17 +1230,17 @@ JitRuntime::generateProfilerExitFrameTai
         // scratch3 := ICCallFrame-Descriptor.Size
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfDescriptor()), scratch3);
 #ifdef DEBUG
         // Assert previous frame is an IonJS frame.
         masm.movePtr(scratch3, scratch1);
         masm.and32(Imm32((1 << FRAMETYPE_BITS) - 1), scratch1);
         {
             Label checkOk;
-            masm.branch32(Assembler::Equal, scratch1, Imm32(JitFrame_IonJS), &checkOk);
+            masm.branch32(Assembler::Equal, scratch1, Imm32(FrameType::IonJS), &checkOk);
             masm.assumeUnreachable("IonICCall frame must be preceded by IonJS frame");
             masm.bind(&checkOk);
         }
 #endif
         masm.rshiftPtr(Imm32(FRAMESIZE_SHIFT), scratch3);
 
         // lastProfilingCallSite := ICCallFrame-ReturnAddr
         masm.loadPtr(Address(scratch2, IonICCallFrameLayout::offsetOfReturnAddress()), scratch1);
@@ -1249,17 +1249,17 @@ JitRuntime::generateProfilerExitFrameTai
         // lastProfilingFrame := ICCallFrame + ICCallFrame-Descriptor.Size +
         //                       IonICCallFrameLayout::Size()
         masm.lea(Operand(scratch2, scratch3, TimesOne, IonICCallFrameLayout::Size()), scratch1);
         masm.storePtr(scratch1, lastProfilingFrame);
         masm.ret();
     }
 
     //
-    // JitFrame_CppToJSJit / JitFrame_WasmToJSJit
+    // FrameType::CppToJSJit / FrameType::WasmToJSJit
     //
     // If at an entry frame, store null into both fields.
     // A fast-path wasm->jit transition frame is an entry frame from the point
     // of view of the JIT.
     //
     masm.bind(&handle_Entry);
     {
         masm.movePtr(ImmPtr(nullptr), scratch1);
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -2620,20 +2620,20 @@ UpdateExecutionObservabilityOfScriptsInZ
     // get discarded. They will be recompiled.
     for (JitActivationIterator actIter(cx); !actIter.done(); ++actIter) {
         if (actIter->compartment()->zone() != zone)
             continue;
 
         for (OnlyJSJitFrameIter iter(actIter); !iter.done(); ++iter) {
             const jit::JSJitFrameIter& frame = iter.frame();
             switch (frame.type()) {
-              case JitFrame_BaselineJS:
+              case FrameType::BaselineJS:
                 MarkBaselineScriptActiveIfObservable(frame.script(), obs);
                 break;
-              case JitFrame_IonJS:
+              case FrameType::IonJS:
                 MarkBaselineScriptActiveIfObservable(frame.script(), obs);
                 for (InlineFrameIterator inlineIter(cx, &frame); inlineIter.more(); ++inlineIter)
                     MarkBaselineScriptActiveIfObservable(inlineIter.script(), obs);
                 break;
               default:;
             }
         }
     }
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -565,17 +565,17 @@ JitFrameIter::done() const
     MOZ_CRASH("unhandled case");
 }
 
 void
 JitFrameIter::settle()
 {
     if (isJSJit()) {
         const jit::JSJitFrameIter& jitFrame = asJSJit();
-        if (jitFrame.type() != jit::JitFrame_WasmToJSJit)
+        if (jitFrame.type() != jit::FrameType::WasmToJSJit)
             return;
 
         // Transition from js jit frames to wasm frames: we're on the
         // wasm-to-jit fast path. The current stack layout is as follows:
         // (stack grows downward)
         //
         // [--------------------]
         // [WASM FUNC           ]
@@ -1908,17 +1908,18 @@ JS::ProfilingFrameIterator::operator++()
         ++jsJitIter();
     settle();
 }
 
 void
 JS::ProfilingFrameIterator::settleFrames()
 {
     // Handle transition frames (see comment in JitFrameIter::operator++).
-    if (isJSJit() && !jsJitIter().done() && jsJitIter().frameType() == jit::JitFrame_WasmToJSJit) {
+    if (isJSJit() && !jsJitIter().done() && jsJitIter().frameType() == jit::FrameType::WasmToJSJit)
+    {
         wasm::Frame* fp = (wasm::Frame*) jsJitIter().fp();
         iteratorDestroy();
         new (storage()) wasm::ProfilingFrameIterator(*activation_->asJit(), fp);
         kind_ = Kind::Wasm;
         MOZ_ASSERT(!wasmIter().done());
         return;
     }
 
--- a/js/src/wasm/WasmFrameIter.cpp
+++ b/js/src/wasm/WasmFrameIter.cpp
@@ -127,17 +127,17 @@ WasmFrameIter::popFrame()
         //
         // fp_ points to the fake exit frame set up by the jit caller, and the
         // return-address-to-fp is in JIT code, thus doesn't belong to any wasm
         // instance's code (in particular, there's no associated CodeRange).
         // Mark the frame as such and untag FP.
         MOZ_ASSERT(!LookupCode(prevFP->returnAddress));
 
         unwoundIonCallerFP_ = (uint8_t*)(uintptr_t(fp_) & ~uintptr_t(ExitOrJitEntryFPTag));
-        unwoundIonFrameType_ = JitFrame_Exit;
+        unwoundIonFrameType_ = FrameType::Exit;
 
         fp_ = nullptr;
         code_ = nullptr;
         codeRange_ = nullptr;
 
         if (unwind_ == Unwind::True) {
             activation_->setJSExitFP(unwoundIonCallerFP_);
             unwoundAddressOfReturnAddress_ = &prevFP->returnAddress;
@@ -176,17 +176,17 @@ WasmFrameIter::popFrame()
         // |  JSJIT TO WASM EXIT | <-- fp_
         // |    WASM JIT ENTRY   | <-- prevFP (already unwound)
         // |      WASM FRAME     | (already unwound)
         // |---------------------|
         //
         // The next value of FP is just a regular jit frame used marked to
         // know that we should transition to a JSJit frame iterator.
         unwoundIonCallerFP_ = (uint8_t*) fp_;
-        unwoundIonFrameType_ = JitFrame_JSJitToWasm;
+        unwoundIonFrameType_ = FrameType::JSJitToWasm;
 
         fp_ = nullptr;
         code_ = nullptr;
         codeRange_ = nullptr;
 
         if (unwind_ == Unwind::True) {
             activation_->setJSExitFP(unwoundIonCallerFP_);
             unwoundAddressOfReturnAddress_ = &prevFP->returnAddress;
--- a/js/src/wasm/WasmFrameIter.h
+++ b/js/src/wasm/WasmFrameIter.h
@@ -14,27 +14,27 @@
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
 
 #ifndef wasm_frame_iter_h
 #define wasm_frame_iter_h
 
-#include "jit/JSJitFrameIter.h"
 #include "js/ProfilingFrameIterator.h"
 #include "js/TypeDecls.h"
 #include "wasm/WasmTypes.h"
 
 namespace js {
 
 namespace jit {
 class MacroAssembler;
 struct Register;
 class Label;
+enum class FrameType;
 } // namespace jit
 
 namespace wasm {
 
 class Code;
 class CodeRange;
 class DebugFrame;
 class FuncTypeIdDesc;
--- a/js/src/wasm/WasmStubs.cpp
+++ b/js/src/wasm/WasmStubs.cpp
@@ -1368,17 +1368,17 @@ GenerateImportJitExit(MacroAssembler& ma
 #else
     const unsigned frameAlignExtra = 0;
 #endif
 
     GenerateJitExitPrologue(masm, jitFramePushed + frameAlignExtra, offsets);
 
     // 1. Descriptor
     size_t argOffset = frameAlignExtra;
-    uint32_t descriptor = MakeFrameDescriptor(sizeOfThisAndArgsAndPadding, JitFrame_WasmToJSJit,
+    uint32_t descriptor = MakeFrameDescriptor(sizeOfThisAndArgsAndPadding, FrameType::WasmToJSJit,
                                               WasmToJSJitFrameLayout::Size());
     masm.storePtr(ImmWord(uintptr_t(descriptor)), Address(masm.getStackPointer(), argOffset));
     argOffset += sizeof(size_t);
 
     // 2. Callee
     Register callee = ABINonArgReturnReg0;   // live until call
     Register scratch = ABINonArgReturnReg1;  // repeatedly clobbered
 
new file mode 100644
--- /dev/null
+++ b/layout/generic/crashtests/1486457.html
@@ -0,0 +1,19 @@
+<style>
+* 	{ display: ruby-text-container }
+div { float: right }
+</style>
+<script>
+function start() {
+    try { o1 = document.createElement('div') } catch (e) {}
+    try { o2 = document.createElement('img') } catch (e) {}
+    try { o3 = document.createElement('img') } catch (e) {}
+    try { o4 = document.createElement('img') } catch (e) {}
+    try { o3.innerText = '%\n' } catch (e) {}
+    try { o4.align = 'right' } catch (e) {}
+    try { o3.appendChild(o4) } catch (e) {}
+    try { o2.appendChild(o3) } catch (e) {}
+    try { document.documentElement.appendChild(o1) } catch (e) {}
+    try { document.documentElement.appendChild(o2) } catch (e) {}
+}
+window.addEventListener('load', start)
+</script>
--- a/layout/generic/crashtests/crashtests.list
+++ b/layout/generic/crashtests/crashtests.list
@@ -700,8 +700,9 @@ load 1460158-2.html
 load 1460158-3.html
 load 1461039.html
 load 1461979-1.html
 load 1467239.html
 load 1472403.html
 load 1474768.html
 load 1478178.html
 load 1483972.html
+load 1486457.html
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -3957,17 +3957,17 @@ nsBlockFrame::ReflowInlineFrames(BlockRe
               lineLayout.GetLastOptionalBreakPosition(&forceBreakOffset, &forceBreakPriority);
           } else {
             forceBreakInFrame = nullptr;
           }
           // restore the float manager state
           aState.FloatManager()->PopState(&floatManagerState);
           // Clear out float lists
           aState.mCurrentLineFloats.DeleteAll();
-          MOZ_ASSERT(aState.mNoWrapFloats.IsEmpty());
+          aState.mNoWrapFloats.Clear();
           aState.mBelowCurrentLineFloats.DeleteAll();
         }
 
         // Don't allow pullup on a subsequent LineReflowStatus::RedoNoPull pass
         allowPullUp = false;
       } while (LineReflowStatus::RedoNoPull == lineReflowStatus);
     } while (LineReflowStatus::RedoMoreFloats == lineReflowStatus);
   } while (LineReflowStatus::RedoNextBand == lineReflowStatus);
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -268,17 +268,17 @@ android.libraryVariants.all { variant ->
 android.libraryVariants.all { variant ->
     configureLibraryVariantWithJNIWrappers(variant, "Generated")
 }
 
 apply plugin: 'maven'
 
 uploadArchives {
     repositories.mavenDeployer {
-        pom.groupId = 'org.mozilla'
+        pom.groupId = 'org.mozilla.geckoview'
         pom.artifactId = "geckoview-${mozconfig.substs.MOZ_UPDATE_CHANNEL}-${mozconfig.substs.ANDROID_CPU_ARCH}"
 
         if (mozconfig.substs.RELEASE_OR_BETA == 'true') {
             pom.version = mozconfig.substs.MOZ_APP_VERSION
         } else {
             pom.version = getAppVersionWithoutMilestone() + "." + getBuildId()
         }
 
--- a/netwerk/protocol/http/AlternateServices.cpp
+++ b/netwerk/protocol/http/AlternateServices.cpp
@@ -764,23 +764,28 @@ TransactionObserver::OnStartRequest(nsIR
   return NS_OK;
 }
 
 NS_IMETHODIMP
 TransactionObserver::OnDataAvailable(nsIRequest *aRequest, nsISupports *aContext,
                                      nsIInputStream *aStream, uint64_t aOffset, uint32_t aCount)
 {
   MOZ_ASSERT(NS_IsMainThread());
-  uint64_t newLen = aCount + mWKResponse.Length();
+  uint32_t oldLen = mWKResponse.Length();
+  uint64_t newLen = aCount + oldLen;
   if (newLen < MAX_WK) {
-    char *startByte =  reinterpret_cast<char *>(mWKResponse.BeginWriting()) + mWKResponse.Length();
+    nsresult rv;
+    auto handle = mWKResponse.BulkWrite(newLen, oldLen, false, rv);
+    if (NS_FAILED(rv)) {
+      return rv;
+    }
     uint32_t amtRead;
-    if (NS_SUCCEEDED(aStream->Read(startByte, aCount, &amtRead))) {
-      MOZ_ASSERT(mWKResponse.Length() + amtRead < MAX_WK);
-      mWKResponse.SetLength(mWKResponse.Length() + amtRead);
+    if (NS_SUCCEEDED(aStream->Read(handle.Elements() + oldLen, aCount, &amtRead))) {
+      MOZ_ASSERT(oldLen + amtRead <= newLen);
+      handle.Finish(oldLen + amtRead, false);
       LOG(("TransactionObserver onDataAvailable %p read %d of .wk [%d]\n",
            this, amtRead, mWKResponse.Length()));
     } else {
       LOG(("TransactionObserver onDataAvailable %p read error\n", this));
     }
   }
   return NS_OK;
 }
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1967,22 +1967,30 @@ class StaticAnalysis(MachCommandBase):
         self._clang_tidy_checks = [c.strip() for c in available_checks if c]
 
         # Build the dummy compile_commands.json
         self._compilation_commands_path = self._create_temp_compilation_db(config)
 
         with concurrent.futures.ThreadPoolExecutor(max_workers=max_workers) as executor:
             futures = []
             for item in config['clang_checkers']:
-                # Do not test mozilla specific checks nor the default '-*'
-                if not (item['publish'] and ('restricted-platforms' in item
-                                             and platform not in item['restricted-platforms']
-                                             or 'restricted-platforms' not in item)
-                        and item['name'] not in ['mozilla-*', '-*'] and
-                        (checker_names == [] or item['name'] in checker_names)):
+                # Skip if any of the following statements is true:
+                # 1. Checker attribute 'publish' is False.
+                not_published = not bool(item.get('publish', True))
+                # 2. Checker has restricted-platforms and current platform is not of them.
+                ignored_platform = 'restricted-platforms' in item and platform not in item['restricted-platforms']
+                # 3. Checker name is mozilla-* or -*.
+                ignored_checker = item['name'] in ['mozilla-*', '-*']
+                # 4. List checker_names is passed and the current checker is not part of the
+                #    list or 'publish' is False
+                checker_not_in_list = checker_names and (item['name'] not in checker_names or not_published)
+                if not_published or \
+                   ignored_platform or \
+                   ignored_checker or \
+                   checker_not_in_list:
                     continue
                 futures.append(executor.submit(self._verify_checker, item))
 
             for future in concurrent.futures.as_completed(futures):
                 ret_val = future.result()
                 if ret_val != self.TOOLS_SUCCESS:
                     # Also delete the tmp folder
                     shutil.rmtree(self._compilation_commands_path)
@@ -2184,17 +2192,17 @@ class StaticAnalysis(MachCommandBase):
 
     def _get_checks(self):
         checks = '-*'
         import yaml
         with open(mozpath.join(self.topsrcdir, "tools", "clang-tidy", "config.yaml")) as f:
             try:
                 config = yaml.safe_load(f)
                 for item in config['clang_checkers']:
-                    if item['publish']:
+                    if item.get('publish', True):
                         checks += ',' + item['name']
             except Exception:
                 print('Looks like config.yaml is not valid, so we are unable to '
                       'determine default checkers, using \'-checks=-*,mozilla-*\'')
                 checks += ',mozilla-*'
         return checks
 
     def _get_config_environment(self):
--- a/taskcluster/ci/push-apk/kind.yml
+++ b/taskcluster/ci/push-apk/kind.yml
@@ -6,17 +6,16 @@ loader: taskgraph.loader.push_apk:loader
 
 transforms:
    - taskgraph.transforms.push_apk:transforms
    - taskgraph.transforms.task:transforms
 
 kind-dependencies:
    - build-signing
    - google-play-strings
-   - beetmover-checksums
 
 jobs:
    push-apk/opt:
       description: Publishes APK onto Google Play Store
       attributes:
          build_platform: android-nightly
          nightly: true
       shipping-phase: ship
--- a/taskcluster/taskgraph/transforms/beetmover_geckoview.py
+++ b/taskcluster/taskgraph/transforms/beetmover_geckoview.py
@@ -23,16 +23,17 @@ from voluptuous import Required, Optiona
     'android-api-16': 'geckoview{update_channel}-armeabi-v7a',
     'android-x86': 'geckoview{update_channel}-x86',
 }
 
 _MOZ_UPDATE_CHANNEL_PER_BRANCH = {
     'mozilla-release': '',
     'mozilla-beta': '-beta',
     'mozilla-central': '-nightly',
+    'try': '-nightly-try',
     'maple': '-nightly-maple',
 }
 
 task_description_schema = {str(k): v for k, v in task_description_schema.schema.iteritems()}
 
 transforms = TransformSequence()
 
 beetmover_description_schema = Schema({
--- a/taskcluster/taskgraph/transforms/push_apk.py
+++ b/taskcluster/taskgraph/transforms/push_apk.py
@@ -133,17 +133,17 @@ def generate_dependencies(dependent_task
 
 def generate_upstream_artifacts(job, dependencies):
     artifact_prefix = get_artifact_prefix(job)
     apks = [{
         'taskId': {'task-reference': '<{}>'.format(task_kind)},
         'taskType': 'signing',
         'paths': ['{}/target.apk'.format(artifact_prefix)],
     } for task_kind in dependencies.keys()
-      if task_kind not in ('google-play-strings', 'beetmover-checksums')
+      if 'google-play-strings' not in task_kind
     ]
 
     google_play_strings = [{
         'taskId': {'task-reference': '<{}>'.format(task_kind)},
         'taskType': 'build',
         'paths': ['public/google_play_strings.json'],
         'optional': True,
     } for task_kind in dependencies.keys()
--- a/testing/marionette/reftest.js
+++ b/testing/marionette/reftest.js
@@ -254,17 +254,17 @@ min-width: 600px; min-height: 600px; max
       if (this.screenshotMode === SCREENSHOT_MODE.always) {
         recordScreenshot();
       }
 
       if (comparison.passed) {
         if (references.length) {
           for (let i = references.length - 1; i >= 0; i--) {
             let item = references[i];
-            stack.push([testUrl, item[0], item[1], item[2]]);
+            stack.push([rhsUrl, item[0], item[1], item[2]]);
           }
         } else {
           // Reached a leaf node so all of one reference chain passed
           status = STATUS.PASS;
           if (this.screenshotMode <= SCREENSHOT_MODE.fail &&
               expected != status) {
             recordScreenshot();
           }
--- a/testing/web-platform/meta/MANIFEST.json
+++ b/testing/web-platform/meta/MANIFEST.json
@@ -185246,16 +185246,28 @@
       [
        "/infrastructure/reftest/reftest_and_fail_0-ref.html",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "infrastructure/reftest/reftest_and_mismatch.html": [
+    [
+     "/infrastructure/reftest/reftest_and_mismatch.html",
+     [
+      [
+       "/infrastructure/reftest/reftest_and_mismatch_0.html",
+       "!="
+      ]
+     ],
+     {}
+    ]
+   ],
    "infrastructure/reftest/reftest_match.html": [
     [
      "/infrastructure/reftest/reftest_match.html",
      [
       [
        "/infrastructure/reftest/green.html",
        "=="
       ]
@@ -190616,16 +190628,28 @@
       [
        "/infrastructure/reftest/red.html",
        "=="
       ]
      ],
      {}
     ]
    ],
+   "infrastructure/reftest/reftest_and_mismatch_0.html": [
+    [
+     "/infrastructure/reftest/reftest_and_mismatch_0.html",
+     [
+      [
+       "/infrastructure/reftest/reftest_and_mismatch_1.html",
+       "!="
+      ]
+     ],
+     {}
+    ]
+   ],
    "infrastructure/reftest/reftest_cycle.html": [
     [
      "/infrastructure/reftest/reftest_cycle.html",
      [
       [
        "/infrastructure/reftest/reftest_cycle_0-ref.html",
        "=="
       ]
@@ -289595,16 +289619,21 @@
      {}
     ]
    ],
    "infrastructure/reftest/red.html": [
     [
      {}
     ]
    ],
+   "infrastructure/reftest/reftest_and_mismatch_1.html": [
+    [
+     {}
+    ]
+   ],
    "infrastructure/reftest/reftest_ref_timeout-ref.html": [
     [
      {}
     ]
    ],
    "infrastructure/server/resources/expect-global.js": [
     [
      {}
@@ -607813,16 +607842,28 @@
   "infrastructure/reftest/reftest_and_fail.html": [
    "2960195356238f03543207e9e6a3599361daeb91",
    "reftest"
   ],
   "infrastructure/reftest/reftest_and_fail_0-ref.html": [
    "04fb9aa15176e6191ded5eccf442fcfd6cdcf566",
    "reftest_node"
   ],
+  "infrastructure/reftest/reftest_and_mismatch.html": [
+   "b6b4847473dd548209de63e6f1f24a213411caf6",
+   "reftest"
+  ],
+  "infrastructure/reftest/reftest_and_mismatch_0.html": [
+   "f84ce6a13aa3dc9909405bb01eaccd820523f0ab",
+   "reftest_node"
+  ],
+  "infrastructure/reftest/reftest_and_mismatch_1.html": [
+   "05e905adafc06405b4f824ae720305735277790d",
+   "support"
+  ],
   "infrastructure/reftest/reftest_cycle.html": [
    "4a84a3b6741ee41fe6187a9bdc766d749206c83a",
    "reftest_node"
   ],
   "infrastructure/reftest/reftest_cycle_0-ref.html": [
    "118bfd88447b48212af29e54861bb6d509a5e1b1",
    "reftest_node"
   ],
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/astral-bidi/adlam-anti-ref.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[adlam-anti-ref.html]
-  expected: FAIL
deleted file mode 100644
--- a/testing/web-platform/meta/css/css-text/astral-bidi/cypriot-anti-ref.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[cypriot-anti-ref.html]
-  expected: FAIL
--- a/testing/web-platform/meta/infrastructure/reftest/reftest_match.html.ini
+++ b/testing/web-platform/meta/infrastructure/reftest/reftest_match.html.ini
@@ -1,6 +1,3 @@
 [reftest_match.html]
   disabled:
     if verify and (os == "mac"): fails in verify mode
-  expected:
-    if debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
-    if not debug and not webrender and e10s and (os == "mac") and (version == "OS X 10.10.5") and (processor == "x86_64") and (bits == 64): FAIL
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/infrastructure/reftest/reftest_and_mismatch.html
@@ -0,0 +1,5 @@
+<title>Reftest chain with mismatch and mismatch</title>
+<link rel=mismatch href=reftest_and_mismatch_0.html>
+<style>
+:root {background-color:green}
+</style>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/infrastructure/reftest/reftest_and_mismatch_0.html
@@ -0,0 +1,5 @@
+<title>Reftest chain with mismatch and mismatch</title>
+<link rel=mismatch href=reftest_and_mismatch_1.html>
+<style>
+:root {background-color:blue}
+</style>
new file mode 100644
--- /dev/null
+++ b/testing/web-platform/tests/infrastructure/reftest/reftest_and_mismatch_1.html
@@ -0,0 +1,4 @@
+<title>Reftest chain with match and mismatch</title>
+<style>
+:root {background-color:green}
+</style>
new file mode 100644
--- /dev/null
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_contentscript_about_blank_start.js
@@ -0,0 +1,69 @@
+"use strict";
+
+const server = createHttpServer({hosts: ["example.com"]});
+
+server.registerPathHandler("/blank-iframe.html", (request, response) => {
+  response.setStatusLine(request.httpVersion, 200, "OK");
+  response.setHeader("Content-Type", "text/html; charset=utf-8", false);
+  response.write("<iframe></iframe>");
+});
+
+add_task(async function content_script_at_document_start() {
+  let extensionData = {
+    manifest: {
+      content_scripts: [{
+        "matches": ["<all_urls>"],
+        "js": ["start.js"],
+        "run_at": "document_start",
+        "match_about_blank": true,
+      }],
+    },
+
+    files: {
+      "start.js": function() {
+        browser.test.sendMessage("content-script-done");
+      },
+    },
+  };
+
+  let extension = ExtensionTestUtils.loadExtension(extensionData);
+  await extension.startup();
+  let contentPage = await ExtensionTestUtils.loadContentPage(`about:blank`);
+  await extension.awaitMessage("content-script-done");
+  await contentPage.close();
+  await extension.unload();
+});
+
+add_task(async function content_style_at_document_start() {
+  let extensionData = {
+    manifest: {
+      content_scripts: [{
+        "matches": ["<all_urls>"],
+        "css": ["start.css"],
+        "run_at": "document_start",
+        "match_about_blank": true,
+      }, {
+        "matches": ["<all_urls>"],
+        "js": ["end.js"],
+        "run_at": "document_end",
+        "match_about_blank": true,
+      }],
+    },
+
+    files: {
+      "start.css": "body { background: red; }",
+      "end.js": function() {
+        let style = window.getComputedStyle(document.body);
+        browser.test.assertEq("rgb(255, 0, 0)", style.backgroundColor, "document_start style should have been applied");
+        browser.test.sendMessage("content-script-done");
+      },
+    },
+  };
+
+  let extension = ExtensionTestUtils.loadExtension(extensionData);
+  await extension.startup();
+  let contentPage = await ExtensionTestUtils.loadContentPage(`about:blank`);
+  await extension.awaitMessage("content-script-done");
+  await contentPage.close();
+  await extension.unload();
+});
--- a/toolkit/components/extensions/test/xpcshell/xpcshell-content.ini
+++ b/toolkit/components/extensions/test/xpcshell/xpcshell-content.ini
@@ -1,13 +1,13 @@
 [test_ext_i18n.js]
 skip-if = os == "android" || (os == "win" && debug) || (os == "linux")
 [test_ext_i18n_css.js]
 [test_ext_contentscript.js]
+[test_ext_contentscript_about_blank_start.js]
 [test_ext_contentscript_scriptCreated.js]
-skip-if = debug # Bug 1407501
 [test_ext_contentscript_triggeringPrincipal.js]
 skip-if = (os == "android" && debug) || (os == "win" && debug) # Windows: Bug 1438796
 [test_ext_contentscript_xrays.js]
 [test_ext_contentScripts_register.js]
 [test_ext_contexts_gc.js]
 [test_ext_adoption_with_xrays.js]
 [test_ext_shadowdom.js]
--- a/toolkit/components/telemetry/docs/collection/use-counters.rst
+++ b/toolkit/components/telemetry/docs/collection/use-counters.rst
@@ -44,17 +44,17 @@ 3. one of four possible use counter decl
 
   * ``method <IDL interface name>.<IDL operation name>``
   * ``attribute <IDL interface name>.<IDL attribute name>``
   * ``property <CSS property method name>``
   * ``custom <any valid identifier> <description>``
 
 CSS properties
 ~~~~~~~~~~~~~~
-The CSS property method name should be identical to the ``method`` argument of ``CSS_PROP()`` and related macros. The only differences are that all hyphens are removed and CamelCase naming is used.  See `nsCSSPropList.h <https://dxr.mozilla.org/mozilla-central/source/layout/style/nsCSSPropList.h>`_ for further details.
+The CSS property method name should be identical to the ``method`` argument of ``CSS_PROP()`` and related macros. The only differences are that all hyphens are removed and CamelCase naming is used.  See `ServoCSSPropList.h <https://searchfox.org/mozilla-central/source/__GENERATED__/layout/style/ServoCSSPropList.h>`_ for further details.
 
 Custom use counters
 ~~~~~~~~~~~~~~~~~~~
 The <description> for custom counters will be appended to "When a document " or "When a page ", so phrase it appropriately.  For instance, "constructs a Foo object" or "calls Document.bar('some value')".  It may contain any character (including whitespace).  Custom counters are incremented when SetDocumentAndPageUseCounter(eUseCounter_custom_MyName) is called on an ns(I)Document object.
 
 WebIDL methods and attributes
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Additionally to having a new entry added to the `UseCounters.conf <https://dxr.mozilla.org/mozilla-central/source/dom/base/UseCounters.conf>`_ file, WebIDL methods and attributes must have a ``[UseCounter]`` extended attribute in the Web IDL file in order for the counters to be incremented.
--- a/tools/clang-tidy/config.yaml
+++ b/tools/clang-tidy/config.yaml
@@ -7,132 +7,81 @@ platforms:
   - macosx64
   - linux64
   - win64
   - win32
 clang_checkers:
   - name: -*
     publish: !!bool no
   - name: bugprone-argument-comment
-    publish: !!bool yes
   - name: bugprone-assert-side-effect
-    publish: !!bool yes
   - name: bugprone-bool-pointer-implicit-conversion
-    publish: !!bool yes
   - name: bugprone-forward-declaration-namespace
-    publish: !!bool yes
   - name: bugprone-macro-repeated-side-effects
-    publish: !!bool yes
   - name: bugprone-string-constructor
-    publish: !!bool yes
   - name: bugprone-string-integer-assignment
-    publish: !!bool yes
   - name: bugprone-suspicious-memset-usage
-    publish: !!bool yes
   - name: bugprone-suspicious-missing-comma
-    publish: !!bool yes
   - name: bugprone-suspicious-semicolon
-    publish: !!bool yes
   - name: bugprone-swapped-arguments
-    publish: !!bool yes
   - name: bugprone-unused-raii
-    publish: !!bool yes
   - name: clang-analyzer-cplusplus.NewDelete
-    publish: !!bool yes
   - name: clang-analyzer-cplusplus.NewDeleteLeaks
-    publish: !!bool yes
   - name: clang-analyzer-deadcode.DeadStores
-    publish: !!bool yes
   - name: clang-analyzer-security.FloatLoopCounter
-    publish: !!bool yes
   - name: clang-analyzer-security.insecureAPI.getpw
-    publish: !!bool yes
   # We don't add clang-analyzer-security.insecureAPI.gets here; it's deprecated.
   - name: clang-analyzer-security.insecureAPI.mkstemp
-    publish: !!bool yes
   - name: clang-analyzer-security.insecureAPI.mktemp
-    publish: !!bool yes
   - name: clang-analyzer-security.insecureAPI.rand
     publish: !!bool no
   - name: clang-analyzer-security.insecureAPI.strcpy
     publish: !!bool no
   - name: clang-analyzer-security.insecureAPI.UncheckedReturn
-    publish: !!bool yes
   - name: clang-analyzer-security.insecureAPI.vfork
-    publish: !!bool yes
   - name: clang-analyzer-unix.Malloc
-    publish: !!bool yes
   - name: clang-analyzer-unix.cstring.BadSizeArg
-    publish: !!bool yes
   - name: clang-analyzer-unix.cstring.NullArg
-    publish: !!bool yes
   - name: misc-unused-alias-decls
-    publish: !!bool yes
   - name: misc-unused-using-decls
-    publish: !!bool yes
   - name: modernize-avoid-bind
-    publish: !!bool yes
     restricted-platforms:
       - win32
       - win64
   - name: modernize-loop-convert
-    publish: !!bool yes
   - name: modernize-raw-string-literal
-    publish: !!bool yes
   - name: modernize-redundant-void-arg
     publish: !!bool no
   - name: modernize-shrink-to-fit
-    publish: !!bool yes
   - name: modernize-use-auto
     # Controversial, see bug 1371052.
     publish: !!bool no
   - name: modernize-use-bool-literals
-    publish: !!bool yes
   - name: modernize-use-equals-default
-    publish: !!bool yes
   - name: modernize-use-equals-delete
-    publish: !!bool yes
   - name: modernize-use-nullptr
-    publish: !!bool yes
   - name: modernize-use-override
     # Too noisy because of the way how we implement NS_IMETHOD. See Bug 1420366.
     publish: !!bool no
   - name: mozilla-*
-    publish: !!bool yes
   - name: performance-faster-string-find
-    publish: !!bool yes
   - name: performance-for-range-copy
-    publish: !!bool yes
   # Only available from clang tidy 6.0. We are currently using 5.0
   # - name: performance-implicit-conversion-in-loop
-  #   publish: !!bool yes
   - name: performance-inefficient-string-concatenation
-    publish: !!bool yes
   - name: performance-inefficient-vector-operation
-    publish: !!bool yes
   - name: performance-type-promotion-in-math-fn
-    publish: !!bool yes
   - name: performance-unnecessary-copy-initialization
-    publish: !!bool yes
   - name: performance-unnecessary-value-param
-    publish: !!bool yes
   - name: readability-container-size-empty
-    publish: !!bool yes
   - name: readability-else-after-return
-    publish: !!bool yes
   - name: readability-misleading-indentation
-    publish: !!bool yes
   - name: readability-redundant-control-flow
-    publish: !!bool yes
   - name: readability-redundant-smartptr-get
     publish: !!bool no
   - name: readability-redundant-string-cstr
-    publish: !!bool yes
   - name: readability-redundant-string-init
-    publish: !!bool yes
   - name: readability-uniqueptr-delete-release
-    publish: !!bool yes
 # Only available from clang tidy 6.0. We are currently using 5.0
 # - name: readability-static-accessed-through-instance
-#   publish: !!bool yes
 
 # Third party files from mozilla-central
 third_party: tools/rewriting/ThirdPartyPaths.txt