mPersistStateStore = do_CreateInstance("@mozilla.org/rdf/datasource;1?name=in-memory-datasource");
if (! mPersistStateStore) { mPersistStateStore = do_CreateInstance("@mozilla.org/rdf/datasource;1?name=in-memory-datasource"); }
nsXULOutlinerBuilder::SetOutliner(nsIOutlinerBoxObject* outliner){    mBoxObject = outliner;    // XXX seems like there's some frame churn going on here, so we'll    // only try to grab the root element if we don't have it    // already. (It better not change!)    if (! mRoot) {        // Get our root element        nsCOMPtr<nsIDOMElement> body;        mBoxObject->GetOutlinerBody(getter_AddRefs(body));        mRoot = do_QueryInterface(body);        LoadDataSources();        // So we can remember open state.        //        // XXX We should fix this so that if the document is        // ``trusted'', we use the localstore.        mPersistStateStore =            do_CreateInstance("@mozilla.org/rdf/datasource;1?name=in-memory-datasource");        if (! mPersistStateStore)            return NS_ERROR_FAILURE;        Rebuild();    }    return NS_OK;}