Closed
Bug 663269
Opened 13 years ago
Closed 13 years ago
Handle null livemarks siteURI
Categories
(Toolkit :: Places, defect)
Toolkit
Places
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: mak, Assigned: mak)
References
Details
(Whiteboard: [fixed-in-places])
Attachments
(1 file)
5.35 KB,
patch
|
dietrich
:
review+
|
Details | Diff | Splinter Review |
siteURI can be null, but we don't handle that, this patch makes so that if siteURI is null we fallback to feedURI, that can never be null. Sorry for lots of lm bugs, but I'm splitting my livemark refactoring patch in multiple bugs, the main patch will be big enough by itself.
Assignee | ||
Comment 1•13 years ago
|
||
Attachment #538383 -
Flags: review?(dietrich)
Comment 2•13 years ago
|
||
Comment on attachment 538383 [details] [diff] [review] patch v1.0 Review of attachment 538383 [details] [diff] [review]: ----------------------------------------------------------------- r=me ::: toolkit/components/places/PlacesUtils.jsm @@ +597,5 @@ > function gatherDataUrl(bNode) { > if (PlacesUtils.nodeIsLivemarkContainer(bNode)) { > + let uri = PlacesUtils.livemarks.getSiteURI(bNode.itemId) || > + PlacesUtils.livemarks.getFeedURI(bNode.itemId); > + return uri.spec + NEWLINE + bNode.title; hm, don't both of these throw? should we handle that in each of these cases in this patch?
Attachment #538383 -
Flags: review?(dietrich) → review+
Assignee | ||
Comment 3•13 years ago
|
||
(In reply to comment #2) > ::: toolkit/components/places/PlacesUtils.jsm > @@ +597,5 @@ > > function gatherDataUrl(bNode) { > > if (PlacesUtils.nodeIsLivemarkContainer(bNode)) { > > + let uri = PlacesUtils.livemarks.getSiteURI(bNode.itemId) || > > + PlacesUtils.livemarks.getFeedURI(bNode.itemId); > > + return uri.spec + NEWLINE + bNode.title; > > hm, don't both of these throw? should we handle that in each of these cases > in this patch? Well if it's a livemark it must have a feedURI, and may have an optional siteURI. So the former won't throw, the latter may, but it's unexpected so it's fine to throw.
Assignee | ||
Comment 4•13 years ago
|
||
http://hg.mozilla.org/projects/places/rev/2075b349013e
Whiteboard: [fixed-in-places]
Assignee | ||
Comment 5•13 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/2075b349013e
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla7
You need to log in
before you can comment on or make changes to this bug.
Description
•