Backed out changeset a8b3690476c9 (bug 1318506)
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 01 Dec 2016 13:35:19 +0100
changeset 325005 9efd9724f08fd0dfe83f1deafe5375b12f6111ad
parent 325004 ca73f213f05a4ae120619fbee6fe6cd11d577638
child 325006 237125712ba359a94f5f7f91e9884be64269e9a4
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
bugs1318506
milestone53.0a1
backs outa8b3690476c918318e32b9b88ef2b5894ae4185d
Backed out changeset a8b3690476c9 (bug 1318506)
dom/base/nsDocument.cpp
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -5066,20 +5066,19 @@ nsDocument::UnblockDOMContentLoaded()
   MOZ_ASSERT(mBlockDOMContentLoaded);
   if (--mBlockDOMContentLoaded != 0 || mDidFireDOMContentLoaded) {
     return;
   }
   mDidFireDOMContentLoaded = true;
 
   MOZ_ASSERT(mReadyState == READYSTATE_INTERACTIVE);
   if (!mSynchronousDOMContentLoaded) {
-    MOZ_RELEASE_ASSERT(NS_IsMainThread());
     nsCOMPtr<nsIRunnable> ev =
       NewRunnableMethod(this, &nsDocument::DispatchContentLoadedEvents);
-    Dispatch("DispatchContentLoadedEvents", TaskCategory::Other, ev.forget());
+    NS_DispatchToCurrentThread(ev);
   } else {
     DispatchContentLoadedEvents();
   }
 }
 
 void
 nsDocument::ContentStateChanged(nsIContent* aContent, EventStates aStateMask)
 {