Backed out 2 changesets (bug 1538968) for causing xpcshell failures on components/places/History.cpp CLOSED TREE
authorarthur.iakab <aiakab@mozilla.com>
Thu, 28 Mar 2019 06:02:01 +0200
changeset 466506 2e6a1dcc4205f8e27b6ae68e057da533b3f0d22a
parent 466505 c83b5d6e0777dc6df8ce917a388a3f46729d5dc7
child 466507 4503d8e8ee40c25bae1f0d91432a16282e1277b0
push id35768
push useropoprus@mozilla.com
push dateThu, 28 Mar 2019 09:55:54 +0000
treeherdermozilla-central@c045dd97faf2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1538968
milestone68.0a1
backs outafc9e5ce9971595f7fe6f46ed81f0a89ee65aeea
56e336b27bcb388ab4b0d04cd502224af26aa1d7
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
Backed out 2 changesets (bug 1538968) for causing xpcshell failures on components/places/History.cpp CLOSED TREE Backed out changeset afc9e5ce9971 (bug 1538968) Backed out changeset 56e336b27bcb (bug 1538968)
dom/html/HTMLLinkElement.cpp
toolkit/components/places/History.cpp
--- a/dom/html/HTMLLinkElement.cpp
+++ b/dom/html/HTMLLinkElement.cpp
@@ -112,33 +112,28 @@ bool HTMLLinkElement::HasDeferredDNSPref
 nsresult HTMLLinkElement::BindToTree(Document* aDocument, nsIContent* aParent,
                                      nsIContent* aBindingParent) {
   Link::ResetLinkState(false, Link::ElementHasHref());
 
   nsresult rv =
       nsGenericHTMLElement::BindToTree(aDocument, aParent, aBindingParent);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  bool isLocalizationLink =
-      aDocument && this->AttrValueIs(kNameSpaceID_None, nsGkAtoms::rel,
-                                     nsGkAtoms::localization, eIgnoreCase);
-
   if (Document* doc = GetComposedDoc()) {
-    if (!isLocalizationLink || !doc->NodePrincipal()->IsSystemPrincipal()) {
-      doc->RegisterPendingLinkUpdate(this);
-    }
+    doc->RegisterPendingLinkUpdate(this);
     TryDNSPrefetchOrPreconnectOrPrefetchOrPreloadOrPrerender();
   }
 
   void (HTMLLinkElement::*update)() =
       &HTMLLinkElement::UpdateStyleSheetInternal;
   nsContentUtils::AddScriptRunner(
       NewRunnableMethod("dom::HTMLLinkElement::BindToTree", this, update));
 
-  if (isLocalizationLink) {
+  if (aDocument && this->AttrValueIs(kNameSpaceID_None, nsGkAtoms::rel,
+                                     nsGkAtoms::localization, eIgnoreCase)) {
     aDocument->LocalizationLinkAdded(this);
   }
 
   CreateAndDispatchEvent(aDocument, NS_LITERAL_STRING("DOMLinkAdded"));
 
   return rv;
 }
 
--- a/toolkit/components/places/History.cpp
+++ b/toolkit/components/places/History.cpp
@@ -1440,26 +1440,16 @@ void StoreAndNotifyEmbedVisit(VisitData&
 History* History::gService = nullptr;
 
 History::History()
     : mShuttingDown(false),
       mShutdownMutex("History::mShutdownMutex"),
       mObservers(VISIT_OBSERVERS_INITIAL_CACHE_LENGTH),
       mRecentlyVisitedURIs(RECENTLY_VISITED_URIS_SIZE) {
   NS_ASSERTION(!gService, "Ruh-roh!  This service has already been created!");
-  if (XRE_IsParentProcess()) {
-    nsCOMPtr<nsIProperties> dirsvc = services::GetDirectoryService();
-    bool haveProfile = false;
-    MOZ_RELEASE_ASSERT(
-        dirsvc &&
-            NS_SUCCEEDED(
-                dirsvc->Has(NS_APP_USER_PROFILE_50_DIR, &haveProfile)) &&
-            haveProfile,
-        "Can't construct history service if there is no profile.");
-  }
   gService = this;
 
   nsCOMPtr<nsIObserverService> os = services::GetObserverService();
   NS_WARNING_ASSERTION(os, "Observer service was not found!");
   if (os) {
     (void)os->AddObserver(this, TOPIC_PLACES_SHUTDOWN, false);
   }
 }