From 65516d234817e653f1e9f486ccaeafab243531cb Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Fri, 5 Dec 2008 12:48:27 +0200 Subject: [PATCH] Bug 467123 - Document.cloneNode() failed in a JS component, r+sr=bz --- content/base/src/nsDocument.cpp | 3 +- content/base/test/chrome/Makefile.in | 1 + content/base/test/chrome/test_bug467123.xul | 37 +++++++++++++++++++++ 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 content/base/test/chrome/test_bug467123.xul diff --git a/content/base/src/nsDocument.cpp b/content/base/src/nsDocument.cpp index 62e0c83341f5..b1bb631be38d 100644 --- a/content/base/src/nsDocument.cpp +++ b/content/base/src/nsDocument.cpp @@ -7347,8 +7347,7 @@ nsDocument::CloneDocHelper(nsDocument* clone) const clone->nsDocument::SetDocumentURI(nsIDocument::GetDocumentURI()); // Must set the principal first, since SetBaseURI checks it. clone->SetPrincipal(NodePrincipal()); - rv = clone->SetBaseURI(nsIDocument::GetBaseURI()); - NS_ENSURE_SUCCESS(rv, rv); + clone->mDocumentBaseURI = mDocumentBaseURI; // Set scripting object PRBool hasHadScriptObject = PR_TRUE; diff --git a/content/base/test/chrome/Makefile.in b/content/base/test/chrome/Makefile.in index ed7204b7ddb8..96a528b39717 100644 --- a/content/base/test/chrome/Makefile.in +++ b/content/base/test/chrome/Makefile.in @@ -51,6 +51,7 @@ _CHROME_FILES = \ test_bug421622.xul \ test_bug429785.xul \ test_bug430050.xul \ + test_bug467123.xul \ $(NULL) libs:: $(_TEST_FILES) diff --git a/content/base/test/chrome/test_bug467123.xul b/content/base/test/chrome/test_bug467123.xul new file mode 100644 index 000000000000..f313a848a381 --- /dev/null +++ b/content/base/test/chrome/test_bug467123.xul @@ -0,0 +1,37 @@ + + + + + + + + + + + Mozilla Bug 467123 + + + + +