Changed nsINavBookmarks::getItemTitle() and ::getKeywordForURI() so that

they return a void string (null in JS) when they can't find matches, rather
than throwing an illegal argument exception or returning an empty string,
respectively.  This fixes a problem when bookmarking about: URIs.

bug=331801
r=brettw@gmail.com
sr=ben@mozilla.org

Original committer: joe%retrovirus.com
Original revision: 1.25
Original date: 2006/03/30 22:56:13
This commit is contained in:
benjamin%smedbergs.us 2006-07-18 17:33:27 +00:00
Родитель c7dc519333
Коммит b5aeac3634
1 изменённых файлов: 9 добавлений и 3 удалений

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

@ -343,6 +343,10 @@ interface nsINavBookmarksService : nsISupports
/**
* Get the history/bookmark title for the URI.
*
* If no item title is available (for instance, if the URI doesn't appear
* in the bookmarks or history), it will return a void string (null in JS).
*
* @param uri The URI whose title should be retrieved
* @returns The title for the URI.
*/
@ -356,7 +360,9 @@ interface nsINavBookmarksService : nsISupports
void setFolderTitle(in PRInt64 folder, in AString title);
/**
* Get the title for a bookmark folder.
* Get the title for a bookmark folder. Throws an invalid argument
* exception if it can't find a folder with the given ID.
*
* @param folder The folder whose title should be retrieved
* @returns The title for the folder
*/
@ -451,8 +457,8 @@ interface nsINavBookmarksService : nsISupports
void setKeywordForURI(in nsIURI uri, in AString keyword);
/**
* Retrieves the keyword for the given URI. Will be empty if no such
* keyword is found.
* Retrieves the keyword for the given URI. Will be void string
* (null in JS) if no such keyword is found.
*/
AString getKeywordForURI(in nsIURI uri);