Closed Bug 1441205 Opened 4 years ago Closed 4 years ago

XPTMethodDescriptor::result is unused

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
firefox60 --- fixed

People

(Reporter: mccr8, Assigned: mccr8)

Details

Attachments

(1 file)

I noticed this and was somewhat alarmed, but I think what is going on here is that a method either:
(1) is not notxpcom, in which case the result type is always nsresult so nothing reads it
(2) is xpcom, in which case it can only be called from C++, so the XPT information is irrelevant.

(2) suggests that we might be able to skip storing more data for notxpcom methods, unless there's something weird like script can enumerate over methods that it can't call.
Unsurprisingly, this does not have any measurable impact on memory usage, to the extent measured by about:memory.

I filed bug 1441222 on loading less information on methods not exposed to script.
Comment on attachment 8954076 [details]
Bug 1441205 - XPTMethodDescriptor::result is unused.

https://reviewboard.mozilla.org/r/223228/#review229402
Attachment #8954076 - Flags: review?(n.nethercote) → review+
> Unsurprisingly, this does not have any measurable impact on memory usage, to
> the extent measured by about:memory.

Not even a single byte? That seems surprising...
(In reply to Nicholas Nethercote [:njn] from comment #4)
> Not even a single byte? That seems surprising...

This was just with two digits of precision. I forgot that if you check "verbose" it gives you the actual bytes... (Also I wonder if the arena allocation means that you only get some kind of arena page level granularity.)
Pushed by amccreight@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f9658f61fbe2
XPTMethodDescriptor::result is unused. r=njn
> (Also I wonder if the arena
> allocation means that you only get some kind of arena page level
> granularity.)

Ah, that might explain it.
https://hg.mozilla.org/mozilla-central/rev/f9658f61fbe2
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
You need to log in before you can comment on or make changes to this bug.