Back out bug 1323207, part 2 - Assert early if we're painting at various points we enter JS (a=backout)
authorBill McCloskey <billm@mozilla.com>
Fri, 06 Jan 2017 12:58:58 -0800
changeset 329032 335c5d74c1a1be434be18cb38230b13ddbbd342e
parent 329031 7faa709241684a5a2de01b5978a25db4e491d620
child 329033 51d359b72c57261be304d66a1704f7e52fca220c
push id31194
push usercbook@mozilla.com
push dateThu, 12 Jan 2017 09:14:59 +0000
treeherdermozilla-central@97d6f7364394 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1323207
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Back out bug 1323207, part 2 - Assert early if we're painting at various points we enter JS (a=backout) This reverts commit cc6bc31c9f3fb10877292b31c1cf26927856a837. MozReview-Commit-ID: Dljoh4lYVZ9
dom/base/nsContentUtils.cpp
image/ScriptedNotificationObserver.cpp
--- a/dom/base/nsContentUtils.cpp
+++ b/dom/base/nsContentUtils.cpp
@@ -6743,18 +6743,16 @@ nsContentUtils::IsPatternMatching(nsAStr
                                   nsIDocument* aDocument)
 {
   NS_ASSERTION(aDocument, "aDocument should be a valid pointer (not null)");
 
   AutoJSAPI jsapi;
   jsapi.Init();
   JSContext* cx = jsapi.cx();
 
-  MOZ_RELEASE_ASSERT(js::AllowGCBarriers(cx), "IsPatternMatching can enter the JS engine during painting. See bug 1310335.");
-
   // We can use the junk scope here, because we're just using it for
   // regexp evaluation, not actual script execution.
   JSAutoCompartment ac(cx, xpc::UnprivilegedJunkScope());
 
   // The pattern has to match the entire value.
   aPattern.Insert(NS_LITERAL_STRING("^(?:"), 0);
   aPattern.AppendLiteral(")$");
 
--- a/image/ScriptedNotificationObserver.cpp
+++ b/image/ScriptedNotificationObserver.cpp
@@ -26,19 +26,16 @@ ScriptedNotificationObserver::ScriptedNo
 : mInner(aInner)
 { }
 
 NS_IMETHODIMP
 ScriptedNotificationObserver::Notify(imgIRequest* aRequest,
                                      int32_t aType,
                                      const nsIntRect* /*aUnused*/)
 {
-  MOZ_RELEASE_ASSERT(js::AllowGCBarriers(CycleCollectedJSContext::Get()->Context()),
-                     "sending image notification to JS observer during painting. See bug 1311841");
-
   if (aType == imgINotificationObserver::SIZE_AVAILABLE) {
     return mInner->SizeAvailable(aRequest);
   }
   if (aType == imgINotificationObserver::FRAME_UPDATE) {
     return mInner->FrameUpdate(aRequest);
   }
   if (aType == imgINotificationObserver::FRAME_COMPLETE) {
     return mInner->FrameComplete(aRequest);