rem: var fileurl = ioService.getURLSpecFromFile(file); 
add: var fileHandler = ioService.getProtocolHandler("file").QueryInterface(Components.interfaces.nsIFileProtocolHandler); var fileurl = fileHandler.getURLSpecFromFile(file); 
context:     setDefault: function() {        // Get RDF service.        var rdf = Components.classes[ "@mozilla.org/rdf/rdf-service;1" ]                    .getService( Components.interfaces.nsIRDFService );        // Now ask if it knows about this mime type.        var exists = false;        var fileLocator = Components.classes[ "@mozilla.org/file/directory_service;1" ]                            .getService( Components.interfaces.nsIProperties );        var file        = fileLocator.get( "UMimTyp", Components.interfaces.nsIFile );                // Get the data source; load it synchronously if it must be        // initialized.        var ioService = Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);        var fileurl = ioService.getURLSpecFromFile(file);                var ds = rdf.GetDataSourceBlocking( fileurl );        // Now check if this mimetype is really in there;        // This is done by seeing if there's a "value" arc from the mimetype resource        // to the mimetype literal string.        var mimeRes       = rdf.GetResource( "urn:mimetype:" + this.mLauncher.MIMEInfo.MIMEType );        var valueProperty = rdf.GetResource( "http://home.netscape.com/NC-rdf#value" );        var mimeLiteral   = rdf.GetLiteral( this.mLauncher.MIMEInfo.MIMEType );        exists =  ds.HasAssertion( mimeRes, valueProperty, mimeLiteral, true );        var dlgUrl;        if ( exists ) {            // Open "edit mime type" dialog.            dlgUrl = "chrome://communicator/content/pref/pref-applications-edit.xul";        } else {            // Open "add mime type" dialog.            dlgUrl = "chrome://communicator/content/pref/pref-applications-new.xul";        }        // Open whichever dialog is appropriate, passing this dialog object as argument.        this.updateSelf = false; // dialog will reset to true onOK        this.mDialog.openDialog( dlgUrl,                                 "_blank",                                 "chrome,modal=yes,resizable=no",                                 this );        if (this.updateSelf) {            // Refresh dialog with updated info about the default action.            this.initIntro();            this.initAppAndSaveToDiskValues();        }    },
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/c8bc7f67934b039af4b5b146ec2d2200958d3474/nsHelperAppDlg.js/clean/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js