Status

()

defect
RESOLVED FIXED
18 years ago
18 years ago

People

(Reporter: dougt, Assigned: dougt)

Tracking

Trunk
x86
Windows 2000
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

 
Blocks: 98278
I am not sure I like the comment describing this interface.  How is this:

A class factory allows creation of nsISupports derived objects without
specifying a concrete base class.  






r=dougt.  rick, can you sr=.

Comment on attachment 49250 [details] [diff] [review]
Updated patch based on Doug's comments

we need to change the references to 'NS_TRUE' and 'NS_FALSE' to PR_TRUE/FALSE .  These are the correct constants 
to use with PRBool.

Also, (minor nit) in the general description... i'd change '... nsISupports derived objects...' to 'nsISupports derived components...'
Also, you might want to add that if an 'outer' object is supplied, but the
component is not aggregatable, then 'NS_ERROR_NO_AGGREGATION' is returned.

I don't know if you want to mention that this interface is binary compatable
with COM's IClassFactory (assuming that it still is :-) )...
good catch.  chak, can you pop another patch?
Comment on attachment 49377 [details] [diff] [review]
Updated patch based on Rick's comments

sr=rpotts@netscape.com

looks good.
Attachment #49377 - Flags: superreview+
Changes just checked in. 

nsIFactory is now frozen
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
I just saw this bug when the update showed up in a notice on the meta-bug.

Why do we have nsIFactory::lockFactory?  How does it interact with
nsIModule::canUnload?

What is a "component", in the comment for createInstance?  I know what an object
is, but people use "component" to mean
  - binary DLL implementing some interfaces, 
  - thing that is registered for a contract ID,
  - XPI-bundle of component[1]s and other resources
  - service (long-lived, singleton object)

I think it's confusing to say that the method "creates an instance of a
component", and then say that it returns a "component".
> Why do we have nsIFactory::lockFactory?  

So that a factory can be held in memory if we ever support dynamic component
unloading.  

> How does it interact with nsIModule::canUnload?

I would guess that there would be a high level of interaction between these two
calls.  If I locked the factory, I would expect nsIModule::canUnload to
return false.  

> What is a "component", in the comment for createInstance?  I know what an
object is, but people use "component" to mean

I agree, we can replace the word 'object' for 'component' everywhere in that file.  
Talk me through needing to lock the factory in memory.  Who needs that?
nsIFactory is another one of those 'COM compatable' interfaces :-)

originally, LockFactory(...) was present because IClassFactory has it too.

-- rick
You need to log in before you can comment on or make changes to this bug.