Bug 207864 Some things GetService "@mozilla.org/rdf/container;1"

r=neil sr=jag
This commit is contained in:
timeless%mozdev.org 2004-05-17 23:23:47 +00:00
Родитель 2158473744
Коммит 99a43c4d07
4 изменённых файлов: 7 добавлений и 10 удалений

Просмотреть файл

@ -73,7 +73,7 @@ const NC_BASE = RDF.GetResource(NC + "base");
const NC_DEFAULTTOPIC = RDF.GetResource(NC + "defaulttopic");
const RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils);
const RDFContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);
var RDFContainer = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer);
const CONSOLE_SERVICE = Components.classes['@mozilla.org/consoleservice;1'].getService(Components.interfaces.nsIConsoleService);
var urnID = 0;

Просмотреть файл

@ -2579,7 +2579,7 @@ nsBookmarksService::InsertResource(nsIRDFResource* aResource,
// Add to container if the parent folder is non null
if (aParentFolder)
{
nsCOMPtr<nsIRDFContainer> container(do_GetService("@mozilla.org/rdf/container;1", &rv));
nsCOMPtr<nsIRDFContainer> container(do_CreateInstance("@mozilla.org/rdf/container;1", &rv));
if (NS_FAILED(rv))
return rv;
rv = container->Init(mInner, aParentFolder);
@ -4539,7 +4539,7 @@ nsBookmarksService::insertBookmarkItem(nsIRDFResource *aRelativeNode,
if (NS_FAILED(rv)) return rv;
}
nsCOMPtr<nsIRDFContainer> container(do_GetService("@mozilla.org/rdf/container;1", &rv));
nsCOMPtr<nsIRDFContainer> container(do_CreateInstance("@mozilla.org/rdf/container;1", &rv));
if (NS_FAILED(rv)) return rv;
rv = container->Init(this, rParent);

Просмотреть файл

@ -58,7 +58,7 @@ function LoadAvailableCharSets(converterRoot)
var kNC_Root = rdf.GetResource(converterRoot);
var kNC_name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name");
var rdfDataSource = rdf.GetDataSource("rdf:charset-menu");
var rdfContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);
var rdfContainer = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer);
rdfContainer.Init(rdfDataSource, kNC_Root);
var availableCharsets = rdfContainer.GetElements();

Просмотреть файл

@ -55,14 +55,11 @@ try
pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService();
if (RDF) RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
RDF = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
RDFC = Components.classes["@mozilla.org/rdf/container;1"].getService();
if (RDFC) RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer);
RDFC = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer);
RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService();
if (RDFCUtils) RDFCUtils = RDFCUtils.QueryInterface(Components.interfaces.nsIRDFContainerUtils);
RDFCUtils = Components.classes["@mozilla.org/rdf/container-utils;1"].getService(Components.interfaces.nsIRDFContainerUtils);
}
catch(e)
{