Closed
Bug 489869
Opened 16 years ago
Closed 16 years ago
Create a new nsISessionStore interface for 1.9.1 branch
Categories
(Firefox :: Session Restore, defect)
Tracking
()
VERIFIED
FIXED
Firefox 3.5
People
(Reporter: zpao, Assigned: zpao)
References
Details
(Keywords: fixed1.9.1)
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
beltzner
:
approval1.9.1+
|
Details | Diff | Splinter Review |
Bug 394759 added to the session store IDL but didn't rev the uuid (on branch only), so binary extensions can't use the methods added.
Flags: blocking-firefox3.5?
Updated•16 years ago
|
Assignee | ||
Comment 1•16 years ago
|
||
The patch (doing it how I think Gavin said I was supposed to)
Attachment #375209 -
Flags: review?(zeniko)
Comment 2•16 years ago
|
||
Comment on attachment 375209 [details] [diff] [review]
Patch v0.1
>+interface nsISessionStore_MOZILLA_1_9_1 : nsISupports
Any reason for not inheriting from nsISessionStore so that 1.9.1 extensions can just QI for this interface and get everything?
> QueryInterface: XPCOMUtils.generateQI([Ci.nsISessionStore,
> Ci.nsIDOMEventListener,
> Ci.nsIObserver,
>- Ci.nsISupportsWeakReference]),
>+ Ci.nsISupportsWeakReference,
>+ Ci.nsISessionStore_MOZILLA_1_9_1,
>+ Ci.nsIClassInfo]),
>+
>+ getInterfaces: function(countRef) {
>+ let interfaces = [Ci.nsISessionStore, Ci.nsIDOMEventListener,
>+ Ci.nsIObserver, Ci.nsISupportsWeakReference,
>+ Ci.nsISessionStore_MOZILLA_1_9_1, Ci.nsIClassInfo];
>+ countRef.value = interfaces.length;
>+ return interfaces;
>+ },
Is this redundancy really necessary?
>+ getHelperForLanguage: function(language) null,
Nit: Function arguments always have an a prefix in this file: aLanguage.
Attachment #375209 -
Flags: review?(zeniko)
Comment 3•16 years ago
|
||
(In reply to comment #2)
> Any reason for not inheriting from nsISessionStore so that 1.9.1 extensions can
> just QI for this interface and get everything?
nsIClassInfo should remove the need for people to worry about the branch interface entirely, right? I think that makes inheritance here unnecessary.
> Is this redundancy really necessary?
getInterfaces usually omits nsISupports, but including it probably doesn't hurt, so I suppose you could use a member variable to store the array of interfaces.
Assignee | ||
Comment 4•16 years ago
|
||
(In reply to comment #3)
> (In reply to comment #2)
> > Any reason for not inheriting from nsISessionStore so that 1.9.1 extensions can
> > just QI for this interface and get everything?
>
> nsIClassInfo should remove the need for people to worry about the branch
> interface entirely, right? I think that makes inheritance here unnecessary.
I'm new to this and not so familiar with C++/XPCOM/whatever, but doesn't it need to inherit for binary consumers to be able to use the nsISessionStore methods?
Comment 5•16 years ago
|
||
(In reply to comment #4)
> I'm new to this and not so familiar with C++/XPCOM/whatever, but doesn't it
> need to inherit for binary consumers to be able to use the nsISessionStore
> methods?
No, they can just QI to either of the interfaces. However, inheritance would avoid the need for that, and I can't really think of a reason not to do it, so feel free I guess.
Assignee | ||
Comment 6•16 years ago
|
||
Put the interfaces in a constant, added the other things needed for nsIClassInfo. It's on tryserver making sure it doesn't break anything
Attachment #375209 -
Attachment is obsolete: true
Attachment #375363 -
Flags: review?(zeniko)
Comment 7•16 years ago
|
||
Comment on attachment 375363 [details] [diff] [review]
Patch v0.2
Nit: s/countRef/aCountRef/.
BTW: Do we also have to revert nsISessionStore's IID?
r+=me with that fixed.
Attachment #375363 -
Flags: review?(zeniko) → review+
Assignee | ||
Comment 8•16 years ago
|
||
(In reply to comment #7)
> Nit: s/countRef/aCountRef/.
I meant to ask about that... since countRef is actually an out param, does it still get the "a" prefix?
> BTW: Do we also have to revert nsISessionStore's IID?
It got reverted before beta 4 freeze: http://hg.mozilla.org/releases/mozilla-1.9.1/rev/b057539eee94
Comment 9•16 years ago
|
||
(In reply to comment #8)
> since countRef is actually an out param, does it still get the "a" prefix?
It does: the "a" just stands for Argument (as opposed to "g" for Global and "m" for Module). For reference, see <https://developer.mozilla.org/en/JavaScript_style_guide#Function_and_variable_naming>
Assignee | ||
Comment 10•16 years ago
|
||
Attachment #375363 -
Attachment is obsolete: true
Attachment #375427 -
Flags: approval1.9.1?
Updated•16 years ago
|
Flags: blocking-firefox3.5? → blocking-firefox3.5-
Comment 11•16 years ago
|
||
Comment on attachment 375427 [details] [diff] [review]
Patch v1.0
a191=beltzner
Attachment #375427 -
Flags: approval1.9.1? → approval1.9.1+
Updated•16 years ago
|
Keywords: checkin-needed
Assignee | ||
Updated•16 years ago
|
Whiteboard: [needs 1.9.1 landing]
Comment 12•16 years ago
|
||
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed → fixed1.9.1
Resolution: --- → FIXED
Whiteboard: [needs 1.9.1 landing]
Updated•16 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•