extraction particle draft
authorBotond Ballo <botond@mozilla.com>
Mon, 13 Apr 2015 17:38:33 -0400
changeset 257074 d2aa21b9d0d23280f309af1f3e09004ae0d8f82e
parent 257073 fd77c6d2b5e1b9a109c3d205c88215e278fb6270
child 257075 c747612158e803ae0344f99fcda7407b157eac08
push id1521
push userbballo@mozilla.com
push dateTue, 14 Apr 2015 15:47:38 +0000
milestone40.0a1
extraction particle
layout/base/nsLayoutUtils.cpp
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -1062,16 +1062,19 @@ nsLayoutUtils::GetDisplayPort(nsIContent
 
 bool
 nsLayoutUtils::SetDisplayPortMargins(nsIContent* aContent,
                                      nsIPresShell* aPresShell,
                                      const ScreenMargin& aMargins,
                                      uint32_t aPriority,
                                      RepaintMode aRepaintMode)
 {
+  MOZ_ASSERT(aContent);
+  MOZ_ASSERT(aContent->GetCurrentDoc() == aPresShell->GetDocument());
+
   DisplayPortMarginsPropertyData* currentData =
     static_cast<DisplayPortMarginsPropertyData*>(aContent->GetProperty(nsGkAtoms::DisplayPortMargins));
   if (currentData && currentData->mPriority > aPriority) {
     return false;
   }
 
   aContent->SetProperty(nsGkAtoms::DisplayPortMargins,
                         new DisplayPortMarginsPropertyData(