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
This commit is contained in:
Michael Layzell
2017-08-01 11:20:56 +02:00
parent 12284f3ab0
commit 44d2ed5cd5
3 changed files with 3 additions and 3 deletions

View File

@@ -4083,7 +4083,7 @@ nsDocShell::SetTreeOwner(nsIDocShellTreeOwner* aTreeOwner)
}
NS_IMETHODIMP
nsDocShell::SetChildOffset(uint32_t aChildOffset)
nsDocShell::SetChildOffset(int32_t aChildOffset)
{
mChildOffset = aChildOffset;
return NS_OK;

View File

@@ -906,7 +906,7 @@ protected:
// 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;

View File

@@ -551,7 +551,7 @@ interface nsIDocShell : nsIDocShellTreeItem
/**
* 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