Use do_GetService instead of nsServiceManager::GetService plus some re-indentation. b=105458 r=dougt@netscape.com sr=blizzard@mozilla.org

This commit is contained in:
locka%iol.ie 2001-10-25 11:37:18 +00:00
parent 6565dffec6
commit 6119d648ca
2 changed files with 12 additions and 13 deletions

View File

@ -147,7 +147,6 @@ CMozillaBrowser::CMozillaBrowser()
// Initialize layout interfaces
mWebBrowserAsWin = nsnull;
mPrefs = nsnull;
mValidBrowserFlag = FALSE;
// Ready state of control
@ -155,7 +154,6 @@ CMozillaBrowser::CMozillaBrowser()
// Create the container that handles some things for us
mWebBrowserContainer = NULL;
mEditor = NULL;
// Controls starts off unbusy
mBusyFlag = FALSE;
@ -982,9 +980,7 @@ HRESULT CMozillaBrowser::Initialize()
rv = NS_InitEmbedding(binDir, provider);
// Load preferences service
rv = nsServiceManager::GetService(kPrefCID,
NS_GET_IID(nsIPref),
(nsISupports **)&mPrefs);
mPrefs = do_GetService(kPrefCID, &rv);
if (NS_FAILED(rv))
{
NG_ASSERT(0);
@ -1050,7 +1046,7 @@ HRESULT CMozillaBrowser::Terminate()
{
#endif
NS_IF_RELEASE(mPrefs);
mPrefs = nsnull;
NS_TermEmbedding();
#ifdef HACK_NON_REENTRANCY

View File

@ -363,19 +363,22 @@ protected:
static nsVoidArray sBrowserList;
// Pointer to web shell manager
CWebBrowserContainer * mWebBrowserContainer;
CWebBrowserContainer * mWebBrowserContainer;
// CComObject to IHTMLDocument implementer
CIEHtmlDocumentInstance * mIERootDocument;
// Mozilla interfaces
nsCOMPtr<nsIWebBrowser> mWebBrowser;
nsCOMPtr<nsIWebBrowser> mWebBrowser;
nsCOMPtr<nsIBaseWindow> mWebBrowserAsWin;
// Context menu
nsCOMPtr<nsIDOMNode> mContextNode;
nsIPref * mPrefs;
nsIEditor * mEditor;
// Prefs service
nsCOMPtr<nsIPref> mPrefs;
// Editor associated with this browser instance.
nsCOMPtr<nsIEditor> mEditor;
// Flag to indicate if browser is created or not
BOOL mValidBrowserFlag;
@ -386,13 +389,13 @@ protected:
// Flag to indicate if the browser has a drop target
BOOL mHaveDropTargetFlag;
// Contains an error message if startup went wrong
tstring mStartupErrorMessage;
tstring mStartupErrorMessage;
// Property list
PropertyList mPropertyList;
// Ready status of control
READYSTATE mBrowserReadyState;
READYSTATE mBrowserReadyState;
// List of registered browser helper objects
CComUnkPtr *mBrowserHelperList;
CComUnkPtr *mBrowserHelperList;
ULONG mBrowserHelperListCount;
// Post data from last navigate operation
CComVariant mLastPostData;