Bug 1279440 - Fix prefetch for rel=next. r=smaug, a=gchang
authorDragana Damjanovic dd.mozilla@gmail.com
Thu, 23 Jun 2016 08:52:00 +0200
changeset 339699 ca386d377f0b3ff68ec0b1092eae7a9290a0ba5d
parent 339698 8cb88950d5210bd0c6ca3e5fb03881daca74e278
child 339700 59f710308c265042d195f67fddc1460ca0399b34
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug, gchang
bugs1279440
milestone49.0a2
Bug 1279440 - Fix prefetch for rel=next. r=smaug, a=gchang
dom/base/Link.cpp
--- a/dom/base/Link.cpp
+++ b/dom/base/Link.cpp
@@ -99,17 +99,17 @@ Link::TryDNSPrefetchPreconnectOrPrefetch
       (linkTypes & nsStyleLinkElement::eNEXT)){
     nsCOMPtr<nsIPrefetchService> prefetchService(do_GetService(NS_PREFETCHSERVICE_CONTRACTID));
     if (prefetchService) {
       nsCOMPtr<nsIURI> uri(GetURI());
       if (uri) {
         nsCOMPtr<nsIDOMNode> domNode = GetAsDOMNode(mElement);
         prefetchService->PrefetchURI(uri,
                                      mElement->OwnerDoc()->GetDocumentURI(),
-                                     domNode, true);
+                                     domNode, linkTypes & nsStyleLinkElement::ePREFETCH);
         return;
       }
     }
   }
 
   if (linkTypes & nsStyleLinkElement::ePRECONNECT) {
     nsCOMPtr<nsIURI> uri(GetURI());
     if (uri && mElement->OwnerDoc()) {