Code review comment for lp:~urbanape/bindwood/dbus-and-local-uuids

Revision history for this message
Zachery Bir (urbanape) wrote :

This has lp:~sil/bindwood/design-view and lp:~sil/bindwood/find-desktop-couch-with-dbus merged in, as well as the work I did supporting internally-generated uuids for bookmarks. There are still a few rough spots to be worked out:

=== TODO ===

This code has been fixed to use the suggested style (creating a new nsIURI, rather than just poking the .spec struct member):

... sync.js +341
                    if (metadata.spec != bm.uri) {
                        try {
                            metadata = Bindwood.ioService.newURI(bm.uri, null, null);
                        } catch(e) {
                            Bindwood.writeError("Problem creating a new URI for bookmark", e);
                        }
                        Bindwood.bookmarksService.changeBookmarkURI(itemId, metadata);
                    }
...

This fails when dealing with a bookmark whose URI looks like this:
  `place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&queryType=1&sort=12&excludeItemIfParentHasAnnotation=livemark%2FfeedURI&maxResults=10&excludeQueries=1`

The problem is that while bookmarksService.getBookmarkURI(thatBookmark) will produce the `place:folder=...` URI spec, the IIOService.newURI() function fails when given that spec to create a URI for the updated bookmark. So, we'll likely need to special case these and either ignore them or find the proper way to spell BookmarkURIs for livemarks, &c.

« Back to merge proposal