Closed Bug 1445073 Opened 6 years ago Closed 6 years ago

Pass XPTInterfaceDirectoryEntry into xptiInterfaceEntry::Create()

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

References

Details

Attachments

(1 file)

I'm trying to resist doing more cleanups in this code, but I keep stumbling over this little bit of cruftiness. XPTInterfaceInfoManager::VerifyAndAddEntryIfNew() takes a directory entry, pulls out the three pieces of it, then passes them to xptiInterfaceEntry::Create(). Passing in the directory entry is simpler. Also, it sets flags on the entry after Create() returns it, but the ctor could just set the flags itself. Finally, there's a comment that refers to a function SetHeader() which does not seem to exist any more.
Comment on attachment 8958257 [details]
Bug 1445073 - Pass XPTInterfaceDirectoryEntry into xptiInterfaceEntry::Create().

https://reviewboard.mozilla.org/r/227188/#review233040

Cleanups are good.

::: xpcom/reflect/xptinfo/xptiInterfaceInfoManager.cpp
(Diff revision 1)
> -                                       iface->mInterfaceDescriptor,
> -                                       typelib);
>      if (!entry)
>          return;
>  
> -    //XXX  We should SetHeader too as part of the validation, no?

Should this comment be preserved, by moving it into the constructor?
Attachment #8958257 - Flags: review?(n.nethercote) → review+
(In reply to Nicholas Nethercote [:njn] from comment #2)
> Should this comment be preserved, by moving it into the constructor?

Looking at the commit history, it looks like SetHeader was a method on some class called "xptiZipItem", which is long gone. I don't think there's any need for the comment.
Oh, you mentioned that in the commit msg. Sorry for the noise.
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f01ba44463a
Pass XPTInterfaceDirectoryEntry into xptiInterfaceEntry::Create(). r=njn
https://hg.mozilla.org/mozilla-central/rev/7f01ba44463a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: