Bug 1857431 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

We already use `[xpc::InitGlobalObjectOptions](https://searchfox.org/mozilla-central/rev/6602bdf9fff5020fbc8e248c963ddddf09a77b1b/js/xpconnect/src/nsXPConnect.cpp#485)` in two places to set-up some common RealmOption options. However we have a lot more places that create realms (globals) that could probably benefit from using this shared helper.

I don't really like having all these boolean parameters, but I don't have a good solution for it right now. One partial idea I had was to pass the ShouldResistFingerprinting function as a pointer to reduce the amount of code duplication and number of parameters?
We already use [xpc::InitGlobalObjectOptions](https://searchfox.org/mozilla-central/rev/6602bdf9fff5020fbc8e248c963ddddf09a77b1b/js/xpconnect/src/nsXPConnect.cpp#485) in two places to set-up some common RealmOption options. However we have a lot more places that create realms (globals) that could probably benefit from using this shared helper.

I don't really like having all these boolean parameters, but I don't have a good solution for it right now. One partial idea I had was to pass the ShouldResistFingerprinting function as a pointer to reduce the amount of code duplication and number of parameters?

Back to Bug 1857431 Comment 0