Fix bug # 47927: crash loading 2nd ftp URL. r=waterson

This commit is contained in:
rjc%netscape.com 2006-07-27 14:51:37 +00:00
Родитель 3bf035f68d
Коммит 7b0d86c14a
2 изменённых файлов: 3 добавлений и 2 удалений

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

@ -63,13 +63,14 @@ function Init()
// Note: Add the HTTPIndex datasource into the tree // Note: Add the HTTPIndex datasource into the tree
var tree = document.getElementById('tree'); var tree = document.getElementById('tree');
tree.database.AddDataSource(HTTPIndex.DataSource);
// Note: set encoding BEFORE setting "ref" (important!) // Note: set encoding BEFORE setting "ref" (important!)
var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService(); var RDF = Components.classes["component://netscape/rdf/rdf-service"].getService();
if (RDF) RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService); if (RDF) RDF = RDF.QueryInterface(Components.interfaces.nsIRDFService);
if (RDF) if (RDF)
{ {
var httpDS = RDF.GetDataSource("rdf:httpindex"); var httpDS = HTTPIndex.DataSource;
if (httpDS) httpDS = httpDS.QueryInterface(Components.interfaces.nsIHTTPIndex); if (httpDS) httpDS = httpDS.QueryInterface(Components.interfaces.nsIHTTPIndex);
if (httpDS) if (httpDS)
{ {

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

@ -36,7 +36,7 @@
<script src="chrome://communicator/content/directory/directory.js"></script> <script src="chrome://communicator/content/directory/directory.js"></script>
<tree id="tree" datasources="rdf:files rdf:httpindex" flex="1" style="height:0px;" <tree id="tree" datasources="rdf:files" flex="1" style="height:0px;"
container="true" open="true" container="true" open="true"
ondraggesture="return BeginDragTree(event);"> ondraggesture="return BeginDragTree(event);">
<template> <template>