mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 12:55:46 +00:00
allow rdf:datasource;param=var (r=waterson)
This commit is contained in:
parent
75836d64c2
commit
4103653589
@ -872,7 +872,7 @@ ServiceImpl::GetDataSource(const char* uri, nsIRDFDataSource** aDataSource)
|
||||
|
||||
// Safely convert it to a C-string for the XPCOM APIs
|
||||
char buf[64];
|
||||
char* progID = buf;
|
||||
char* progID = buf, *p;
|
||||
if (progIDStr.Length() >= sizeof(buf))
|
||||
progID = new char[progIDStr.Length() + 1];
|
||||
|
||||
@ -881,6 +881,11 @@ ServiceImpl::GetDataSource(const char* uri, nsIRDFDataSource** aDataSource)
|
||||
|
||||
progIDStr.ToCString(progID, progIDStr.Length() + 1);
|
||||
|
||||
/* strip params to get ``base'' progID for data source */
|
||||
p = PL_strchr(progID, ';');
|
||||
if (p)
|
||||
*p = '\0';
|
||||
|
||||
rv = nsComponentManager::CreateInstance(progID, nsnull,
|
||||
nsIRDFDataSource::GetIID(),
|
||||
getter_AddRefs(ds));
|
||||
|
Loading…
Reference in New Issue
Block a user