diff --git a/mozilla/extensions/xmlterm/base/mozLineTerm.cpp b/mozilla/extensions/xmlterm/base/mozLineTerm.cpp index 7ffb22efac1..dce65757f96 100644 --- a/mozilla/extensions/xmlterm/base/mozLineTerm.cpp +++ b/mozilla/extensions/xmlterm/base/mozLineTerm.cpp @@ -235,6 +235,8 @@ NS_IMETHODIMP mozLineTerm::GetSecurePrincipal(nsIDOMDocument *domDoc, { XMLT_LOG(mozLineTerm::GetSecurePrincipal,30,("\n")); + nsresult result; + if (!aPrincipalStr) return NS_ERROR_FAILURE; @@ -245,7 +247,10 @@ NS_IMETHODIMP mozLineTerm::GetSecurePrincipal(nsIDOMDocument *domDoc, if (!doc) return NS_ERROR_FAILURE; - nsCOMPtr principal=dont_AddRef(doc->GetDocumentPrincipal()); + nsCOMPtr principal; + result = doc->GetPrincipal(getter_AddRefs(principal)); + if (NS_FAILED(result)) + return result; #if 0 // Temporarily comented out, because ToString is not immplemented result = principal->ToString(aPrincipalStr); diff --git a/mozilla/extensions/xmlterm/base/mozXMLTermUtils.cpp b/mozilla/extensions/xmlterm/base/mozXMLTermUtils.cpp index 4574e2ce031..bca3390d9f3 100644 --- a/mozilla/extensions/xmlterm/base/mozXMLTermUtils.cpp +++ b/mozilla/extensions/xmlterm/base/mozXMLTermUtils.cpp @@ -337,7 +337,10 @@ mozXMLTermUtils::ExecuteScript(nsIDOMDocument* aDOMDocument, if (!doc) return NS_ERROR_FAILURE; - nsCOMPtr docPrincipal=dont_AddRef(doc->GetDocumentPrincipal()); + nsCOMPtr docPrincipal; + result = doc->GetPrincipal(getter_AddRefs(docPrincipal)); + if (NS_FAILED(result)) + return result; // Get document script context nsCOMPtr scriptContext; diff --git a/mozilla/extensions/xmlterm/geckoterm/Makefile.in b/mozilla/extensions/xmlterm/geckoterm/Makefile.in index 5da3a10cdf9..64cacd24c69 100644 --- a/mozilla/extensions/xmlterm/geckoterm/Makefile.in +++ b/mozilla/extensions/xmlterm/geckoterm/Makefile.in @@ -62,7 +62,7 @@ DEFINES = $(TK_CFLAGS) CPPSRCS = nsSetupRegistry.cpp \ mozSimpleContainer.cpp \ mozGeckoTerm.cpp \ - nsTimer.cpp \ +# nsTimer.cpp \ $(NULL) # Libraries to be linked