Clean up OS X sandbox setup code related to MacSandboxInfo

RESOLVED FIXED in Firefox 56

Status

()

defect
--
minor
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: haik, Assigned: Alex_Gaynor)

Tracking

48 Branch
mozilla56
Points:
---

Firefox Tracking Flags

(firefox48 affected, firefox56 fixed)

Details

(Whiteboard: sb+)

Attachments

(1 attachment)

In the call to StartMacSandbox(MacSandboxInfo aInfo) we pass an instance of a MacSandBoxInfo struct. The struct has a constructor which duplicates several std::string objects. Instead, we could pass aInfo as a const reference and avoid all the string copies.

Additionally, if we need to copy the strings, using the default compiler generated version might be equivalent. We can enabled using the new =default syntax.

GMP also uses some of the same sandbox setup code and might need some cleanup too.
Assignee: nobody → haftandilian
Whiteboard: sb+
See Also: → 1261751
Assignee: haftandilian → agaynor
Comment on attachment 8891468 [details]
Bug 1264811 - Use a const reference and a default constructor to simplify the macOS sandbox code;

https://reviewboard.mozilla.org/r/162610/#review167940

Thanks for fixing this.
Attachment #8891468 - Flags: review?(haftandilian) → review+
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/cc29c0db027b
Use a const reference and a default constructor to simplify the macOS sandbox code; r=haik
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/cc29c0db027b
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.