diff --git a/extensions/transformiix/resources/buster/buster-files.js b/extensions/transformiix/resources/buster/buster-files.js index f8e80c06cb2..a986a83cd18 100644 --- a/extensions/transformiix/resources/buster/buster-files.js +++ b/extensions/transformiix/resources/buster/buster-files.js @@ -70,7 +70,7 @@ var cmdFileController = this.content += aContent; return aCount; }; - serial.init(view.memoryDataSource); + serial.init(view.mResultDS); serial.QueryInterface(nsIRDFXMLSource); serial.Serialize(sink); if (!sink.content.length) { @@ -103,14 +103,12 @@ var cmdFileController = if (res == nsIFilePicker.returnOK) { var fl = fp.file; - if (view.previousResults) { - view.database.RemoveDataSource(view.previousResults); - view.previousResults = null; + if (view.mPreviousResultDS) { + view.database.RemoveDataSource(view.mPreviousResultDS); + view.mPreviousResultDS = null; } - view.database.RemoveDataSource(view.memoryDataSource); - view.previousResults = kRDFSvc.GetDataSource(fp.fileURL.spec); - view.database.AddDataSource(view.previousResults); - view.database.AddDataSource(view.memoryDataSource); + view.mPreviousResultDS = kRDFSvc.GetDataSource(fp.fileURL.spec); + view.database.AddDataSource(view.mPreviousResultDS); } document.getElementById('obs_orig_success') diff --git a/extensions/transformiix/resources/buster/buster-statics.js b/extensions/transformiix/resources/buster/buster-statics.js index 63a576a9ac4..0a4cef66548 100644 --- a/extensions/transformiix/resources/buster/buster-statics.js +++ b/extensions/transformiix/resources/buster/buster-statics.js @@ -63,9 +63,12 @@ const nsIFilePicker = Components.interfaces.nsIFilePicker; const nsIXULTreeBuilder = Components.interfaces.nsIXULTreeBuilder; const nsIXULTemplateBuilder = Components.interfaces.nsIXULTemplateBuilder; const kIOSvc = Components.classes[kIOSvcContractID] - .getService(Components.interfaces.nsIIOService); + .getService(Components.interfaces.nsIIOService); const nsIRDFService = Components.interfaces.nsIRDFService; const nsIRDFDataSource = Components.interfaces.nsIRDFDataSource; +const nsIRDFRemoteDataSource = Components.interfaces.nsIRDFRemoteDataSource; +const nsIRDFPurgeableDataSource = + Components.interfaces.nsIRDFPurgeableDataSource; const nsIRDFResource = Components.interfaces.nsIRDFResource; const nsIRDFLiteral = Components.interfaces.nsIRDFLiteral; const nsIRDFInt = Components.interfaces.nsIRDFInt; diff --git a/extensions/transformiix/resources/buster/buster-test.js b/extensions/transformiix/resources/buster/buster-test.js index bb74f2cd7ee..1810e27bbce 100644 --- a/extensions/transformiix/resources/buster/buster-test.js +++ b/extensions/transformiix/resources/buster/buster-test.js @@ -48,7 +48,7 @@ var runQueue = }, observe : function(aSubject, aTopic, aData) { - item = this.mArray.shift(); + var item = this.mArray.shift(); if (item) { item.run(this); } @@ -81,11 +81,10 @@ var itemCache = } return first; } - var retItem = this.mArray[aResource.Value]; - if (retItem) { - return retItem; + if (aResource.Value in this.mArray) { + return this.mArray[aResource.Value]; } - retItem = new runItem(aResource); + var retItem = new runItem(aResource); this.mArray[aResource.Value] = retItem; runQueue.push(retItem); return retItem; @@ -167,8 +166,8 @@ runItem.prototype = cat = cat.QueryInterface(nsIRDFLiteral); name = name.QueryInterface(nsIRDFLiteral); path = path.QueryInterface(nsIRDFLiteral); - xalan_fl = this.kXalan.resolve(cat.Value+"/"+path.Value); - xalan_ref = this.kXalan.resolve(cat.Value+"-gold/"+path.Value); + var xalan_fl = this.kXalan.resolve(cat.Value+"/"+path.Value); + var xalan_ref = this.kXalan.resolve(cat.Value+"-gold/"+path.Value); dump(name.Value+" links to "+xalan_fl+"\n"); } // Directory selected @@ -182,7 +181,6 @@ runItem.prototype = m += 1; child = children.getNext(); child.QueryInterface(nsIRDFResource); - //var aFoo = new runItem(child); } } var refContent = this.loadTextFile(xalan_ref+".out"); @@ -241,10 +239,6 @@ runItem.prototype = isGood = false; }; dump("This succeeded. "+isGood+"\n"); - if (!isGood) { - DumpDOM(this.mResDoc); - DumpDOM(this.mRefDoc); - } isGood = isGood.toString(); for (var i=0; i