Closed Bug 434796 Opened 16 years ago Closed 16 years ago

Remove mozIStorageStatement::initialize

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sdwilsh, Assigned: sdwilsh)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Right now mozIStorageStatement has an initialize method declared in the idl.  This has two problems currently:
1) It breaks the factory model that is prevalent throughout this module.
2) we have to unsafely static_cast the mozIStorageConnection object passed in to get the native database pointer to create the statement.

We can fix this by making Initialize a public method on mozStorageStatement, and have it take in a mozStorageConnection instead of a mozIStorageConnection.

This also let's us get rid of a few checks in the Initialize method as well.
This will also be needed for bug 429986 since I need a reliable way to get to the parent mozStorageConnection object.
Blocks: 429986
Attached patch v1.0Splinter Review
Fix as described in comment 0.  This passes storage unit tests locally.

Requesting sr due to API change.
Assignee: nobody → sdwilsh
Status: NEW → ASSIGNED
Attachment #321790 - Flags: superreview?(shaver)
Attachment #321790 - Flags: review?(vladimir)
Whiteboard: [has patch][needs review vlad][needs sr shaver]
Comment on attachment 321790 [details] [diff] [review]
v1.0

Sure, why not.
Attachment #321790 - Flags: review?(vladimir) → review+
Whiteboard: [has patch][needs review vlad][needs sr shaver] → [has patch][has review][needs sr shaver]
Comment on attachment 321790 [details] [diff] [review]
v1.0

sr=shaver
Attachment #321790 - Flags: superreview?(shaver) → superreview+
Whiteboard: [has patch][has review][needs sr shaver] → [has patch][has review][has sr][can land]
Posted to the newsgroup to get approval for this change in 1.9.1:
http://groups.google.com/group/mozilla.dev.platform/browse_thread/thread/0fd2edaef648790b#
Whiteboard: [has patch][has review][has sr][can land] → [has patch][has review][has sr]
Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/a2741a49c3fa
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Whiteboard: [has patch][has review][has sr]
Blocks: 485223
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: