Closed Bug 207864 Opened 17 years ago Closed 11 years ago

Some things GetService "@mozilla.org/rdf/container;1"

Categories

(SeaMonkey :: UI Design, defect, minor)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

References

()

Details

Attachments

(5 files)

I'm not certain that this is wrong, so feel free to correct me if i'm wrong.
Depends on: 218208
No longer depends on: 218208
It works, but they probably shouldn't be doing it.
Severity: normal → minor
Status: UNCONFIRMED → NEW
Ever confirmed: true
This is not an rdf bug, please file bugs for the affected components.
Attached patch createInstanceSplinter Review
Attachment #146740 - Flags: review?(neil.parkwaycc.co.uk)
Status: NEW → ASSIGNED
Component: RDF → XP Apps: GUI Features
Comment on attachment 146740 [details] [diff] [review]
createInstance

>-const RDFContainer = Components.classes["@mozilla.org/rdf/container;1"].getService(Components.interfaces.nsIRDFContainer);
>+const RDFContainer = Components.classes["@mozilla.org/rdf/container;1"].createInstance(Components.interfaces.nsIRDFContainer);
Possible abuse of RDFContainer here - it gets Init()ed multiple times.
Even if that's allowable IMHO this should say var rather than const.

>-  RDFC = Components.classes["@mozilla.org/rdf/container;1"].getService();
>+  RDFC = Components.classes["@mozilla.org/rdf/container;1"].createInstance();
>   if (RDFC) RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer);
r=me (subject to possible r- above) if you fix the bad createInstance fu.
Attachment #146740 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #146740 - Flags: superreview?(jag)
Comment on attachment 146740 [details] [diff] [review]
createInstance

I'm guessing Neil meant to say something like "combine those two statements
into one" for the search-editor.js part of the patch. If not, I say go ahead
and do it. sr=jag with that.

Though unspecified, I believe init can be called multiple times to
"reinitialize" the container to the new context. RDFContainerImpl::Init seems
to have been written with this in mind.
Attachment #146740 - Flags: superreview?(jag) → superreview+
I wrote exactly what I meant to write, but it meant what jag wrote ;-)
Product: Core → Mozilla Application Suite
timeless,
Are you still working on this ?
Component: XP Apps: GUI Features → UI Design
Attachment #355359 - Flags: review?(mkmelin+mozilla)
QA Contact: ui-design
Attached patch toolkit/InstanceSplinter Review
Attachment #355360 - Flags: review?(gavin.sharp)
Attachment #355360 - Flags: review?(gavin.sharp) → review+
Attachment #355361 - Attachment description: suite/Instace → suite/Instance
Okay, I should have put this one in either the toolkit or the suite patch (though I couldn't, really, crossing repos), but suitekit's pretty cute, for an afterthought.
Attachment #355362 - Flags: review?(neil)
Attachment #355361 - Flags: review?(neil) → review+
Attachment #355362 - Flags: review?(neil) → review+
Attachment #355359 - Flags: review?(mkmelin+mozilla) → review+
OS: Windows 2000 → All
Hardware: x86 → All
Comment on attachment 355361 [details] [diff] [review]
suite/Instance [checked in]

http://hg.mozilla.org/comm-central/rev/610f02e3c92c
Attachment #355361 - Attachment description: suite/Instance → suite/Instance [checked in]
Comment on attachment 355359 [details] [diff] [review]
mail/Instance [checked in]

http://hg.mozilla.org/comm-central/rev/f4eb87ffd715
Attachment #355359 - Attachment description: mail/Instance → mail/Instance [checked in]
http://hg.mozilla.org/mozilla-central/rev/8dcbd3d42d68
http://hg.mozilla.org/mozilla-central/rev/562fa5121cec

Close enough: please to be filing new bugs for any instances I might have missed.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.