Closed Bug 331801 Opened 19 years ago Closed 19 years ago

uncaught exception bookmarking about: or chrome: URIs

Categories

(Firefox :: Bookmarks & History, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Firefox 2 alpha2

People

(Reporter: philor, Assigned: mozilla)

References

()

Details

(Keywords: fixed1.8.1, Whiteboard: swag 1 (actual was ~1))

Attachments

(1 file, 2 obsolete files)

STR: 1. Open about:config or chrome://global/content/console.xul 2. Add Bookmark Result: Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsINavBookmarksService.getItemTitle]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: chrome://browser/content/places/bookmarkProperties.js :: BPP__populateProperties :: line 2707" data: no] and empty title and location in the Add Bookmark dialog.
Assignee: nobody → joe
Priority: -- → P3
Target Milestone: --- → Firefox 2 alpha2
Whiteboard: swag 1
Depends on: 332255
No longer depends on: 332255
Comment on attachment 216767 [details] [diff] [review] Patch to add exception-handling code (to handle unavailable metadata) when populating bookmark properties you should probably add to your comment though: // title not available, e.g. for about: or chrome: URIs.
Attachment #216767 - Flags: superreview?(bugs) → superreview+
I think GetItemTitle should be fixed. This looks like a 1 line change to SetIsVoid(PR_TRUE) and return when there are no results. Then you don't need the ugly JavaScript exception stuff.
I didn't comment that exception, because strictly speaking, those URIs *do* have titles as shown on the title bar and in the session history--it's just that (if I understand correctly) the history service isn't currently providing those titles, which bug 332255 would change.
Status: NEW → ASSIGNED
So, Brett, you going to land bug 332254 instead?
Depends on: 332254
I don't think the history service should provide title for those things. They aren't added to history, therefore there is no title, which I think is correct behavior. Do you want to do bug 332254? I'm in the middle of a lot of performance stuff.
Looking at the code for getKeywordForURI, it shouldn't except. Were you getting exceptions from that.
I don't think the folder title/type things should be changed. If they don't exist, then you have a reference to a bad folder ID which is bad and you should pay for it with pain. You should be getting folder IDs from the bookmark/history service and they should be valid, which is fundamentally different than URIs which come from anywhere and anybody can make them up. The rest looks good.
Attachment #216784 - Attachment is obsolete: true
Attachment #216786 - Flags: review?(brettw)
Attachment #216784 - Flags: superreview?(bugs)
Attachment #216784 - Flags: review?(brettw)
Comment on attachment 216786 [details] [diff] [review] Reverted the behavior of getFolderTitle() but added some documentation about its current behavior Perfect, thanks.
Attachment #216786 - Flags: review?(brettw) → review+
Attachment #216786 - Flags: superreview?(bugs)
Comment on attachment 216786 [details] [diff] [review] Reverted the behavior of getFolderTitle() but added some documentation about its current behavior cool. r=ben@mozilla.org
Attachment #216786 - Flags: superreview?(bugs) → superreview+
Landed on branch and trunk.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: swag 1 → swag 1 (actual was ~1)
Bug 451915 - move Firefox/Places bugs to Firefox/Bookmarks and History. Remove all bugspam from this move by filtering for the string "places-to-b-and-h". In Thunderbird 3.0b, you do that as follows: Tools | Message Filters Make sure the correct account is selected. Click "New" Conditions: Body contains places-to-b-and-h Change the action to "Delete Message". Select "Manually Run" from the dropdown at the top. Click OK. Select the filter in the list, make sure "Inbox" is selected at the bottom, and click "Run Now". This should delete all the bugspam. You can then delete the filter. Gerv
Component: Places → Bookmarks & History
QA Contact: places → bookmarks
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: