diff --git a/layout/inspector/src/inCSSValueSearch.cpp b/layout/inspector/src/inCSSValueSearch.cpp index 9b5f45779f6..1384085d470 100644 --- a/layout/inspector/src/inCSSValueSearch.cpp +++ b/layout/inspector/src/inCSSValueSearch.cpp @@ -46,18 +46,22 @@ static NS_DEFINE_CID(kInspectorCSSUtilsCID, NS_INSPECTORCSSUTILS_CID); /////////////////////////////////////////////////////////////////////////////// - inCSSValueSearch::inCSSValueSearch() + : mResults(nsnull), + mProperties(nsnull), + mLastResult(nsnull), + mBaseURL(nsnull), + mTextCriteria(nsnull), + mResultCount(0), + mPropertyCount(0), + mIsActive(PR_FALSE), + mHoldResults(PR_TRUE), + mReturnRelativeURLs(PR_TRUE), + mNormalizeChromeURLs(PR_FALSE) { NS_INIT_ISUPPORTS(); - - mHoldResults = PR_TRUE; - mReturnRelativeURLs = PR_FALSE; - mNormalizeChromeURLs = PR_FALSE; - mResultCount = 0; mProperties = new nsCSSProperty[100]; - mPropertyCount = 0; mCSSUtils = do_GetService(kInspectorCSSUtilsCID); } diff --git a/layout/inspector/src/inCSSValueSearch.h b/layout/inspector/src/inCSSValueSearch.h index c07cc549dd3..65195ce9a0c 100644 --- a/layout/inspector/src/inCSSValueSearch.h +++ b/layout/inspector/src/inCSSValueSearch.h @@ -63,21 +63,20 @@ public: virtual ~inCSSValueSearch(); protected: - PRBool mIsActive; - PRInt32 mResultCount; - PRBool mHoldResults; - nsVoidArray* mResults; - nsAutoString* mLastResult; nsCOMPtr mObserver; - + nsCOMPtr mCSSUtils; nsCOMPtr mDocument; + nsVoidArray* mResults; + nsCSSProperty* mProperties; + nsAutoString* mLastResult; nsAutoString* mBaseURL; + nsAutoString* mTextCriteria; + PRInt32 mResultCount; + PRUint32 mPropertyCount; + PRBool mIsActive; + PRBool mHoldResults; PRBool mReturnRelativeURLs; PRBool mNormalizeChromeURLs; - nsAutoString* mTextCriteria; - nsCSSProperty* mProperties; - PRUint32 mPropertyCount; - nsCOMPtr mCSSUtils; nsresult InitSearch(); nsresult KillSearch(PRInt16 aResult); diff --git a/layout/inspector/src/inFileSearch.cpp b/layout/inspector/src/inFileSearch.cpp index c25e2405b30..e330b7dfb48 100644 --- a/layout/inspector/src/inFileSearch.cpp +++ b/layout/inspector/src/inFileSearch.cpp @@ -45,10 +45,19 @@ /////////////////////////////////////////////////////////////////////////////// inFileSearch::inFileSearch() + : mSearchLoop(nsnull), + mBasePath(nsnull), + mTextCriteria(nsnull), + mFilenameCriteria(nsnull), + mDirsSearched(0), + mFilenameCriteriaCount(0), + mResultCount(0), + mIsActive(PR_FALSE), + mHoldResults(PR_FALSE), + mReturnRelativePaths(PR_FALSE), + mSearchRecursive(PR_FALSE) { NS_INIT_ISUPPORTS(); - - mSearchLoop = 0; } inFileSearch::~inFileSearch() diff --git a/layout/inspector/src/inFileSearch.h b/layout/inspector/src/inFileSearch.h index 13ec54a2875..0440e9dba43 100644 --- a/layout/inspector/src/inFileSearch.h +++ b/layout/inspector/src/inFileSearch.h @@ -59,27 +59,22 @@ public: virtual ~inFileSearch(); protected: - // inISearchProcess related - PRBool mIsActive; - PRInt32 mResultCount; - nsCOMPtr mLastResult; - nsCOMPtr mResults; - PRBool mHoldResults; - nsAutoString* mBasePath; - PRBool mReturnRelativePaths; nsCOMPtr mObserver; - - // inIFileSearch related + nsCOMPtr mResults; + nsCOMPtr mDirStack; + nsCOMPtr mLastResult; nsCOMPtr mSearchPath; + inSearchLoop* mSearchLoop; + nsAutoString* mBasePath; nsAutoString* mTextCriteria; PRUnichar** mFilenameCriteria; - PRUint32 mFilenameCriteriaCount; - PRBool mSearchRecursive; PRUint32 mDirsSearched; - - // asynchronous search related - nsCOMPtr mDirStack; - inSearchLoop* mSearchLoop; + PRUint32 mFilenameCriteriaCount; + PRInt32 mResultCount; + PRBool mIsActive; + PRBool mHoldResults; + PRBool mReturnRelativePaths; + PRBool mSearchRecursive; // life cycle of search nsresult InitSearch();