Open Bug 1340066 Opened 7 years ago Updated 8 months ago

pass primitive type argument by value instead of by const reference in ipc Send/Recv function

Categories

(Core :: IPC, defect, P3)

defect

Tracking

()

People

(Reporter: jerry, Unassigned)

References

(Depends on 1 open bug)

Details

Is it better to use "void func(const bool& aBool)" instead of "void func(bool aBool)" or "void func(const bool aBool)" in ipc Send/Recv functions?
With the reference, each access needs a dereference.
Are the modern compilers having the optimization for this use case?

e.g.
https://dxr.mozilla.org/mozilla-central/rev/0eef1d5a39366059677c6d7944cfe8a97265a011/dom/ipc/ContentBridgeChild.h#46
Is it worth it?
Flags: needinfo?(wmccloskey)
This might be something we could put off until the new Rust IPDL code generator lands.
Depends on: ripdl
Flags: needinfo?(wmccloskey)
What's the rust ipdl code gen? Could you please show the bug id?
Flags: needinfo?(wmccloskey)
sorry, I found it.
Flags: needinfo?(wmccloskey)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.