Closed
Bug 329698
Opened 18 years ago
Closed 18 years ago
Write nsIAnnotationService::getAnnotations
Categories
(Firefox :: Bookmarks & History, defect, P1)
Firefox
Bookmarks & History
Tracking
()
RESOLVED
FIXED
Firefox 2 alpha1
People
(Reporter: brettw, Assigned: brettw)
References
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 2 obsolete files)
12.28 KB,
patch
|
bryner
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Updated•18 years ago
|
Priority: -- → P1
Target Milestone: --- → Firefox 2 alpha1
Assignee | ||
Comment 1•18 years ago
|
||
Please check memory management carefully and don't assume I know what I'm doing. It's easy to mess up with the stupid XPCOM arrays.
Attachment #214448 -
Flags: review?(joe)
Comment 2•18 years ago
|
||
Comment on attachment 214448 [details] [diff] [review] Patch Could you rename GetPageAnnotations to GetPageAnnotationNames, as it's more descriptive (since we aren't getting the annotation contents in this function). Also, since I don't have much experience with the finer points of Moz memory management, I recommend finding an additional reviewer to look this over. Otherwise looks good.
Attachment #214448 -
Flags: review?(joe) → review-
Assignee | ||
Comment 3•18 years ago
|
||
Attachment #214452 -
Flags: review?(joe)
Assignee | ||
Updated•18 years ago
|
Attachment #214452 -
Flags: superreview?(bryner)
Updated•18 years ago
|
Attachment #214452 -
Flags: review?(joe) → review+
Assignee | ||
Comment 4•18 years ago
|
||
Attachment #214448 -
Attachment is obsolete: true
Attachment #214452 -
Attachment is obsolete: true
Attachment #214456 -
Flags: review?(bryner)
Attachment #214452 -
Flags: superreview?(bryner)
Comment 5•18 years ago
|
||
Comment on attachment 214456 [details] [diff] [review] Patch with bryner's comments addressed >--- src/nsAnnotationService.cpp 7 Feb 2006 22:57:56 -0000 1.8 >+++ src/nsAnnotationService.cpp 8 Mar 2006 19:44:44 -0000 >+NS_IMETHODIMP >+nsAnnotationService::GetPageAnnotationNames(nsIURI* aURI, PRUint32* aCount, >+ nsIVariant*** _result) >+{ >+ *aCount = 0; >+ *_result = nsnull; >+ >+ nsTArray<nsCString> names; >+ nsresult rv = GetPageAnnotationNamesTArray(aURI, &names); >+ NS_ENSURE_SUCCESS(rv, rv); >+ if (! names.Length()) >+ return NS_OK; The general coding style is == 0 for integer comparisons, just so it's obvious that it's not a null pointer check. >+ for (PRUint32 i = 0; i < names.Length(); i ++) { >+ nsCOMPtr<nsIWritableVariant> var = >+ do_CreateInstance(NS_VARIANT_CONTRACTID, &rv); I'd prefer |new nsVariant()|, I guess (nsVariant is exported)
Attachment #214456 -
Flags: review?(bryner) → review+
Assignee | ||
Comment 6•18 years ago
|
||
On branch and trunk.
Comment 7•15 years ago
|
||
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.
Description
•