rem: this.dump( "Exception testing if mime type entry exists: " + all + "\n" ); 
add:  ds = rdf.GetDataSource( file_url.spec ); 
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;        try {            var mimeRes = rdf.GetResource( "urn:mimetype:" + this.mLauncher.MIMEInfo.MIMEType );            var fileLocator = Components.classes[ "@mozilla.org/file/directory_service;1" ].getService( Components.interfaces.nsIProperties );            var file = fileLocator.get( "UMimTyp", Components.interfaces.nsIFile );            var file_url = Components.classes[ "@mozilla.org/network/standard-url;1" ].createInstance( Components.interfaces.nsIFileURL );            if ( file_url ) {                file_url.file = file;            }            var ds = rdf.GetDataSource( file_url.spec ).QueryInterface( Components.interfaces.nsIRDFDataSource );            // The next line will produce "blocking load requested when async load pending" and an NS_ERROR_FAILURE            //ds.QueryInterface( Components.interfaces.nsIRDFRemoteDataSource.Refresh( true );            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 );        } catch ( all ) {this.dump( "Exception testing if mime type entry exists: " + all + "\n" );        }        if ( exists ) {            // Open "edit mime type" dialog.            this.mDialog.openDialog( "chrome://communicator/content/pref/pref-applications-edit.xul",                                     "appEdit",                                     "chrome,modal=yes,resizable=no",                                     this );        } else {            // Open "add mime type" dialog.            this.mDialog.openDialog( "chrome://communicator/content/pref/pref-applications-new.xul",                                     "appEdit",                                     "chrome,modal=yes,resizable=no",                                     this );        }        // Refresh dialog with updated info.        this.initIntro();        this.initExplanation();    },
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/7a1c4d2c69f483a4524b43e446c4278a78630ed2/nsHelperAppDlg.js/clean/embedding/components/ui/helperAppDlg/nsHelperAppDlg.js