remove hasAnno check for bookmark description

RESOLVED FIXED in Firefox 3.6a1

Status

()

RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: dietrich, Assigned: dietrich)

Tracking

({perf})

Trunk
Firefox 3.6a1
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [TSnappiness])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

9 years ago
Created attachment 377213 [details] [diff] [review]
v1

one less query.
Attachment #377213 - Flags: review?(mak77)
(Assignee)

Updated

9 years ago
Whiteboard: [TSnappiness]
Attachment #377213 - Flags: review?(mak77) → review+
Comment on attachment 377213 [details] [diff] [review]
v1

>diff --git a/browser/components/places/content/treeView.js b/browser/components/places/content/treeView.js

>       case this.COLUMN_TYPE_DESCRIPTION:
>-        const annos = PlacesUtils.annotations;
>-        if (annos.itemHasAnnotation(node.itemId, DESCRIPTION_ANNO))
>-          return annos.getItemAnnotation(node.itemId, DESCRIPTION_ANNO)
>+        if (node.itemId != -1) {
>+          const annos = PlacesUtils.annotations;

is this really needed?

>+          try {
>+            return annos.getItemAnnotation(node.itemId, DESCRIPTION_ANNO)

missing final semicolon.

>+          }
>+          catch (ex) {
>+            /* has no description */
>+          }

what about making catch on a single line: catch (ex) { /* has no description */ } ? looks like should be easier to follow what code is doing (feel free to ignore me here if you prefer this style)
(Assignee)

Comment 2

9 years ago
Created attachment 377260 [details] [diff] [review]
for checkin
Assignee: nobody → dietrich
Attachment #377213 - Attachment is obsolete: true
(Assignee)

Updated

9 years ago
Whiteboard: [TSnappiness] → [TSnappiness][has patch][has review][can land]
http://hg.mozilla.org/mozilla-central/rev/95e15728ccae
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Whiteboard: [TSnappiness][has patch][has review][can land] → [TSnappiness]
Target Milestone: --- → Firefox 3.6a1
You need to log in before you can comment on or make changes to this bug.