Closed Bug 711447 Opened 13 years ago Closed 13 years ago

Close connection in nsPermissionManager

Categories

(Core :: Networking: Cookies, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: espindola, Assigned: espindola)

References

Details

(Whiteboard: [Snappy:p1])

Attachments

(1 file, 2 obsolete files)

No description provided.
Attached patch Close connection in nsPermissionManager (obsolete) (deleted) — Splinter Review
Assignee: nobody → respindola
Status: NEW → ASSIGNED
Attachment #582267 - Flags: review?(mak77)
Comment on attachment 582267 [details] [diff] [review] Close connection in nsPermissionManager Review of attachment 582267 [details] [diff] [review]: ----------------------------------------------------------------- looks ok
Attachment #582267 - Flags: review?(mak77) → review+
Comment on attachment 582267 [details] [diff] [review] Close connection in nsPermissionManager Review of attachment 582267 [details] [diff] [review]: ----------------------------------------------------------------- ::: extensions/cookie/nsPermissionManager.cpp @@ +797,5 @@ > mStmtInsert = nsnull; > mStmtDelete = nsnull; > mStmtUpdate = nsnull; > + mozilla::DebugOnly<nsresult> rv = mDBConn->Close(); > + MOZ_ASSERT(NS_SUCCEEDED(rv)); You should add a helper method to this and make this and `RemoveAllInternal` call the helper. We were doing it right in one place, but not the other.
Attachment #582267 - Flags: review-
Component: Storage → Networking: Cookies
Product: Toolkit → Core
QA Contact: storage → networking.cookies
Version: unspecified → Trunk
Comment on attachment 582835 [details] [diff] [review] Close connection in nsPermissionManager Review of attachment 582835 [details] [diff] [review]: ----------------------------------------------------------------- ::: extensions/cookie/nsPermissionManager.cpp @@ +620,5 @@ > return rv; > } > > +void > +nsPermissionManager::CloseDBInternal() I don't like the Internal suffix here, we usually use it when there's another exposed method with the same name, that's not this case, just CloseDB() will be fine afaict. @@ +646,1 @@ > mDBConn = nsnull; you can move this inside the helper "if (mDBConn)" scope ::: extensions/cookie/nsPermissionManager.h @@ +221,5 @@ > PRUint32 aExpireType, > PRInt64 aExpireTime, > const PRUnichar *aData); > void NotifyObservers(nsIPermission *aPermission, const PRUnichar *aData); > + void CloseDBInternal(); this may like a nice but simple javadoc explaining what it does.
This implement all the comments, except for the javadoc, since the file had no javadoc I just added a plain comment. https://tbpl.mozilla.org/?tree=Try&rev=8e4a8b9a5073
Attachment #582835 - Attachment is obsolete: true
Attachment #582835 - Flags: review?(sdwilsh)
Attachment #582835 - Flags: review?(mak77)
Attachment #582972 - Flags: review?(mak77)
Comment on attachment 582972 [details] [diff] [review] Close connection in nsPermissionManager Review of attachment 582972 [details] [diff] [review]: ----------------------------------------------------------------- I don't have further comments, I'm forwarding final review to either swilsh or dwitte, on a first come first serve handling, since sdwilsh appears to be on vacation
Attachment #582972 - Flags: review?(sdwilsh)
Attachment #582972 - Flags: review?(mak77)
Attachment #582972 - Flags: review?(dwitte)
Attachment #582972 - Flags: feedback+
Blocks: 662444
Whiteboard: [Snappy:p1]
Comment on attachment 582972 [details] [diff] [review] Close connection in nsPermissionManager Review of attachment 582972 [details] [diff] [review]: ----------------------------------------------------------------- Looks fine to me too. I can't technically r+ this, so f+ at taras's request.
Attachment #582972 - Flags: feedback+
Comment on attachment 582972 [details] [diff] [review] Close connection in nsPermissionManager Looks good, thanks. r=dwitte
Attachment #582972 - Flags: review?(sdwilsh)
Attachment #582972 - Flags: review?(dwitte)
Attachment #582972 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: