Merge inbound to mozilla-central. a=merge
authorCsoregi Natalia <ncsoregi@mozilla.com>
Wed, 06 Mar 2019 18:11:32 +0200
changeset 462597 4ab143dde4dc3424cfedc74b3648fbf2e47fb7bf
parent 462590 0d659b1c6de3bc90ac8cb964717142f49f3f0d8e (current diff)
parent 462596 1f10307fec284c52fbaf8d8423b47e762b9f0990 (diff)
child 462623 34f94fc00f2191bfd709eb87d8cc367a80b5f0f1
child 462738 e996f385103a9f81aa5d0a7f1f7ac1a065404dde
push id35656
push userncsoregi@mozilla.com
push dateWed, 06 Mar 2019 16:13:00 +0000
treeherdermozilla-central@4ab143dde4dc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone67.0a1
first release with
nightly linux32
4ab143dde4dc / 67.0a1 / 20190306161300 / files
nightly linux64
4ab143dde4dc / 67.0a1 / 20190306161300 / files
nightly mac
4ab143dde4dc / 67.0a1 / 20190306161300 / files
nightly win32
4ab143dde4dc / 67.0a1 / 20190306161300 / files
nightly win64
4ab143dde4dc / 67.0a1 / 20190306161300 / 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/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -354,17 +354,22 @@ class AdjustedTargetForFilter {
       // create a DrawTarget that we can return from DT() anyway, so we'll
       // just use a 1x1-sized one.
       mSourceGraphicRect.SizeTo(1, 1);
     }
 
     mTarget = mFinalTarget->CreateSimilarDrawTarget(mSourceGraphicRect.Size(),
                                                     SurfaceFormat::B8G8R8A8);
 
-    if (!mTarget) {
+    if (mTarget) {
+      // See bug 1524554.
+      mTarget->ClearRect(gfx::Rect());
+    }
+
+    if (!mTarget || !mTarget->IsValid()) {
       // XXX - Deal with the situation where our temp size is too big to
       // fit in a texture (bug 1066622).
       mTarget = mFinalTarget;
       mCtx = nullptr;
       mFinalTarget = nullptr;
       return;
     }
 
@@ -376,17 +381,23 @@ class AdjustedTargetForFilter {
   already_AddRefed<SourceSurface> DoSourcePaint(
       gfx::IntRect& aRect, CanvasRenderingContext2D::Style aStyle) {
     if (aRect.IsEmpty()) {
       return nullptr;
     }
 
     RefPtr<DrawTarget> dt = mFinalTarget->CreateSimilarDrawTarget(
         aRect.Size(), SurfaceFormat::B8G8R8A8);
-    if (!dt) {
+
+    if (dt) {
+      // See bug 1524554.
+      dt->ClearRect(gfx::Rect());
+    }
+
+    if (!dt || !dt->IsValid()) {
       aRect.SetEmpty();
       return nullptr;
     }
 
     Matrix transform =
         mFinalTarget->GetTransform().PostTranslate(-aRect.TopLeft() + mOffset);
 
     dt->SetTransform(transform);
@@ -465,17 +476,22 @@ class AdjustedTargetForShadow {
     int32_t blurRadius = state.ShadowBlurRadius();
     bounds.Inflate(blurRadius);
     bounds.RoundOut();
     bounds.ToIntRect(&mTempRect);
 
     mTarget = mFinalTarget->CreateShadowDrawTarget(
         mTempRect.Size(), SurfaceFormat::B8G8R8A8, mSigma);
 
-    if (!mTarget) {
+    if (mTarget) {
+      // See bug 1524554.
+      mTarget->ClearRect(gfx::Rect());
+    }
+
+    if (!mTarget || !mTarget->IsValid()) {
       // XXX - Deal with the situation where our temp size is too big to
       // fit in a texture (bug 1066622).
       mTarget = mFinalTarget;
       mCtx = nullptr;
       mFinalTarget = nullptr;
     } else {
       mTarget->SetTransform(
           mFinalTarget->GetTransform().PostTranslate(-mTempRect.TopLeft()));
@@ -4080,17 +4096,22 @@ static already_AddRefed<SourceSurface> E
   if (!roundedOutSourceRect.ToIntRect(&roundedOutSourceRectInt)) {
     RefPtr<SourceSurface> surface(aSurface);
     return surface.forget();
   }
 
   RefPtr<DrawTarget> subrectDT = aTargetDT->CreateSimilarDrawTarget(
       roundedOutSourceRectInt.Size(), SurfaceFormat::B8G8R8A8);
 
-  if (!subrectDT) {
+  if (subrectDT) {
+    // See bug 1524554.
+    subrectDT->ClearRect(gfx::Rect());
+  }
+
+  if (!subrectDT || !subrectDT->IsValid()) {
     RefPtr<SourceSurface> surface(aSurface);
     return surface.forget();
   }
 
   *aSourceRect -= roundedOutSourceRect.TopLeft();
 
   subrectDT->CopySurface(aSurface, roundedOutSourceRectInt, IntPoint());
   return subrectDT->Snapshot();
--- a/gfx/2d/Factory.cpp
+++ b/gfx/2d/Factory.cpp
@@ -865,18 +865,24 @@ RefPtr<ID2D1DeviceContext> Factory::GetD
   } else {
     ptr = &mOffMTDC;
   }
 
   if (*ptr) {
     return *ptr;
   }
 
+  RefPtr<ID2D1Device> device = GetD2D1Device();
+
+  if (!device) {
+    return nullptr;
+  }
+
   RefPtr<ID2D1DeviceContext> dc;
-  HRESULT hr = mD2D1Device->CreateDeviceContext(
+  HRESULT hr = device->CreateDeviceContext(
       D2D1_DEVICE_CONTEXT_OPTIONS_ENABLE_MULTITHREADED_OPTIMIZATIONS,
       getter_AddRefs(dc));
 
   if (FAILED(hr)) {
     gfxCriticalError() << "Failed to create global device context";
     return nullptr;
   }
 
--- a/gfx/thebes/gfxBlur.cpp
+++ b/gfx/thebes/gfxBlur.cpp
@@ -83,16 +83,20 @@ already_AddRefed<DrawTarget> gfxAlphaBox
           blurDataSize);
     }
   } else if (mAccelerated) {
     // Note: CreateShadowDrawTarget is only implemented for Cairo, so we don't
     // care about mimicking this in the DrawTargetCapture case.
     mDrawTarget = aReferenceDT->CreateShadowDrawTarget(
         mBlur.GetSize(), SurfaceFormat::A8,
         AlphaBoxBlur::CalculateBlurSigma(aBlurRadius.width));
+    if (mDrawTarget) {
+      // See Bug 1526045 - this is to force DT initialization.
+      mDrawTarget->ClearRect(gfx::Rect());
+    }
   } else {
     // Make an alpha-only surface to draw on. We will play with the data after
     // everything is drawn to create a blur effect.
     // This will be freed when the DrawTarget dies
     mData = static_cast<uint8_t*>(calloc(1, blurDataSize));
     if (!mData) {
       return nullptr;
     }
--- a/js/src/vm/UnboxedObject.cpp
+++ b/js/src/vm/UnboxedObject.cpp
@@ -711,22 +711,16 @@ bool UnboxedLayout::makeNativeGroup(JSCo
       if (!PropagatePropertyTypes(cx, id, group, nativeGroup)) {
         return false;
       }
 
       // If we are OOM we may not be able to propagate properties.
       if (nativeGroup->unknownProperties(sweepNative)) {
         break;
       }
-
-      HeapTypeSet* nativeProperty =
-          nativeGroup->maybeGetProperty(sweepNative, id);
-      if (nativeProperty && nativeProperty->canSetDefinite(i)) {
-        nativeProperty->setDefinite(i);
-      }
     }
   } else {
     // If we skip, though, the new group had better agree.
     MOZ_ASSERT(nativeGroup->unknownProperties(sweepNative));
   }
 
   layout.nativeGroup_ = nativeGroup;
   layout.nativeShape_ = shape;
--- a/js/src/wasm/WasmSignalHandlers.cpp
+++ b/js/src/wasm/WasmSignalHandlers.cpp
@@ -98,16 +98,21 @@ using mozilla::DebugOnly;
 #    define RFP_sig(p) ((p)->sc_x[29])
 #    define RLR_sig(p) ((p)->sc_lr)
 #    define R31_sig(p) ((p)->sc_sp)
 #  endif
 #  if defined(__mips__)
 #    define EPC_sig(p) ((p)->sc_pc)
 #    define RFP_sig(p) ((p)->sc_regs[30])
 #  endif
+#  if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
+      defined(__PPC64LE__)
+#    define R01_sig(p) ((p)->sc_frame.fixreg[1])
+#    define R32_sig(p) ((p)->sc_frame.srr0)
+#  endif
 #elif defined(__linux__) || defined(__sun)
 #  if defined(__linux__)
 #    define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP])
 #    define EBP_sig(p) ((p)->uc_mcontext.gregs[REG_EBP])
 #    define ESP_sig(p) ((p)->uc_mcontext.gregs[REG_ESP])
 #  else
 #    define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_PC])
 #    define EBP_sig(p) ((p)->uc_mcontext.gregs[REG_EBP])
@@ -165,16 +170,21 @@ using mozilla::DebugOnly;
 #    define RFP_sig(p) ((p)->uc_mcontext.__gregs[_REG_X29])
 #    define RLR_sig(p) ((p)->uc_mcontext.__gregs[_REG_X30])
 #    define R31_sig(p) ((p)->uc_mcontext.__gregs[_REG_SP])
 #  endif
 #  if defined(__mips__)
 #    define EPC_sig(p) ((p)->uc_mcontext.__gregs[_REG_EPC])
 #    define RFP_sig(p) ((p)->uc_mcontext.__gregs[_REG_S8])
 #  endif
+#  if defined(__ppc64__) || defined(__PPC64__) || defined(__ppc64le__) || \
+      defined(__PPC64LE__)
+#    define R01_sig(p) ((p)->uc_mcontext.__gregs[_REG_R1])
+#    define R32_sig(p) ((p)->uc_mcontext.__gregs[_REG_PC])
+#  endif
 #elif defined(__DragonFly__) || defined(__FreeBSD__) || \
     defined(__FreeBSD_kernel__)
 #  define EIP_sig(p) ((p)->uc_mcontext.mc_eip)
 #  define EBP_sig(p) ((p)->uc_mcontext.mc_ebp)
 #  define ESP_sig(p) ((p)->uc_mcontext.mc_esp)
 #  define RIP_sig(p) ((p)->uc_mcontext.mc_rip)
 #  define RSP_sig(p) ((p)->uc_mcontext.mc_rsp)
 #  define RBP_sig(p) ((p)->uc_mcontext.mc_rbp)
@@ -194,16 +204,21 @@ using mozilla::DebugOnly;
 #    define RFP_sig(p) ((p)->uc_mcontext.mc_gpregs.gp_x[29])
 #    define RLR_sig(p) ((p)->uc_mcontext.mc_gpregs.gp_lr)
 #    define R31_sig(p) ((p)->uc_mcontext.mc_gpregs.gp_sp)
 #  endif
 #  if defined(__FreeBSD__) && defined(__mips__)
 #    define EPC_sig(p) ((p)->uc_mcontext.mc_pc)
 #    define RFP_sig(p) ((p)->uc_mcontext.mc_regs[30])
 #  endif
+#  if defined(__FreeBSD__) && (defined(__ppc64__) || defined(__PPC64__) || \
+                               defined(__ppc64le__) || defined(__PPC64LE__))
+#    define R01_sig(p) ((p)->uc_mcontext.mc_gpr[1])
+#    define R32_sig(p) ((p)->uc_mcontext.mc_srr0)
+#  endif
 #elif defined(XP_DARWIN)
 #  define EIP_sig(p) ((p)->thread.uts.ts32.__eip)
 #  define EBP_sig(p) ((p)->thread.uts.ts32.__ebp)
 #  define ESP_sig(p) ((p)->thread.uts.ts32.__esp)
 #  define RIP_sig(p) ((p)->thread.__rip)
 #  define RBP_sig(p) ((p)->thread.__rbp)
 #  define RSP_sig(p) ((p)->thread.__rsp)
 #  define R11_sig(p) ((p)->thread.__r[11])