Bug 1061469 - part 5: Fixing up update for Imports. r=mrbkap
authorGabor Krizsanits <gkrizsanits@mozilla.com>
Mon, 06 Oct 2014 11:43:58 +0200
changeset 208998 cd96e70b321c4ea76d7c0ee889ca8844fa9d35a8
parent 208997 1d90c36242034820a0e3316751a1ca69388ceb87
child 208999 da69c023cce9b160a62b09997c579d5627d95838
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersmrbkap
bugs1061469
milestone35.0a1
Bug 1061469 - part 5: Fixing up update for Imports. r=mrbkap
content/base/src/ImportManager.cpp
--- a/content/base/src/ImportManager.cpp
+++ b/content/base/src/ImportManager.cpp
@@ -86,16 +86,20 @@ ImportLoader::Updater::GetReferrerChain(
   for (uint32_t i = 0; i < l / 2; i++) {
     Swap(aResult[i], aResult[l - i - 1]);
   }
 }
 
 bool
 ImportLoader::Updater::ShouldUpdate(nsTArray<nsINode*>& aNewPath)
 {
+  if (mLoader->Manager()->GetNearestPredecessor(mLoader->GetMainReferrer()) !=
+      mLoader->mBlockingPredecessor) {
+    return true;
+  }
   // Let's walk down on the main referrer chains of both the current main and
   // the new link, and find the last pair of links that are from the same
   // document. This is the junction point between the two referrer chain. Their
   // order in the subimport list of that document will determine if we have to
   // update the spanning tree or this new edge changes nothing in the script
   // execution order.
   nsTArray<nsINode*> oldPath;
   GetReferrerChain(mLoader->mLinks[mLoader->mMainReferrer], oldPath);