mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 1064439, part 14 - Turn nsWebBrowser::mStream into an nsRefPtr and eliminate mStreamGuard. r=jst
This commit is contained in:
parent
1f8c51305b
commit
fab20cd349
@ -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;
|
||||
}
|
||||
|
@ -156,8 +156,7 @@ protected:
|
||||
uint32_t mPersistFlags;
|
||||
|
||||
// stream
|
||||
nsEmbedStream *mStream;
|
||||
nsCOMPtr<nsISupports> mStreamGuard;
|
||||
nsRefPtr<nsEmbedStream> mStream;
|
||||
|
||||
//Weak Reference interfaces...
|
||||
nsIWidget* mParentWidget;
|
||||
|
Loading…
Reference in New Issue
Block a user