Closed
Bug 711554
Opened 12 years ago
Closed 12 years ago
finalize statements and close connection
Categories
(Firefox :: Search, defect)
Tracking
()
RESOLVED
FIXED
Firefox 12
People
(Reporter: espindola, Assigned: espindola)
Details
Attachments
(1 file, 3 obsolete files)
1.81 KB,
patch
|
mak
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=7e534723652b
Comment 2•12 years ago
|
||
Comment on attachment 582336 [details] [diff] [review] finalize statements and close connection Review of attachment 582336 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/search/nsSearchService.js @@ +3622,5 @@ > + closeDB: function epsCloseDB() { > + this.mInsertData.finalize(); > + this.mDeleteData.finalize(); > + this.mGetData.finalize(); > + this.mDB.close(); all of these are getters, you may be initing them there ideally. Before finalizing or closing you should ensure if they are still getters or not with Object.getOwnPropertyDescriptor(this, "property").value !== undefined it's probably simpler to put the properties names in a temp array and loop it.
Attachment #582336 -
Flags: review?(mak77) → review-
Assignee | ||
Comment 3•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=fbf33829a451
Attachment #582336 -
Attachment is obsolete: true
Attachment #583207 -
Flags: review?(mak77)
Comment 4•12 years ago
|
||
Comment on attachment 583207 [details] [diff] [review] finalize statements and close connection Review of attachment 583207 [details] [diff] [review]: ----------------------------------------------------------------- ::: toolkit/components/search/nsSearchService.js @@ +3624,5 @@ > + this.mInsertData.finalize(); > + if (this.getOwnPropertyDescriptor(this, "mDeleteData").value !== undefined) > + this.mDeleteData.finalize(); > + if (this.getOwnPropertyDescriptor(this, "mGetData").value !== undefined) > + this.mGetData.finalize(); something like this may work ["mInsertData", "mDeleteData", "mGetData"].forEach(function(aStmt) { if (Object.getOwnPropertyDescriptor(this, aStmt).value !== undefined) this[aStmt].finalize(); }, this); @@ +3625,5 @@ > + if (this.getOwnPropertyDescriptor(this, "mDeleteData").value !== undefined) > + this.mDeleteData.finalize(); > + if (this.getOwnPropertyDescriptor(this, "mGetData").value !== undefined) > + this.mGetData.finalize(); > + this.mDB.close(); also mDB is a lazy getter, it should be handled similarly as the statements.
Attachment #583207 -
Flags: review?(mak77) → review-
Assignee | ||
Comment 5•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=98457fae3a7d
Attachment #583207 -
Attachment is obsolete: true
Attachment #583544 -
Flags: review?(mak77)
Assignee | ||
Comment 6•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=1f8b2d452ff8
Attachment #583544 -
Attachment is obsolete: true
Attachment #583544 -
Flags: review?(mak77)
Attachment #583561 -
Flags: review?(mak77)
Comment 7•12 years ago
|
||
Comment on attachment 583561 [details] [diff] [review] finalize statements and close connection Review of attachment 583561 [details] [diff] [review]: ----------------------------------------------------------------- looks good
Attachment #583561 -
Flags: review?(mak77) → review+
Assignee | ||
Comment 8•12 years ago
|
||
https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=c0b49e61e2fd
Comment 9•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c0b49e61e2fd
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
You need to log in
before you can comment on or make changes to this bug.
Description
•