diff --git a/mozilla/rdf/datasource/src/nsXULContentSink.cpp b/mozilla/rdf/datasource/src/nsXULContentSink.cpp index e7f873ac481..83d673461b7 100644 --- a/mozilla/rdf/datasource/src/nsXULContentSink.cpp +++ b/mozilla/rdf/datasource/src/nsXULContentSink.cpp @@ -846,6 +846,16 @@ XULContentSinkImpl::Init(nsIDocument* aDocument, nsIWebShell* aWebShell, nsIRDFD if (! aDocument) return NS_ERROR_NULL_POINTER; + nsCOMPtr childDocument; + childDocument = do_QueryInterface(mDocument); + if (childDocument != nsnull) { + childDocument->GetFragmentRoot(&mFragmentRoot); + if (mFragmentRoot) { + // We're totally a subdocument. Find the root document's + // data source and make assertions there. + } + } + NS_PRECONDITION(aDataSource != nsnull, "null ptr"); if (! aDataSource) return NS_ERROR_NULL_POINTER; @@ -873,16 +883,6 @@ XULContentSinkImpl::Init(nsIDocument* aDocument, nsIWebShell* aWebShell, nsIRDFD mState = eXULContentSinkState_InProlog; - nsCOMPtr childDocument; - childDocument = do_QueryInterface(mDocument); - if (childDocument != nsnull) { - childDocument->GetFragmentRoot(&mFragmentRoot); - if (mFragmentRoot) { - // We're totally a subdocument. Find the root document's - // data source and make assertions there. - } - } - return NS_OK; }