merge mozilla-inbound to mozilla-central. r=merge a=merge
authorSebastian Hengst <archaeopteryx@coole-files.de>
Wed, 30 Aug 2017 11:05:16 +0200
changeset 377674 ab2d700fda2b4934d24227216972dce9fac19b74
parent 377657 ae9e6b6d31321f119f1e07823f93137f58771377 (current diff)
parent 377673 b85516a5f3bd3712b82292084730576704f93336 (diff)
child 377676 6958d7731394fe0ecc064d9b7cfb2b7d68064cc0
child 377759 623832ad831b3c0e74d9e27a775f56cac6bee2ad
push id32413
push userarchaeopteryx@coole-files.de
push dateWed, 30 Aug 2017 09:05:33 +0000
treeherdermozilla-central@ab2d700fda2b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge, merge
milestone57.0a1
first release with
nightly linux32
ab2d700fda2b / 57.0a1 / 20170830100230 / files
nightly linux64
ab2d700fda2b / 57.0a1 / 20170830100230 / files
nightly mac
ab2d700fda2b / 57.0a1 / 20170830100230 / files
nightly win32
ab2d700fda2b / 57.0a1 / 20170830100230 / files
nightly win64
ab2d700fda2b / 57.0a1 / 20170830100230 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
merge mozilla-inbound to mozilla-central. r=merge a=merge MozReview-Commit-ID: Gf0QPFp52Bj
dom/notification/Notification.cpp
--- a/.cron.yml
+++ b/.cron.yml
@@ -12,17 +12,17 @@ jobs:
           target-tasks-method: nightly_desktop
       run-on-projects:
           - mozilla-central
           - date
       when:
           by-project:
               # Match buildbot starts for now
               date: [{hour: 15, minute: 0}]
-              mozilla-central: [{hour: 10, minute: 0}]
+              mozilla-central: [{hour: 10, minute: 0}, {hour: 22, minute: 0}]
               # No default
 
     - name: nightly-desktop-linux
       job:
           type: decision-task
           treeherder-symbol: Nd-Ln
           target-tasks-method: nightly_linux
       run-on-projects:
--- a/devtools/client/framework/components/toolbox-toolbar.js
+++ b/devtools/client/framework/components/toolbox-toolbar.js
@@ -116,17 +116,18 @@ function renderToolboxButtons({toolboxBu
         ),
         onClick: (event) => {
           onClick(event);
           focusButton(id);
         },
         onFocus: () => focusButton(id),
         tabIndex: id === focusedButton ? "0" : "-1"
       });
-    })
+    }),
+    isStart ? div({className: "devtools-separator"}) : null
   );
 }
 
 /**
  * The options button is a ToolboxTab just like in the ToolboxTabs component. However
  * it is separate from the normal tabs, so deal with it separately here.
  *
  * @param {Object}   optionsPanel - A single panel definition for the options panel.
@@ -145,20 +146,17 @@ function renderOptions({optionsPanel, cu
     focusButton,
   }));
 }
 
 /**
  * Render a separator.
  */
 function renderSeparator() {
-  return div({
-    id: "toolbox-controls-separator",
-    className: "devtools-separator"
-  });
+  return div({className: "devtools-separator"});
 }
 
 /**
  * Render the dock buttons, and handle all the cases for what type of host the toolbox
  * is attached to. The following props are expected.
  *
  * @property {String} focusedButton - The id of the focused button.
  * @property {Function} closeToolbox - Completely close the toolbox.
--- a/devtools/client/inspector/test/browser_inspector_highlighter-comments.js
+++ b/devtools/client/inspector/test/browser_inspector_highlighter-comments.js
@@ -46,16 +46,17 @@ add_task(function* () {
 
   info("Hovering over a text node and waiting for highlighter to appear.");
   yield hoverTextNode("Visible text node");
   yield assertHighlighterShownOnTextNode("body", 14);
 
   function hoverContainer(container) {
     let promise = inspector.toolbox.once("node-highlight");
 
+    container.tagLine.scrollIntoView();
     EventUtils.synthesizeMouse(container.tagLine, 2, 2, {type: "mousemove"},
         markupView.doc.defaultView);
 
     return promise;
   }
 
   function* hoverElement(selector) {
     info(`Hovering node ${selector} in the markup view`);
--- a/devtools/client/themes/common.css
+++ b/devtools/client/themes/common.css
@@ -370,20 +370,16 @@ checkbox:-moz-focusring {
 .devtools-toolbarbutton-group > .devtools-toolbarbutton:last-child {
   margin-inline-end: 0;
 }
 
 .devtools-toolbarbutton-group + .devtools-toolbarbutton {
   margin-inline-start: 3px;
 }
 
-.devtools-separator + .devtools-toolbarbutton {
-  margin-inline-start: 1px;
-}
-
 /* Text input */
 
 .devtools-textinput,
 .devtools-searchinput,
 .devtools-filterinput {
   -moz-appearance: none;
   margin: 1px 3px;
   border: 1px solid;
--- a/devtools/client/themes/firebug-theme.css
+++ b/devtools/client/themes/firebug-theme.css
@@ -71,17 +71,16 @@
 }
 
 /* Add a negative bottom margin to overlap bottom border
   of the parent element (see also the next comment for 'tabs') */
 .theme-firebug .devtools-tab,
 .theme-firebug .devtools-sidebar-tabs tab {
   margin: 3px 0 -1px 0;
   padding: 1px 4px !important;
-  padding-inline-end: 0 !important;
   border: 1px solid transparent !important;
   border-bottom: none !important;
   border-radius: 4px 4px 0 0;
   font-weight: bold;
   color: var(--theme-body-color);
   -moz-box-flex: initial;
   min-width: 0;
 }
@@ -95,18 +94,18 @@
 }
 
 .theme-firebug .toolbox-tabs,
 .theme-firebug #toolbox-option-container {
   margin-bottom: -1px;
 }
 
 .theme-firebug .devtools-tab-label {
-  /* Set the end padding on the label to make sure the label gets faded out properly */
-  padding-inline-end: 4px;
+  padding-inline-end: 0;
+  mask-image: none;
 }
 
 /* In order to hide bottom-border of side panel tabs we need
  to make the parent element overflow visible, so child element
  can move one pixel down to hide the bottom border of the parent. */
 .theme-firebug .devtools-sidebar-tabs tabs {
   overflow: visible;
 }
--- a/devtools/client/themes/toolbars.css
+++ b/devtools/client/themes/toolbars.css
@@ -4,38 +4,47 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* CSS Variables specific to the devtools toolbar that aren't defined by the themes */
 .theme-light {
   --searchbox-background-color: #ffee99;
   --searchbox-border-color: #ffbf00;
   --searcbox-no-match-background-color: #ffe5e5;
   --searcbox-no-match-border-color: #e52e2e;
+
   --magnifying-glass-image: url(chrome://devtools/skin/images/search.svg);
   --filter-image: url(chrome://devtools/skin/images/filter.svg);
   --tool-options-image: url(chrome://devtools/skin/images/tool-options.svg);
+
   --icon-filter: none;
   --checked-icon-filter: url(chrome://devtools/skin/images/filters.svg#checked-icon-state);
+
+  --separator-border-image: linear-gradient(transparent 4px, rgba(0,0,0,.1) 4px, rgba(0,0,0,.1) calc(100% - 4px), transparent calc(100% - 4px));
 }
 
 .theme-dark {
   --searchbox-background-color: #4d4222;
   --searchbox-border-color: #d99f2b;
   --searcbox-no-match-background-color: #402325;
   --searcbox-no-match-border-color: #cc3d3d;
+
   --magnifying-glass-image: url(chrome://devtools/skin/images/search.svg);
   --filter-image: url(chrome://devtools/skin/images/filter.svg);
   --tool-options-image: url(chrome://devtools/skin/images/tool-options.svg);
+
   --icon-filter: invert(1);
   --checked-icon-filter: url(chrome://devtools/skin/images/filters.svg#dark-theme-checked-icon-state);
+
+  --separator-border-image: linear-gradient(transparent 4px, rgba(100%,100%,100%,.2) 4px, rgba(100%,100%,100%,.2) calc(100% - 4px), transparent calc(100% - 4px))
 }
 
 .theme-firebug {
   --magnifying-glass-image: url(chrome://devtools/skin/images/search.svg);
   --tool-options-image: url(chrome://devtools/skin/images/firebug/tool-options.svg);
+
   --icon-filter: none;
   --checked-icon-filter: none;
 }
 
 
 /* Toolbars */
 .devtools-toolbar,
 .devtools-sidebar-tabs tabs {
@@ -75,22 +84,20 @@
 }
 
 .devtools-toolbar-bottom {
   border-top-width: 1px;
   border-bottom: none;
 }
 
 .devtools-separator {
-  margin: 0 2px;
-  width: 2px;
-  background-image: linear-gradient(transparent 15%, var(--theme-splitter-color) 15%, var(--theme-splitter-color) 85%, transparent 85%);
-  background-size: 1px 100%;
-  background-repeat: no-repeat;
-  background-position: 0, 1px, 2px;
+  border-inline-start: 1px solid;
+  border-image: var(--separator-border-image);
+  border-image-slice: 1;
+  height: inherit;
 }
 
 /* In-tools sidebar */
 .devtools-sidebar-tabs {
   -moz-appearance: none;
   margin: 0;
   height: 100%;
 }
--- a/devtools/client/themes/toolbox.css
+++ b/devtools/client/themes/toolbox.css
@@ -38,23 +38,24 @@
   --command-rulers-image: url(images/firebug/command-rulers.svg);
   --command-measure-image: url(images/firebug/command-measure.svg);
 }
 
 /* Toolbox tabbar */
 
 .devtools-tabbar {
   -moz-appearance: none;
-  min-height: 24px;
+  min-height: 29px;
   border: 0px solid;
   border-bottom-width: 1px;
   padding: 0;
   background: var(--theme-tab-toolbar-background);
   border-bottom-color: var(--theme-splitter-color);
   display: flex;
+  box-sizing: border-box;
 }
 
 .toolbox-tabs-wrapper {
   position: relative;
   display: flex;
   flex: 1;
 }
 
@@ -74,26 +75,24 @@
   margin: 0;
   flex: 1;
   overflow: hidden;
 }
 
 /* Set flex attribute to Toolbox buttons and Picker container so,
    they don't overlap with the tab bar */
 #toolbox-buttons-start,
-#toolbox-buttons-end {
+#toolbox-buttons-end,
+#toolbox-option-container,
+#toolbox-controls,
+#toolbox-dock-buttons {
   display: flex;
   align-items: stretch;
 }
 
-#toolbox-buttons-start {
-  border: solid 0 var(--theme-splitter-color);
-  border-inline-end-width: 1px;
-}
-
 /* Toolbox tabs */
 .devtools-tab {
   position: relative;
   display: flex;
   align-items: center;
   min-width: 32px;
   min-height: 24px;
   margin: 0;
@@ -258,20 +257,16 @@
   padding-inline-start: 1px;
 }
 #toolbox-option-container img {
   margin: 0 3px;
 }
 
 /* Toolbox controls */
 
-#toolbox-controls, #toolbox-dock-buttons {
-  display: flex;
-}
-
 /* Save space in Firebug theme */
 .theme-firebug #toolbox-controls button {
   margin-inline-start: 0 !important;
   min-width: 12px;
   margin: 0 1px;
 }
 
 #toolbox-close::before {
@@ -302,25 +297,16 @@
  * Ensure that when the toolbar collapses in on itself when there is not enough room
  * that it still looks reasonable.
  */
 .devtools-tabbar > div {
   background-color: var(--theme-tab-toolbar-background);
   z-index: 0;
 }
 
-#toolbox-buttons-end:empty + .devtools-separator,
-.devtools-separator[invisible] {
-  visibility: hidden;
-}
-
-#toolbox-controls-separator {
-  margin: 0;
-}
-
 /* Command buttons */
 
 .command-button,
 #toolbox-controls > button,
 #toolbox-dock-buttons > button {
   /* !important is needed to override .devtools-button rules in common.css */
   padding: 0 !important;
   margin: 0 !important;
--- a/devtools/client/themes/webconsole.css
+++ b/devtools/client/themes/webconsole.css
@@ -769,34 +769,39 @@ a.learn-more-link.webconsole-learn-more-
 .webconsole-filterbar-primary {
   display: flex;
   /* We want the toolbar (which contain the text search input) to be at least 200px
   so we don't allow to shrink it */
   flex: 1 0 200px;
 }
 
 .devtools-toolbar.webconsole-filterbar-secondary {
-  height: initial;
-  /* This toolbar should always take the whole horizontal space */
+  display: flex;
   width: 100%;
+  align-items: center;
 }
 
 .webconsole-filterbar-primary .devtools-plaininput {
   flex: 1 1 100%;
 }
 
+.webconsole-filterbar-secondary .devtools-separator {
+  margin: 0 5px;
+}
+
 .webconsole-filterbar-filtered-messages {
   /* Needed so the bar takes the whole horizontal space when it is wrapped */
   flex-grow: 1;
   color: var(--theme-comment);
   text-align: end;
 }
 
 .webconsole-filterbar-filtered-messages .filter-message-text {
   font-style: italic;
+  -moz-user-select: none;
 }
 
 .webconsole-filterbar-filtered-messages .reset-filters-button {
   margin-inline-start: 0.5em;
 }
 
 .webconsole-output {
   flex: 1;
--- a/devtools/client/webconsole/new-console-output/components/filter-bar.js
+++ b/devtools/client/webconsole/new-console-output/components/filter-bar.js
@@ -135,17 +135,17 @@ const FilterBar = createClass({
         dispatch
       }),
       FilterButton({
         active: filter[FILTERS.DEBUG],
         label: getLabel(l10n.getStr("webconsole.debugFilterButton.label"), FILTERS.DEBUG),
         filterKey: FILTERS.DEBUG,
         dispatch
       }),
-      dom.span({
+      dom.div({
         className: "devtools-separator",
       }),
       FilterButton({
         active: filter[FILTERS.CSS],
         label: l10n.getStr("webconsole.cssFilterButton.label"),
         filterKey: FILTERS.CSS,
         dispatch
       }),
--- a/dom/base/nsStructuredCloneContainer.cpp
+++ b/dom/base/nsStructuredCloneContainer.cpp
@@ -143,17 +143,20 @@ nsStructuredCloneContainer::GetDataAsBas
   binaryData.SetLength(size);
   Data().ReadBytes(iter, binaryData.BeginWriting(), size);
   nsAutoCString base64Data;
   nsresult rv = Base64Encode(binaryData, base64Data);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     return rv;
   }
 
-  CopyASCIItoUTF16(base64Data, aOut);
+  if (!CopyASCIItoUTF16(base64Data, aOut, fallible)) {
+    return NS_ERROR_OUT_OF_MEMORY;
+  }
+
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsStructuredCloneContainer::GetSerializedNBytes(uint64_t* aSize)
 {
   NS_ENSURE_ARG_POINTER(aSize);
 
--- a/dom/events/test/pointerevents/touch_action_helpers.js
+++ b/dom/events/test/pointerevents/touch_action_helpers.js
@@ -15,16 +15,28 @@ function touchScrollDown(aSelector = '#t
   return ok(synthesizeNativeTouchDrag(target, aX, aY + 40, 0, -40), "Synthesized vertical drag");
 }
 
 function tapComplete() {
   var button = document.getElementById('btnComplete');
   return button.click();
 }
 
+function waitForResetScrollLeft(aSelector = '#target0') {
+  var target = document.querySelector(aSelector);
+  return new Promise(resolve => {
+    target.addEventListener("scroll", function onScroll() {
+      if (target.scrollLeft == 0) {
+        target.removeEventListener("scroll", onScroll);
+        resolve();
+      }
+    });
+  });
+}
+
 // The main body functions to simulate the input events required for the named test
 
 function* pointerevent_touch_action_auto_css_touch_manual(testDriver) {
   touchActionSetup(testDriver);
 
   yield touchScrollRight();
   yield waitForApzFlushedRepaints(testDriver);
   yield touchScrollDown();
@@ -32,18 +44,22 @@ function* pointerevent_touch_action_auto
 
 function* pointerevent_touch_action_button_test_touch_manual(testDriver) {
   touchActionSetup(testDriver);
 
   yield touchScrollDown();
   yield waitForApzFlushedRepaints(testDriver);
   yield setTimeout(testDriver, 2 * scrollReturnInterval);
   yield touchScrollRight();
+  let resetScrollLeft = waitForResetScrollLeft();
   yield waitForApzFlushedRepaints(testDriver);
   yield setTimeout(testDriver, 2 * scrollReturnInterval);
+  // Wait for resetting target0's scrollLeft to avoid the reset break the
+  // following scroll behaviors.
+  yield resetScrollLeft.then(testDriver);
   yield touchScrollDown('#target0 > button');
   yield waitForApzFlushedRepaints(testDriver);
   yield touchScrollRight('#target0 > button');
   yield waitForApzFlushedRepaints(testDriver);
   yield tapComplete();
 }
 
 function* pointerevent_touch_action_inherit_child_auto_child_none_touch_manual(testDriver) {
@@ -154,18 +170,22 @@ function* pointerevent_touch_action_pan_
 
 function* pointerevent_touch_action_span_test_touch_manual(testDriver) {
   touchActionSetup(testDriver);
 
   yield touchScrollDown();
   yield waitForApzFlushedRepaints(testDriver);
   yield setTimeout(testDriver, 2 * scrollReturnInterval);
   yield touchScrollRight();
+  let resetScrollLeft = waitForResetScrollLeft();
   yield waitForApzFlushedRepaints(testDriver);
   yield setTimeout(testDriver, 2 * scrollReturnInterval);
+  // Wait for resetting target0's scrollLeft to avoid the reset break the
+  // following scroll behaviors.
+  yield resetScrollLeft.then(testDriver);
   yield touchScrollDown('#testspan');
   yield waitForApzFlushedRepaints(testDriver);
   yield touchScrollRight('#testspan');
   yield waitForApzFlushedRepaints(testDriver);
   yield tapComplete();
 }
 
 function* pointerevent_touch_action_svg_test_touch_manual(testDriver) {
@@ -186,18 +206,22 @@ function* pointerevent_touch_action_svg_
 
 function* pointerevent_touch_action_table_test_touch_manual(testDriver) {
   touchActionSetup(testDriver);
 
   yield touchScrollDown('#row1');
   yield waitForApzFlushedRepaints(testDriver);
   yield setTimeout(testDriver, 2 * scrollReturnInterval);
   yield touchScrollRight('#row1');
+  let resetScrollLeft = waitForResetScrollLeft();
   yield waitForApzFlushedRepaints(testDriver);
   yield setTimeout(testDriver, 2 * scrollReturnInterval);
+  // Wait for resetting target0's scrollLeft to avoid the reset break the
+  // following scroll behaviors.
+  yield resetScrollLeft.then(testDriver);
   yield touchScrollDown('#cell3');
   yield waitForApzFlushedRepaints(testDriver);
   yield touchScrollRight('#cell3');
   yield waitForApzFlushedRepaints(testDriver);
   yield tapComplete();
 }
 
 // This the stuff that runs the appropriate body function above
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -2320,34 +2320,40 @@ Notification::InitFromJSVal(JSContext* a
   }
   RefPtr<nsStructuredCloneContainer> dataObjectContainer =
     new nsStructuredCloneContainer();
   aRv = dataObjectContainer->InitFromJSVal(aData, aCx);
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
 
-  dataObjectContainer->GetDataAsBase64(mDataAsBase64);
+  aRv = dataObjectContainer->GetDataAsBase64(mDataAsBase64);
+  if (NS_WARN_IF(aRv.Failed())) {
+    return;
+  }
 }
 
 void Notification::InitFromBase64(const nsAString& aData, ErrorResult& aRv)
 {
   if (!mDataAsBase64.IsEmpty() || aData.IsEmpty()) {
     return;
   }
 
   // To and fro to ensure it is valid base64.
   RefPtr<nsStructuredCloneContainer> container =
     new nsStructuredCloneContainer();
   aRv = container->InitFromBase64(aData, JS_STRUCTURED_CLONE_VERSION);
   if (NS_WARN_IF(aRv.Failed())) {
     return;
   }
 
-  container->GetDataAsBase64(mDataAsBase64);
+  aRv = container->GetDataAsBase64(mDataAsBase64);
+  if (NS_WARN_IF(aRv.Failed())) {
+    return;
+  }
 }
 
 bool
 Notification::AddRefObject()
 {
   AssertIsOnTargetThread();
   MOZ_ASSERT_IF(mWorkerPrivate && !mWorkerHolder, mTaskCount == 0);
   MOZ_ASSERT_IF(mWorkerPrivate && mWorkerHolder, mTaskCount > 0);
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -29,16 +29,17 @@
 #include "nsIPermissionManager.h"
 
 #include "jsapi.h"
 
 #include "mozilla/BasePrincipal.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/ErrorNames.h"
 #include "mozilla/LoadContext.h"
+#include "mozilla/SystemGroup.h"
 #include "mozilla/Telemetry.h"
 #include "mozilla/dom/BindingUtils.h"
 #include "mozilla/dom/ContentParent.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/DOMError.h"
 #include "mozilla/dom/ErrorEvent.h"
 #include "mozilla/dom/Headers.h"
 #include "mozilla/dom/InternalHeaders.h"
@@ -4307,16 +4308,20 @@ ServiceWorkerManager::ScheduleUpdateTime
   }
 
   timer = do_CreateInstance("@mozilla.org/timer;1", &rv);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     data->mUpdateTimers.Remove(aScope); // another lookup, but very rare
     return;
   }
 
+  // Label with SystemGroup because UpdateTimerCallback only sends an IPC message
+  // (PServiceWorkerUpdaterConstructor) without touching any web contents.
+  timer->SetTarget(SystemGroup::EventTargetFor(TaskCategory::Other));
+
   nsCOMPtr<nsITimerCallback> callback = new UpdateTimerCallback(aPrincipal,
                                                                 aScope);
 
   const uint32_t UPDATE_DELAY_MS = 1000;
 
   rv = timer->InitWithCallback(callback, UPDATE_DELAY_MS,
                                nsITimer::TYPE_ONE_SHOT);
   if (NS_WARN_IF(NS_FAILED(rv))) {
--- a/gfx/ipc/GPUProcessManager.cpp
+++ b/gfx/ipc/GPUProcessManager.cpp
@@ -425,37 +425,52 @@ GPUProcessManager::SimulateDeviceReset()
   if (mProcess) {
     OnRemoteProcessDeviceReset(mProcess);
   } else {
     OnInProcessDeviceReset();
   }
 }
 
 void
-GPUProcessManager::DisableWebRender()
+GPUProcessManager::DisableWebRender(wr::WebRenderError aError)
 {
-  MOZ_ASSERT(gfx::gfxVars::UseWebRender());
   if (!gfx::gfxVars::UseWebRender()) {
     return;
   }
-  // Disable WebRender
-  gfx::gfxConfig::GetFeature(gfx::Feature::WEBRENDER).ForceDisable(
-    gfx::FeatureStatus::Unavailable,
-    "WebRender initialization failed",
-    NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBRENDER_INITIALIZE"));
+  if (aError == wr::WebRenderError::INITIALIZE) {
+    // Disable WebRender
+    gfx::gfxConfig::GetFeature(gfx::Feature::WEBRENDER).ForceDisable(
+      gfx::FeatureStatus::Unavailable,
+      "WebRender initialization failed",
+      NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBRENDER_INITIALIZE"));
+  } else if (aError == wr::WebRenderError::MAKE_CURRENT) {
+    // Disable WebRender
+    gfx::gfxConfig::GetFeature(gfx::Feature::WEBRENDER).ForceDisable(
+      gfx::FeatureStatus::Unavailable,
+      "Failed to make render context current",
+      NS_LITERAL_CSTRING("FEATURE_FAILURE_WEBRENDER_MAKE_CURRENT"));
+  } else {
+    MOZ_ASSERT_UNREACHABLE("Invalid value");
+  }
   gfx::gfxVars::SetUseWebRender(false);
 
   if (mProcess) {
     OnRemoteProcessDeviceReset(mProcess);
   } else {
     OnInProcessDeviceReset();
   }
 }
 
 void
+GPUProcessManager::NotifyWebRenderError(wr::WebRenderError aError)
+{
+  DisableWebRender(aError);
+}
+
+void
 GPUProcessManager::OnInProcessDeviceReset()
 {
   RebuildInProcessSessions();
   NotifyListenersOnCompositeDeviceReset();
 }
 
 void
 GPUProcessManager::OnRemoteProcessDeviceReset(GPUProcessHost* aHost)
--- a/gfx/ipc/GPUProcessManager.h
+++ b/gfx/ipc/GPUProcessManager.h
@@ -11,16 +11,17 @@
 #include "Units.h"
 #include "mozilla/UniquePtr.h"
 #include "mozilla/dom/ipc/IdType.h"
 #include "mozilla/gfx/GPUProcessHost.h"
 #include "mozilla/gfx/Point.h"
 #include "mozilla/ipc/ProtocolUtils.h"
 #include "mozilla/ipc/TaskFactory.h"
 #include "mozilla/ipc/Transport.h"
+#include "mozilla/webrender/WebRenderTypes.h"
 #include "nsIObserverService.h"
 #include "nsThreadUtils.h"
 class nsBaseWidget;
 
 
 namespace mozilla {
 class MemoryReportingProcess;
 namespace layers {
@@ -144,17 +145,18 @@ public:
     CompositorOptions* aOutCompositorOptions);
 
   // Destroy and recreate all of the compositors
   void ResetCompositors();
 
   void OnProcessLaunchComplete(GPUProcessHost* aHost) override;
   void OnProcessUnexpectedShutdown(GPUProcessHost* aHost) override;
   void SimulateDeviceReset();
-  void DisableWebRender();
+  void DisableWebRender(wr::WebRenderError aError);
+  void NotifyWebRenderError(wr::WebRenderError aError);
   void OnInProcessDeviceReset();
   void OnRemoteProcessDeviceReset(GPUProcessHost* aHost) override;
   void NotifyListenersOnCompositeDeviceReset();
 
   // Notify the GPUProcessManager that a top-level PGPU protocol has been
   // terminated. This may be called from any thread.
   void NotifyRemoteActorDestroyed(const uint64_t& aProcessToken);
 
--- a/gfx/layers/ipc/CompositorBridgeChild.cpp
+++ b/gfx/layers/ipc/CompositorBridgeChild.cpp
@@ -883,16 +883,24 @@ CompositorBridgeChild::RecvObserveLayerU
   MOZ_ASSERT(XRE_IsParentProcess());
 
   if (RefPtr<dom::TabParent> tab = dom::TabParent::GetTabParentFromLayersId(aLayersId)) {
     tab->LayerTreeUpdate(aEpoch, aActive);
   }
   return IPC_OK();
 }
 
+mozilla::ipc::IPCResult
+CompositorBridgeChild::RecvNotifyWebRenderError(const WebRenderError& aError)
+{
+  MOZ_ASSERT(XRE_IsParentProcess());
+  GPUProcessManager::Get()->NotifyWebRenderError(aError);
+  return IPC_OK();
+}
+
 void
 CompositorBridgeChild::HoldUntilCompositableRefReleasedIfNecessary(TextureClient* aClient)
 {
   if (!aClient) {
     return;
   }
 
   if (!(aClient->GetFlags() & TextureFlags::RECYCLE)) {
--- a/gfx/layers/ipc/CompositorBridgeChild.h
+++ b/gfx/layers/ipc/CompositorBridgeChild.h
@@ -280,16 +280,19 @@ private:
 
   virtual mozilla::ipc::IPCResult
   RecvRemotePaintIsReady() override;
 
   mozilla::ipc::IPCResult RecvObserveLayerUpdate(const uint64_t& aLayersId,
                                                  const uint64_t& aEpoch,
                                                  const bool& aActive) override;
 
+  virtual mozilla::ipc::IPCResult
+  RecvNotifyWebRenderError(const WebRenderError& aError) override;
+
   uint64_t GetNextResourceId();
 
   // Class used to store the shared FrameMetrics, mutex, and APZCId  in a hash table
   class SharedFrameMetricsData {
   public:
     SharedFrameMetricsData(
         const mozilla::ipc::SharedMemoryBasic::Handle& metrics,
         const CrossProcessMutexHandle& handle,
--- a/gfx/layers/ipc/CompositorBridgeParent.cpp
+++ b/gfx/layers/ipc/CompositorBridgeParent.cpp
@@ -30,16 +30,17 @@
 #include "mozilla/gfx/2D.h"          // for DrawTarget
 #include "mozilla/gfx/GPUChild.h"       // for GfxPrefValue
 #include "mozilla/gfx/Point.h"          // for IntSize
 #include "mozilla/gfx/Rect.h"          // for IntSize
 #include "mozilla/gfx/gfxVars.h"        // for gfxVars
 #include "VRManager.h"                  // for VRManager
 #include "mozilla/ipc/Transport.h"      // for Transport
 #include "mozilla/gfx/gfxVars.h"
+#include "mozilla/gfx/GPUParent.h"
 #include "mozilla/layers/AnimationHelper.h" // for CompositorAnimationStorage
 #include "mozilla/layers/APZCTreeManager.h"  // for APZCTreeManager
 #include "mozilla/layers/APZCTreeManagerParent.h"  // for APZCTreeManagerParent
 #include "mozilla/layers/APZThreadUtils.h"  // for APZCTreeManager
 #include "mozilla/layers/AsyncCompositionManager.h"
 #include "mozilla/layers/BasicCompositor.h"  // for BasicCompositor
 #include "mozilla/layers/Compositor.h"  // for Compositor
 #include "mozilla/layers/CompositorManagerParent.h" // for CompositorManagerParent
@@ -2114,16 +2115,23 @@ CompositorBridgeParent::DeallocPTextureP
 }
 
 bool
 CompositorBridgeParent::IsSameProcess() const
 {
   return OtherPid() == base::GetCurrentProcId();
 }
 
+void
+CompositorBridgeParent::NotifyWebRenderError(wr::WebRenderError aError)
+{
+  MOZ_ASSERT(CompositorLoop() == MessageLoop::current());
+  Unused << SendNotifyWebRenderError(aError);
+}
+
 #if defined(XP_WIN) || defined(MOZ_WIDGET_GTK)
 //#define PLUGINS_LOG(...) printf_stderr("CP [%s]: ", __FUNCTION__);
 //                         printf_stderr(__VA_ARGS__);
 //                         printf_stderr("\n");
 #define PLUGINS_LOG(...)
 
 bool
 CompositorBridgeParent::UpdatePluginWindowState(uint64_t aId)
--- a/gfx/layers/ipc/CompositorBridgeParent.h
+++ b/gfx/layers/ipc/CompositorBridgeParent.h
@@ -158,16 +158,18 @@ public:
                            uint32_t aApzcId) override;
   bool StopSharingMetrics(FrameMetrics::ViewID aScrollId,
                           uint32_t aApzcId) override;
 
   virtual bool IsRemote() const {
     return false;
   }
 
+  virtual void NotifyWebRenderError(wr::WebRenderError aError) {}
+
 protected:
   ~CompositorBridgeParentBase() override;
 
   bool mCanSend;
 
 private:
   RefPtr<CompositorManagerParent> mCompositorManager;
 };
@@ -254,16 +256,17 @@ public:
                                               const TextureFlags& aFlags,
                                               const uint64_t& aId,
                                               const uint64_t& aSerial,
                                               const wr::MaybeExternalImageId& aExternalImageId) override;
   virtual bool DeallocPTextureParent(PTextureParent* actor) override;
 
   virtual bool IsSameProcess() const override;
 
+  virtual void NotifyWebRenderError(wr::WebRenderError aError) override;
 
   PCompositorWidgetParent* AllocPCompositorWidgetParent(const CompositorWidgetInitData& aInitData) override;
   bool DeallocPCompositorWidgetParent(PCompositorWidgetParent* aActor) override;
 
   void ObserveLayerUpdate(uint64_t aLayersId, uint64_t aEpoch, bool aActive) override { }
 
   /**
    * This forces the is-first-paint flag to true. This is intended to
--- a/gfx/layers/ipc/PCompositorBridge.ipdl
+++ b/gfx/layers/ipc/PCompositorBridge.ipdl
@@ -37,16 +37,17 @@ using mozilla::LayoutDeviceIntSize from 
 using class mozilla::TimeStamp from "mozilla/TimeStamp.h";
 using class mozilla::layers::FrameUniformityData from "mozilla/layers/FrameUniformityData.h";
 using mozilla::layers::TextureFlags from "mozilla/layers/CompositorTypes.h";
 using mozilla::layers::CompositorOptions from "mozilla/layers/CompositorOptions.h";
 using mozilla::wr::PipelineId from "mozilla/webrender/WebRenderTypes.h";
 using mozilla::wr::IdNamespace from "mozilla/webrender/WebRenderTypes.h";
 using base::ProcessId from "base/process.h";
 using mozilla::wr::MaybeExternalImageId from "mozilla/webrender/WebRenderTypes.h";
+using mozilla::wr::WebRenderError from "mozilla/webrender/WebRenderTypes.h";
 
 namespace mozilla {
 namespace layers {
 
 
 /**
  * The PCompositorBridge protocol is a top-level protocol for the compositor.
  * There is an instance of the protocol for each compositor, plus one for each
@@ -256,12 +257,13 @@ parent:
   sync CheckContentOnlyTDR(uint32_t sequenceNum)
     returns (bool isContentOnlyTDR);
 
 child:
   // Send back Compositor Frame Metrics from APZCs so tiled layers can
   // update progressively.
   async SharedCompositorFrameMetrics(Handle metrics, CrossProcessMutexHandle mutex, uint64_t aLayersId, uint32_t aAPZCId);
   async ReleaseSharedCompositorFrameMetrics(ViewID aId, uint32_t aAPZCId);
+  async NotifyWebRenderError(WebRenderError error);
 };
 
 } // layers
 } // mozilla
--- a/gfx/layers/wr/WebRenderMessageUtils.h
+++ b/gfx/layers/wr/WebRenderMessageUtils.h
@@ -117,11 +117,20 @@ struct ParamTraits<mozilla::wr::MixBlend
 };
 
 template<>
 struct ParamTraits<mozilla::wr::BuiltDisplayListDescriptor>
   : public PlainOldDataSerializer<mozilla::wr::BuiltDisplayListDescriptor>
 {
 };
 
+template<>
+struct ParamTraits<mozilla::wr::WebRenderError>
+  : public ContiguousEnumSerializer<
+        mozilla::wr::WebRenderError,
+        mozilla::wr::WebRenderError::INITIALIZE,
+        mozilla::wr::WebRenderError::Sentinel>
+{
+};
+
 } // namespace IPC
 
 #endif // GFX_WEBRENDERMESSAGEUTILS_H
--- a/gfx/webrender_bindings/RendererOGL.cpp
+++ b/gfx/webrender_bindings/RendererOGL.cpp
@@ -133,18 +133,17 @@ RendererOGL::Render()
 
   if (mDebugFlags.mBits != flags) {
     mDebugFlags.mBits = flags;
     wr_renderer_set_debug_flags(mRenderer, mDebugFlags);
   }
 
   if (!mGL->MakeCurrent()) {
     gfxCriticalNote << "Failed to make render context current, can't draw.";
-    // XXX This could cause oom in webrender since pending_texture_updates is not handled.
-    // It needs to be addressed.
+    NotifyWebRenderError(WebRenderError::MAKE_CURRENT);
     return false;
   }
 
   mozilla::widget::WidgetRenderingContext widgetContext;
 
 #if defined(XP_MACOSX)
   widgetContext.mGL = mGL;
 // TODO: we don't have a notion of compositor here.
@@ -230,10 +229,26 @@ RendererOGL::FlushRenderedEpochs()
 }
 
 RenderTextureHost*
 RendererOGL::GetRenderTexture(wr::WrExternalImageId aExternalImageId)
 {
   return mThread->GetRenderTexture(aExternalImageId);
 }
 
+static void
+DoNotifyWebRenderError(layers::CompositorBridgeParentBase* aBridge, WebRenderError aError)
+{
+  aBridge->NotifyWebRenderError(aError);
+}
+
+void
+RendererOGL::NotifyWebRenderError(WebRenderError aError)
+{
+  layers::CompositorThreadHolder::Loop()->PostTask(NewRunnableFunction(
+    &DoNotifyWebRenderError,
+    mBridge,
+    aError
+  ));
+}
+
 } // namespace wr
 } // namespace mozilla
--- a/gfx/webrender_bindings/RendererOGL.h
+++ b/gfx/webrender_bindings/RendererOGL.h
@@ -86,16 +86,18 @@ public:
 
   wr::WrRenderedEpochs* FlushRenderedEpochs();
 
   RenderTextureHost* GetRenderTexture(wr::WrExternalImageId aExternalImageId);
 
   wr::Renderer* GetRenderer() { return mRenderer; }
 
 protected:
+  void NotifyWebRenderError(WebRenderError aError);
+
   RefPtr<RenderThread> mThread;
   RefPtr<gl::GLContext> mGL;
   RefPtr<widget::CompositorWidget> mWidget;
   wr::Renderer* mRenderer;
   layers::CompositorBridgeParentBase* mBridge;
   wr::WindowId mWindowId;
   TimeStamp mFrameStartTime;
   RefPtr<layers::SyncObjectHost> mSyncObject;
--- a/gfx/webrender_bindings/WebRenderTypes.h
+++ b/gfx/webrender_bindings/WebRenderTypes.h
@@ -668,12 +668,19 @@ struct WrClipId {
 
   bool operator==(const WrClipId& other) const {
     return id == other.id;
   }
 };
 
 typedef Variant<layers::FrameMetrics::ViewID, WrClipId> ScrollOrClipId;
 
+enum class WebRenderError : int8_t {
+  INITIALIZE = 0,
+  MAKE_CURRENT,
+
+  Sentinel /* this must be last for serialization purposes. */
+};
+
 } // namespace wr
 } // namespace mozilla
 
 #endif /* GFX_WEBRENDERTYPES_H */
--- a/js/src/jit/IonCacheIRCompiler.cpp
+++ b/js/src/jit/IonCacheIRCompiler.cpp
@@ -1664,16 +1664,70 @@ IonCacheIRCompiler::emitStoreTypedObject
     // Compute the address being written to.
     LoadTypedThingData(masm, layout, obj, scratch1);
     Address dest(scratch1, offset);
 
     StoreToTypedArray(cx_, masm, type, val, dest, scratch2, failure->label());
     return true;
 }
 
+static void
+EmitStoreDenseElement(MacroAssembler& masm, const ConstantOrRegister& value,
+                      Register elements, BaseObjectElementIndex target)
+{
+    // If the ObjectElements::CONVERT_DOUBLE_ELEMENTS flag is set, int32 values
+    // have to be converted to double first. If the value is not int32, it can
+    // always be stored directly.
+
+    Address elementsFlags(elements, ObjectElements::offsetOfFlags());
+    if (value.constant()) {
+        Value v = value.value();
+        Label done;
+        if (v.isInt32()) {
+            Label dontConvert;
+            masm.branchTest32(Assembler::Zero, elementsFlags,
+                              Imm32(ObjectElements::CONVERT_DOUBLE_ELEMENTS),
+                              &dontConvert);
+            masm.storeValue(DoubleValue(v.toInt32()), target);
+            masm.jump(&done);
+            masm.bind(&dontConvert);
+        }
+        masm.storeValue(v, target);
+        masm.bind(&done);
+        return;
+    }
+
+    TypedOrValueRegister reg = value.reg();
+    if (reg.hasTyped() && reg.type() != MIRType::Int32) {
+        masm.storeTypedOrValue(reg, target);
+        return;
+    }
+
+    Label convert, storeValue, done;
+    masm.branchTest32(Assembler::NonZero, elementsFlags,
+                      Imm32(ObjectElements::CONVERT_DOUBLE_ELEMENTS),
+                      &convert);
+    masm.bind(&storeValue);
+    masm.storeTypedOrValue(reg, target);
+    masm.jump(&done);
+
+    masm.bind(&convert);
+    if (reg.hasValue()) {
+        masm.branchTestInt32(Assembler::NotEqual, reg.valueReg(), &storeValue);
+        masm.int32ValueToDouble(reg.valueReg(), ScratchDoubleReg);
+        masm.storeDouble(ScratchDoubleReg, target);
+    } else {
+        MOZ_ASSERT(reg.type() == MIRType::Int32);
+        masm.convertInt32ToDouble(reg.typedReg().gpr(), ScratchDoubleReg);
+        masm.storeDouble(ScratchDoubleReg, target);
+    }
+
+    masm.bind(&done);
+}
+
 bool
 IonCacheIRCompiler::emitStoreDenseElement()
 {
     Register obj = allocator.useRegister(masm, reader.objOperandId());
     Register index = allocator.useRegister(masm, reader.int32OperandId());
     ConstantOrRegister val = allocator.useConstantOrRegister(masm, reader.valOperandId());
 
     AutoScratchRegister scratch(allocator, masm);
@@ -1691,17 +1745,17 @@ IonCacheIRCompiler::emitStoreDenseElemen
     Address initLength(scratch, ObjectElements::offsetOfInitializedLength());
     masm.branch32(Assembler::BelowOrEqual, initLength, index, failure->label());
 
     // Hole check.
     BaseObjectElementIndex element(scratch, index);
     masm.branchTestMagic(Assembler::Equal, element, failure->label());
 
     EmitPreBarrier(masm, element, MIRType::Value);
-    EmitIonStoreDenseElement(masm, val, scratch, element);
+    EmitStoreDenseElement(masm, val, scratch, element);
     if (needsPostBarrier())
         emitPostBarrierElement(obj, val, scratch, index);
     return true;
 }
 
 bool
 IonCacheIRCompiler::emitStoreDenseElementHole()
 {
@@ -1777,17 +1831,17 @@ IonCacheIRCompiler::emitStoreDenseElemen
     // Skip EmitPreBarrier as the memory is uninitialized.
     masm.jump(&doStore);
 
     masm.bind(&inBounds);
 
     EmitPreBarrier(masm, element, MIRType::Value);
 
     masm.bind(&doStore);
-    EmitIonStoreDenseElement(masm, val, scratch, element);
+    EmitStoreDenseElement(masm, val, scratch, element);
     if (needsPostBarrier())
         emitPostBarrierElement(obj, val, scratch, index);
     return true;
 }
 
 bool
 IonCacheIRCompiler::emitArrayPush()
 {
--- a/js/src/jit/IonCaches.cpp
+++ b/js/src/jit/IonCaches.cpp
@@ -95,62 +95,8 @@ jit::GetReturnAddressToIonCode(JSContext
 
     void* returnAddr = frame.returnAddress();
 #ifdef DEBUG
     ++frame;
     MOZ_ASSERT(frame.isIonJS());
 #endif
     return returnAddr;
 }
-
-void
-jit::EmitIonStoreDenseElement(MacroAssembler& masm, const ConstantOrRegister& value,
-                              Register elements, BaseObjectElementIndex target)
-{
-    // If the ObjectElements::CONVERT_DOUBLE_ELEMENTS flag is set, int32 values
-    // have to be converted to double first. If the value is not int32, it can
-    // always be stored directly.
-
-    Address elementsFlags(elements, ObjectElements::offsetOfFlags());
-    if (value.constant()) {
-        Value v = value.value();
-        Label done;
-        if (v.isInt32()) {
-            Label dontConvert;
-            masm.branchTest32(Assembler::Zero, elementsFlags,
-                              Imm32(ObjectElements::CONVERT_DOUBLE_ELEMENTS),
-                              &dontConvert);
-            masm.storeValue(DoubleValue(v.toInt32()), target);
-            masm.jump(&done);
-            masm.bind(&dontConvert);
-        }
-        masm.storeValue(v, target);
-        masm.bind(&done);
-        return;
-    }
-
-    TypedOrValueRegister reg = value.reg();
-    if (reg.hasTyped() && reg.type() != MIRType::Int32) {
-        masm.storeTypedOrValue(reg, target);
-        return;
-    }
-
-    Label convert, storeValue, done;
-    masm.branchTest32(Assembler::NonZero, elementsFlags,
-                      Imm32(ObjectElements::CONVERT_DOUBLE_ELEMENTS),
-                      &convert);
-    masm.bind(&storeValue);
-    masm.storeTypedOrValue(reg, target);
-    masm.jump(&done);
-
-    masm.bind(&convert);
-    if (reg.hasValue()) {
-        masm.branchTestInt32(Assembler::NotEqual, reg.valueReg(), &storeValue);
-        masm.int32ValueToDouble(reg.valueReg(), ScratchDoubleReg);
-        masm.storeDouble(ScratchDoubleReg, target);
-    } else {
-        MOZ_ASSERT(reg.type() == MIRType::Int32);
-        masm.convertInt32ToDouble(reg.typedReg().gpr(), ScratchDoubleReg);
-        masm.storeDouble(ScratchDoubleReg, target);
-    }
-
-    masm.bind(&done);
-}
--- a/js/src/jit/IonCaches.h
+++ b/js/src/jit/IonCaches.h
@@ -23,15 +23,12 @@
 
 #include "vm/TypedArrayObject.h"
 
 namespace js {
 namespace jit {
 
 void* GetReturnAddressToIonCode(JSContext* cx);
 
-void EmitIonStoreDenseElement(MacroAssembler& masm, const ConstantOrRegister& value,
-                              Register elements, BaseObjectElementIndex target);
-
 } // namespace jit
 } // namespace js
 
 #endif /* jit_IonCaches_h */
--- a/layout/inspector/tests/chrome/chrome.ini
+++ b/layout/inspector/tests/chrome/chrome.ini
@@ -1,15 +1,19 @@
 [DEFAULT]
 skip-if = os == 'android'
 support-files = GentiumPlus-R.woff
 
-[test_bug467669.css]
 [test_bug467669.xul]
-[test_bug695639.css]
+support-files =
+  test_bug467669.css
 [test_bug695639.xul]
-[test_bug708874.css]
+support-files =
+  test_bug695639.css
 [test_bug708874.xul]
-[test_bug727834.css]
+support-files =
+  test_bug708874.css
 [test_bug727834.xul]
+support-files =
+  test_bug727834.css
 [test_parseStyleSheetObservers.html]
 support-files =
   imported_no_op.css
--- a/layout/style/nsCSSAnonBoxList.h
+++ b/layout/style/nsCSSAnonBoxList.h
@@ -77,17 +77,17 @@ CSS_ANON_BOX(fieldsetContent, ":-moz-fie
 CSS_NON_INHERITING_ANON_BOX(framesetBlank, ":-moz-frameset-blank")
 CSS_ANON_BOX(mozDisplayComboboxControlFrame, ":-moz-display-comboboxcontrol-frame")
 CSS_ANON_BOX(htmlCanvasContent, ":-moz-html-canvas-content")
 
 CSS_WRAPPER_ANON_BOX(inlineTable, ":-moz-inline-table")
 CSS_WRAPPER_ANON_BOX(table, ":-moz-table")
 CSS_WRAPPER_ANON_BOX(tableCell, ":-moz-table-cell")
 CSS_WRAPPER_ANON_BOX(tableColGroup, ":-moz-table-column-group")
-CSS_ANON_BOX(tableCol, ":-moz-table-column")
+CSS_NON_INHERITING_ANON_BOX(tableCol, ":-moz-table-column")
 CSS_ANON_BOX(tableWrapper, ":-moz-table-wrapper")
 CSS_WRAPPER_ANON_BOX(tableRowGroup, ":-moz-table-row-group")
 CSS_WRAPPER_ANON_BOX(tableRow, ":-moz-table-row")
 
 CSS_ANON_BOX(canvas, ":-moz-canvas")
 CSS_NON_INHERITING_ANON_BOX(pageBreak, ":-moz-pagebreak")
 CSS_ANON_BOX(page, ":-moz-page")
 CSS_ANON_BOX(pageContent, ":-moz-pagecontent")
--- a/layout/tables/nsTableColGroupFrame.cpp
+++ b/layout/tables/nsTableColGroupFrame.cpp
@@ -190,17 +190,16 @@ nsTableColGroupFrame::AppendFrames(Child
 
   // Our next colframe should be an eColContent.  We've removed all the
   // eColAnonymousColGroup colframes, eColAnonymousCol colframes always follow
   // eColContent ones, and eColAnonymousCell colframes only appear in an
   // eColGroupAnonymousCell colgroup, which never gets AppendFrames() called on
   // it.
   MOZ_ASSERT(!col || col->GetColType() == eColContent,
              "What's going on with our columns?");
-  RemoveStateBits(NS_FRAME_OWNS_ANON_BOXES);
 
   const nsFrameList::Slice& newFrames =
     mFrames.AppendFrames(this, aFrameList);
   InsertColsReflow(GetStartColumnIndex() + mColCount, newFrames);
 }
 
 void
 nsTableColGroupFrame::InsertFrames(ChildListID     aListID,
@@ -232,17 +231,16 @@ nsTableColGroupFrame::InsertFrames(Child
 
   // Our next colframe should be an eColContent.  We've removed all the
   // eColAnonymousColGroup colframes, eColAnonymousCol colframes always follow
   // eColContent ones, and eColAnonymousCell colframes only appear in an
   // eColGroupAnonymousCell colgroup, which never gets InsertFrames() called on
   // it.
   MOZ_ASSERT(!col || col->GetColType() == eColContent,
              "What's going on with our columns?");
-  RemoveStateBits(NS_FRAME_OWNS_ANON_BOXES);
 
   NS_ASSERTION(!aPrevFrame || aPrevFrame == aPrevFrame->LastContinuation(),
                "Prev frame should be last in continuation chain");
   NS_ASSERTION(!aPrevFrame || !GetNextColumn(aPrevFrame) ||
                GetNextColumn(aPrevFrame)->GetColType() != eColAnonymousCol,
                "Shouldn't be inserting before a spanned colframe");
 
   const nsFrameList::Slice& newFrames =
@@ -496,40 +494,16 @@ nsTableColGroupFrame::InvalidateFrameWit
 {
   nsIFrame::InvalidateFrameWithRect(aRect, aDisplayItemKey);
   // If we have filters applied that would affects our bounds, then
   // we get an inactive layer created and this is computed
   // within FrameLayerBuilder
   GetParent()->InvalidateFrameWithRect(aRect + GetPosition(), aDisplayItemKey);
 }
 
-void
-nsTableColGroupFrame::AppendDirectlyOwnedAnonBoxes(
-  nsTArray<OwnedAnonBox>& aResult)
-{
-  nsTableColFrame* col = GetFirstColumn();
-  if (!col) {
-    // No columns, nothing to do.
-    return;
-  }
-
-  if (col->GetColType() == eColContent) {
-    // We have actual columns; no anon boxes here.
-    return;
-  }
-
-  for ( ; col; col = col->GetNextCol()) {
-    MOZ_ASSERT(col->GetColType() != eColContent,
-               "We should not have any real columns after anonymous ones");
-    MOZ_ASSERT(col->GetColType() != eColAnonymousCol,
-               "We shouldn't have spanning anonymous columns");
-    aResult.AppendElement(OwnedAnonBox(col));
-  }
-}
-
 #ifdef DEBUG_FRAME_DUMP
 nsresult
 nsTableColGroupFrame::GetFrameName(nsAString& aResult) const
 {
   return MakeFrameName(NS_LITERAL_STRING("TableColGroup"), aResult);
 }
 
 void nsTableColGroupFrame::Dump(int32_t aIndent)
--- a/layout/tables/nsTableColGroupFrame.h
+++ b/layout/tables/nsTableColGroupFrame.h
@@ -196,19 +196,16 @@ public:
   {
     return nsContainerFrame::IsFrameOfType(aFlags & ~(nsIFrame::eTablePart));
   }
 
   virtual void InvalidateFrame(uint32_t aDisplayItemKey = 0) override;
   virtual void InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey = 0) override;
   virtual void InvalidateFrameForRemoval() override { InvalidateFrameSubtree(); }
 
-  // Return any anonymous columns we contain.
-  void AppendDirectlyOwnedAnonBoxes(nsTArray<OwnedAnonBox>& aResult) override;
-
 protected:
   explicit nsTableColGroupFrame(nsStyleContext* aContext);
 
   void InsertColsReflow(int32_t                   aColIndex,
                         const nsFrameList::Slice& aCols);
 
   virtual LogicalSides GetLogicalSkipSides(const ReflowInput* aReflowInput = nullptr) const override;
 
--- a/layout/tables/nsTableFrame.cpp
+++ b/layout/tables/nsTableFrame.cpp
@@ -738,30 +738,25 @@ nsTableFrame::AppendAnonymousColFrames(n
   nsIPresShell *shell = PresContext()->PresShell();
 
   // Get the last col frame
   nsFrameList newColFrames;
 
   int32_t startIndex = mColFrames.Length();
   int32_t lastIndex  = startIndex + aNumColsToAdd - 1;
 
-  // aColGroupFrame will need to handle restyling these cols we're about to add.
-  aColGroupFrame->AddStateBits(NS_FRAME_OWNS_ANON_BOXES);
   for (int32_t childX = startIndex; childX <= lastIndex; childX++) {
     nsIContent* iContent;
     RefPtr<nsStyleContext> styleContext;
-    nsStyleContext* parentStyleContext;
 
     // all anonymous cols that we create here use a pseudo style context of the
     // col group
     iContent = aColGroupFrame->GetContent();
-    parentStyleContext = aColGroupFrame->StyleContext();
     styleContext = shell->StyleSet()->
-      ResolveInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableCol,
-                                         parentStyleContext);
+      ResolveNonInheritingAnonymousBoxStyle(nsCSSAnonBoxes::tableCol);
     // ASSERTION to check for bug 54454 sneaking back in...
     NS_ASSERTION(iContent, "null content in CreateAnonymousColFrames");
 
     // create the new col frame
     nsIFrame* colFrame = NS_NewTableColFrame(shell, styleContext);
     ((nsTableColFrame *) colFrame)->SetColType(aColType);
     colFrame->Init(iContent, aColGroupFrame, nullptr);
 
@@ -1510,17 +1505,35 @@ void nsTableFrame::CalcHasBCBorders()
 }
 
 /* static */ void
 nsTableFrame::DisplayGenericTablePart(nsDisplayListBuilder* aBuilder,
                                       nsFrame* aFrame,
                                       const nsDisplayListSet& aLists,
                                       DisplayGenericTablePartTraversal aTraversal)
 {
-  if (aFrame->IsVisibleForPainting(aBuilder)) {
+  bool isVisible = aFrame->IsVisibleForPainting(aBuilder);
+  bool isColumn = aFrame->IsTableColFrame();
+  // If we have an anonymous column in the AppendAnonymousColFrames sense, it
+  // might think it's visible for painting (due to not inheriting its colgroup's
+  // styles) while the colgroup as a whole is actually not visible for painting
+  // because it has hidden visibility.  In that situation we should also treat
+  // the column as not visible, because otherwise hit-testing can get a bit
+  // confused.
+  //
+  // XXXbz It's not clear whether anonymous columns and column groups should
+  // ever affect hit-testing at all.  See
+  // https://github.com/w3c/csswg-drafts/issues/1763 which might result in them
+  // not existing conceptually and hence not affecting hit-testing.
+  if (isVisible && isColumn &&
+      aFrame->StyleContext()->GetPseudo() == nsCSSAnonBoxes::tableCol &&
+      !aFrame->GetParent()->StyleVisibility()->IsVisible()) {
+    isVisible = false;
+  }
+  if (isVisible) {
     nsDisplayTableItem* currentItem = aBuilder->GetCurrentTableItem();
     // currentItem may be null, when none of the table parts have a
     // background or border
     if (currentItem) {
       currentItem->UpdateForFrameBackground(aFrame);
     }
 
     // Paint the outset box-shadows for the table frames
@@ -1550,17 +1563,17 @@ nsTableFrame::DisplayGenericTablePart(ns
       table->OrderRowGroups(rowGroups);
       for (nsTableRowGroupFrame* rowGroup : rowGroups) {
         auto offset = rowGroup->GetNormalPosition() - colGroup->GetNormalPosition();
         if (!aBuilder->GetDirtyRect().Intersects(nsRect(offset, rowGroup->GetSize()))) {
           continue;
         }
         PaintRowGroupBackgroundByColIdx(rowGroup, aFrame, aBuilder, aLists, colIdx, offset);
       }
-    } else if (aFrame->IsTableColFrame()) {
+    } else if (isColumn) {
       // Compute background rect by iterating all cell frame.
       nsTableColFrame* col = static_cast<nsTableColFrame*>(aFrame);
       AutoTArray<int32_t, 1> colIdx;
       colIdx.AppendElement(col->GetColIndex());
 
       nsTableFrame* table = col->GetTableFrame();
       RowGroupArray rowGroups;
       table->OrderRowGroups(rowGroups);
@@ -1583,17 +1596,17 @@ nsTableFrame::DisplayGenericTablePart(ns
     if (hasBoxShadow) {
       aLists.BorderBackground()->AppendNewToTop(
         new (aBuilder) nsDisplayBoxShadowInner(aBuilder, aFrame));
     }
   }
 
   aTraversal(aBuilder, aFrame, aLists);
 
-  if (aFrame->IsVisibleForPainting(aBuilder)) {
+  if (isVisible) {
     if (aFrame->IsTableFrame()) {
       nsTableFrame* table = static_cast<nsTableFrame*>(aFrame);
       // In the collapsed border model, overlay all collapsed borders.
       if (table->IsBorderCollapse()) {
         if (table->HasBCBorders()) {
           aLists.BorderBackground()->AppendNewToTop(
             new (aBuilder) nsDisplayTableBorderCollapse(aBuilder, table));
         }
--- a/layout/tools/reftest/remotereftest.py
+++ b/layout/tools/reftest/remotereftest.py
@@ -1,23 +1,25 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from contextlib import closing
 import sys
 import logging
 import os
+import signal
 import time
 import tempfile
 import traceback
 import urllib2
 
 import mozdevice
 import mozinfo
+import mozprocess
 from automation import Automation
 from remoteautomation import RemoteAutomation, fennecLogcatFilters
 
 from output import OutputHandler
 from runreftest import RefTest, ReftestResolver
 import reftestcommandline
 
 # We need to know our current directory so that we can serve our test files from it.
@@ -233,16 +235,45 @@ class RemoteReftest(RefTest):
 
         options.xrePath = remoteXrePath
         options.utilityPath = remoteUtilityPath
         return 0
 
     def stopWebServer(self, options):
         self.server.stop()
 
+    def killNamedProc(self, pname):
+        """ Kill processes matching the given command name """
+        self.log.info("Checking for %s processes..." % pname)
+
+        def _psInfo(line):
+            if pname in line:
+                self.log.info(line)
+        process = mozprocess.ProcessHandler(['ps', '-f'],
+                                            processOutputLine=_psInfo)
+        process.run()
+        process.wait()
+
+        def _psKill(line):
+            parts = line.split()
+            if len(parts) == 3 and parts[0].isdigit():
+                pid = int(parts[0])
+                if parts[2] == pname:
+                    self.log.info("killing %s with pid %d" % (pname, pid))
+                    try:
+                        os.kill(
+                            pid, getattr(signal, "SIGKILL", signal.SIGTERM))
+                    except Exception as e:
+                        self.log.info("Failed to kill process %d: %s" %
+                                      (pid, str(e)))
+        process = mozprocess.ProcessHandler(['ps', '-o', 'pid,ppid,comm'],
+                                            processOutputLine=_psKill)
+        process.run()
+        process.wait()
+
     def createReftestProfile(self, options, manifest, startAfter=None):
         profile = RefTest.createReftestProfile(self,
                                                options,
                                                manifest,
                                                server=options.remoteWebServer,
                                                port=options.httpPort)
         if startAfter is not None:
             print ("WARNING: Continuing after a crash is not supported for remote "
@@ -393,16 +424,24 @@ def run_test_harness(parser, options):
 
     if mozinfo.info['debug']:
         print "changing timeout for remote debug reftests from %s to 600 seconds" % options.timeout
         options.timeout = 600
 
     # Hack in a symbolic link for jsreftest
     os.system("ln -s ../jsreftest " + str(os.path.join(SCRIPT_DIRECTORY, "jsreftest")))
 
+    # Despite our efforts to clean up servers started by this script, in practice
+    # we still see infrequent cases where a process is orphaned and interferes
+    # with future tests, typically because the old server is keeping the port in use.
+    # Try to avoid those failures by checking for and killing servers before
+    # trying to start new ones.
+    reftest.killNamedProc('ssltunnel')
+    reftest.killNamedProc('xpcshell')
+
     # Start the webserver
     retVal = reftest.startWebServer(options)
     if retVal:
         return retVal
 
     procName = options.app.split('/')[-1]
     dm.killProcess(procName)
     if dm.processExist(procName):
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -405,61 +405,24 @@ class RefTest(object):
                 return None
             browserEnv[v[:ix]] = v[ix + 1:]
 
         # Enable leaks detection to its own log file.
         self.leakLogFile = os.path.join(profileDir, "runreftest_leaks.log")
         browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leakLogFile
         return browserEnv
 
-    def killNamedOrphans(self, pname):
-        """ Kill orphan processes matching the given command name """
-        self.log.info("Checking for orphan %s processes..." % pname)
-
-        def _psInfo(line):
-            if pname in line:
-                self.log.info(line)
-        process = mozprocess.ProcessHandler(['ps', '-f'],
-                                            processOutputLine=_psInfo)
-        process.run()
-        process.wait()
-
-        def _psKill(line):
-            parts = line.split()
-            if len(parts) == 3 and parts[0].isdigit():
-                pid = int(parts[0])
-                if parts[2] == pname and parts[1] == '1':
-                    self.log.info("killing %s orphan with pid %d" % (pname, pid))
-                    try:
-                        os.kill(
-                            pid, getattr(signal, "SIGKILL", signal.SIGTERM))
-                    except Exception as e:
-                        self.log.info("Failed to kill process %d: %s" %
-                                      (pid, str(e)))
-        process = mozprocess.ProcessHandler(['ps', '-o', 'pid,ppid,comm'],
-                                            processOutputLine=_psKill)
-        process.run()
-        process.wait()
-
     def cleanup(self, profileDir):
         if profileDir:
             shutil.rmtree(profileDir, True)
 
     def runTests(self, tests, options, cmdargs=None):
         cmdargs = cmdargs or []
         self._populate_logger(options)
 
-        # Despite our efforts to clean up servers started by this script, in practice
-        # we still see infrequent cases where a process is orphaned and interferes
-        # with future tests, typically because the old server is keeping the port in use.
-        # Try to avoid those failures by checking for and killing orphan servers before
-        # trying to start new ones.
-        self.killNamedOrphans('ssltunnel')
-        self.killNamedOrphans('xpcshell')
-
         if options.cleanupCrashes:
             mozcrash.cleanup_pending_crash_reports()
 
         manifests = self.resolver.resolveManifests(options, tests)
         if options.filter:
             manifests[""] = options.filter
 
         if not getattr(options, 'runTestsInParallel', False):
--- a/services/sync/tps/extensions/mozmill/resource/driver/controller.js
+++ b/services/sync/tps/extensions/mozmill/resource/driver/controller.js
@@ -428,18 +428,17 @@ MozMillController.prototype.startUserShu
 }
 
 /**
  * Restart the application
  *
  * @param {string} aNext
  *        Name of the next test function to run after restart
  * @param {boolean} [aFlags=undefined]
- *        Additional flags how to handle the shutdown or restart. The attributes
- *        eRestarti386 (0x20) and eRestartx86_64 (0x30) have not been documented yet.
+ *        Additional flags how to handle the shutdown or restart.
  * @see https://developer.mozilla.org/nsIAppStartup#Attributes
  */
 MozMillController.prototype.restartApplication = function (aNext, aFlags) {
   var flags = Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart;
 
   if (aFlags) {
     flags |= aFlags;
   }
@@ -456,18 +455,17 @@ MozMillController.prototype.restartAppli
 }
 
 /**
  * Stop the application
  *
  * @param {boolean} [aResetProfile=false]
  *        Whether to reset the profile during restart
  * @param {boolean} [aFlags=undefined]
- *        Additional flags how to handle the shutdown or restart. The attributes
- *        eRestarti386 and eRestartx86_64 have not been documented yet.
+ *        Additional flags how to handle the shutdown or restart.
  * @see https://developer.mozilla.org/nsIAppStartup#Attributes
  */
 MozMillController.prototype.stopApplication = function (aResetProfile, aFlags) {
   var flags = Ci.nsIAppStartup.eAttemptQuit;
 
   if (aFlags) {
     flags |= aFlags;
   }
--- a/services/sync/tps/extensions/mozmill/resource/modules/frame.js
+++ b/services/sync/tps/extensions/mozmill/resource/modules/frame.js
@@ -41,18 +41,17 @@ var modules = undefined;
 
 var timers = [];
 
 
 /**
  * Shutdown or restart the application
  *
  * @param {boolean} [aFlags=undefined]
- *        Additional flags how to handle the shutdown or restart. The attributes
- *        eRestarti386 and eRestartx86_64 have not been documented yet.
+ *        Additional flags how to handle the shutdown or restart.
  * @see https://developer.mozilla.org/nsIAppStartup#Attributes
  */
 function shutdownApplication(aFlags) {
   var flags = Ci.nsIAppStartup.eForceQuit;
 
   if (aFlags) {
     flags |= aFlags;
   }
--- a/testing/firefox-ui/harness/setup.py
+++ b/testing/firefox-ui/harness/setup.py
@@ -1,12 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 import os
 import re
 from setuptools import setup, find_packages
 
 THIS_DIR = os.path.dirname(os.path.realpath(__name__))
 
 
 def read(*parts):
@@ -22,17 +23,19 @@ def get_version():
 long_description = """Custom Marionette runner classes and entry scripts for Firefox Desktop
 specific Marionette tests.
 """
 
 setup(name='firefox-ui-harness',
       version=get_version(),
       description="Firefox UI Harness",
       long_description=long_description,
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Auto-tools',
       author_email='tools-marionette@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Marionette/Harnesses/FirefoxUI',
       license='MPL',
       packages=find_packages(),
       include_package_data=True,
       zip_safe=False,
--- a/testing/marionette/puppeteer/firefox/setup.py
+++ b/testing/marionette/puppeteer/firefox/setup.py
@@ -1,12 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 import os
 import re
 from setuptools import setup, find_packages
 
 THIS_DIR = os.path.dirname(os.path.realpath(__name__))
 
 
 def read(*parts):
@@ -18,17 +19,19 @@ def get_version():
     return re.findall("__version__ = '([\d\.]+)'",
                       read('firefox_puppeteer', '__init__.py'), re.M)[0]
 
 
 setup(name='firefox-puppeteer',
       version=get_version(),
       description="Firefox Puppeteer",
       long_description='See http://firefox-puppeteer.readthedocs.org/',
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Auto-tools',
       author_email='tools-marionette@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Marionette/Puppeteer/Firefox',
       license='MPL',
       packages=find_packages(),
       include_package_data=True,
       zip_safe=False,
--- a/testing/mochitest/runrobocop.py
+++ b/testing/mochitest/runrobocop.py
@@ -78,20 +78,20 @@ class RobocopTestRunner(MochitestDesktop
 
     def startup(self):
         """
            Second-stage initialization: One-time initialization which may require cleanup.
         """
         # Despite our efforts to clean up servers started by this script, in practice
         # we still see infrequent cases where a process is orphaned and interferes
         # with future tests, typically because the old server is keeping the port in use.
-        # Try to avoid those failures by checking for and killing orphan servers before
+        # Try to avoid those failures by checking for and killing servers before
         # trying to start new ones.
-        self.killNamedOrphans('ssltunnel')
-        self.killNamedOrphans('xpcshell')
+        self.killNamedProc('ssltunnel')
+        self.killNamedProc('xpcshell')
         self.auto.deleteANRs()
         self.auto.deleteTombstones()
         procName = self.options.app.split('/')[-1]
         self.dm.killProcess(procName)
         if self.dm.processExist(procName):
             self.log.warning("unable to kill %s before running tests!" % procName)
         self.dm.removeDir(self.remoteScreenshots)
         self.dm.removeDir(self.remoteMozLog)
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1657,35 +1657,35 @@ toolbar#nav-bar {
 
         # For e10s, our tests default to suppressing the "unsafe CPOW usage"
         # warnings that can plague test logs.
         if not options.enableCPOWWarnings:
             browserEnv["DISABLE_UNSAFE_CPOW_WARNINGS"] = "1"
 
         return browserEnv
 
-    def killNamedOrphans(self, pname):
-        """ Kill orphan processes matching the given command name """
-        self.log.info("Checking for orphan %s processes..." % pname)
+    def killNamedProc(self, pname):
+        """ Kill processes matching the given command name """
+        self.log.info("Checking for %s processes..." % pname)
 
         def _psInfo(line):
             if pname in line:
                 self.log.info(line)
 
         process = mozprocess.ProcessHandler(['ps', '-f'],
                                             processOutputLine=_psInfo)
         process.run()
         process.wait()
 
         def _psKill(line):
             parts = line.split()
             if len(parts) == 3 and parts[0].isdigit():
                 pid = int(parts[0])
-                if parts[2] == pname and parts[1] == '1':
-                    self.log.info("killing %s orphan with pid %d" % (pname, pid))
+                if parts[2] == pname:
+                    self.log.info("killing %s with pid %d" % (pname, pid))
                     killPid(pid, self.log)
         process = mozprocess.ProcessHandler(['ps', '-o', 'pid,ppid,comm'],
                                             processOutputLine=_psKill)
         process.run()
         process.wait()
 
     def execute_start_script(self):
         if not self.start_script or not self.marionette:
@@ -2414,20 +2414,20 @@ toolbar#nav-bar {
             options.e10s = False
         mozinfo.update({"e10s": options.e10s})  # for test manifest parsing.
 
         self.setTestRoot(options)
 
         # Despite our efforts to clean up servers started by this script, in practice
         # we still see infrequent cases where a process is orphaned and interferes
         # with future tests, typically because the old server is keeping the port in use.
-        # Try to avoid those failures by checking for and killing orphan servers before
+        # Try to avoid those failures by checking for and killing servers before
         # trying to start new ones.
-        self.killNamedOrphans('ssltunnel')
-        self.killNamedOrphans('xpcshell')
+        self.killNamedProc('ssltunnel')
+        self.killNamedProc('xpcshell')
 
         if options.cleanupCrashes:
             mozcrash.cleanup_pending_crash_reports()
 
         tests = self.getActiveTests(options)
         self.logPreamble(tests)
         tests = [t for t in tests if 'disabled' not in t]
 
--- a/testing/mozbase/manifestparser/setup.py
+++ b/testing/mozbase/manifestparser/setup.py
@@ -1,22 +1,25 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_NAME = "manifestparser"
 PACKAGE_VERSION = '1.1'
 
 setup(name=PACKAGE_NAME,
       version=PACKAGE_VERSION,
       description="Library to create and manage test manifests",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+                  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla manifests',
       author='Mozilla Automation and Testing Team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       zip_safe=False,
       packages=['manifestparser'],
       install_requires=[],
--- a/testing/mozbase/mozcrash/setup.py
+++ b/testing/mozbase/mozcrash/setup.py
@@ -1,27 +1,30 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_NAME = 'mozcrash'
 PACKAGE_VERSION = '1.0'
 
 # dependencies
 deps = ['mozfile >= 1.0',
         'mozlog >= 3.0']
 
 setup(name=PACKAGE_NAME,
       version=PACKAGE_VERSION,
       description="Library for printing stack traces from minidumps "
       "left behind by crashed processes",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Mozilla Automation and Tools team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['mozcrash'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozdebug/setup.py
+++ b/testing/mozbase/mozdebug/setup.py
@@ -1,22 +1,25 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_VERSION = '0.1'
 
 setup(name='mozdebug',
       version=PACKAGE_VERSION,
       description="Utilities for running applications under native code debuggers "
       "intended for use in Mozilla testing",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Mozilla Automation and Testing Team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['mozdebug'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozdevice/setup.py
+++ b/testing/mozbase/mozdevice/setup.py
@@ -1,29 +1,32 @@
 
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_NAME = 'mozdevice'
 PACKAGE_VERSION = '0.51'
 
 deps = ['mozfile >= 1.0',
         'mozlog >= 3.0',
         'moznetwork >= 0.24',
         'mozprocess >= 0.19',
         ]
 
 setup(name=PACKAGE_NAME,
       version=PACKAGE_VERSION,
       description="Mozilla-authored device management",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='',
       author='Mozilla Automation and Testing Team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['mozdevice'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozfile/setup.py
+++ b/testing/mozbase/mozfile/setup.py
@@ -1,22 +1,25 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_NAME = 'mozfile'
 PACKAGE_VERSION = '1.2'
 
 setup(name=PACKAGE_NAME,
       version=PACKAGE_VERSION,
       description="Library of file utilities for use in Mozilla testing",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Mozilla Automation and Tools team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['mozfile'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozhttpd/setup.py
+++ b/testing/mozbase/mozhttpd/setup.py
@@ -1,22 +1,25 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_VERSION = '0.7'
 deps = ['moznetwork >= 0.24']
 
 setup(name='mozhttpd',
       version=PACKAGE_VERSION,
       description="Python webserver intended for use with Mozilla testing",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Mozilla Automation and Testing Team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['mozhttpd'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozinfo/setup.py
+++ b/testing/mozbase/mozinfo/setup.py
@@ -1,24 +1,27 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_VERSION = '0.10'
 
 # dependencies
 deps = ['mozfile >= 0.12']
 
 setup(name='mozinfo',
       version=PACKAGE_VERSION,
       description="Library to get system information for use in Mozilla testing",
       long_description="see http://mozbase.readthedocs.org",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Mozilla Automation and Testing Team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['mozinfo'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozinstall/setup.py
+++ b/testing/mozbase/mozinstall/setup.py
@@ -1,12 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 import os
 from setuptools import setup
 
 try:
     here = os.path.dirname(os.path.abspath(__file__))
     description = file(os.path.join(here, 'README.md')).read()
 except IOError:
     description = None
@@ -23,19 +24,19 @@ setup(name='mozInstall',
       description="package for installing and uninstalling Mozilla applications",
       long_description="see http://mozbase.readthedocs.org/",
       # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       classifiers=['Environment :: Console',
                    'Intended Audience :: Developers',
                    'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',
                    'Natural Language :: English',
                    'Operating System :: OS Independent',
-                   'Programming Language :: Python',
                    'Topic :: Software Development :: Libraries :: Python Modules',
-                   ],
+                   'Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
       keywords='mozilla',
       author='Mozilla Automation and Tools team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL 2.0',
       packages=['mozinstall'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozleak/setup.py
+++ b/testing/mozbase/mozleak/setup.py
@@ -1,25 +1,28 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 
 PACKAGE_NAME = 'mozleak'
 PACKAGE_VERSION = '0.1'
 
 
 setup(
     name=PACKAGE_NAME,
     version=PACKAGE_VERSION,
     description="Library for extracting memory leaks from leak logs files",
     long_description="see http://mozbase.readthedocs.org/",
-    classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+    classifiers=['Programming Language :: Python :: 2.7',
+                 'Programming Language :: Python :: 2 :: Only'],
+    # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
     keywords='mozilla',
     author='Mozilla Automation and Tools team',
     author_email='tools@lists.mozilla.org',
     url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
     license='MPL',
     packages=['mozleak'],
     zip_safe=False,
     install_requires=[],
--- a/testing/mozbase/mozlog/setup.py
+++ b/testing/mozbase/mozlog/setup.py
@@ -1,12 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup, find_packages
 
 PACKAGE_NAME = 'mozlog'
 PACKAGE_VERSION = '3.5'
 
 setup(name=PACKAGE_NAME,
       version=PACKAGE_VERSION,
       description="Robust log handling specialized for logging in the Mozilla universe",
@@ -21,17 +22,18 @@ setup(name=PACKAGE_NAME,
       tests_require=['mozfile'],
       platforms=['Any'],
       classifiers=['Development Status :: 4 - Beta',
                    'Environment :: Console',
                    'Intended Audience :: Developers',
                    'License :: OSI Approved :: Mozilla Public License 1.1 (MPL 1.1)',
                    'Operating System :: OS Independent',
                    'Topic :: Software Development :: Libraries :: Python Modules',
-                   ],
+                   'Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
       package_data={"mozlog": ["formatters/html/main.js",
                                "formatters/html/style.css"]},
       entry_points={
           "console_scripts": [
               "structlog = mozlog.scripts:main"
           ],
           'pytest11': [
               'mozlog = mozlog.pytest_mozlog.plugin',
--- a/testing/mozbase/moznetwork/setup.py
+++ b/testing/mozbase/moznetwork/setup.py
@@ -1,25 +1,28 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 PACKAGE_VERSION = '0.27'
 
 deps = ['mozinfo',
         'mozlog >= 3.0',
         ]
 
 setup(name='moznetwork',
       version=PACKAGE_VERSION,
       description="Library of network utilities for use in Mozilla testing",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Mozilla Automation and Tools team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=['moznetwork'],
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozbase/mozscreenshot/setup.py
+++ b/testing/mozbase/mozscreenshot/setup.py
@@ -1,25 +1,28 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup
 
 
 PACKAGE_NAME = 'mozscreenshot'
 PACKAGE_VERSION = '0.1'
 
 
 setup(
     name=PACKAGE_NAME,
     version=PACKAGE_VERSION,
     description="Library for taking screenshots in tests harness",
     long_description="see http://mozbase.readthedocs.org/",
-    classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+    classifiers=['Programming Language :: Python :: 2.7',
+                 'Programming Language :: Python :: 2 :: Only'],
+    # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
     keywords='mozilla',
     author='Mozilla Automation and Tools team',
     author_email='tools@lists.mozilla.org',
     url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
     license='MPL',
     packages=['mozscreenshot'],
     zip_safe=False,
     install_requires=['mozlog', 'mozinfo'],
--- a/testing/mozbase/moztest/setup.py
+++ b/testing/mozbase/moztest/setup.py
@@ -1,24 +1,27 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup, find_packages
 
 PACKAGE_VERSION = '0.8'
 
 # dependencies
 deps = ['mozinfo']
 
 setup(name='moztest',
       version=PACKAGE_VERSION,
       description="Package for storing and outputting Mozilla test results",
       long_description="see http://mozbase.readthedocs.org/",
-      classifiers=[],  # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='mozilla',
       author='Mozilla Automation and Tools team',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Auto-tools/Projects/Mozbase',
       license='MPL',
       packages=find_packages(),
       include_package_data=True,
       zip_safe=False,
--- a/testing/mozharness/setup.py
+++ b/testing/mozharness/setup.py
@@ -1,8 +1,9 @@
+
 import os
 from setuptools import setup, find_packages
 
 try:
     here = os.path.dirname(os.path.abspath(__file__))
     description = open(os.path.join(here, 'README.txt')).read()
 except IOError:
     description = ''
@@ -15,17 +16,19 @@ try:
     import json
 except ImportError:
     dependencies.append('simplejson')
 
 setup(name='mozharness',
       version=version,
       description="Mozharness is a configuration-driven script harness with full logging that allows production infrastructure and individual developers to use the same scripts. ",
       long_description=description,
-      classifiers=[],  # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+		   'Programming Language :: Python :: 2 :: Only',
+	 	  ],  # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
       author='Aki Sasaki',
       author_email='aki@mozilla.com',
       url='https://hg.mozilla.org/build/mozharness/',
       license='MPL',
       packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
       include_package_data=True,
       zip_safe=False,
       install_requires=dependencies,
--- a/testing/talos/setup.py
+++ b/testing/talos/setup.py
@@ -1,8 +1,9 @@
+
 import os
 from setuptools import setup, find_packages
 
 try:
     here = os.path.dirname(os.path.abspath(__file__))
     description = open(os.path.join(here, 'README')).read()
 except OSError:
     description = ''
@@ -13,17 +14,19 @@ with open(os.path.join(here, "requiremen
     dependencies = f.read().splitlines()
 
 dependency_links = []
 
 setup(name='talos',
       version=version,
       description="Performance testing framework for Windows, Mac and Linux.",
       long_description=description,
-      classifiers=[],  # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+                   'Programming Language :: Python :: 2 :: Only'],
+      # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
       author='Mozilla Foundation',
       author_email='tools@lists.mozilla.org',
       url='https://wiki.mozilla.org/Buildbot/Talos',
       license='MPL',
       packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
       include_package_data=True,
       package_data={'': ['*.config',
                          '*.css',
--- a/testing/tps/setup.py
+++ b/testing/tps/setup.py
@@ -1,12 +1,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+
 from setuptools import setup, find_packages
 import sys
 
 version = '0.5'
 
 deps = ['httplib2 == 0.9.2',
         'mozfile == 1.2',
         'mozhttpd == 0.7',
@@ -22,17 +23,19 @@ deps = ['httplib2 == 0.9.2',
 assert sys.version_info[0] == 2
 assert sys.version_info[1] >= 6
 
 setup(name='tps',
       version=version,
       description='run automated multi-profile sync tests',
       long_description="""\
 """,
-      classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
+      classifiers=['Programming Language :: Python :: 2.7',
+		   'Programming Language :: Python :: 2 :: Only',
+		  ], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
       keywords='',
       author='Mozilla Automation and Tools team',
       author_email='tools@lists.mozilla.org',
       url='https://developer.mozilla.org/en-US/docs/TPS',
       license='MPL 2.0',
       packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
       include_package_data=True,
       zip_safe=False,
--- a/toolkit/components/startup/public/nsIAppStartup.idl
+++ b/toolkit/components/startup/public/nsIAppStartup.idl
@@ -116,29 +116,17 @@ interface nsIAppStartup : nsISupports
      * Quit, damnit!
      */
     const uint32_t eForceQuit = 0x03;
 
     /**
      * Restart the application after quitting.  The application will be
      * restarted with the same profile and an empty command line.
      */
-    const uint32_t eRestart = 0x10; 
-
-    /**
-     * When restarting attempt to start in the i386 architecture. Only supported
-     * on OSX.
-     */
-    const uint32_t eRestarti386 = 0x20;
-
-    /**
-     * When restarting attempt to start in the x86_64 architecture. Only
-     * supported on OSX.
-     */
-    const uint32_t eRestartx86_64 = 0x40;
+    const uint32_t eRestart = 0x10;
 
     /**
      * Restart the application after quitting.  The application will be
      * restarted with an empty command line and the normal profile selection
      * process will take place on startup.
      */
     const uint32_t eRestartNotSameProfile = 0x100;
 
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -65,16 +65,17 @@
 #include "mozilla/layers/WebRenderLayerManager.h"
 #include "mozilla/dom/ContentChild.h"
 #include "mozilla/dom/TabParent.h"
 #include "mozilla/gfx/GPUProcessManager.h"
 #include "mozilla/gfx/gfxVars.h"
 #include "mozilla/Move.h"
 #include "mozilla/Services.h"
 #include "mozilla/Sprintf.h"
+#include "mozilla/webrender/WebRenderTypes.h"
 #include "nsRefPtrHashtable.h"
 #include "TouchEvents.h"
 #include "WritingModes.h"
 #include "InputData.h"
 #include "FrameLayerBuilder.h"
 #ifdef ACCESSIBILITY
 #include "nsAccessibilityService.h"
 #endif
@@ -1288,17 +1289,17 @@ nsBaseWidget::CreateCompositorSession(in
     if (lm->AsWebRenderLayerManager() && mCompositorSession) {
       TextureFactoryIdentifier textureFactoryIdentifier;
       lm->AsWebRenderLayerManager()->Initialize(mCompositorSession->GetCompositorBridgeChild(),
                                                 wr::AsPipelineId(mCompositorSession->RootLayerTreeId()),
                                                 &textureFactoryIdentifier);
       if (textureFactoryIdentifier.mParentBackend != LayersBackend::LAYERS_WR) {
         retry = true;
         DestroyCompositor();
-        gfx::GPUProcessManager::Get()->DisableWebRender();
+        gfx::GPUProcessManager::Get()->DisableWebRender(wr::WebRenderError::INITIALIZE);
       }
     }
 
     // We need to retry in a loop because the act of failing to create the
     // compositor can change our state (e.g. disable WebRender).
     if (mCompositorSession || !retry) {
       *aOptionsOut = options;
       return lm.forget();
--- a/xpcom/build/nsWindowsDllInterceptor.h
+++ b/xpcom/build/nsWindowsDllInterceptor.h
@@ -904,17 +904,35 @@ protected:
           COPY_CODES(1);
         } else if (origBytes[nOrigBytes] >= 0xb8 && origBytes[nOrigBytes] <= 0xbf) {
           // mov r32, imm32
           COPY_CODES(5);
         } else {
           MOZ_ASSERT_UNREACHABLE("Unrecognized opcode sequence");
           return;
         }
-      } else if (origBytes[nOrigBytes] == 0x45) {
+      } else if (origBytes[nOrigBytes] == 0x44) {
+        // REX.R
+        COPY_CODES(1);
+
+        // TODO: Combine with the "0x89" case below in the REX.W section
+        if (origBytes[nOrigBytes] == 0x89) {
+          // mov r/m32, r32
+          COPY_CODES(1);
+          int len = CountModRmSib(origBytes + nOrigBytes);
+          if (len < 0) {
+            MOZ_ASSERT_UNREACHABLE("Unrecognized opcode sequence");
+            return;
+          }
+          COPY_CODES(len);
+        } else {
+          MOZ_ASSERT_UNREACHABLE("Unrecognized opcode sequence");
+          return;
+        }
+       } else if (origBytes[nOrigBytes] == 0x45) {
         // REX.R & REX.B
         COPY_CODES(1);
 
         if (origBytes[nOrigBytes] == 0x33) {
           // xor r32, r32
           COPY_CODES(2);
         } else {
           MOZ_ASSERT_UNREACHABLE("Unrecognized opcode sequence");