Bug 1373672 - Part 2: nsDocShell::mChildOffset should be signed, r=smaug
☠☠ backed out by 6da77209f66b ☠ ☠
authorMichael Layzell <michael@thelayzells.com>
Tue, 01 Aug 2017 11:20:56 +0200
changeset 423311 dc318b0913b97dba5f8c8ec2735f96b7d5a30d69
parent 423310 e62c93a8c93b83f21e417fc61ee4f163ea48cb8f
child 423312 36bb09c4b28edaefacb7199cd1d73e010753ecb9
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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
Bug 1373672 - Part 2: nsDocShell::mChildOffset should be signed, r=smaug All consumers of this value expect the passed-in value to be signed, and a negative value is stored into this variable (-1) when the docshell was dynamically added. It makes more sense for this to be signed. MozReview-Commit-ID: 8iKDOAx7O2R
--- a/docshell/base/nsDocShell.cpp
+++ b/docshell/base/nsDocShell.cpp
@@ -4078,17 +4078,17 @@ nsDocShell::SetTreeOwner(nsIDocShellTree
   // performance-critical, let's be safe and unconditionally recompute this
   // state whenever dependent state changes.
   return NS_OK;
-nsDocShell::SetChildOffset(uint32_t aChildOffset)
+nsDocShell::SetChildOffset(int32_t aChildOffset)
   mChildOffset = aChildOffset;
   return NS_OK;
 nsDocShell::GetHistoryID(nsID** aID)
--- a/docshell/base/nsDocShell.h
+++ b/docshell/base/nsDocShell.h
@@ -901,17 +901,17 @@ protected:
   nsIDocShellTreeOwner* mTreeOwner; // Weak Reference
   mozilla::dom::EventTarget* mChromeEventHandler; // Weak Reference
   eCharsetReloadState mCharsetReloadState;
   // Offset in the parent's child list.
   // -1 if the docshell is added dynamically to the parent shell.
-  uint32_t mChildOffset;
+  int32_t mChildOffset;
   uint32_t mBusyFlags;
   uint32_t mAppType;
   uint32_t mLoadType;
   int32_t mMarginWidth;
   int32_t mMarginHeight;
   // This can either be a content docshell or a chrome docshell. After
--- a/docshell/base/nsIDocShell.idl
+++ b/docshell/base/nsIDocShell.idl
@@ -546,17 +546,17 @@ interface nsIDocShell : nsIDocShellTreeI
    * For a new document load, this will be the channel of the previous document
    * until after OnLocationChange fires.
   readonly attribute nsIChannel currentDocumentChannel;
    * Set the offset of this child in its container.
-  [noscript] void setChildOffset(in unsigned long offset);
+  [noscript] void setChildOffset(in long offset);
    * Find out whether the docshell is currently in the middle of a page
    * transition. This is set just before the pagehide/unload events fire.
   readonly attribute boolean isInUnload;