Merge inbound to mozilla-central. a=merge
authorCiure Andrei <aciure@mozilla.com>
Tue, 12 Jun 2018 00:54:56 +0300
changeset 476517 62ab31ea0ec73e72a1ea9d44c9c4b003813b6724
parent 476513 4ad30d5cdf5a6939fd3a865caec24bd30a9b80b8 (current diff)
parent 476516 c9ee5976668480a59f1d5431f62e64e73ff936bc (diff)
child 476526 2ec05fde848fd82e349ceaaa6a0b2e1d34fc8339
child 476540 aad3bf7016f28e957696bce266a077d3c444a176
push id9374
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:43:20 +0000
treeherdermozilla-beta@160e085dfb0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone62.0a1
first release with
nightly linux32
62ab31ea0ec7 / 62.0a1 / 20180611220254 / files
nightly linux64
62ab31ea0ec7 / 62.0a1 / 20180611220254 / files
nightly mac
62ab31ea0ec7 / 62.0a1 / 20180611220254 / files
nightly win32
62ab31ea0ec7 / 62.0a1 / 20180611220254 / files
nightly win64
62ab31ea0ec7 / 62.0a1 / 20180611220254 / 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 inbound to mozilla-central. a=merge
--- a/devtools/client/debugger/new/README.mozilla
+++ b/devtools/client/debugger/new/README.mozilla
@@ -1,13 +1,13 @@
 This is the debugger.html project output.
 See https://github.com/devtools-html/debugger.html
 
-Version 62
+Version 64
 
-Comparison: https://github.com/devtools-html/debugger.html/compare/release-61...release-62
+Comparison: https://github.com/devtools-html/debugger.html/compare/release-63...release-64
 
 Packages:
 - babel-plugin-transform-es2015-modules-commonjs @6.26.2
 - babel-preset-react @6.24.1
 - react @16.2.0
 - react-dom @16.2.0
 - webpack @3.11.0
--- a/devtools/client/debugger/new/dist/debugger.css
+++ b/devtools/client/debugger/new/dist/debugger.css
@@ -1040,21 +1040,22 @@ html .toggle-button.end.vertical svg {
 .toggle-button.end.collapsed {
   transform: rotate(180deg);
 }
 /* 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/>. */
 
 .search-shadow {
-  margin: 1px;
+  border: 1px solid transparent;
 }
 
 .search-shadow.focused {
-  box-shadow: var(--theme-focus-box-shadow-textbox);
+  border: 1px solid var(--blue-50);
+  transition: border-color 0.2s ease-in-out;
 }
 
 .search-field {
   position: relative;
   height: 27px;
   width: calc(100% - 1px);
   background-color: var(--theme-toolbar-background);
   border-bottom: 1px solid var(--theme-splitter-color);
@@ -2656,17 +2657,17 @@ button.jump-definition {
   --editor-searchbar-height: 27px;
   --editor-second-searchbar-height: 27px;
   --debug-line-error-border: rgb(255, 0, 0);
   --debug-expression-error-background: rgba(231, 116, 113, 0.3);
   --editor-header-height: 30px;
 }
 
 .theme-dark .editor-wrapper {
-  --debug-expression-background: #54617e;
+  --debug-expression-background: rgba(202, 227, 255, 0.3);
   --debug-line-border: #7786a2;
 }
 
 .editor-wrapper .CodeMirror-linewidget {
   margin-right: -7px;
   overflow: hidden;
 }
 
@@ -2705,17 +2706,17 @@ html[dir="rtl"] .editor-mount {
 
 .theme-dark {
   --gutter-hover-background-color: #414141;
 }
 
 :not(.empty-line):not(.new-breakpoint) > .CodeMirror-gutter-wrapper:hover {
   width: 60px;
   height: 13px;
-  left: -55px !important;
+  margin-left: -25px;
   background-color: var(--gutter-hover-background-color) !important;
   mask: url("chrome://devtools/skin/images/debugger/breakpoint.svg") no-repeat;
   mask-size: 100%;
   mask-position: 0 1px;
 }
 
 :not(.empty-line):not(.new-breakpoint)
   > .CodeMirror-gutter-wrapper:hover
@@ -3855,18 +3856,16 @@ html[dir="rtl"] .object-node {
  * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
 
 .secondary-panes {
   overflow: auto;
   display: flex;
   flex-direction: column;
   flex: 1;
   white-space: nowrap;
-  -moz-user-select: none;
-  user-select: none;
   --breakpoint-expression-right-clear-space: 36px;
   --breakpoint-expression-height: 2.4em;
 }
 
 /*
   We apply overflow to the container with the commandbar.
   This allows the commandbar to remain fixed when scrolling
   until the content completely ends. Not just the height of
--- a/devtools/client/debugger/new/src/components/Editor/Breakpoint.js
+++ b/devtools/client/debugger/new/src/components/Editor/Breakpoint.js
@@ -73,25 +73,16 @@ class Breakpoint extends _react.Componen
       if (breakpoint.condition) {
         editor.codeMirror.addLineClass(line, "line", "has-condition");
       } else {
         editor.codeMirror.removeLineClass(line, "line", "has-condition");
       }
     };
   }
 
-  shouldComponentUpdate(nextProps) {
-    const {
-      editor,
-      breakpoint,
-      selectedSource
-    } = this.props;
-    return editor !== nextProps.editor || breakpoint.disabled !== nextProps.breakpoint.disabled || breakpoint.hidden !== nextProps.breakpoint.hidden || breakpoint.condition !== nextProps.breakpoint.condition || breakpoint.loading !== nextProps.breakpoint.loading || selectedSource !== nextProps.selectedSource;
-  }
-
   componentDidMount() {
     this.addBreakpoint();
   }
 
   componentDidUpdate() {
     this.addBreakpoint();
   }
 
--- a/devtools/client/debugger/new/src/components/SecondaryPanes/Scopes.js
+++ b/devtools/client/debugger/new/src/components/SecondaryPanes/Scopes.js
@@ -61,17 +61,18 @@ class Scopes extends _react.PureComponen
         generatedScopes: (0, _scopes.getScopes)(nextProps.why, nextProps.selectedFrame, nextProps.generatedFrameScopes)
       });
     }
   }
 
   render() {
     const {
       isPaused,
-      isLoading
+      isLoading,
+      openLink
     } = this.props;
     const {
       originalScopes,
       generatedScopes,
       showOriginal
     } = this.state;
     const scopes = showOriginal && originalScopes || generatedScopes;
 
@@ -80,16 +81,17 @@ class Scopes extends _react.PureComponen
         className: "pane scopes-list"
       }, _react2.default.createElement(_devtoolsReps.ObjectInspector, {
         roots: scopes,
         autoExpandAll: false,
         autoExpandDepth: 1,
         disableWrap: true,
         focusable: false,
         dimTopLevelWindow: true,
+        openLink: openLink,
         createObjectClient: grip => (0, _firefox.createObjectClient)(grip)
       }), originalScopes ? _react2.default.createElement("div", {
         className: "scope-type-toggle"
       }, _react2.default.createElement("a", {
         href: "",
         onClick: e => {
           e.preventDefault();
           this.setState({
--- a/devtools/client/debugger/new/src/utils/sources-tree/getURL.js
+++ b/devtools/client/debugger/new/src/utils/sources-tree/getURL.js
@@ -52,29 +52,29 @@ function getURL(sourceUrl, debuggeeUrl =
   const defaultDomain = (0, _url.parse)(debuggeeUrl).host;
   const filename = getFilenameFromPath(pathname);
 
   switch (protocol) {
     case "javascript:":
       // Ignore `javascript:` URLs for now
       return def;
 
+    case "moz-extension:":
+    case "resource:":
+      return (0, _lodash.merge)(def, {
+        path,
+        group: `${protocol}//${host || ""}`,
+        filename
+      });
+
     case "webpack:":
-      // A Webpack source is a special case
+    case "ng:":
       return (0, _lodash.merge)(def, {
         path: path,
-        group: "webpack://",
-        filename: filename
-      });
-
-    case "ng:":
-      // An Angular source is a special case
-      return (0, _lodash.merge)(def, {
-        path: path,
-        group: "ng://",
+        group: `${protocol}//`,
         filename: filename
       });
 
     case "about:":
       // An about page is a special case
       return (0, _lodash.merge)(def, {
         path: "/",
         group: url,
@@ -85,26 +85,24 @@ function getURL(sourceUrl, debuggeeUrl =
       return (0, _lodash.merge)(def, {
         path: "/",
         group: NoDomain,
         filename: url
       });
 
     case null:
       if (pathname && pathname.startsWith("/")) {
-        // If it's just a URL like "/foo/bar.js", resolve it to the file
-        // protocol
+        // use file protocol for a URL like "/foo/bar.js"
         return (0, _lodash.merge)(def, {
           path: path,
           group: "file://",
           filename: filename
         });
       } else if (host === null) {
-        // We don't know what group to put this under, and it's a script
-        // with a weird URL. Just group them all under an anonymous group.
+        // use anonymous group for weird URLs
         return (0, _lodash.merge)(def, {
           path: url,
           group: defaultDomain,
           filename: filename
         });
       }
 
       break;
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -1630,18 +1630,17 @@ IonBuilder::blockIsOSREntry(const CFGBlo
     }
 
     if (block->stopPc() == block->startPc() && block->stopIns()->isBackEdge()) {
         // An empty block with only a backedge can never be a loop entry.
         return false;
     }
 
     MOZ_ASSERT(*info().osrPc() == JSOP_LOOPENTRY);
-    // Skip over the LOOPENTRY to match.
-    return GetNextPc(info().osrPc()) == entryPc;
+    return info().osrPc() == entryPc;
 }
 
 AbortReasonOr<Ok>
 IonBuilder::visitGoto(CFGGoto* ins)
 {
     // Test if this potentially was a fake loop and create OSR entry if that is
     // the case.
     const CFGBlock* successor = ins->getSuccessor(0);
@@ -1736,27 +1735,28 @@ IonBuilder::visitLoopEntry(CFGLoopEntry*
         return abort(AbortReason::Alloc);
 #endif
 
     MOZ_TRY(analyzeNewLoopTypes(cfgCurrent));
 
     setCurrent(header);
     pc = header->pc();
 
-    initLoopEntry();
-    return Ok();
-}
-
-bool
-IonBuilder::initLoopEntry()
-{
+    return Ok();
+}
+
+AbortReasonOr<Ok>
+IonBuilder::jsop_loopentry()
+{
+    MOZ_ASSERT(*pc == JSOP_LOOPENTRY);
+
     current->add(MInterruptCheck::New(alloc()));
     insertRecompileCheck();
 
-    return true;
+    return Ok();
 }
 
 AbortReasonOr<Ok>
 IonBuilder::visitControlInstruction(CFGControlInstruction* ins, bool* restarted)
 {
     switch (ins->type()) {
       case CFGControlInstruction::Type_Test:
         return visitTest(ins->toTest());
@@ -1804,17 +1804,16 @@ IonBuilder::inspectOpcode(JSOp op)
       case JSOP_RETURN:
       case JSOP_RETRVAL:
       case JSOP_AND:
       case JSOP_OR:
       case JSOP_TRY:
       case JSOP_THROW:
       case JSOP_GOTO:
       case JSOP_CONDSWITCH:
-      case JSOP_LOOPENTRY:
       case JSOP_TABLESWITCH:
       case JSOP_CASE:
       case JSOP_DEFAULT:
         // Control flow opcodes should be handled in the ControlFlowGenerator.
         MOZ_CRASH("Shouldn't encounter this opcode.");
 
       case JSOP_BITNOT:
         return jsop_bitnot();
@@ -2372,17 +2371,20 @@ IonBuilder::inspectOpcode(JSOp op)
         // TODO: Investigate dynamic checks.
         MDefinition* arr = current->peek(-1);
         arr->setImplicitlyUsedUnchecked();
         pushConstant(BooleanValue(false));
         return Ok();
       }
 
       case JSOP_IMPORTMETA:
-          return jsop_importmeta();
+        return jsop_importmeta();
+
+      case JSOP_LOOPENTRY:
+        return jsop_loopentry();
 
       // ===== NOT Yet Implemented =====
       // Read below!
 
       // With
       case JSOP_ENTERWITH:
       case JSOP_LEAVEWITH:
 
@@ -2501,17 +2503,16 @@ IonBuilder::restartLoop(const CFGBlock* 
 
     loopDepth_ = header->loopDepth();
 
     // Don't specializePhis(), as the header has been visited before and the
     // phis have already had their type set.
     setCurrent(header);
     pc = header->pc();
 
-    initLoopEntry();
     return Ok();
 }
 
 AbortReasonOr<Ok>
 IonBuilder::replaceTypeSet(MDefinition* subject, TemporaryTypeSet* type, MTest* test)
 {
     if (type->unknown())
         return Ok();
@@ -6630,17 +6631,18 @@ IonBuilder::newBlockAfter(MBasicBlock* a
     graph().insertBlockAfter(at, block);
     return block;
 }
 
 AbortReasonOr<MBasicBlock*>
 IonBuilder::newOsrPreheader(MBasicBlock* predecessor, jsbytecode* loopEntry,
                             jsbytecode* beforeLoopEntry)
 {
-    MOZ_ASSERT(loopEntry == GetNextPc(info().osrPc()));
+    MOZ_ASSERT(JSOp(*loopEntry) == JSOP_LOOPENTRY);
+    MOZ_ASSERT(loopEntry == info().osrPc());
 
     // Create two blocks: one for the OSR entry with no predecessors, one for
     // the preheader, which has the OSR entry block as a predecessor. The
     // OSR block is always the second block (with id 1).
     MBasicBlock* osrBlock;
     MOZ_TRY_VAR(osrBlock, newBlockAfter(*graph().begin(), predecessor->stackDepth(), loopEntry));
     MBasicBlock* preheader;
     MOZ_TRY_VAR(preheader, newBlock(predecessor, loopEntry));
--- a/js/src/jit/IonBuilder.h
+++ b/js/src/jit/IonBuilder.h
@@ -120,17 +120,16 @@ class IonBuilder
     // body has been processed.
     AbortReasonOr<Ok> addOsrValueTypeBarrier(uint32_t slot, MInstruction** def,
                                              MIRType type, TemporaryTypeSet* typeSet);
     AbortReasonOr<Ok> maybeAddOsrTypeBarriers();
 
     // Restarts processing of a loop if the type information at its header was
     // incomplete.
     AbortReasonOr<Ok> restartLoop(const CFGBlock* header);
-    bool initLoopEntry();
 
     // Please see the Big Honkin' Comment about how resume points work in
     // IonBuilder.cpp, near the definition for this function.
     AbortReasonOr<Ok> resume(MInstruction* ins, jsbytecode* pc, MResumePoint::Mode mode);
     AbortReasonOr<Ok> resumeAt(MInstruction* ins, jsbytecode* pc);
     AbortReasonOr<Ok> resumeAfter(MInstruction* ins);
     AbortReasonOr<Ok> maybeInsertResume();
 
@@ -504,16 +503,17 @@ class IonBuilder
     AbortReasonOr<Ok> jsop_funapplyarguments(uint32_t argc);
     AbortReasonOr<Ok> jsop_funapplyarray(uint32_t argc);
     AbortReasonOr<Ok> jsop_spreadcall();
     AbortReasonOr<Ok> jsop_call(uint32_t argc, bool constructing, bool ignoresReturnValue);
     AbortReasonOr<Ok> jsop_eval(uint32_t argc);
     AbortReasonOr<Ok> jsop_label();
     AbortReasonOr<Ok> jsop_andor(JSOp op);
     AbortReasonOr<Ok> jsop_dup2();
+    AbortReasonOr<Ok> jsop_loopentry();
     AbortReasonOr<Ok> jsop_loophead(jsbytecode* pc);
     AbortReasonOr<Ok> jsop_compare(JSOp op);
     AbortReasonOr<Ok> jsop_compare(JSOp op, MDefinition* left, MDefinition* right);
     AbortReasonOr<Ok> getStaticName(bool* emitted, JSObject* staticObject, PropertyName* name,
                                     MDefinition* lexicalCheck = nullptr);
     AbortReasonOr<Ok> loadStaticSlot(JSObject* staticObject, BarrierKind barrier,
                                      TemporaryTypeSet* types, uint32_t slot);
     AbortReasonOr<Ok> setStaticName(JSObject* staticObject, PropertyName* name);
--- a/js/src/jit/IonControlFlow.cpp
+++ b/js/src/jit/IonControlFlow.cpp
@@ -928,17 +928,17 @@ ControlFlowGenerator::processWhileOrForI
 
     // Skip past the JSOP_LOOPHEAD for the body start.
     jsbytecode* loopHead = GetNextPc(pc);
     jsbytecode* bodyStart = GetNextPc(loopHead);
     jsbytecode* bodyEnd = pc + GetJumpOffset(pc);
     jsbytecode* exitpc = GetNextPc(ifne);
     jsbytecode* continuepc = pc;
 
-    CFGBlock* header = CFGBlock::New(alloc(), GetNextPc(loopEntry));
+    CFGBlock* header = CFGBlock::New(alloc(), loopEntry);
 
     CFGLoopEntry* ins = CFGLoopEntry::New(alloc(), header, stackPhiCount);
     if (LoopEntryCanIonOsr(loopEntry))
         ins->setCanOsr();
 
     if (SN_TYPE(sn) == SRC_FOR_IN)
         ins->setIsForIn();
 
@@ -1476,17 +1476,17 @@ ControlFlowGenerator::processForLoop(JSO
     }
     jsbytecode* loopHead = bodyStart;
     MOZ_ASSERT(JSOp(*bodyStart) == JSOP_LOOPHEAD);
     MOZ_ASSERT(ifne + GetJumpOffset(ifne) == bodyStart);
     bodyStart = GetNextPc(bodyStart);
 
     MOZ_ASSERT(JSOp(*loopEntry) == JSOP_LOOPENTRY);
 
-    CFGBlock* header = CFGBlock::New(alloc(), GetNextPc(loopEntry));
+    CFGBlock* header = CFGBlock::New(alloc(), loopEntry);
 
     CFGLoopEntry* ins = CFGLoopEntry::New(alloc(), header, 0);
     if (LoopEntryCanIonOsr(loopEntry))
         ins->setCanOsr();
 
     current->setStopIns(ins);
     current->setStopPc(pc);
 
@@ -1544,17 +1544,17 @@ ControlFlowGenerator::processDoWhileLoop
 
     // Verify that the IFNE goes back to a loophead op.
     jsbytecode* loopHead = GetNextPc(pc);
     MOZ_ASSERT(JSOp(*loopHead) == JSOP_LOOPHEAD);
     MOZ_ASSERT(loopHead == ifne + GetJumpOffset(ifne));
 
     jsbytecode* loopEntry = GetNextPc(loopHead);
 
-    CFGBlock* header = CFGBlock::New(alloc(), GetNextPc(loopEntry));
+    CFGBlock* header = CFGBlock::New(alloc(), loopEntry);
 
     CFGLoopEntry* ins = CFGLoopEntry::New(alloc(), header, 0);
     if (LoopEntryCanIonOsr(loopEntry))
         ins->setCanOsr();
 
     current->setStopIns(ins);
     current->setStopPc(pc);
 
--- a/layout/generic/WritingModes.h
+++ b/layout/generic/WritingModes.h
@@ -1001,16 +1001,20 @@ public:
     CHECK_WRITING_MODE(aWritingMode);
     return mSize.width;
   }
   nscoord BSize(WritingMode aWritingMode) const // block-size
   {
     CHECK_WRITING_MODE(aWritingMode);
     return mSize.height;
   }
+  nscoord Size(LogicalAxis aAxis, WritingMode aWM) const
+  {
+    return aAxis == eLogicalAxisInline ? ISize(aWM) : BSize(aWM);
+  }
 
   nscoord Width(WritingMode aWritingMode) const
   {
     CHECK_WRITING_MODE(aWritingMode);
     return aWritingMode.IsVertical() ? BSize() : ISize();
   }
   nscoord Height(WritingMode aWritingMode) const
   {
@@ -1026,16 +1030,20 @@ public:
     CHECK_WRITING_MODE(aWritingMode);
     return mSize.width;
   }
   nscoord& BSize(WritingMode aWritingMode) // block-size
   {
     CHECK_WRITING_MODE(aWritingMode);
     return mSize.height;
   }
+  nscoord& Size(LogicalAxis aAxis, WritingMode aWM)
+  {
+    return aAxis == eLogicalAxisInline ? ISize(aWM) : BSize(aWM);
+  }
 
   /**
    * Return an nsSize containing our physical dimensions
    */
   nsSize GetPhysicalSize(WritingMode aWritingMode) const
   {
     CHECK_WRITING_MODE(aWritingMode);
     return aWritingMode.IsVertical() ?
@@ -1219,16 +1227,24 @@ public:
     CHECK_WRITING_MODE(aWritingMode);
     return mMargin.top;
   }
   nscoord BEnd(WritingMode aWritingMode) const // block-end margin
   {
     CHECK_WRITING_MODE(aWritingMode);
     return mMargin.bottom;
   }
+  nscoord Start(LogicalAxis aAxis, WritingMode aWM) const
+  {
+    return aAxis == eLogicalAxisInline ? IStart(aWM) : BStart(aWM);
+  }
+  nscoord End(LogicalAxis aAxis, WritingMode aWM) const
+  {
+    return aAxis == eLogicalAxisInline ? IEnd(aWM) : BEnd(aWM);
+  }
 
   nscoord& IStart(WritingMode aWritingMode) // inline-start margin
   {
     CHECK_WRITING_MODE(aWritingMode);
     return mMargin.left;
   }
   nscoord& IEnd(WritingMode aWritingMode) // inline-end margin
   {
@@ -1240,27 +1256,39 @@ public:
     CHECK_WRITING_MODE(aWritingMode);
     return mMargin.top;
   }
   nscoord& BEnd(WritingMode aWritingMode) // block-end margin
   {
     CHECK_WRITING_MODE(aWritingMode);
     return mMargin.bottom;
   }
+  nscoord& Start(LogicalAxis aAxis, WritingMode aWM)
+  {
+    return aAxis == eLogicalAxisInline ? IStart(aWM) : BStart(aWM);
+  }
+  nscoord& End(LogicalAxis aAxis, WritingMode aWM)
+  {
+    return aAxis == eLogicalAxisInline ? IEnd(aWM) : BEnd(aWM);
+  }
 
   nscoord IStartEnd(WritingMode aWritingMode) const // inline margins
   {
     CHECK_WRITING_MODE(aWritingMode);
     return mMargin.LeftRight();
   }
   nscoord BStartEnd(WritingMode aWritingMode) const // block margins
   {
     CHECK_WRITING_MODE(aWritingMode);
     return mMargin.TopBottom();
   }
+  nscoord StartEnd(LogicalAxis aAxis, WritingMode aWM) const
+  {
+    return aAxis == eLogicalAxisInline ? IStartEnd(aWM) : BStartEnd(aWM);
+  }
 
   /*
    * Return margin values for line-relative sides, as defined in
    * http://www.w3.org/TR/css-writing-modes-3/#line-directions:
    *
    * line-left
    *     Nominally the side from which LTR text would start.
    * line-right