зеркало из https://github.com/mozilla/pjs.git
More mem leak fixes.
This commit is contained in:
Родитель
2fc53d1f83
Коммит
eb7bd04505
|
@ -70,19 +70,18 @@ int writeout(const char* i_pURL, PRBool bUseStd =PR_TRUE)
|
|||
}
|
||||
if (NS_SUCCEEDED(result))
|
||||
{
|
||||
char* temp;
|
||||
nsXPIDLCString temp;
|
||||
PRInt32 port;
|
||||
pURL->GetScheme(&temp);
|
||||
cout << "Got " << (temp ? temp : "") << ',';
|
||||
pURL->GetPreHost(&temp);
|
||||
cout << (temp ? temp : "") << ',';
|
||||
pURL->GetHost(&temp);
|
||||
cout << (temp ? temp : "") << ',';
|
||||
pURL->GetScheme(getter_Copies(temp));
|
||||
cout << "Got " << (temp ? (const char*)temp : "") << ',';
|
||||
pURL->GetPreHost(getter_Copies(temp));
|
||||
cout << (temp ? (const char*)temp : "") << ',';
|
||||
pURL->GetHost(getter_Copies(temp));
|
||||
cout << (temp ? (const char*)temp : "") << ',';
|
||||
pURL->GetPort(&port);
|
||||
cout << port << ',';
|
||||
pURL->GetPath(&temp);
|
||||
cout << (temp ? temp : "") << endl;
|
||||
nsCRT::free(temp);
|
||||
pURL->GetPath(getter_Copies(temp));
|
||||
cout << (temp ? (const char*)temp : "") << endl;
|
||||
} else {
|
||||
cout << "Can not create URL" << endl;
|
||||
}
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include "nsRect.h"
|
||||
#include "plhash.h"
|
||||
#include "nsINameSpaceManager.h"
|
||||
#include "nsXPIDLString.h"
|
||||
|
||||
static NS_DEFINE_IID(kIDocumentLoaderObserverIID, NS_IDOCUMENT_LOADER_OBSERVER_IID);
|
||||
static NS_DEFINE_IID(kIDocumentViewerIID, NS_IDOCUMENT_VIEWER_IID);
|
||||
|
@ -593,11 +594,12 @@ nsWebCrawler::OkToLoad(const nsString& aURLSpec)
|
|||
|
||||
if (NS_OK == rv) {
|
||||
#ifdef NECKO
|
||||
char* host;
|
||||
nsXPIDLCString host;
|
||||
rv = url->GetHost(getter_Copies(host));
|
||||
#else
|
||||
const char* host;
|
||||
#endif
|
||||
rv = url->GetHost(&host);
|
||||
#endif
|
||||
if (rv == NS_OK) {
|
||||
PRInt32 hostlen = PL_strlen(host);
|
||||
|
||||
|
@ -627,9 +629,6 @@ nsWebCrawler::OkToLoad(const nsString& aURLSpec)
|
|||
}
|
||||
}
|
||||
ok = PR_FALSE;
|
||||
#ifdef NECKO
|
||||
nsCRT::free(host);
|
||||
#endif
|
||||
}
|
||||
NS_RELEASE(url);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче