Closed Bug 1294645 Opened 8 years ago Closed 8 years ago

Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

Slightly less than half (93 / 210) of the NS_METHOD instances in the codebase
are because of the use of NS_CALLBACK in
nsI{Input,Output,UnicharInput},Stream.idl. The use of __stdcall on Win32 isn't
important for these callbacks because they are only used as arguments to
[noscript] methods.

This patch converts them to vanilla |nsresult| functions. It increases the size
of xul.dll by about ~600 bytes, which is about 0.001%.
Comment on attachment 8780414 [details] [diff] [review]
Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl

Review of attachment 8780414 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for including the size comparison. :)  One less thing to think about when using these classes and callbacks--which always confuse me.
Attachment #8780414 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/360df5276cf6e2d7294ce0e122952cf56bc5372e
Bug 1294645 - Don't use NS_CALLBACK for callbacks in nsI{Input,Output,UnicharInput},Stream.idl. r=froydnj.
https://hg.mozilla.org/mozilla-central/rev/360df5276cf6
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
Blocks: 1295672
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: