Closed
Bug 291721
Opened 20 years ago
Closed 20 years ago
add ClassInfo to item and other interfaces
Categories
(Calendar :: Internal Components, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: vlad)
Details
Attachments
(1 file)
|
9.61 KB,
patch
|
shaver
:
first-review+
|
Details | Diff | Splinter Review |
To avoid QueryInterface() lameness, implement CI so that interface flattening
can happen in JS.
| Assignee | ||
Comment 1•20 years ago
|
||
| Assignee | ||
Updated•20 years ago
|
Attachment #181706 -
Flags: first-review?(shaver)
Comment 2•20 years ago
|
||
Comment on attachment 181706 [details] [diff] [review]
cal-add-classinfo.patch
>Index: calAttendee.js
>
>+calAttendeeClassInfo = {
>+ getInterfaces: function (count) {
[...]
>+ flags: 0
>+};
>+
>+
> calAttendee.prototype = {
> QueryInterface: function (aIID) {
> if (!aIID.equals(Components.interfaces.nsISupports) &&
> !aIID.equals(Components.interfaces.calIAttendee))
> {
> throw Components.results.NS_ERROR_NO_INTERFACE;
> }
You should return the classinfo here, no?
> calEvent.prototype = {
> __proto__: calItemBase ? (new calItemBase()) : {},
>
> QueryInterface: function (aIID) {
> if (aIID.equals(Components.interfaces.calIEvent))
> return this;
>
>+ if (aIID.equals(Components.interfaces.nsIClassInfo))
>+ return calEventClassInfo;
>+
> return this.__proto__.__proto__.QueryInterface.call(this, aIID);
> },
What say you to just making this sClassInfo on the prototype, and teaching
calItemBase's QI to return this.sClassInfo for nsIClassInfo?
I guess it only saves event and todo for now, so I'm not that picky, but I
thought I'd mention it.
r=shaver if you actually return the attendee's classinfo somewhere, and check
once for each class in xpcshell that the right things happen. =)
Attachment #181706 -
Flags: first-review?(shaver) → first-review+
| Assignee | ||
Comment 3•20 years ago
|
||
fixed and committed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•