Add assertion to detect case that bent caught in record-and-replay on privatebrowsing tests so we can learn what portion of orange (hangs) in those tests it's responsible for, and get stacks pointing to the problem.
authorL. David Baron <dbaron@dbaron.org>
Thu, 21 Oct 2010 20:37:49 -0700
changeset 56350 d045978f60071598f08f6351ccaebafff1f42567
parent 56349 3515ce21be424e4d22ce8884bcaeddaa5ac8f2fe
child 56351 04f831cccd8b2f840ea37cf19f350fa18cf7645a
push id16496
push userdbaron@mozilla.com
push dateFri, 22 Oct 2010 03:38:07 +0000
treeherdermozilla-central@bafbdc85d57b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone2.0b8pre
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
Add assertion to detect case that bent caught in record-and-replay on privatebrowsing tests so we can learn what portion of orange (hangs) in those tests it's responsible for, and get stacks pointing to the problem.
view/src/nsView.cpp
--- a/view/src/nsView.cpp
+++ b/view/src/nsView.cpp
@@ -989,16 +989,19 @@ nsPoint nsIView::GetOffsetTo(const nsIVi
 
 nsPoint nsView::GetOffsetTo(const nsView* aOther) const
 {
   return GetOffsetTo(aOther, GetViewManager()->AppUnitsPerDevPixel());
 }
 
 nsPoint nsView::GetOffsetTo(const nsView* aOther, const PRInt32 aAPD) const
 {
+  NS_ABORT_IF_FALSE(GetParent() || !aOther || aOther->GetParent() ||
+                    this == aOther, "caller of (outer) GetOffsetTo must not "
+                    "pass unrelated views");
   // We accumulate the final result in offset
   nsPoint offset(0, 0);
   // The offset currently accumulated at the current APD
   nsPoint docOffset(0, 0);
   const nsView* v = this;
   nsViewManager* currVM = v->GetViewManager();
   PRInt32 currAPD = currVM->AppUnitsPerDevPixel();
   const nsView* root = nsnull;