Fix crash (result of simultaneous check-in for 73936 and mstoltz check-in for 82495). r=Pike.

This commit is contained in:
peterv%netscape.com 2001-08-03 13:48:30 +00:00
Родитель 27db932f52
Коммит 711c13372e
2 изменённых файлов: 10 добавлений и 10 удалений

Просмотреть файл

@ -30,6 +30,7 @@
#include "nsIDOMDOMImplementation.h"
#include "nsIDOMEventReceiver.h"
#include "nsIEventQueueService.h"
#include "nsIPrivateDOMImplementation.h"
#include "nsIScriptSecurityManager.h"
#include "nsLayoutCID.h"
#include "nsNetUtil.h"
@ -181,6 +182,10 @@ nsSyncLoader::LoadDocument(nsIURI* documentURI, nsIDocument *aLoader, nsIDOMDocu
do_CreateInstance(kIDOMDOMImplementationCID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIPrivateDOMImplementation> privImplementation(do_QueryInterface(implementation, &rv));
NS_ENSURE_SUCCESS(rv, rv);
privImplementation->Init(documentURI);
// Create an empty document from it
nsString emptyStr;
nsCOMPtr<nsIDOMDocument> DOMDocument;
@ -202,11 +207,6 @@ nsSyncLoader::LoadDocument(nsIURI* documentURI, nsIDocument *aLoader, nsIDOMDocu
nsCOMPtr<nsIDocument> document = do_QueryInterface(DOMDocument, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// Partial Reset
document->SetDocumentURL(documentURI);
document->SetBaseURL(documentURI);
document->SetBaseTarget(NS_LITERAL_STRING(""));
nsCOMPtr<nsIEventQueueService> service =
do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);

Просмотреть файл

@ -30,6 +30,7 @@
#include "nsIDOMDOMImplementation.h"
#include "nsIDOMEventReceiver.h"
#include "nsIEventQueueService.h"
#include "nsIPrivateDOMImplementation.h"
#include "nsIScriptSecurityManager.h"
#include "nsLayoutCID.h"
#include "nsNetUtil.h"
@ -181,6 +182,10 @@ nsSyncLoader::LoadDocument(nsIURI* documentURI, nsIDocument *aLoader, nsIDOMDocu
do_CreateInstance(kIDOMDOMImplementationCID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
nsCOMPtr<nsIPrivateDOMImplementation> privImplementation(do_QueryInterface(implementation, &rv));
NS_ENSURE_SUCCESS(rv, rv);
privImplementation->Init(documentURI);
// Create an empty document from it
nsString emptyStr;
nsCOMPtr<nsIDOMDocument> DOMDocument;
@ -202,11 +207,6 @@ nsSyncLoader::LoadDocument(nsIURI* documentURI, nsIDocument *aLoader, nsIDOMDocu
nsCOMPtr<nsIDocument> document = do_QueryInterface(DOMDocument, &rv);
NS_ENSURE_SUCCESS(rv, rv);
// Partial Reset
document->SetDocumentURL(documentURI);
document->SetBaseURL(documentURI);
document->SetBaseTarget(NS_LITERAL_STRING(""));
nsCOMPtr<nsIEventQueueService> service =
do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);