From b07ac299a1aaa4e76356184c8d47df7e321571e2 Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Tue, 18 Jul 2006 17:33:27 +0000 Subject: [PATCH] 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 git-svn-id: svn://10.0.0.236/trunk@202831 18797224-902f-48f8-a5cc-f745e15eee43 --- .../places/public/nsINavBookmarksService.idl | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mozilla/toolkit/components/places/public/nsINavBookmarksService.idl b/mozilla/toolkit/components/places/public/nsINavBookmarksService.idl index a1d82479669..2f3a95839da 100644 --- a/mozilla/toolkit/components/places/public/nsINavBookmarksService.idl +++ b/mozilla/toolkit/components/places/public/nsINavBookmarksService.idl @@ -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);