[Project_owners] Re: isBookmarked() troubles

Neil neil at parkwaycc.co.uk
Sat Jul 16 22:02:58 EDT 2005

HJ wrote:

> I tried to fix a bug in my source, but when I use something like this:
> bookmarksService = 
> Components.classes["@mozilla.org/browser/bookmarks-service;1"].getService(Components.interfaces.nsIBookmarksService); 
> bookmarksService.isBookmarked(String(aURL));
> it throws thew following error:
> Error: uncaught exception: [Exception... "Component returned failure 
> code: 0x8000ffff (NS_ERROR_UNEXPECTED) 
> [nsIBookmarksService.isBookmarked]"  nsresult: "0x8000ffff 
> (NS_ERROR_UNEXPECTED)"  location: "JS frame :: xxx :: isBookmarked :: 
> line xxx"  data: no]

It's a poor choice of error code; NS_ERROR_NOT_INITIALISED would have 
been better. You need to call ReadBookmarks first. The navigator chrome 
calls it after a delay for performance reasons.

More information about the Project_owners mailing list