Closed Bug 458756 Opened 16 years ago Closed 16 years ago

Use raw sqlite3_stmt pointers instead of the mozStorageStatement object for async statements

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.1b2

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

Attachments

(1 file)

We end up doing a lot of work that we don't have to do by wrapping it, and it also means we may not get accurate errors back (due to threading timing issues).  We could add more locks, but we don't need to if we use a raw statement.

We also end up doing less work on the calling thread (addref and release, among other things).
Attached patch v1.0Splinter Review
Attachment #341979 - Flags: review?(dcamp)
Blocks: 458811
Comment on attachment 341979 [details] [diff] [review]
v1.0

>+    // Reset the statement
>+    (void)sqlite3_finalize(mStatement);
>+
>+    // Notify about completion iff we have a callback.

Probably worth nulling out mStatement here.
Attachment #341979 - Flags: review?(dcamp) → review+
(In reply to comment #2)
> Probably worth nulling out mStatement here.
Fixed locally.  Thanks for the quick review.
Whiteboard: [has patch][has review][can land]
http://hg.mozilla.org/mozilla-central/rev/c98392bd35b3
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][can land]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: