forked from mirrors/gecko-dev
Bug 512518 followup: fix 'unused variable' warnings in nsRegressionTester.cpp, and use & instead of && for bit-masking operation. r=dbaron
This commit is contained in:
parent
b96097a2d0
commit
475462560c
1 changed files with 9 additions and 6 deletions
|
|
@ -81,27 +81,30 @@ nsRegressionTester::~nsRegressionTester()
|
||||||
NS_IMPL_ISUPPORTS1(nsRegressionTester, nsILayoutRegressionTester)
|
NS_IMPL_ISUPPORTS1(nsRegressionTester, nsILayoutRegressionTester)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsRegressionTester::DumpFrameModel(nsIDOMWindow *aWindowToDump, nsILocalFile *aDestFile, PRUint32 aFlagsMask, PRInt32 *aResult)
|
nsRegressionTester::DumpFrameModel(nsIDOMWindow *aWindowToDump,
|
||||||
|
nsILocalFile *aDestFile,
|
||||||
|
PRUint32 aFlagsMask, PRInt32 *aResult)
|
||||||
{
|
{
|
||||||
NS_ENSURE_ARG(aWindowToDump);
|
NS_ENSURE_ARG(aWindowToDump);
|
||||||
NS_ENSURE_ARG_POINTER(aResult);
|
NS_ENSURE_ARG_POINTER(aResult);
|
||||||
|
|
||||||
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
|
||||||
PRUint32 busyFlags;
|
|
||||||
PRBool stillLoading;
|
|
||||||
|
|
||||||
*aResult = DUMP_RESULT_ERROR;
|
*aResult = DUMP_RESULT_ERROR;
|
||||||
|
|
||||||
#ifndef DEBUG
|
#ifndef DEBUG
|
||||||
return NS_ERROR_NOT_AVAILABLE;
|
return NS_ERROR_NOT_AVAILABLE;
|
||||||
#else
|
#else
|
||||||
|
nsresult rv = NS_ERROR_NOT_AVAILABLE;
|
||||||
|
PRUint32 busyFlags;
|
||||||
|
PRBool stillLoading;
|
||||||
|
|
||||||
nsCOMPtr<nsIDocShell> docShell;
|
nsCOMPtr<nsIDocShell> docShell;
|
||||||
rv = GetDocShellFromWindow(aWindowToDump, getter_AddRefs(docShell));
|
rv = GetDocShellFromWindow(aWindowToDump, getter_AddRefs(docShell));
|
||||||
if (NS_FAILED(rv)) return rv;
|
if (NS_FAILED(rv)) return rv;
|
||||||
|
|
||||||
// find out if the document is loaded
|
// find out if the document is loaded
|
||||||
docShell->GetBusyFlags(&busyFlags);
|
docShell->GetBusyFlags(&busyFlags);
|
||||||
stillLoading = busyFlags && (nsIDocShell::BUSY_FLAGS_BUSY | nsIDocShell::BUSY_FLAGS_PAGE_LOADING);
|
stillLoading = busyFlags & (nsIDocShell::BUSY_FLAGS_BUSY |
|
||||||
|
nsIDocShell::BUSY_FLAGS_PAGE_LOADING);
|
||||||
if (stillLoading)
|
if (stillLoading)
|
||||||
{
|
{
|
||||||
*aResult = DUMP_RESULT_LOADING;
|
*aResult = DUMP_RESULT_LOADING;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue