Bug 1064439, part 14 - Turn nsWebBrowser::mStream into an nsRefPtr and eliminate mStreamGuard. r=jst

This commit is contained in:
Andrew McCreight 2014-12-16 09:18:02 -08:00
parent 1f8c51305b
commit fab20cd349
2 changed files with 1 additions and 6 deletions

View File

@ -76,7 +76,6 @@ nsWebBrowser::nsWebBrowser() :
mPersistCurrentState(nsIWebBrowserPersist::PERSIST_STATE_READY),
mPersistResult(NS_OK),
mPersistFlags(nsIWebBrowserPersist::PERSIST_FLAGS_NONE),
mStream(nullptr),
mParentWidget(nullptr),
mListenerArray(nullptr)
{
@ -1799,7 +1798,6 @@ NS_IMETHODIMP nsWebBrowser::OpenStream(nsIURI *aBaseURI, const nsACString& aCont
if (!mStream) {
mStream = new nsEmbedStream();
mStreamGuard = do_QueryInterface(mStream);
mStream->InitOwner(this);
rv = mStream->Init();
if (NS_FAILED(rv))
@ -1828,9 +1826,7 @@ NS_IMETHODIMP nsWebBrowser::CloseStream()
return NS_ERROR_FAILURE;
rv = mStream->CloseStream();
// release
mStream = nullptr;
mStreamGuard = nullptr;
return rv;
}

View File

@ -156,8 +156,7 @@ protected:
uint32_t mPersistFlags;
// stream
nsEmbedStream *mStream;
nsCOMPtr<nsISupports> mStreamGuard;
nsRefPtr<nsEmbedStream> mStream;
//Weak Reference interfaces...
nsIWidget* mParentWidget;