Closed Bug 1264811 Opened 8 years ago Closed 7 years ago

Clean up OS X sandbox setup code related to MacSandboxInfo

Categories

(Core :: Security: Process Sandboxing, defect)

48 Branch
defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox48 --- affected
firefox56 --- fixed

People

(Reporter: haik, Assigned: Alex_Gaynor)

References

Details

(Whiteboard: sb+)

Attachments

(1 file)

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: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.