From 711c13372ed8a384e4a7fdaf4590fddc1fc696a9 Mon Sep 17 00:00:00 2001 From: "peterv%netscape.com" Date: Fri, 3 Aug 2001 13:48:30 +0000 Subject: [PATCH] Fix crash (result of simultaneous check-in for 73936 and mstoltz check-in for 82495). r=Pike. --- content/base/src/nsSyncLoadService.cpp | 10 +++++----- .../transformiix/source/xml/parser/nsSyncLoader.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/content/base/src/nsSyncLoadService.cpp b/content/base/src/nsSyncLoadService.cpp index 3facd33df08c..21957a3a2e95 100644 --- a/content/base/src/nsSyncLoadService.cpp +++ b/content/base/src/nsSyncLoadService.cpp @@ -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 privImplementation(do_QueryInterface(implementation, &rv)); + NS_ENSURE_SUCCESS(rv, rv); + privImplementation->Init(documentURI); + // Create an empty document from it nsString emptyStr; nsCOMPtr DOMDocument; @@ -202,11 +207,6 @@ nsSyncLoader::LoadDocument(nsIURI* documentURI, nsIDocument *aLoader, nsIDOMDocu nsCOMPtr document = do_QueryInterface(DOMDocument, &rv); NS_ENSURE_SUCCESS(rv, rv); - // Partial Reset - document->SetDocumentURL(documentURI); - document->SetBaseURL(documentURI); - document->SetBaseTarget(NS_LITERAL_STRING("")); - nsCOMPtr service = do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv); diff --git a/extensions/transformiix/source/xml/parser/nsSyncLoader.cpp b/extensions/transformiix/source/xml/parser/nsSyncLoader.cpp index 3facd33df08c..21957a3a2e95 100644 --- a/extensions/transformiix/source/xml/parser/nsSyncLoader.cpp +++ b/extensions/transformiix/source/xml/parser/nsSyncLoader.cpp @@ -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 privImplementation(do_QueryInterface(implementation, &rv)); + NS_ENSURE_SUCCESS(rv, rv); + privImplementation->Init(documentURI); + // Create an empty document from it nsString emptyStr; nsCOMPtr DOMDocument; @@ -202,11 +207,6 @@ nsSyncLoader::LoadDocument(nsIURI* documentURI, nsIDocument *aLoader, nsIDOMDocu nsCOMPtr document = do_QueryInterface(DOMDocument, &rv); NS_ENSURE_SUCCESS(rv, rv); - // Partial Reset - document->SetDocumentURL(documentURI); - document->SetBaseURL(documentURI); - document->SetBaseTarget(NS_LITERAL_STRING("")); - nsCOMPtr service = do_GetService(NS_EVENTQUEUESERVICE_CONTRACTID, &rv); NS_ENSURE_SUCCESS(rv, rv);