Bug 1331966 - Don't assert against content JS during painting on Android. r=dvander, a=ritu
authorBill McCloskey <billm@mozilla.com>
Thu, 19 Jan 2017 11:00:15 -0800
changeset 358687 b123b9a23ce95286b60fd9b0bbd27a1cc12f4d1d
parent 358686 764865df33d2bfdcc052908046594b19488350ee
child 358688 9b49981936b607d4d6f02b098ecf7191c86f19be
push id10631
push userryanvm@gmail.com
push dateWed, 25 Jan 2017 22:56:06 +0000
treeherdermozilla-aurora@b123b9a23ce9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander, ritu
bugs1331966
milestone53.0a2
Bug 1331966 - Don't assert against content JS during painting on Android. r=dvander, a=ritu MozReview-Commit-ID: HU8V8jeBFX
layout/base/PresShell.cpp
--- a/layout/base/PresShell.cpp
+++ b/layout/base/PresShell.cpp
@@ -6236,21 +6236,27 @@ void
 PresShell::Paint(nsView*        aViewToPaint,
                  const nsRegion& aDirtyRegion,
                  uint32_t        aFlags)
 {
   PROFILER_LABEL("PresShell", "Paint",
     js::ProfileEntry::Category::GRAPHICS);
 
   Maybe<js::AutoAssertNoContentJS> nojs;
+
+  // On Android, Flash can call into content JS during painting, so we can't
+  // assert there. However, we don't rely on this assertion on Android because
+  // we don't paint while JS is running.
+#if !defined(MOZ_WIDGET_ANDROID)
   if (!(aFlags & nsIPresShell::PAINT_COMPOSITE)) {
     // We need to allow content JS when the flag is set since we may trigger
     // MozAfterPaint events in content in those cases.
     nojs.emplace(dom::danger::GetJSContext());
   }
+#endif
 
   NS_ASSERTION(!mIsDestroying, "painting a destroyed PresShell");
   NS_ASSERTION(aViewToPaint, "null view");
 
   MOZ_ASSERT(!mApproximateFrameVisibilityVisited, "Should have been cleared");
 
   if (!mIsActive) {
     return;